diff options
author | varac <varacanero@zeromail.org> | 2013-01-30 16:47:30 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2013-01-30 16:47:30 +0100 |
commit | 6c135ea7bc2ae9951154cf5471801469e3e3d581 (patch) | |
tree | 11edc63e26ce79f4e6ba2634d42c0796797f3236 /manifests/apticron.pp | |
parent | 92d2d7be5f99920c67245d02c1ce76288967db62 (diff) | |
parent | 14670466be5eceba043e697d5f6f0f0ada9d5b07 (diff) |
Merge remote-tracking branch 'remotes/shared/master'
Diffstat (limited to 'manifests/apticron.pp')
-rw-r--r-- | manifests/apticron.pp | 74 |
1 files changed, 22 insertions, 52 deletions
diff --git a/manifests/apticron.pp b/manifests/apticron.pp index 2fe8e44..54d7b71 100644 --- a/manifests/apticron.pp +++ b/manifests/apticron.pp @@ -1,54 +1,24 @@ -class apt::apticron { - - case $apticron_ensure_version { - '': { $apticron_ensure_version = "present" } - } - - case $apticron_config { - '': { $apticron_config = "apt/${operatingsystem}/apticron_${lsbdistcodename}.erb" } - } - - case $apticron_email { - '': { $apticron_email = "root" } - } - - case $apticron_diff_only { - '': { $apticron_diff_only = "1" } - } - - case $apticron_listchanges_profile { - '': { $apticron_listchanges_profile = "apticron" } - } - - case $apticron_system { - '': { $apticron_system = false } - } - - case $apticron_ipaddressnum { - '': { $apticron_ipaddressnum = false } - } - - case $apticron_ipaddresses { - '': { $apticron_ipaddresses = false } - } - - case $apticron_notifyholds { - '': { $apticron_notifyholds = "0" } - } - - case $apticron_notifynew { - '': { $apticron_notifynew = "0" } - } - - case $apticron_customsubject { - '': { $apticron_customsubject = "" } - } - - package { apticron: ensure => $apticron_ensure_version } - - file { "/etc/apticron/apticron.conf": - content => template($apticron_config), - mode => 0644, owner => root, group => root, - require => Package["apticron"]; +class apt::apticron( + $ensure_version = 'installed', + $config = "apt/${::operatingsystem}/apticron_${::lsbdistcodename}.erb", + $email = 'root', + $diff_only = '1', + $listchanges_profile = 'apticron', + $system = false, + $ipaddressnum = false, + $ipaddresses = false, + $notifyholds = '0', + $notifynew = '0', + $customsubject = '' +) { + + package { 'apticron': ensure => $ensure_version } + + file { '/etc/apticron/apticron.conf': + content => template($apt::apticron::config), + owner => root, + group => root, + mode => '0644', + require => Package['apticron']; } } |