Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CHEF
cookbooks
fai
Commits
cfdf17ec
Commit
cfdf17ec
authored
Feb 17, 2015
by
Christopher Huhn
Browse files
Circumvent problems with boolean logic
parent
7b732e79
Changes
3
Hide whitespace changes
Inline
Side-by-side
attributes/default.rb
View file @
cfdf17ec
...
...
@@ -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"
...
...
recipes/flavors.rb
View file @
cfdf17ec
...
...
@@ -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
...
...
templates/default/fai_apt.conf.erb
View file @
cfdf17ec
APT::Install-Recommends "
<%=
@install_recommends
||
true
%>
";
APT::Install-Suggests "
<%=
@install_suggests
||
false
%>
";
APT::Install-Recommends "
<%=
@install_recommends
%>
";
APT::Install-Suggests "
<%=
@install_suggests
%>
";
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment