[chef] Re: Edit attribute by chef API (ruby)


Chronological Thread 
  • From: Daniel DeLeo < >
  • To: Daniil S < >
  • Cc: " " < >
  • Subject: [chef] Re: Edit attribute by chef API (ruby)
  • Date: Tue, 5 Nov 2013 10:31:52 -0800

The attribute DSL in Chef is how Chef::Node objects work so you can use the same code you would in an attributes file. Then you just call node.save at the end.

-- 
Daniel DeLeo

On Tuesday, November 5, 2013 at 5:29 AM, Daniil S wrote:

Good day.

Can't find out how to edit single attribute using chef api in ruby.

Someshing like:
chef_node = Chef::Node.load(fqdn)
chef_node.normal=(attr_name, new_value)

--
Thanks in advance.
Daniil.




Archive powered by MHonArc 2.6.16.

§