Hi,

I need to run an exec ressource if one of the conditions fail.
It seems not to work from puppet versions 0.25.4 to 2.6.4.

# 1. try onlyif:
% puppet -e ' Exec { path => "/usr/bin:/bin:/usr/sbin:/sbin" }
exec { "run_rsn":
      command => "touch /bar",
      onlyif => [ "test -f /does_not_exist", "test -d /"]}'


# 2. try unless:
% puppet -e ' Exec { path => "/usr/bin:/bin:/usr/sbin:/sbin" }
exec { "run_rsn":
      command => "touch /bar",
      unless => [ "test -f /does_not_exist", "test -d /"]}'

% ls /bar                                        
ls: cannot access /bar: No such file or directory
zsh: exit 2

Any hints or ideas or better bugreport or maybe it is a known bug?


All the best, Sandor Szücs
--



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to