The Leader Client Replacement execution list does not update the attributes on the server

advertisements

I have a cookbook with attributes. I add a recipe from this cookbook to run list of a node. I run chef-client on that node and see the attributes and their values on the chef server. Later I made changes to cookbook attributes, uploaded the cookbook, ran that specific recipe using -o option. I do not see the updated values of the attributes on the chef server.

I read somewhere that -o option does not update the chef server. So is it that we should not use -o option frequently and use it only for development purpose.

If the cookbook was always run through -o option can not see the attributes and the recipe on the node attribute on the server (which I think is bad?).

Thanks Amod


the -o option is there to allow a chef-run with a totally different runlist than usual, thus not saving it to chef-server.

If you need to run periodically with -o, you're probably doing it wrong. Make your recipe idempotent or change it so it can be enabled for a run using a flag somewhere (node attribute or data-bag item) without modifying the node run list

Without the use case it's hard to give a correct advice on how to address this.