I have been using the ohai-softlayer cookbook for fetching the softlayer metadata. As part of collecting the softlayer metadata it collects the user_metadata attribute for the softlayer VM. Somehow I dont want user_metadata to be pushed to the chef-server, so I used another cookbook blacklist_node_attrs . I have another cook book which includes these 2 in its default recipe.
include_recipe 'blacklist_node_attrs'
include_recipe 'ohai-softlayer::default'
In the attributes folder I have this piece of code which adds the blacklist attribute name.
node.default[:blacklist] = {
"softlayer" => {
'user_metadata' => true
}
}
I have included these cookbooks at the last in the run_list. When I run the command
knife node show <nodename> -a softlayer
It displayes the user_metadata attribute. Do you know how can I restrict it from getting displayed ? How can I delete the attribute ?
It seems that the version of the cookbook was not updated. I changed the version of wrapper cookbook (Refer in question -> I have another cook book which includes these 2 in its default recipe. ) and then the changes were reflected on chef node.