FAQ
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+unsubscribe@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.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
grouppuppet-users @
categoriespuppet
postedSep 4, '13 at 1:01p
activeSep 5, '13 at 2:01p
posts3
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase