Set an attribute on a node from the command line?

Hi,

is there a better way than this…

knife exec -E “nodes.find(:name => ‘$(hostname)’) {|n|
n.set[‘someattribute’] = [‘somevalue’] ; n.save }”

Cheers
Tom

I created a knife plugin for such kind of things

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

--max

On Fri, Sep 14, 2012 at 9:11 PM, Tom Hodder tom@limepepper.co.uk 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