Confused about basic principles....
Chef seems really cool, and I’m about to start playing around with it, but based on my initial readings I’m still confused about one thing. Ideally, I’d like to be able to use Chef to easily assign roles to various machines (e.g. when I assign a machine to be a dns slave, it would create alias interfaces, install packages, copy config, start the service, etc) So clearly Chef is is designed to be good at this. What’s not so clear is what happens when I revoke the role and assign it to another machine. I haven’t been able to easily find any examples of what happens — while it would be great if Chef magically knew how to reverse its previous actions when the role was revoked, this seems like a pretty hard problem. It seems like this is the one case where you have to do things by hand. Is my understanding correct? If chef does have some way of rolling back previous config, how exactly does is work (I’m happy to look at source code). For instance, I could imagine that they only way this could work is if you take an all or nothing approach with Chef — so for instance, if you list ALL services, interfaces, packages that should be on a box, then Chef would know to stop any services, interfaces, uninstall packages that were not to suppose to be there — I’m pretty cool with this approach, but then that leads to the obvious question of suppose I have a hand tweaked system and now want to creating a baseline Chef config from where I can go forwards, are there good tools for this, what’s the safest way to may sure Chef doesn’t uninstall a bunch of stuff because I forgot to include it?
Thanks very much for any advice!
How do I remove sub-recipes from a reciepe
Let me explain:
For our production machines we don’t want to include this recipe (mod_status). Is there a way to do turn it off in our frontend-server role ?
Would I have to essentially recreate the apache cookbook as a site-cookbook and do it there? I would like to avoid this as far as possible so that I don’t have to keep syncing the vendor apache2 recipe with our own.
Or is there a way to inherit from a recipe and then remove some included_recipes ? Thanks,