- From: David Montgomery <
>
- To:
- Subject: [chef] chef-solo and override attributes will not work in json role
- Date: Thu, 16 Jan 2014 16:28:38 +0800
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.rb
default['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
end
Nothing.....no errors ....no nothing. So..do overide attributes work? Is so..then why not working for me?
Thanks
- [chef] chef-solo and override attributes will not work in json role, David Montgomery, 01/16/2014
Archive powered by MHonArc 2.6.16.