Unverified Commit 4f236fd8 authored by Ben Abrams's avatar Ben Abrams
Browse files

allow you to specify dpkg options just for unattended upgrades



This differes from existing functionality that allows it to be set globally.
Signed-off-by: default avatarBen Abrams <me@benabrams.it>
parent eabf84d7
......@@ -51,6 +51,8 @@ default['apt']['unattended_upgrades']['random_sleep'] = nil
default['apt']['unattended_upgrades']['syslog_enable'] = false
default['apt']['unattended_upgrades']['syslog_facility'] = 'daemon'
default['apt']['unattended_upgrades']['dpkg_options'] = []
default['apt']['confd']['force_confask'] = false
default['apt']['confd']['force_confdef'] = false
default['apt']['confd']['force_confmiss'] = false
......
......@@ -85,3 +85,20 @@ Unattended-Upgrade::SyslogEnable "<%= node['apt']['unattended_upgrades']['syslog
// Specify syslog facility. Default is daemon
Unattended-Upgrade::SyslogFacility "<%= node['apt']['unattended_upgrades']['syslog_facility'] %>";
// specify any dpkg options you want to run
// for example if you wanted to upgrade and use
// the installed version of config files when
// resolving conflicts during an upgrade you
// typically need:
// Dpkg::Options {
// "--force-confdef";
// "--force-confold";
//};
<% unless node['apt']['unattended_upgrades']['dpkg_options'].empty? -%>
Dpkg::Options {
<% node['apt']['unattended_upgrades']['dpkg_options'].each do |option|%>
"<%= option %>";
<% end -%>
};
<% end -%>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment