[Pkg-puppet-devel] Bug#529555: [Puppet] onlyif + unless precedence => No, an AND relationship. To close.

Jayen jayenashar at gmail.com
Fri Sep 5 23:44:54 UTC 2014


$ puppet -V
3.6.1

$ ls -lRArt /etc/puppet/
/etc/puppet/:
total 20
-rw-r--r-- 1 root root  430 May 26 17:55 puppet.conf
-rwxr-xr-x 1 root root  256 May 26 17:55 etckeeper-commit-pre
-rwxr-xr-x 1 root root  245 May 26 17:55 etckeeper-commit-post
drwxr-xr-x 2 root root 4096 May 26 17:57 modules
drwxr-xr-x 2 root root 4096 May 26 17:57 manifests

/etc/puppet/modules:
total 0

/etc/puppet/manifests:
total 0

$ md5sum -c /var/lib/dpkg/info/puppet*.md5sums | grep -v OK$
# ===> 1

$ ruby1.9.1 --version
ruby 1.9.3p484 (2013-11-22 revision 43786) [i486-linux]
$ ruby2.0 --version
ruby 2.0.0p457 (2014-03-03) [i386-linux-gnu]
$ ruby2.1 --version
ruby 2.1.2p95 (2014-05-08) [i386-linux-gnu]
$ ruby --version
ruby 2.1.2p95 (2014-05-08) [i386-linux-gnu]

On 05/09/14 16:41, Joseph Herlant wrote:
> 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