Last active
December 15, 2015 20:19
-
-
Save jnwng/5317609 to your computer and use it in GitHub Desktop.
Substitute file dashes for slashes (like they should be to override node attributes)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if default['postgresql']['version'] == "9.1" | |
default['postgresql']['main_dir'] = "foo" | |
else | |
default['postgresql']['main_dir'] = "bar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
normal['postgresql']['version'] = "9.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default['postgresql']['version'] = "9.2" | |
default['postgresql']['dir'] = "/etc/postgresql/#{node['postgresql']['version']}/main" |
Some context, using chef-solo and chef 11. Just trying to hopefully clarify some of the attribute changes that were made
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not particularly sure what the best method is of overriding these attributes, but presumably its too much to ask to understand what node attribute depend on other attributes. However, might be the case that people need to document these attribute dependencies, or otherwise specify these attributes in environments as opposed to in their cookbooks (although cookbooks make the most sense).