[chef] Re: Re: Re: Set node value from script output


Chronological Thread 
  • From: Matthew Drobnak < >
  • To: " " < >
  • Subject: [chef] Re: Re: Re: Set node value from script output
  • Date: Mon, 27 Jun 2011 18:30:01 -0400
  • Accept-language: en-US
  • Acceptlanguage: en-US

Would that persist in the chef db? Or would I have to set it each time?

Thanks for the help.

-Matt
On Jun 27, 2011, at 6:25 PM, John Alberts wrote:

Something like the following should work as well.

node[:myattribute] = %x[/usr/bin/myscript]

John


On Mon, Jun 27, 2011 at 3:55 PM, Noah Kantrowitz < "> > wrote:

On Jun 27, 2011, at 1:46 PM, Matthew Drobnak wrote:

> I need the output of a script to set a node value, from inside a cookbook. How would one do this?

You will have to call Chef::ShellOut (or something similar) from within a ruby_block resource.

--Noah



--
John Alberts





Archive powered by MHonArc 2.6.16.

§