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..c578311 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 = hiera('apticron_ensure_version','installed'),
+ $config = hiera('apticron_config',"apt/${::operatingsystem}/apticron_${::lsbdistcodename}.erb"),
+ $email = hiera('apticron_email', 'root'),
+ $diff_only = hiera('apticron_diff_only', '1'),
+ $listchanges_profile = hiera('apticron_listchanges_profile','apticron'),
+ $system = hiera('apticron_system',false),
+ $ipaddressnum = hiera('apticron_ipaddressnum',false),
+ $ipaddresses = hiera('apticron_ipaddresses', false),
+ $notifyholds = hiera('apticron_notifyholds', '0'),
+ $notifynew = hiera('apticron_notifynew', '0'),
+ $customsubject = hiera('apticron_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"];
}