On Tuesday, August 19, 2014 11:10:26 AM UTC-5, Yanis Guenane wrote: > > If your file `/volumes/vol1` could be managed by Puppet somehow, you > could use if defined(File['/volumes/vol1']) as a condition. > > Not sure if it is possible in your case, >
Whether it's possible is irrelevant, because that's not *correct* in any case. That use of the defined() function tests whether File['/volumes/vol1'] is in the catalog -- and even then it tests only at a particular instant during catalog compilation, ignoring any later addition of such a resource to the catalog. AND it will return true if File['/volumes/vol1'] has ensure => absent. None of that has anything to do with whether said file/directory is actually present on the target system at the start of the run, or at any random point in the middle of a run. Do not use defined(). Ever. John -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/63704455-82bd-43fe-96b2-72af0a94b250%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
