[chef] Re: node.attribute? check nested


Chronological Thread 
  • From: Nic Grayson < >
  • To: Daniil S < >
  • Cc: " " < >
  • Subject: [chef] Re: node.attribute? check nested
  • Date: Sun, 14 Jul 2013 11:24:36 -0500

node['foo']['bar'] is just a variable so any ruby logic will work

puts "it's not set" unless node['foo']['bar']

if node['foo']['bar'] == "biz" etc.


On Sun, Jul 14, 2013 at 11:02 AM, Daniil S < " target="_blank"> > wrote:
Hello.
Official documentation mentions such construction:
not_if { node.attribute?("some_command_complete") }

Can I check nested attribute with it?
For example, if i have attribute node['foo']['bar'], how can i check if it is set?




Archive powered by MHonArc 2.6.16.

§