[Pkg-puppet-devel] Bug#529555: [Puppet] onlyif + unless precedence => No, an AND relationship. To close.
Joseph Herlant
herlantj at gmail.com
Fri Sep 5 06:41:03 UTC 2014
Control: notfound -1 3.6.1-1
Hi Jayen,
This is weird because when I test this particular case (no file and no
link) on my computer, I don't have the error (even in verbose mode):
-------------------------
$ rm -f /tmp/myfile
$ test -L /tmp/myfile
$ echo $?
1
$ stat -L /tmp/myfile
stat: cannot stat ‘/tmp/myfile’: No such file or directory
$ echo $?
1
$ puppet apply -v -e "exec { 'rm /tmp/myfile': onlyif => 'test -L
/tmp/myfile', unless => 'stat -L /tmp/myfile', path =>
'/usr/bin:/usr/sbin:/bin'; }"
Notice: Compiled catalog for mypc.localhost in environment production
in 0.04 seconds
Info: Applying configuration version '1409898803'
Notice: Finished catalog run in 0.06 seconds
-------------------------
The only way to reproduce your error is to remove the 'onlyif' in my
version, but then, having the error is normal!
What version of puppet do you have?
Joseph
More information about the Pkg-puppet-devel
mailing list