summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVarac <varac@leap.se>2017-06-24 12:14:10 +0200
committerVarac <varac@leap.se>2017-06-24 12:26:08 +0200
commitfc907004a75ab2f8f8302706150b68a9cdd6baf0 (patch)
treeebff124996b01732d4d2c028b1a3e52321949cbb
parent1078bffff8a0ac49c566c28f85ef8c9fe14f4e11 (diff)
Add configured apt component to the unattended-upgrades whitelist
Resolves: #8792
-rw-r--r--puppet/modules/site_apt/files/Debian/51unattended-upgrades-leap6
-rw-r--r--puppet/modules/site_apt/manifests/unattended_upgrades.pp3
-rw-r--r--puppet/modules/site_apt/templates/51unattended-upgrades-leap5
3 files changed, 6 insertions, 8 deletions
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
index bbaac6a2..00000000
--- a/puppet/modules/site_apt/files/Debian/51unattended-upgrades-leap
+++ /dev/null
@@ -1,6 +0,0 @@
-// this file is managed by puppet !
-
-Unattended-Upgrade::Allowed-Origins {
- "leap.se:stable";
-}
-
diff --git a/puppet/modules/site_apt/manifests/unattended_upgrades.pp b/puppet/modules/site_apt/manifests/unattended_upgrades.pp
index 42f1f4c6..ddadd35a 100644
--- a/puppet/modules/site_apt/manifests/unattended_upgrades.pp
+++ b/puppet/modules/site_apt/manifests/unattended_upgrades.pp
@@ -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
index 00000000..3e28531f
--- /dev/null
+++ b/puppet/modules/site_apt/templates/51unattended-upgrades-leap
@@ -0,0 +1,5 @@
+// this file is managed by puppet !
+
+Unattended-Upgrade::Origins-Pattern {
+ "site=deb.leap.se,component=<%= @apt_platform_component %>";
+}