- From: Dylan Northrup <
>
- To:
- Subject: [chef] Re: chef-client , apply role
- Date: Thu, 2 Jan 2014 09:18:19 -0500
If you don't run the entire run_list, you may be missing attributes that should be needed during the chef-client run. As an example, if your run_list were 'wrapper' cookbooks (that contain attributes, and then call other cookbooks), if you had any dependency on those attributes (such as "what data center is this node in?", "is this node dev, ref or prod?", "what service is this node providing?", etc) you wouldn't have access to them.
I'd suggest that there's likely something interesting you're trying to do, but the way you're trying to go about it will cause more headaches down the road than you think and there is likely a better way to go about what you're wanting to do. If you want to simply update node attributes, knife node edit is one way (though not the easiest to automate). A quick google search shows 'knife-set-attribute' at
https://github.com/amian84/knife-set-attribute may be another way (though I've not used it, so YMMV).
But these are still methods of changing the model on the chef server and you'll still need to do a full chef-client run on the client to render the change(s) on the node. And, in the end, doing the full chef-client run is the best practice from a reliability standpoint. When making a change you want to make sure it's fully and completely rendered onto a node the way it will be every time chef-client will run in the future. If it doesn't, there's a pretty large opportunity for you to be surprised after the next automated chef-client run when something goes boom because of that attribute change 'that simply updated one thing that was ephemeral and should have little effect'.
But that's just my opinion. I could be wrong.
Archive powered by MHonArc 2.6.16.