On 10/10/2014 09:17 PM, Stella wrote:
> I am using Puppet 3.6.2. I am trying to write a puppet module, which
> will replace a file with source template ONLY IF this file already
> exists. If this file doesn't exist, don't do anything. 

Have you tried not specifying an "ensure" value?

file { '/path/to/file': content => 'foobar' }

This should only do anything if the file is there, because the resource
doesn't care about its ensure (i.e. existence) value.

Cheers,
Felix

-- 
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/543868AE.5090803%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to