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