I don't usually recommend other languages at PM, but in this case it's more of a product. Have you looked at cfengine, puppet or facter (the last one has a cpan module too). They should do what you want and more, it depends on how far you want to take it. We use puppet at work for server management and once you have taken some time to do the ground work it is a breeze to install x numbers of new modules/packages on the server farm by changing a single class definition.
Confucius says kill mosquito unless cannon