Hi!
I've been wrestling with this issue ever since we got auto-upgraded to Chef 11,
and I can't find a good solution. How do I recursively convert an attribute
into an ordinary ruby hash? I've posted a better description of the problem on
stack overflow:
I would love any pointers here!
Thanks,
--Igor
Igor,
From your stackoverflow question I would say you are having issues because you are accessing the attributes using dot notation. Try:
config = node['myapp']['config'].to_hash
JSON.parse(config.to_json)
--
Seth Chisamore
Software Development Engineer, Opscode, Inc.
IRC, Skype, Twitter, Github: schisamo
On Feb 6, 2013, at 3:54 PM, igor.serebryany@airbnb.com
wrote:
Hi!
I've been wrestling with this issue ever since we got auto-upgraded to Chef 11,
and I can't find a good solution. How do I recursively convert an attribute
into an ordinary ruby hash? I've posted a better description of the problem on
stack overflow:
chef 11: any way to turn attributes into a ruby hash? - Stack Overflow
I would love any pointers here!
Thanks,
--Igor
[0] chef/lib/chef/node.rb at main · chef/chef · GitHub