Improve unattended-upgrades origin selectors

* 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.
This commit is contained in:
Jerome Charaoui 2015-10-09 16:39:19 -04:00
parent e4d777e5ec
commit f8980538c1

View 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 -%>
};