aboutsummaryrefslogtreecommitdiff
path: root/manifests/apticron.pp
diff options
context:
space:
mode:
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"];
}