You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
you can see that we are using apache_module definition and passing it node['rvm_passenger']['module_path'] value which is calculated in a ruby block before.
It turns out that node attribute is nill, when the apache_module resource is constructed, which indirectly is throw a error when i try to use this recipe on centos6.
I dont know exactly how each resource is elevated and how one resource might be able to use that node attribute computed by another resource. ( if there is a blog post somewhere let me know).
I did a quick test to show the idea, ideally, in the end of the code run i should see the /tmp/test file contain the content "This is a secret" but it turns out the file contains nothing. it seems that this has to do with the order of things being run.
ruby_block "Calculate secret" do
block do
node.set['secret_message'] = "This is a secret"
end
end
file "/tmp/test" do
content "#{node['secret_message']}"
mode 0644
end
The text was updated successfully, but these errors were encountered:
currently i had to hack out the apache2 recipe to use following line, this is definitely not idea and i am sure it is breaking a bunch of other things.
apache_module "passenger" do
module_path "/usr/local/rvm/gems/ruby-1.9.3-p194@passenger/gems/passenger-3.0.18/ext/apache2/mod_passenger.so"
end
in rvm_passenger:: apache2 (https://github.com/fnichol/chef-rvm_passenger/blob/master/recipes/apache2.rb#L74)
you can see that we are using apache_module definition and passing it node['rvm_passenger']['module_path'] value which is calculated in a ruby block before.
It turns out that node attribute is nill, when the apache_module resource is constructed, which indirectly is throw a error when i try to use this recipe on centos6.
I dont know exactly how each resource is elevated and how one resource might be able to use that node attribute computed by another resource. ( if there is a blog post somewhere let me know).
I did a quick test to show the idea, ideally, in the end of the code run i should see the /tmp/test file contain the content "This is a secret" but it turns out the file contains nothing. it seems that this has to do with the order of things being run.
The text was updated successfully, but these errors were encountered: