Hello,

I have noticed that commands specified in 'onlyif' and 'unless' parameters of the Exec type are always executed, even if --noop option is given on command line or the resource's noop parameter is set to true.

For example, the following block always creates /tmp/onlyif and /tmp/unless.

exec{"touch /tmp/exec":
        noop   => true,
        onlyif => "touch /tmp/onlyif",
        unless => "touch /tmp/unless; false",
}

Is this expected behavior?

Is it possible to determine from within puppet manifest whether --noop option has been given on command line? For example, to change the block above to something like:

if ! $noop {
        exec{"touch /tmp/exec":
                onlyif => "touch /tmp/onlyif",
                unless => "touch /tmp/unless; false",
        }
}

Thanks,

Vlad

--
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to