Skip to content

Instantly share code, notes, and snippets.

@stahnma
Created November 1, 2009 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stahnma/223634 to your computer and use it in GitHub Desktop.
Save stahnma/223634 to your computer and use it in GitHub Desktop.
#init.pp
exec { "/home/stahnma/bin/myscript":
path => ["/usr/bin", "/usr/sbin"],
}
#myscript
#!/bin/bash
echo "hello world"
exit 0
# output
stahnma@duo /home/stahnma/development/puppet-modules/test_exec/manifests> puppet --debug init.pp
debug: Creating default schedules
debug: //Exec[/home/stahnma/bin/myscript]: Changing returns
debug: //Exec[/home/stahnma/bin/myscript]: 1 change(s)
debug: //Exec[/home/stahnma/bin/myscript]: Executing '/home/stahnma/bin/myscript'
debug: Executing '/home/stahnma/bin/myscript'
notice: //Exec[/home/stahnma/bin/myscript]/returns: executed successfully
debug: Finishing transaction 70227119585940 with 1 changes
# puppet-version
puppet-0.24.8-4.fc11.noarch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment