]> gitweb.fluxo.info Git - puppet-apt.git/commitdiff
Improve unattended-upgrades origin selectors
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>
Fri, 9 Oct 2015 20:39:19 +0000 (16:39 -0400)
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>
Fri, 9 Oct 2015 20:39:19 +0000 (16:39 -0400)
  * On squeeze, use release fact instead of hardcoded release name
  * On wheezy, special-case because codename selector is not available
  * On jessie and up, start pulling in point-release updates. The
    codename selector ensures that we won't be upgrading to a new
    release automatically.

templates/50unattended-upgrades.erb

index 2afebfe4858fd16b7e9ebe247ba90cca2950d16c..7c65d1027d960a9559708c058797f3df5160e104 100644 (file)
@@ -7,12 +7,16 @@ Unattended-Upgrade::Allowed-Origins {
   "${distro_id}:${distro_codename}-backports";
 <% elsif scope.lookupvar('::operatingsystem') == 'Debian' and scope.lookupvar('::debian_codename') == 'squeeze' -%>
 Unattended-Upgrade::Allowed-Origins {
-  "${distro_id}:oldoldstable";
+  "${distro_id}:<%= scope.lookupvar('::debian_release') %>";
   "${distro_id}:squeeze-lts";
-<% else -%>
+<% elsif scope.lookupvar('::operatingsystem') == 'Debian' and scope.lookupvar('::debian_codename') == 'wheezy' -%>
 Unattended-Upgrade::Origins-Pattern {
   "origin=Debian,archive=<%= scope.lookupvar('::debian_release') %>,label=Debian-Security";
   "origin=Debian,archive=${distro_codename}-lts";
+<% else -%>
+Unattended-Upgrade::Origins-Pattern {
+  "origin=Debian,codename=${distro_codename},label=Debian";
+  "origin=Debian,codename=${distro_codename},label=Debian-Security";
 <% end -%>
 };