From c99227ad55e8d266a77ad5dfb672147eec6e1c3b Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sat, 27 Jul 2013 06:14:47 -0400 Subject: Make custom_sources_list into a class paramter and thus remove the last global variable. --- manifests/init.pp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'manifests') diff --git a/manifests/init.pp b/manifests/init.pp index 33eac37..7550aaa 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -15,6 +15,7 @@ class apt( $ubuntu_url = $apt::params::ubuntu_url, $repos = $apt::params::repos, $custom_preferences = $apt::params::custom_preferences, + $custom_sources_list = '', $disable_update = $apt::params::disable_update, $custom_key_dir = $apt::params::custom_key_dir ) inherits apt::params { @@ -53,9 +54,9 @@ class apt( $next_codename = debian_nextcodename($codename) $next_release = debian_nextrelease($release) - $sources_content = $::custom_sources_list ? { + $sources_content = $custom_sources_list ? { '' => template( "apt/${::operatingsystem}/sources.list.erb"), - default => $::custom_sources_list + default => $custom_sources_list } file { # include main, security and backports -- cgit v1.2.3 From f286b0ed860660ce255740f2f43123d024553bcc Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sun, 8 Dec 2013 21:58:38 +0000 Subject: Remove Lenny-related comment that was made obsolete a year ago by commit 822950. --- manifests/preferences_snippet.pp | 3 --- 1 file changed, 3 deletions(-) (limited to 'manifests') diff --git a/manifests/preferences_snippet.pp b/manifests/preferences_snippet.pp index cbc83d2..0c7b7bb 100644 --- a/manifests/preferences_snippet.pp +++ b/manifests/preferences_snippet.pp @@ -34,9 +34,6 @@ define apt::preferences_snippet ( owner => root, group => 0, mode => '0644'; } - # This should really work in the same manner as sources_list and apt_conf - # snippets, but since the preferences.d directory cannot be used in Debian - # lenny, we can't generalize without going into ugly special-casing. case $source { '': { case $release { -- cgit v1.2.3 From 4bd4dd254263003a404a1573abd50307b04057c8 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 8 Jan 2014 21:27:05 +0100 Subject: use stdlib instead of the common module --- manifests/dselect.pp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'manifests') diff --git a/manifests/dselect.pp b/manifests/dselect.pp index 6feeb9f..2b99a43 100644 --- a/manifests/dselect.pp +++ b/manifests/dselect.pp @@ -1,9 +1,10 @@ +# manage dselect, like +# suppressing the annoying help texts class apt::dselect { - # suppress annoying help texts of dselect - line { 'dselect_expert': - file => '/etc/dpkg/dselect.cfg', - line => 'expert', + file_line { 'dselect_expert': + path => '/etc/dpkg/dselect.cfg', + line => 'expert', } package { 'dselect': ensure => installed } -- cgit v1.2.3 From 9d56396a0439a19dd6cd3a09a5d1a9f7d6345778 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 8 Jan 2014 21:28:42 +0100 Subject: use the new style common module --- manifests/init.pp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'manifests') diff --git a/manifests/init.pp b/manifests/init.pp index 7550aaa..034d79e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -111,9 +111,8 @@ class apt( # backports uses the normal archive key now package { 'debian-backports-keyring': ensure => absent } - include common::moduledir + common::module_dir { 'apt': } $apt_base_dir = "${common::moduledir::module_dir_path}/apt" - modules_dir { 'apt': } if $custom_key_dir { file { "${apt_base_dir}/keys.d": -- cgit v1.2.3 From 7c68c19973518841ba2462371b9d4b4d4f1da37e Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sat, 6 Dec 2014 00:52:59 -0500 Subject: make it optional to end sources in ".list" --- manifests/sources_list.pp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'manifests') diff --git a/manifests/sources_list.pp b/manifests/sources_list.pp index 3367f83..aefad2d 100644 --- a/manifests/sources_list.pp +++ b/manifests/sources_list.pp @@ -15,22 +15,24 @@ define apt::sources_list ( include apt::dot_d_directories + $realname = regsubst($name, '\.list$', '') + # One would expect the 'file' resource on sources.list.d to trigger an # apt-get update when files are added or modified in the directory, but it # apparently doesn't. - file { "/etc/apt/sources.list.d/${name}": + file { "/etc/apt/sources.list.d/${realname}.list": ensure => $ensure, owner => root, group => 0, mode => '0644', notify => Exec['refresh_apt'], } if $source { - File["/etc/apt/sources.list.d/${name}"] { + File["/etc/apt/sources.list.d/${realname}.list"] { source => $source, } } else { - File["/etc/apt/sources.list.d/${name}"] { + File["/etc/apt/sources.list.d/${realname}.list"] { content => $content, } } -- cgit v1.2.3 From 85c7554c4bb06130ab3e88170842dc1b2ddbb186 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sat, 7 Feb 2015 16:12:55 +0000 Subject: Add support for Squeeze LTS. --- manifests/init.pp | 2 ++ manifests/params.pp | 2 ++ 2 files changed, 4 insertions(+) (limited to 'manifests') diff --git a/manifests/init.pp b/manifests/init.pp index 7550aaa..2814013 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -5,12 +5,14 @@ class apt( $codename = $apt::params::codename, + $use_lts = $apt::params::use_lts, $use_volatile = $apt::params::use_volatile, $include_src = $apt::params::include_src, $use_next_release = $apt::params::use_next_release, $debian_url = $apt::params::debian_url, $security_url = $apt::params::security_url, $backports_url = $apt::params::backports_url, + $lts_url = $apt::params::lts_url, $volatile_url = $apt::params::volatile_url, $ubuntu_url = $apt::params::ubuntu_url, $repos = $apt::params::repos, diff --git a/manifests/params.pp b/manifests/params.pp index 12273ac..54fd13e 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,5 +1,6 @@ class apt::params () { $codename = $::lsbdistcodename + $use_lts = false $use_volatile = false $include_src = false $use_next_release = false @@ -9,6 +10,7 @@ class apt::params () { 'wheezy' => $debian_url, default => 'http://backports.debian.org/debian-backports/', } + $lts_url = $debian_url $volatile_url = 'http://volatile.debian.org/debian-volatile/' $ubuntu_url = 'http://archive.ubuntu.com/ubuntu' $repos = 'auto' -- cgit v1.2.3 From 3bd6f73973f0a4b744f75d3a9b2c73b15e76603b Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sat, 28 Feb 2015 13:01:14 +0000 Subject: Add missing "include common::moduledir". Without this, $common::moduledir::module_dir_path is empty. --- manifests/init.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests') diff --git a/manifests/init.pp b/manifests/init.pp index 0fb4f1b..68856cc 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -113,6 +113,7 @@ class apt( # backports uses the normal archive key now package { 'debian-backports-keyring': ensure => absent } + include common::moduledir common::module_dir { 'apt': } $apt_base_dir = "${common::moduledir::module_dir_path}/apt" -- cgit v1.2.3 From 9192785c452ce2cfa0f58984d3aebdcaf841113a Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sat, 27 Jul 2013 13:38:27 -0400 Subject: make it possible to opt out of MailOnlyOnError This combines all files into one template. It should make maintenance easier. --- manifests/unattended_upgrades.pp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'manifests') diff --git a/manifests/unattended_upgrades.pp b/manifests/unattended_upgrades.pp index 80939e3..b63b483 100644 --- a/manifests/unattended_upgrades.pp +++ b/manifests/unattended_upgrades.pp @@ -1,15 +1,19 @@ -class apt::unattended_upgrades { +class apt::unattended_upgrades ( + $config_content = undef, + $mailonlyonerror = true, +) { package { 'unattended-upgrades': ensure => present } + $file_content = $config_content ? { + undef => template('apt/50unattended-upgrades.erb'), + default => $config_content + } + apt_conf { '50unattended-upgrades': - source => [ - "puppet:///modules/site_apt/${::lsbdistid}/50unattended-upgrades.${::lsbdistcodename}", - "puppet:///modules/site_apt/${::lsbdistid}/50unattended-upgrades", - "puppet:///modules/apt/${::lsbdistid}/50unattended-upgrades.${::lsbdistcodename}", - "puppet:///modules/apt/${::lsbdistid}/50unattended-upgrades" ], + content => $file_content, require => Package['unattended-upgrades'], } } -- cgit v1.2.3 From d24ca3314fadd7836ed0d6345359eb7ccfad6419 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sat, 27 Jul 2013 13:42:54 -0400 Subject: Parametrize unattended-upgrades mail recipient --- manifests/unattended_upgrades.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests') diff --git a/manifests/unattended_upgrades.pp b/manifests/unattended_upgrades.pp index b63b483..7e17333 100644 --- a/manifests/unattended_upgrades.pp +++ b/manifests/unattended_upgrades.pp @@ -1,6 +1,7 @@ class apt::unattended_upgrades ( $config_content = undef, $mailonlyonerror = true, + $mail_recipient = 'root', ) { package { 'unattended-upgrades': -- cgit v1.2.3 From 6f6e725e60f05a232ba6053cfc49ce1b219be7c7 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Fri, 17 Apr 2015 16:43:26 -0400 Subject: Add parameter for blacklisting a list of packages. This functionality was lost because we stopped using a source file for the 50unattended-upgrades file that would previously let one override the configuration per release or per host. --- manifests/unattended_upgrades.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests') diff --git a/manifests/unattended_upgrades.pp b/manifests/unattended_upgrades.pp index 7e17333..9f74bbd 100644 --- a/manifests/unattended_upgrades.pp +++ b/manifests/unattended_upgrades.pp @@ -2,6 +2,7 @@ class apt::unattended_upgrades ( $config_content = undef, $mailonlyonerror = true, $mail_recipient = 'root', + $blacklisted_packages = [], ) { package { 'unattended-upgrades': -- cgit v1.2.3 From 5532df22f12655ddb7f99f5eee2fe05e8c953444 Mon Sep 17 00:00:00 2001 From: Matt Taggart Date: Tue, 28 Apr 2015 11:57:23 -0700 Subject: invert the backports logic because squeeze and older were the exception and wheezy and newer the default --- manifests/params.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests') diff --git a/manifests/params.pp b/manifests/params.pp index 54fd13e..35fa44f 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -7,8 +7,8 @@ class apt::params () { $debian_url = 'http://http.debian.net/debian/' $security_url = 'http://security.debian.org/' $backports_url = $::lsbdistcodename ? { - 'wheezy' => $debian_url, - default => 'http://backports.debian.org/debian-backports/', + 'squeeze' => 'http://backports.debian.org/debian-backports/', + default => $debian_url } $lts_url = $debian_url $volatile_url = 'http://volatile.debian.org/debian-volatile/' -- cgit v1.2.3 From 3dac57374f63ca6f0565f46feb5970fade960c6b Mon Sep 17 00:00:00 2001 From: Matt Taggart Date: Tue, 28 Apr 2015 11:59:46 -0700 Subject: the http redirector has a new official home --- manifests/params.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests') diff --git a/manifests/params.pp b/manifests/params.pp index 35fa44f..f977c27 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -4,7 +4,7 @@ class apt::params () { $use_volatile = false $include_src = false $use_next_release = false - $debian_url = 'http://http.debian.net/debian/' + $debian_url = 'http://httpredir.debian.org/debian/' $security_url = 'http://security.debian.org/' $backports_url = $::lsbdistcodename ? { 'squeeze' => 'http://backports.debian.org/debian-backports/', -- cgit v1.2.3