]> gitweb.fluxo.info Git - puppet-apt.git/commitdiff
fix unattended upgrades
authormh <mh@immerda.ch>
Sun, 5 Jun 2011 12:58:22 +0000 (14:58 +0200)
committermh <mh@immerda.ch>
Sun, 5 Jun 2011 12:58:22 +0000 (14:58 +0200)
as we use $lsbdistcodename as source we cannot name the sources
which should be used to update "stable". -> Fix it by deploying
a per lsbdistcodename configfile. This can also be used as a pre-
work for the #2681 shared modules bug.

files/lenny/50unattended-upgrades [moved from files/50unattended-upgrades with 97% similarity]
files/squeeze/50unattended-upgrades [new file with mode: 0644]
manifests/unattended_upgrades.pp

similarity index 97%
rename from files/50unattended-upgrades
rename to files/lenny/50unattended-upgrades
index fbab858e3ae93fec57b5dad53c306d6e384dcc8e..084181199dc7502d348765028b063bfb8f73568b 100644 (file)
@@ -4,8 +4,8 @@
 
 // allowed (origin, archive) pairs
 Unattended-Upgrade::Allowed-Origins {
-       "Debian stable";
-       "Debian-Security stable";
+       "Debian lenny";
+       "Debian-Security lenny";
 //     "Debian testing";
 };
 
diff --git a/files/squeeze/50unattended-upgrades b/files/squeeze/50unattended-upgrades
new file mode 100644 (file)
index 0000000..a1822e7
--- /dev/null
@@ -0,0 +1,57 @@
+// this file is managed by puppet !
+//
+//See https://wiki.ubuntu.com/AutomaticUpdates for more details about this feature.
+
+// allowed (origin, archive) pairs
+Unattended-Upgrade::Allowed-Origins {
+       "Debian squeeze";
+       "Debian-Security squeeze";
+//     "Debian testing";
+};
+
+APT::Periodic::Update-Package-Lists "1";
+APT::Periodic::Unattended-Upgrade "1";
+Unattended-Upgrade::Mail "root";
+
+APT::UnattendedUpgrades::LogDir "/var/log/";
+APT::UnattendedUpgrades::LogFile "unattended_upgrades.log";
+
+Unattended-Upgrade::Package-Blacklist {
+       // we don't want the kernel to be updated so nagios still can give a warning if there is
+       // a manual update (and reboot) left
+
+        "linux-image-*";
+
+       // unfortunately there seems to be a bug in unattended-upgrades <= 0.62 that wildcards aren't recognized:
+       //2009-12-11 13:41:43,267 INFO Initial blacklisted packages: linux-image-*
+       //2009-12-11 13:41:43,267 INFO Starting unattended upgrades script
+       //2009-12-11 13:41:43,267 INFO Allowed origins are: ["['Debian', 'stable']", "['Debian-Security', 'stable']"]
+       //2009-12-11 13:41:45,233 INFO Packages that are upgraded: linux-image-2.6.26-2-amd64
+       //2009-12-11 13:41:45,233 INFO Writing dpkg log to '/var/log/unattended-upgrades-dpkg_2009-12-11_13:41:45.233713.log'
+       //2009-12-11 13:42:11,988 INFO All upgrades installed
+
+        // lenny
+       "linux-image-2.6.26-1-686";
+       "linux-image-2.6.26-1-amd64";
+        "linux-image-2.6.26-1-xen-686";
+        "linux-image-2.6.26-1-xen-amd64";
+       "linux-image-2.6.26-1-vserver-686";
+       "linux-image-2.6.26-1-vserver-amd64";
+
+       "linux-image-2.6.26-2-686";
+       "linux-image-2.6.26-2-amd64";
+        "linux-image-2.6.26-2-xen-686";
+        "linux-image-2.6.26-2-xen-amd64";
+       "linux-image-2.6.26-2-vserver-686";
+       "linux-image-2.6.26-2-vserver-amd64";
+
+       // squeeze
+       "linux-image-2.6.32-5-686";
+       "linux-image-2.6.32-5-amd64";
+       "linux-image-2.6.32-5-xen-686";
+       "linux-image-2.6.32-5-xen-amd64";
+       "linux-image-2.6.32-5-vserver-686";
+       "linux-image-2.6.32-5-vserver-amd64";
+
+};
+
index b90fcbbdee9622bc1a23356ad675864bbe16952e..3baffad36ed9a48e77e26f72e840d6b4200440ec 100644 (file)
@@ -8,8 +8,7 @@ class apt::unattended_upgrades {
   apt_conf { "50unattended-upgrades":
     source  => ["puppet:///modules/site-apt/$lsbdistcodename/50unattended-upgrades",
                "puppet:///modules/site-apt/50unattended-upgrades",
-               "puppet:///modules/apt/$lsbdistcodename/50unattended-upgrades",
-               "puppet:///modules/apt/50unattended-upgrades" ],
+               "puppet:///modules/apt/$lsbdistcodename/50unattended-upgrades" ],
     require => Package['unattended-upgrades'],
   }