summaryrefslogtreecommitdiff
path: root/manifests/apticron.pp
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2013-01-02 16:14:06 +0100
committerintrigeri <intrigeri@boum.org>2013-01-02 16:14:06 +0100
commit517040bb2e088325c2baa5bc4e9860d218357669 (patch)
treeeeca8062bf072c780aafe6f3b6ae22782a8e1914 /manifests/apticron.pp
parentcda713fcf6bd189c3e870c9e466aa5f41d1847b6 (diff)
parent07a031f2050deecfefa205e1e0c63586692a06ff (diff)
Merge remote-tracking branch 'riseup/immerda_27_readme' into shared
Conflicts: README manifests/cron/dist_upgrade.pp manifests/cron/download.pp manifests/init.pp manifests/preferences.pp
Diffstat (limited to 'manifests/apticron.pp')
-rw-r--r--manifests/apticron.pp64
1 files changed, 16 insertions, 48 deletions
diff --git a/manifests/apticron.pp b/manifests/apticron.pp
index 2fe8e44..ebdd5b5 100644
--- a/manifests/apticron.pp
+++ b/manifests/apticron.pp
@@ -1,53 +1,21 @@
-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 }
+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($apticron_config),
+ content => template($apt::apticron::config),
mode => 0644, owner => root, group => root,
require => Package["apticron"];
}