summaryrefslogtreecommitdiff
path: root/puppet/modules/site_apt/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/site_apt/manifests/init.pp')
-rw-r--r--puppet/modules/site_apt/manifests/init.pp35
1 files changed, 31 insertions, 4 deletions
diff --git a/puppet/modules/site_apt/manifests/init.pp b/puppet/modules/site_apt/manifests/init.pp
index 80c6fbde..8821c110 100644
--- a/puppet/modules/site_apt/manifests/init.pp
+++ b/puppet/modules/site_apt/manifests/init.pp
@@ -1,6 +1,20 @@
-class site_apt {
+class site_apt {
- include ::apt
+ # on couchdb we need to include squeeze in apt preferences,
+ # so the cloudant package can pull some packages from squeeze
+ # template() must be unquoted !
+ if 'couchdb' in $::services {
+ $custom_preferences = template("site_apt/preferences.include_squeeze")
+ } else {
+ $custom_preferences = ''
+ }
+ class { 'apt':
+ custom_preferences => $custom_preferences,
+ custom_key_dir => 'puppet:///modules/site_apt/keys'
+ }
+
+ # enable http://deb.leap.se debian package repository
+ include site_apt::leap_repo
apt::apt_conf { '90disable-pdiffs':
content => 'Acquire::PDiffs "false";';
@@ -8,8 +22,21 @@ class site_apt {
include ::apt::unattended_upgrades
- apt::sources_list { 'fallback.list.disabled':
- content => template('site_apt/fallback.list');
+ apt::sources_list { 'secondary.list.disabled':
+ content => template('site_apt/secondary.list');
}
+ apt::preferences_snippet { 'facter':
+ release => "${::lsbdistcodename}-backports",
+ priority => 999
+ }
+
+ # All packages should be installed _after_ refresh_apt is called,
+ # which does an apt-get update.
+ # There is one exception:
+ # The creation of sources.list depends on the lsb package
+
+ File['/etc/apt/preferences'] ->
+ Exec['refresh_apt']
+ Package <| ( title != 'lsb' ) |>
}