From f1a0eca4662f8c7ec47bfc3d60aa9099c8f9fa77 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 15 Apr 2012 15:41:58 +0200 Subject: Migrate - in class names to _ In newer puppet releases the old way to name class/modules with a -, won't anymore be supported. --- manifests/cron/dist_upgrade.pp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 manifests/cron/dist_upgrade.pp (limited to 'manifests/cron/dist_upgrade.pp') diff --git a/manifests/cron/dist_upgrade.pp b/manifests/cron/dist_upgrade.pp new file mode 100644 index 0000000..1c8adb1 --- /dev/null +++ b/manifests/cron/dist_upgrade.pp @@ -0,0 +1,23 @@ +class apt::cron::dist_upgrade inherits apt::cron::base { + + $action = "autoclean -y +dist-upgrade -y -o APT::Get::Show-Upgraded=true -o 'DPkg::Options::=--force-confold' +" + + file { "/etc/cron-apt/action.d/3-download": + ensure => absent, + } + + package { "apt-listbugs": ensure => absent } + + config_file { "/etc/cron-apt/action.d/4-dist-upgrade": + content => $action, + require => Package[cron-apt] + } + + config_file { "/etc/cron-apt/config.d/MAILON": + content => "MAILON=upgrade\n", + require => Package[cron-apt] + } + +} -- cgit v1.2.3 From d47addd2ed9ae6e99423bff736352144cda32832 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 18 Jun 2012 11:41:04 -0300 Subject: get rid off config_file wrapper --- manifests/cron/dist_upgrade.pp | 10 ++++++---- manifests/cron/download.pp | 10 ++++++---- manifests/init.pp | 3 ++- 3 files changed, 14 insertions(+), 9 deletions(-) (limited to 'manifests/cron/dist_upgrade.pp') diff --git a/manifests/cron/dist_upgrade.pp b/manifests/cron/dist_upgrade.pp index 1c8adb1..68460f2 100644 --- a/manifests/cron/dist_upgrade.pp +++ b/manifests/cron/dist_upgrade.pp @@ -10,14 +10,16 @@ dist-upgrade -y -o APT::Get::Show-Upgraded=true -o 'DPkg::Options::=--force-conf package { "apt-listbugs": ensure => absent } - config_file { "/etc/cron-apt/action.d/4-dist-upgrade": + file { "/etc/cron-apt/action.d/4-dist-upgrade": content => $action, - require => Package[cron-apt] + require => Package[cron-apt], + owner => root, group => 0, mode => 0644; } - config_file { "/etc/cron-apt/config.d/MAILON": + file { "/etc/cron-apt/config.d/MAILON": content => "MAILON=upgrade\n", - require => Package[cron-apt] + require => Package[cron-apt], + owner => root, group => 0, mode => 0644; } } diff --git a/manifests/cron/download.pp b/manifests/cron/download.pp index a27967d..a189995 100644 --- a/manifests/cron/download.pp +++ b/manifests/cron/download.pp @@ -3,19 +3,21 @@ class apt::cron::download inherits apt::cron::base { $action = "autoclean -y dist-upgrade -d -y -o APT::Get::Show-Upgraded=true " - + file { "/etc/cron-apt/action.d/4-dist-upgrade": ensure => absent, } - config_file { "/etc/cron-apt/action.d/3-download": + file { "/etc/cron-apt/action.d/3-download": content => $action, - require => Package[cron-apt] + require => Package[cron-apt], + owner => root, group => 0, mode => 0644; } config_file { "/etc/cron-apt/config.d/MAILON": content => "MAILON=changes\n", - require => Package[cron-apt] + require => Package[cron-apt], + owner => root, group => 0, mode => 0644; } } diff --git a/manifests/init.pp b/manifests/init.pp index e35dd2c..509b6d1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -50,7 +50,7 @@ class apt( $next_codename = debian_nextcodename($::lsbdistcodename) $next_release = debian_nextrelease($release) - config_file { + file { # include main, security and backports # additional sources should be included via the apt::sources_list define "/etc/apt/sources.list": @@ -60,6 +60,7 @@ class apt( }, require => Package['lsb'], notify => Exec['refresh_apt'], + owner => root, group => 0, mode => 0644; } apt_conf { "02show_upgraded": -- cgit v1.2.3