This is an example I found online that would do what I want: check if a dir 
exists and if so, do something:

class foo {
  exec { "is foo present":
    command => "/bin/true",
    onlyif => "/usr/bin/test -d /foo"
  }
  file { "create a file if dir foo is present":
    path => "/path/otherfoo",
    ...snip...
    require => Exec["is foo present],
  }
}

But it doesn't work - the 'file' resource is always executed, regardless of 
whether the 'exec' resource returned true or false.
What am I missing?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c7abec5c-e80e-440a-9e9b-0662c728820d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to