Commit cfdf17ec authored by Christopher Huhn's avatar Christopher Huhn
Browse files

Circumvent problems with boolean logic

parent 7b732e79
......@@ -22,9 +22,9 @@ default[:fai][:config_source] = nil
default[:fai][:debmirror_url] = "ftp://ftp.de.debian.org/debian"
# recommended packages should be installed:
default[:fai][:install_recommends] = true
default_unless[:fai][:install_recommends] = true
# while suggested packages should not:
default[:fai][:install_suggests] = false
default_unless[:fai][:install_suggests] = false
# root password
default[:fai][:root_pw_hash] = '$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1' # "fai"
......
......@@ -82,8 +82,9 @@ node.fai.flavors.each do |f, config|
template "#{configdir}/apt/apt.conf" do
source "fai_apt.conf.erb"
variables({
:install_recommends => config['install_recommends'] || node['fai']['install_recommends'],
:install_suggests => config['install_suggests'] || node['fai']['install_suggests']
# we cannot simply use 'or' here, as we are dealing with booleans ...
:install_recommends => config.has_key?('install_recommends')?config['install_recommends']:node['fai']['install_recommends'],
:install_suggests => config.has_key?('install_suggests')?config['install_suggests']:node['fai']['install_suggests']
})
end
......
APT::Install-Recommends "<%= @install_recommends || true %>";
APT::Install-Suggests "<%= @install_suggests || false %>";
APT::Install-Recommends "<%= @install_recommends %>";
APT::Install-Suggests "<%= @install_suggests %>";
Supports Markdown
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