I have an attribute default set in a cookbook attributes file:
default[:lmds][:database][:host] = “localhost”
which I’m attempting to override in a role:
$ knife role show lmds-app -a default_attributes
I then apply that role to a node:
$ knife node show -r i-3DBB07DC.ec.int.realestate.com.au
However, the node is picking up the cookbook-default, “localhost”, rather than the value specified in the role. Based on the documentation on the Chef Wiki, I thought the role would trump the cookbook. Am I doing the override incorrectly?
If I put the override in node attributes, rather than the role, then it works … but I don’t want to have to do that for every node.