A util that needs to be written
July 23, 2008
Let’s say I have a bunch of admins working on a bunch of systems. I know they try hard to make sure that anything they change on a machine to fix a problem is also put into our config mgmt system but I also know that at 3am you can’t always remember to do that. So, I want to be able to make sure we know if things have changed. Something like this:
import yum my = yum.YumBase() for pkg in my.rpmdb: ver_results = pkg.verify() for file_that_does_not_match in ver_results.keys(): if not check_against_config_mgmt(thishost, file_that_does_not_match): notify_admin_about_modification(thishost, file_that_does_not_match, pkg)
The functions that don’t exist are the check_against_config_mgmt() and notify_admin_about_modification() functions. The parts preceding those all exist in current yum versions.
Anyone think they can take that up and find a way of checking if puppet knows about the changes that have been made? If you do, yell at me and I’ll help.