Run command if file exists:
exec { 'foo'
command => '<your command>',
onlyif => '/usr/bin/test -f /file/that/must/exist/for/exec/to/run',
}
Run command unless file exists
exec {
command => '<your command>',
creates => '/path/to/file',
}
On Tuesday, 13 March 2012 at 6:23 AM, Douglas Brancaglion wrote:
> Hi guys!
>
> I need configure one command exec with onlyif parameter.
>
> I want test file size exist or no.
>
> Ho i do this?
>
> Tks in advanced.
>
> Douglas
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to [email protected]
> (mailto:[email protected]).
> To unsubscribe from this group, send email to
> [email protected]
> (mailto:[email protected]).
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.