diff options
author | Gabriel Filion <gabster@lelutin.ca> | 2013-07-27 13:38:27 -0400 |
---|---|---|
committer | Gabriel Filion <gabster@lelutin.ca> | 2015-04-17 15:50:36 -0400 |
commit | 9192785c452ce2cfa0f58984d3aebdcaf841113a (patch) | |
tree | 78d302937259e35e62ad1e8169e4ca79670d66bd /templates | |
parent | bb12a296a001a6b11377385b2dd40d39f6534703 (diff) |
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.erb | 26 |
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 -%> |