Chef override attributes vs chef-client -j switch

When applying recipes via chef-client, you can override attributes via the –json-attributes (or -j) switch. However, the override_attributes option on roles, environments and recipes has higher precedence over the –json-attributes switch.

For more info about Chef attribute precedence, use this as a reference. The attributes set via --json-attributes are “normal” attribute types.

Written on April 7, 2017 by arturopie