Two puppet shortcuts

Mike McGrath mmcgrath at redhat.com
Sat Jul 31 02:47:56 UTC 2010


I've created two puppet shortcuts.  If you have just some script to
deploy.  You can stick it in modules/scripts/files.  Then just use:

scripts::generic { 'script_name.sh': }

and it will automatically put it in /usr/local/bin/script_name.sh on the
server you include that on.


The next shortcut is a script / cron combo.  Lets say you have a
"myscript.cron" and a "myscript.sh"  You can put both files in
modules/scripts/files then use:

scripts::script_and_cron { 'myscript': }

and it will deploy the script to /usr/local/bin/myscript.sh and the cron
file to /etc/cron.d/myscript.cron

I did this because both of these use cases exist all over the place and we
seem to be writing a full class for each, then including it.

	-Mike



More information about the infrastructure mailing list