refactor out python and plugins puppet code into their own define

- this was originally part of the Rockage updates