summaryrefslogtreecommitdiff
path: root/manifests/apticron.pp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2010-12-08 22:24:24 -0500
committerMicah Anderson <micah@riseup.net>2010-12-08 22:24:24 -0500
commitfbb291ed19eeb9a64d4aed78c48d221315da7866 (patch)
treeb13729bc1da7bc7d7c72bc11a5531782d4a31f01 /manifests/apticron.pp
parentd9ccf2a99b4af1430ba6fecdecde9737d89fa674 (diff)
add apticron support.
Why apticron, when we have cron-apt already? Some people have different preferences, we use apticron along with the upgrade_package functionality in this module. I know someone who uses cron-apt to run the upgrades, but apticron for notifications, because apticron's notifications are much nicer (cron-apt just gives you the output of apt-get upgrade)
Diffstat (limited to 'manifests/apticron.pp')
-rw-r--r--manifests/apticron.pp54
1 files changed, 54 insertions, 0 deletions
diff --git a/manifests/apticron.pp b/manifests/apticron.pp
new file mode 100644
index 0000000..7f834a5
--- /dev/null
+++ b/manifests/apticron.pp
@@ -0,0 +1,54 @@
+class apt::apticron {
+
+ case $apticron_ensure_version {
+ '': { $apticron_ensure_version = "present" }
+ }
+
+ case $apticron_config {
+ '': { $apticron_config = "apt/${operatingsystem}/apticron_${lsbrelease}.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"];
+ }
+}