I want to edit ec2 node\'s node_data using a knife node
command.
I can manually do it by using below command.
knife node edit NODE_NAME
if you want to
add new attribute
knife exec -E "nodes.find(:name => 'NODE-1') { |node| node.normal_attrs[:attribute_name]='Value' ; node.save; }"
Need to update attribute
its depends on node attribute type
if node attribute is json then run this command
knife exec -E "nodes.find(:name => 'NODE-1') { |node| node.normal_attrs['node_data'][:attribute_name]= 'Value' ; node.save; }"
if node attribute in array type
knife exec -E "nodes.find(:name => 'NODE-1') { |node| node.normal.tags << {'attribute_name'=>'Value',''=>}; node.save; }"