aboutsummaryrefslogtreecommitdiff
path: root/manifests/apticron.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-18 10:51:59 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-18 10:51:59 -0200
commitc2219fa645251599b797b2574e6a68212d676f66 (patch)
treeb2b5cb63bee1abc3f2ae31b81cd417b292355b6c /manifests/apticron.pp
parent8bfd579a82b6f824b0184bb2e33a384254426eec (diff)
parent14670466be5eceba043e697d5f6f0f0ada9d5b07 (diff)
downloadpuppet-apt-c2219fa645251599b797b2574e6a68212d676f66.tar.gz
puppet-apt-c2219fa645251599b797b2574e6a68212d676f66.tar.bz2
Merge branch 'master' of git://labs.riseup.net/shared-apt
Conflicts: templates/Ubuntu/sources.list.erb
Diffstat (limited to 'manifests/apticron.pp')
-rw-r--r--manifests/apticron.pp74
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'];
}
}