Add configured apt component to the unattended-upgrades whitelist
authorVarac <varac@leap.se>
Sat, 24 Jun 2017 10:14:10 +0000 (12:14 +0200)
committerVarac <varac@leap.se>
Sat, 24 Jun 2017 10:26:08 +0000 (12:26 +0200)
Resolves: #8792

puppet/modules/site_apt/files/Debian/51unattended-upgrades-leap [deleted file]
puppet/modules/site_apt/manifests/unattended_upgrades.pp
puppet/modules/site_apt/templates/51unattended-upgrades-leap [new file with mode: 0644]

diff --git a/puppet/modules/site_apt/files/Debian/51unattended-upgrades-leap b/puppet/modules/site_apt/files/Debian/51unattended-upgrades-leap
deleted file mode 100644 (file)
index bbaac6a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// this file is managed by puppet !
-
-Unattended-Upgrade::Allowed-Origins {
-  "leap.se:stable";
-}
-
index 42f1f4c..ddadd35 100644 (file)
@@ -11,8 +11,7 @@ class site_apt::unattended_upgrades {
 
   # configure LEAP upgrades
   apt::apt_conf { '51unattended-upgrades-leap':
-    source      => [
-      "puppet:///modules/site_apt/${::lsbdistid}/51unattended-upgrades-leap"],
+    content     => template('site_apt/51unattended-upgrades-leap'),
     require     => Package['unattended-upgrades'],
     refresh_apt => false,
   }
diff --git a/puppet/modules/site_apt/templates/51unattended-upgrades-leap b/puppet/modules/site_apt/templates/51unattended-upgrades-leap
new file mode 100644 (file)
index 0000000..3e28531
--- /dev/null
@@ -0,0 +1,5 @@
+// this file is managed by puppet !
+
+Unattended-Upgrade::Origins-Pattern {
+  "site=deb.leap.se,component=<%= @apt_platform_component %>";
+}