Quick Howtos

Using MCollective to generate spiffy Shellshock reports for your boss


If you haven't heard of Shellshock, you should crawl out from under your rock and do some Googling. Back? Ok, great. I won't explain what it is, but if you're reading this post, you've probably been tasked to find and patch all vulnerable systems. And management would like to see a comprehensive report of which machines have been patched....

Luckily enough, with Puppet, Facter, and MCollective, that's a trivial task.

Python DB-API is terrible, or how to return dictionaries from a database query

Do you, like me, pull out your hair and get the almost irresistible urge to murder small cute things when forced to use Python's DB-API? Despite being under development for many years it seems to be half-baked at best.

One such idiocy would be the utter lack of dictionary support, the ability that pretty much every other database abstraction layer since, well...forever, has had to allow you to address the columns by name. E.g., print row['firstName'].