Last active
August 29, 2015 13:57
-
-
Save patmaddox/9633594 to your computer and use it in GitHub Desktop.
<srbaker>SOLVED</srbaker>
This file contains hidden or 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_attributes chef_user: "ubuntu" | |
| default_attributes { ... a whole mess of other stuff which apparently blows away the first line. whoops } |
This file contains hidden or 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
| when recipes_rbenv.rb is loaded, node['chef_user'] is nil. However I can see a | |
| chef_user attribute if I look at the node information on the chef server. I've | |
| also tried passing {'chef_user' => 'ubuntu'} to default_attributes in case it | |
| was a problem with string vs symbol for the key. No luck. Any ideas how I can | |
| get the value of this attribute that's set in the environment's default_attributes? |
This file contains hidden or 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
| node.default['rbenv']['user_installs'] = [ | |
| {'user' => node['chef_user'] } | |
| ] |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
okay got it sorted, you can't call default_attributes twice in an environment file, the second call will blow away the first one