summaryrefslogtreecommitdiff
path: root/templates/50unattended-upgrades.erb
diff options
context:
space:
mode:
Diffstat (limited to 'templates/50unattended-upgrades.erb')
-rw-r--r--templates/50unattended-upgrades.erb15
1 files changed, 8 insertions, 7 deletions
diff --git a/templates/50unattended-upgrades.erb b/templates/50unattended-upgrades.erb
index 94059d5..23c5c89 100644
--- a/templates/50unattended-upgrades.erb
+++ b/templates/50unattended-upgrades.erb
@@ -1,17 +1,18 @@
// this file is managed by puppet !
-Unattended-Upgrade::Allowed-Origins {
<% if scope.lookupvar('::operatingsystem') == 'Ubuntu' -%>
+Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}-security";
"${distro_id}:${distro_codename}-updates";
"${distro_id}:${distro_codename}-backports";
<% elsif scope.lookupvar('::operatingsystem') == 'Debian' and scope.lookupvar('::operatingsystemmajrelease') == 6 -%>
- "${distro-id} ${distro-codename}-security";
- "${distro-id} ${distro-codename}-lts";
+Unattended-Upgrade::Allowed-Origins {
+ "${distro_id}:oldoldstable";
+ "${distro_id}:squeeze-lts";
<% else -%>
- # See Debian bug #704087
- "o=Debian,a=oldstable,l=Debian-Security";
- "o=Debian,a=stable,l=Debian-Security";
+Unattended-Upgrade::Origins-Pattern {
+ "origin=Debian,archive=<%= scope.lookupvar('::apt::release') %>,label=Debian-Security";
+ "origin=Debian,archive=${distro_codename}-lts";
<% end -%>
};
@@ -20,7 +21,7 @@ Unattended-Upgrade::Package-Blacklist {
<% @blacklisted_packages.each do |pkg| -%>
"<%= pkg %>";
<% end -%>
-}
+};
<% end -%>
APT::Periodic::Update-Package-Lists "1";