From e99752e09a784629b89a2f798109804b11a1e8a4 Mon Sep 17 00:00:00 2001 From: varac Date: Tue, 27 Jan 2015 22:14:26 +0100 Subject: use apt.url hiera value for customizing apt sources url Change-Id: Ib18c9031df13dab3187e0bb0f2202ffddd0d228d --- puppet/modules/site_apt/manifests/init.pp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'puppet/modules/site_apt/manifests') diff --git a/puppet/modules/site_apt/manifests/init.pp b/puppet/modules/site_apt/manifests/init.pp index 633ccf1e..7e63eaf1 100644 --- a/puppet/modules/site_apt/manifests/init.pp +++ b/puppet/modules/site_apt/manifests/init.pp @@ -1,7 +1,12 @@ class site_apt { + $apt_config = hiera('apt') + $apt_url = $apt_config['url'] + class { 'apt': - custom_key_dir => 'puppet:///modules/site_apt/keys' + custom_key_dir => 'puppet:///modules/site_apt/keys', + debian_url => $apt_url, + backports_url => $apt_url } # enable http://deb.leap.se debian package repository -- cgit v1.2.3 From 1b3455a697ae74b34f28f4960bf0a274e27a1ee8 Mon Sep 17 00:00:00 2001 From: varac Date: Tue, 27 Jan 2015 22:40:08 +0100 Subject: provide way to customize all three apt sources urls (basic, security, backports) Change-Id: I5542b320bb1edb52c63350b5e4fd2af681991fb5 --- puppet/modules/site_apt/manifests/init.pp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'puppet/modules/site_apt/manifests') diff --git a/puppet/modules/site_apt/manifests/init.pp b/puppet/modules/site_apt/manifests/init.pp index 7e63eaf1..506591dc 100644 --- a/puppet/modules/site_apt/manifests/init.pp +++ b/puppet/modules/site_apt/manifests/init.pp @@ -1,12 +1,16 @@ class site_apt { - $apt_config = hiera('apt') - $apt_url = $apt_config['url'] + $apt_config = hiera('apt') + $apt_url = $apt_config['url'] + $apt_url_basic = $apt_url['basic'] + $apt_url_security = $apt_url['security'] + $apt_url_backports = $apt_url['backports'] class { 'apt': custom_key_dir => 'puppet:///modules/site_apt/keys', - debian_url => $apt_url, - backports_url => $apt_url + debian_url => $apt_url_basic, + security_url => $apt_url_security, + backports_url => $apt_url_backports } # enable http://deb.leap.se debian package repository -- cgit v1.2.3 From aed223ad42635370bdbc1b239ed43a1330698c5e Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 4 Feb 2015 14:03:31 -0800 Subject: consolidate sources into common.json --- puppet/modules/site_apt/manifests/init.pp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'puppet/modules/site_apt/manifests') diff --git a/puppet/modules/site_apt/manifests/init.pp b/puppet/modules/site_apt/manifests/init.pp index 506591dc..c32c29c4 100644 --- a/puppet/modules/site_apt/manifests/init.pp +++ b/puppet/modules/site_apt/manifests/init.pp @@ -1,10 +1,10 @@ class site_apt { - $apt_config = hiera('apt') - $apt_url = $apt_config['url'] - $apt_url_basic = $apt_url['basic'] - $apt_url_security = $apt_url['security'] - $apt_url_backports = $apt_url['backports'] + $sources = hiera('sources') + $apt_config = $sources['apt'] + $apt_url_basic = $apt_config['basic'] + $apt_url_security = $apt_config['security'] + $apt_url_backports = $apt_config['backports'] class { 'apt': custom_key_dir => 'puppet:///modules/site_apt/keys', -- cgit v1.2.3 From 06f282523fdeb06b00d20d1e38f7ddf5604ffd84 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Wed, 6 May 2015 13:06:28 -0400 Subject: fix unattended-upgrades now that jessie has been released Change-Id: I69e6a0f8e676be72bce492af32fef76c9167f5ee --- puppet/modules/site_apt/manifests/unattended_upgrades.pp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'puppet/modules/site_apt/manifests') diff --git a/puppet/modules/site_apt/manifests/unattended_upgrades.pp b/puppet/modules/site_apt/manifests/unattended_upgrades.pp index daebffab..40111deb 100644 --- a/puppet/modules/site_apt/manifests/unattended_upgrades.pp +++ b/puppet/modules/site_apt/manifests/unattended_upgrades.pp @@ -1,10 +1,9 @@ -class site_apt::unattended_upgrades inherits apt::unattended_upgrades { +class site_apt::unattended_upgrades { # override unattended-upgrades package resource to make sure # that it is upgraded on every deploy (#6245) - include ::apt::unattended_upgrades - - Package['unattended-upgrades'] { - ensure => latest + class { 'apt::unattended_upgrades': + config_content => template('site_apt/50unattended-upgrades'), + ensure_version => latest } } -- cgit v1.2.3 From 984684f56f15d9d89ea78ffe6ed67dabf3d63208 Mon Sep 17 00:00:00 2001 From: varac Date: Wed, 13 May 2015 13:38:28 +0200 Subject: remove old leap_mx logfile location from check_mk logwatch state file #6964 Change-Id: I385c639e5c096deef4f81691a85c1b83cbab9421 --- puppet/modules/site_apt/manifests/init.pp | 3 +++ puppet/modules/site_apt/manifests/preferences/augeas.pp | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 puppet/modules/site_apt/manifests/preferences/augeas.pp (limited to 'puppet/modules/site_apt/manifests') diff --git a/puppet/modules/site_apt/manifests/init.pp b/puppet/modules/site_apt/manifests/init.pp index c32c29c4..75f545d4 100644 --- a/puppet/modules/site_apt/manifests/init.pp +++ b/puppet/modules/site_apt/manifests/init.pp @@ -1,3 +1,4 @@ +# setup basic debian package manager configuration class site_apt { $sources = hiera('sources') @@ -31,6 +32,8 @@ class site_apt { priority => 999 } + include site_apt::preferences::augeas + # All packages should be installed _after_ refresh_apt is called, # which does an apt-get update. # There is one exception: diff --git a/puppet/modules/site_apt/manifests/preferences/augeas.pp b/puppet/modules/site_apt/manifests/preferences/augeas.pp new file mode 100644 index 00000000..257d64c4 --- /dev/null +++ b/puppet/modules/site_apt/manifests/preferences/augeas.pp @@ -0,0 +1,15 @@ +# install augeas packages from backports +class site_apt::preferences::augeas { + + # i could not get + # site_config::remove_files::augeas::['rm_old_leap_mx_log_destination'] + # to remove a line matching a regex with the wheezy version of augeas-lenses + # (0.10.0-1). Therefore we install it from backports + + apt::preferences_snippet { 'augeas': + package => 'augeas-lenses augeas-tools libaugeas0', + release => "${::lsbdistcodename}-backports", + priority => 999; + } + +} -- cgit v1.2.3 From d5dccfc5cd72188bac66d7433c94b1046b50c7fb Mon Sep 17 00:00:00 2001 From: varac Date: Tue, 26 May 2015 11:47:26 +0200 Subject: Revert "remove old leap_mx logfile location from check_mk logwatch state file #6964" This reverts commit 984684f56f15d9d89ea78ffe6ed67dabf3d63208. Needed because: Augeas fails after upgrading augeas packages during same puppetrun, but only on first deploy - https://leap.se/code/issues/6997 --- puppet/modules/site_apt/manifests/init.pp | 3 --- puppet/modules/site_apt/manifests/preferences/augeas.pp | 15 --------------- 2 files changed, 18 deletions(-) delete mode 100644 puppet/modules/site_apt/manifests/preferences/augeas.pp (limited to 'puppet/modules/site_apt/manifests') diff --git a/puppet/modules/site_apt/manifests/init.pp b/puppet/modules/site_apt/manifests/init.pp index 75f545d4..c32c29c4 100644 --- a/puppet/modules/site_apt/manifests/init.pp +++ b/puppet/modules/site_apt/manifests/init.pp @@ -1,4 +1,3 @@ -# setup basic debian package manager configuration class site_apt { $sources = hiera('sources') @@ -32,8 +31,6 @@ class site_apt { priority => 999 } - include site_apt::preferences::augeas - # All packages should be installed _after_ refresh_apt is called, # which does an apt-get update. # There is one exception: diff --git a/puppet/modules/site_apt/manifests/preferences/augeas.pp b/puppet/modules/site_apt/manifests/preferences/augeas.pp deleted file mode 100644 index 257d64c4..00000000 --- a/puppet/modules/site_apt/manifests/preferences/augeas.pp +++ /dev/null @@ -1,15 +0,0 @@ -# install augeas packages from backports -class site_apt::preferences::augeas { - - # i could not get - # site_config::remove_files::augeas::['rm_old_leap_mx_log_destination'] - # to remove a line matching a regex with the wheezy version of augeas-lenses - # (0.10.0-1). Therefore we install it from backports - - apt::preferences_snippet { 'augeas': - package => 'augeas-lenses augeas-tools libaugeas0', - release => "${::lsbdistcodename}-backports", - priority => 999; - } - -} -- cgit v1.2.3 From b4cc317aaf95e76fe648ef36895f6d4ba6fea490 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Thu, 4 Jun 2015 13:36:24 -0400 Subject: add preferences snippet for leap repository (#7090) Change-Id: Ia7a35c8613350ad75ff1ebbdda0a09efa0960ba6 --- puppet/modules/site_apt/manifests/init.pp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'puppet/modules/site_apt/manifests') diff --git a/puppet/modules/site_apt/manifests/init.pp b/puppet/modules/site_apt/manifests/init.pp index c32c29c4..02f85140 100644 --- a/puppet/modules/site_apt/manifests/init.pp +++ b/puppet/modules/site_apt/manifests/init.pp @@ -31,6 +31,12 @@ class site_apt { priority => 999 } + apt::preferences_snippet { 'leap': + priority => 999, + package => '*', + pin => 'origin "deb.leap.se"' + } + # All packages should be installed _after_ refresh_apt is called, # which does an apt-get update. # There is one exception: -- cgit v1.2.3 From 251178948efda3cf15b6f64af57d6d594f31695e Mon Sep 17 00:00:00 2001 From: varac Date: Sat, 6 Jun 2015 15:38:52 +0200 Subject: Configure apt preferences before installing any packages Change-Id: Iac4dc8428ff5e663870ed4dd6a2b840e0904e5be --- puppet/modules/site_apt/manifests/init.pp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'puppet/modules/site_apt/manifests') diff --git a/puppet/modules/site_apt/manifests/init.pp b/puppet/modules/site_apt/manifests/init.pp index 02f85140..cf49f870 100644 --- a/puppet/modules/site_apt/manifests/init.pp +++ b/puppet/modules/site_apt/manifests/init.pp @@ -1,3 +1,4 @@ +# setup apt on all nodes class site_apt { $sources = hiera('sources') @@ -36,13 +37,14 @@ class site_apt { package => '*', pin => 'origin "deb.leap.se"' } - + # 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'] -> + Apt::Preferences_snippet <| |> -> Exec['refresh_apt'] -> - Package <| ( title != 'lsb' ) |> + Package <| ( title != 'lsb' ) |> } -- cgit v1.2.3