I find my answer.But I have a prob, one attribute don't change.My resultat :Compiled Resource:in my command default should have been replaced by mypassword....
# Declared in /var/chef/cache/cookbooks/A/recipes/default.rb:10:in `from_file'
execute("download") do
action [:nothing]
retries 0
retry_delay 2
guard_interpreter :default
command "wget --user=myid --password=default --no-check-certificate https://**.**.**.**/myurl/myapp"
backup 5
returns 0
cookbook_name "A"
recipe_name "default"
enddefault.rb attributes A :default["A"]["url_source"] = "url"default.rb recipes A :
default["A"]["id"] = "default"
default["A"]["password"] = "default"execute 'download' dodefault.rb attributes B :
command "wget --user=#{node['A']['id']} --password=#{node['A']['password']} --no-check-certificate #{node['A']['url_source']}"
action :nothing
enddefault["B"]["id"] = "myid"
default["B"]["password"] = "mypassword"
default["B"]["url_source_fgl"] = "https://**.**.**.**/myurl/myapp"force_override["A"]["url_source"] = default["B"]["url_source"]
force_override["A"]["id"] = default["B"]["id"]
force_override["A"]["password"] = default["B"]["password"]
default recipe B :execute 'start' do
notifies :run, "execute[download]", :immediately
notifies :restart, "service[apache2]", :immediately
action :run
end2014-06-25 16:25 GMT+02:00 Ilisia Felane < " target="_blank"> >:
I tested that :Hi,I would like change my default attribute of my recipe A, but not in my recipe A, in a other recipe B. How I can do that ?
node.override['A']['url_source'] = node['B']['url_source']but no work
node.override['A']['id'] = node['B']['id']
ThanksFelane
Archive powered by MHonArc 2.6.16.