[chef] Re: set an attribute on a node from the command line?


Chronological Thread 
  • From: Max Gorbul < >
  • To:
  • Subject: [chef] Re: set an attribute on a node from the command line?
  • Date: Fri, 14 Sep 2012 22:13:50 -0700

I created a knife plugin for such kind of things

https://gist.github.com/3726422

$ knife node exec [nodename] 'node.set[:somefalue] = true'

--max

On Fri, Sep 14, 2012 at 9:11 PM, Tom Hodder 
< >
 wrote:
> Hi,
>
> is there a better way than this...
>
> knife exec -E "nodes.find(:name => '$(hostname)') {|n|
> n.set['someattribute'] = ['somevalue'] ; n.save }"
>
>
> Cheers
> Tom



Archive powered by MHonArc 2.6.16.

§