Skip to content

Commit

Permalink
Merge pull request #87 from kisoku/master
Browse files Browse the repository at this point in the history
improve defaults
  • Loading branch information
Sean OMeara committed Aug 21, 2014
2 parents e3436c3 + 2124815 commit 1376afc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
default['apt']['unattended_upgrades']['enable'] = false
default['apt']['unattended_upgrades']['update_package_lists'] = true
# this needs a good default
default['apt']['unattended_upgrades']['allowed_origins'] = []
codename = node.attribute?('lsb') ? node['lsb']['codename'] : 'notlinux'
default['apt']['unattended_upgrades']['allowed_origins'] = [
"#{node['platform'].capitalize} #{codename}"
]
default['apt']['unattended_upgrades']['package_blacklist'] = []
default['apt']['unattended_upgrades']['auto_fix_interrupted_dpkg'] = false
default['apt']['unattended_upgrades']['minimal_steps'] = false
Expand Down
4 changes: 2 additions & 2 deletions templates/default/50unattended-upgrades.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Unattended-Upgrade::Allowed-Origins {
<% unless node['apt']['unattended_upgrades']['allowed_origins'].empty? -%>
<% node['apt']['unattended_upgrades']['allowed_origins'].each do |origin| -%>
<%= origin %>
"<%= origin %>";
<% end -%>
<% end -%>
};
Expand All @@ -12,7 +12,7 @@ Unattended-Upgrade::Allowed-Origins {
Unattended-Upgrade::Package-Blacklist {
<% unless node['apt']['unattended_upgrades']['package_blacklist'].empty? -%>
<% node['apt']['unattended_upgrades']['package_blacklist'].each do |package| -%>
<%= package %>
"<%= package %>";
<% end -%>
<% end -%>
};
Expand Down

0 comments on commit 1376afc

Please sign in to comment.