ahh, ok. We are planning on using the "creates" parameter as an "run this unless file is there" directive. Our scenario is that we need to run one time scripts on machines. We figure we can use a file type to create a local script to run, then use the exec to exec the script. At the end of the script we will "touch /var/puppet/receipts/somefile". Might look something like this. If there is a better way to push a one time script to nodes, please let me know.
class run_one_time { file { "/var/puppet/script/myscript001.sh": content => "#!/bin/sh; do a bunch of stuff; touch /var/puppet/receipts/myscript001;" before => Exec[runOnce] } exec { runOnce: command => "/var/puppet/script/myscript.sh", creates => "/var/puppet/receipts/myscript001", path => ["/usr/bin", "/usr/sbin"] } } --- Thanks, Allan Marcus 505-667-5666 On Mar 4, 2010, at 8:43 AM, Peter Meier wrote: > >> Is there a way to set the content of this file (/var/tmp/myfile) using some >> additional parameter in the above syntax? > > the file should be created by the command itself and should represent that > what the command should setup is actually setup. Puppet won't create this > file, nor it will control the content of that file. > > cheers pete > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >
smime.p7s
Description: S/MIME cryptographic signature