Here's how to fix it:
for i in $(cat /tmp/hosts); do echo -n "$i: " knife exec -E "nodes.transform('name:$i') {|n| puts n.hostname ; n.normal_attrs['my_bad_attribute_name'].delete('self')}" done
Note: replace the nested array format with underscores. In other words
node['my']['bad']['attribute']['name']
becomes my_bad_attribute_name
No comments:
Post a Comment