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.On Thu, Jan 2, 2014 at 5:28 AM, Sam Darwin < " target="_blank"> > wrote:
is there a way to run:
chef-client -o "role[abc]"
that is, to apply a role without running the entire run_list ?
this should not be ephemeral and have little effect... it should cause all the
results that having the role in the real run_list would have, update the
chef-server with attributes in a persistent way and everything else. I
would also add the role to the real run_list . But I don't want to run all
recipes on the client at that moment.
Archive powered by MHonArc 2.6.16.