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",
    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 view this discussion on the web visit
For more options, visit

Reply via email to