aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorGabriel Filion <gabster@lelutin.ca>2013-07-27 13:38:27 -0400
committerGabriel Filion <gabster@lelutin.ca>2015-04-17 15:50:36 -0400
commit9192785c452ce2cfa0f58984d3aebdcaf841113a (patch)
tree78d302937259e35e62ad1e8169e4ca79670d66bd /templates
parentbb12a296a001a6b11377385b2dd40d39f6534703 (diff)
downloadpuppet-apt-9192785c452ce2cfa0f58984d3aebdcaf841113a.tar.gz
puppet-apt-9192785c452ce2cfa0f58984d3aebdcaf841113a.tar.bz2
make it possible to opt out of MailOnlyOnError
This combines all files into one template. It should make maintenance easier.
Diffstat (limited to 'templates')
-rw-r--r--templates/50unattended-upgrades.erb26
1 files changed, 26 insertions, 0 deletions
diff --git a/templates/50unattended-upgrades.erb b/templates/50unattended-upgrades.erb
new file mode 100644
index 0000000..0ba0d7e
--- /dev/null
+++ b/templates/50unattended-upgrades.erb
@@ -0,0 +1,26 @@
+// this file is managed by puppet !
+
+Unattended-Upgrade::Allowed-Origins {
+<% if scope.lookupvar('::operatingsystem') == 'Ubuntu' -%>
+ "${distro_id}:${distro_codename}-security";
+ "${distro_id}:${distro_codename}-updates";
+ "${distro_id}:${distro_codename}-backports";
+<% else -%>
+<% if scope.lookupvar('::lsbdistcodename') == 'squeeze' -%>
+ "${distro-id} ${distro-codename}-security";
+ "${distro-id} ${distro-codename}-lts";
+<% else -%>
+ # See Debian bug #704087
+ "o=Debian,a=oldstable,l=Debian-Security";
+ "o=Debian,a=stable,l=Debian-Security";
+<% end -%>
+};
+
+APT::Periodic::Update-Package-Lists "1";
+APT::Periodic::Download-Upgradeable-Packages "1";
+APT::Periodic::Unattended-Upgrade "1";
+
+Unattended-Upgrade::Mail "root";
+<% if mailonlyonerror -%>
+Unattended-Upgrade::MailOnlyOnError "true";
+<% end -%>