Have to see about the database module, maybe a real puppet module with provider is nicer. But hey, its simple and straight forward with this queries