34 lines
1 KiB
Text
34 lines
1 KiB
Text
// this file is managed by puppet !
|
|
|
|
<% 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 -%>
|
|
Unattended-Upgrade::Allowed-Origins {
|
|
"${distro-id}:oldoldstable";
|
|
"${distro-id}:squeeze-lts";
|
|
<% else -%>
|
|
Unattended-Upgrade::Origins-Pattern {
|
|
"o=Debian,l=Debian-Security";
|
|
"o=Debian,a=${distro-id}-lts";
|
|
<% end -%>
|
|
};
|
|
|
|
<% if not @blacklisted_packages.empty? -%>
|
|
Unattended-Upgrade::Package-Blacklist {
|
|
<% @blacklisted_packages.each do |pkg| -%>
|
|
"<%= pkg %>";
|
|
<% end -%>
|
|
}
|
|
<% end -%>
|
|
|
|
APT::Periodic::Update-Package-Lists "1";
|
|
APT::Periodic::Download-Upgradeable-Packages "1";
|
|
APT::Periodic::Unattended-Upgrade "1";
|
|
|
|
Unattended-Upgrade::Mail "<%= @mail_recipient -%>";
|
|
<% if @mailonlyonerror -%>
|
|
Unattended-Upgrade::MailOnlyOnError "true";
|
|
<% end -%>
|