how to set node attribute value from execute resouce command output
问题 execute 'my_commad' do command 'myvar=`curl http://example.com/blah/blah` && echo -n $myvar > /etc/value' end node.default[:attribute1] = ::File.read('/etc/value').chomp This will fail, because at the time of convergence the node attributes are checked first and hence it will throw the following error: ERROR: No such file or directory @ rb_sysopen - /etc/value 回答1: if you are setting the node attribute at the recipe itself and not in an attribute file, this might work for you. though, in my