On Thursday, January 16, 2014 at 12:28 AM, David Montgomery wrote:
Do override attributes work in chef-solo?Here is my role:{
"name": "server",
"chef_type": "role",
"description": "server",
"override_attributes": {"environment":{"git_repos":["logic"]}},
"run_list": ["recipe[build-essential]","recipe[java]","recipe[environment::scm]" ]
}In my cookbook called "environment"...in attributes have this this:#cookbooks/'environment/attributes/default.rbdefault['environment']['git_repos'] = []
In my scm recipe "recipe[environment::scm]" I have this for a test:
git_repos = node['environment']['git_repos']
git_repos.each do |repo|
directory "/home/ubuntu/wtf/" do
owner "root"
group "root"
#mode "0775"
recursive true
action :create
end
endNothing.....no errors ....no nothing. So..do overide attributes work? Is so..then why not working for me?
Thanks
Archive powered by MHonArc 2.6.16.