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+unsubscr...@googlegroups.com > (mailto:puppet-users+unsubscr...@googlegroups.com). > 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 puppet-users@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.