Re: [Puppet Users] Use onlyif in EXEC

Tim Sharpe
Mon, 12 Mar 2012 20:45:04 -0000

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 puppet-users@googlegroups.com
(mailto:puppet-users@googlegroups.com).
> To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com
(mailto:puppet-users+unsubscribe@googlegroups.com).
> For more options, visit this group at