From 39917fb4dbe21b1673ceabaa1d61180cca9f493b Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 5 Jun 2012 21:31:15 -0300 Subject: new style for 2.7 --- manifests/listchanges.pp | 43 +++++++++++-------------------------------- 1 file changed, 11 insertions(+), 32 deletions(-) (limited to 'manifests/listchanges.pp') diff --git a/manifests/listchanges.pp b/manifests/listchanges.pp index 038d5c9..236b629 100644 --- a/manifests/listchanges.pp +++ b/manifests/listchanges.pp @@ -1,37 +1,16 @@ -class apt::listchanges { - - case $apt_listchanges_version { - '': { $apt_listchanges_version = "present" } - } - - case $apt_listchanges_config { - '': { $apt_listchanges_config = "apt/${operatingsystem}/listchanges_${lsbdistcodename}.erb" } - } - - case $apt_listchanges_frontend { - '': { $apt_listchanges_frontend = "mail" } - } - - case $apt_listchanges_email { - '': { $apt_listchanges_email = "root" } - } - - case $apt_listchanges_confirm { - '': { $apt_listchanges_confirm = "0" } - } - - case $apt_listchanges_saveseen { - '': { $apt_listchanges_saveseen = "/var/lib/apt/listchanges.db" } - } - - case $apt_listchanges_which { - '': { $apt_listchanges_which = "both" } - } - - package { apt-listchanges: ensure => $apt_listchanges_ensure_version } +class apt::listchanges( + $ensure_version = hiera('apt_listchanges_version','installed'), + $config = hiera('apt_listchanges_config', "apt/${::operatingsystem}/listchanges_${::lsbdistcodename}.erb"), + $frontend = hiera('apt_listchanges_frontend','mail'), + $email = hiera('apt_listchanges_email','root'), + $confirm = hiera('apt_listchanges_confirm','0'), + $saveseen = hiera('pt_listchanges_saveseen','/var/lib/apt/listchanges.db'), + $which = hiera('apt_listchanges_which','both') +){ + package { apt-listchanges: ensure => $ensure_version } file { "/etc/apt/listchanges.conf": - content => template($apt_listchanges_config), + content => template($apt::listchanges::config), mode => 0644, owner => root, group => root, require => Package["apt-listchanges"]; } -- cgit v1.2.3 From 0e016e968da85a435f1670761bad458aa515c7a5 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 14 Jun 2012 10:07:29 -0300 Subject: migrate away from hiera stuff --- manifests/listchanges.pp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'manifests/listchanges.pp') diff --git a/manifests/listchanges.pp b/manifests/listchanges.pp index 236b629..4194463 100644 --- a/manifests/listchanges.pp +++ b/manifests/listchanges.pp @@ -1,11 +1,11 @@ class apt::listchanges( - $ensure_version = hiera('apt_listchanges_version','installed'), - $config = hiera('apt_listchanges_config', "apt/${::operatingsystem}/listchanges_${::lsbdistcodename}.erb"), - $frontend = hiera('apt_listchanges_frontend','mail'), - $email = hiera('apt_listchanges_email','root'), - $confirm = hiera('apt_listchanges_confirm','0'), - $saveseen = hiera('pt_listchanges_saveseen','/var/lib/apt/listchanges.db'), - $which = hiera('apt_listchanges_which','both') + $ensure_version = 'installed', + $config = "apt/${::operatingsystem}/listchanges_${::lsbdistcodename}.erb", + $frontend = 'mail', + $email = 'root', + $confirm = '0', + $saveseen = '/var/lib/apt/listchanges.db', + $which = 'both' ){ package { apt-listchanges: ensure => $ensure_version } -- cgit v1.2.3 From ded81d8edcc9a7cc8275a68f669fde896379b12e Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Wed, 2 Jan 2013 08:12:11 -0500 Subject: Apply code style corrections from puppet-lint Signed-off-by: Gabriel Filion + more linting by intrigeri. Conflicts: manifests/apticron.pp manifests/cron/dist_upgrade.pp manifests/cron/download.pp manifests/dist_upgrade/initiator.pp manifests/init.pp manifests/listchanges.pp manifests/preferences.pp manifests/preseeded_package.pp manifests/proxy_client.pp manifests/unattended_upgrades.pp manifests/update.pp --- manifests/listchanges.pp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'manifests/listchanges.pp') diff --git a/manifests/listchanges.pp b/manifests/listchanges.pp index 4194463..0c163ae 100644 --- a/manifests/listchanges.pp +++ b/manifests/listchanges.pp @@ -7,11 +7,13 @@ class apt::listchanges( $saveseen = '/var/lib/apt/listchanges.db', $which = 'both' ){ - package { apt-listchanges: ensure => $ensure_version } - - file { "/etc/apt/listchanges.conf": + package { 'apt-listchanges': ensure => $ensure_version } + + file { '/etc/apt/listchanges.conf': content => template($apt::listchanges::config), - mode => 0644, owner => root, group => root, - require => Package["apt-listchanges"]; + owner => root, + group => root, + mode => '0644', + require => Package['apt-listchanges']; } } -- cgit v1.2.3