[Pkg-puppet-devel] Bug#524812: Bug#524812: exec type, creates directive does not create

Russ Allbery rra at debian.org
Mon Apr 20 06:30:29 UTC 2009


Jayen Ashar <jayen at science.unsw.edu.au> writes:

>   exec {
>     "mail jayen at science.unsw.edu.au -s \"kB available on /: `df / | tail -n 1 | sed -r 's/ +/	/g' | cut -f4` - `hostname`\"":
>       path => ["/bin", "/sbin", "/usr/bin", "/usr/sbin"],
>       creates => "/var/tmp/partition_usage_20090420";
>   }
>
> does not create /var/tmp/partition_usage_20090420 as advertised and
> executes the command every time puppet runs

"creates" doesn't mean quite what you think it means.  The creates
attribute tells Puppet that your command will create that file, and hence
the command should not be run if that file already exists.  It doesn't
tell Puppet to create the file; your command has to do that.

-- 
Russ Allbery (rra at debian.org)               <http://www.eyrie.org/~eagle/>





More information about the Pkg-puppet-devel mailing list