Merge branch '1.4.x'
[puppet-modules/puppetlabs-apt.git] / templates / 50unattended-upgrades.erb
1 // Automatically upgrade packages from these (origin:archive) pairs
2 Unattended-Upgrade::Allowed-Origins {
3 <% @origins.each do |origin| -%>
4         "<%= origin %>";
5 <% end -%>
6 };
7
8 // List of packages to not update
9 Unattended-Upgrade::Package-Blacklist {
10 <% @blacklist.each do |package| -%>
11         "<%= package %>";
12 <% end -%>
13 };
14
15 // This option allows you to control if on a unclean dpkg exit
16 // unattended-upgrades will automatically run 
17 //   dpkg --force-confold --configure -a
18 // The default is true, to ensure updates keep getting installed
19 Unattended-Upgrade::AutoFixInterruptedDpkg "<%= @auto_fix %>";
20
21 // Split the upgrade into the smallest possible chunks so that
22 // they can be interrupted with SIGUSR1. This makes the upgrade
23 // a bit slower but it has the benefit that shutdown while a upgrade
24 // is running is possible (with a small delay)
25 Unattended-Upgrade::MinimalSteps "<%= @minimal_steps %>";
26
27 // Install all unattended-upgrades when the machine is shuting down
28 // instead of doing it in the background while the machine is running
29 // This will (obviously) make shutdown slower
30 Unattended-Upgrade::InstallOnShutdown "<%= @install_on_shutdown %>";
31
32 // Send email to this address for problems or packages upgrades
33 // If empty or unset then no email is sent, make sure that you
34 // have a working mail setup on your system. A package that provides
35 // 'mailx' must be installed.
36 <% if @mail_to != "NONE" %>Unattended-Upgrade::Mail "<%= @mail_to %>";<% end %>
37
38 // Set this value to "true" to get emails only on errors. Default
39 // is to always send a mail if Unattended-Upgrade::Mail is set
40 <% if @mail_to != "NONE" %>Unattended-Upgrade::MailOnlyOnError "<%= @mail_only_on_error %>";<% end %>
41
42 // Do automatic removal of new unused dependencies after the upgrade
43 // (equivalent to apt-get autoremove)
44 Unattended-Upgrade::Remove-Unused-Dependencies "<%= @remove_unused %>";
45
46 // Automatically reboot *WITHOUT CONFIRMATION* if a 
47 // the file /var/run/reboot-required is found after the upgrade 
48 Unattended-Upgrade::Automatic-Reboot "<%= @auto_reboot %>";
49
50
51 // Use apt bandwidth limit feature, this example limits the download
52 // speed to 70kb/sec
53 <% if @dl_limit != "NONE" %>Acquire::http::Dl-Limit "<%= @dl_limit %>";<% end %>