aha! I had in mind putting this in puppet instead of the script, but it works here too