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

Jayen jayenashar at gmail.com
Sat Sep 6 11:03:40 UTC 2014


Yes, I am running debian jessie.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux testing (jessie)
Release:        testing
Codename:       jessie

I'm pretty sure I put it all in one line.  My command line history would 
agree.

$ puppet apply -v /tmp/my_manifest
Notice: Compiled catalog for eeyore.com in environment production in 
0.07 seconds
Info: Applying configuration version '1410000832'
Notice: Finished catalog run in 0.13 seconds

Now I'm a bit confused...  The command in my history is working now...

Looking at the error message from my earlier email, it looks like sh is 
trying to run /tmp/myfile (like you say it may be on the start of a new 
line and puppet is treating the new line as a new command).

I'm pretty confused now, but I can't reproduce the issue anymore...

$ puppet config print --verbose | grep log.*level
log_level = notice
rails_loglevel = info

$ dpkg -l | egrep "(puppet|ruby)"
ii  libruby1.8                            1.8.7.358-13 
   i386         Libraries necessary to run Ruby 1.8
ii  libruby1.9.1                          1.9.3.484-2 
   i386         Libraries necessary to run Ruby 1.9.1
ii  libruby2.0:i386                       2.0.0.484+really457-3 
   i386         Libraries necessary to run Ruby 2.0
ii  libruby2.1:i386                       2.1.2-3 
   i386         Libraries necessary to run Ruby 2.1
ii  puppet                                3.6.1-1 
   all          Centralized configuration management - agent startup and 
compatibility scripts
ii  puppet-common                         3.6.1-1 
   all          Centralized configuration management
ii  puppet-lint                           1.0.1-1 
   all          check puppet manifests for style guide conformity
ii  ruby                                  1:2.1.0.4 
   all          Interpreter of object-oriented scripting language Ruby 
(default version)
ii  ruby-augeas                           0.5.0-2+b2 
   i386         Augeas bindings for the Ruby language
ii  ruby-hiera                            1.3.4-1 
   all          Transitional package for hiera
ii  ruby-json                             1.8.1-1+b1 
   i386         JSON library for Ruby
ii  ruby-rgen                             0.6.6-1 
   all          Ruby Modelling and Generator Framework
ii  ruby-safe-yaml                        1.0.3-1 
   all          safer YAML loader for Ruby
ii  ruby-selinux                          2.3-1 
   i386         Ruby bindings to SELinux shared libraries
ii  ruby-shadow                           2.3.4-2 
   i386         interface of shadow password for Ruby
ii  ruby1.9.1                             1.9.3.484-2 
   i386         Interpreter of object-oriented scripting language Ruby
ii  ruby2.0                               2.0.0.484+really457-3 
   i386         Interpreter of object-oriented scripting language Ruby
ii  ruby2.1                               2.1.2-3 
   i386         Interpreter of object-oriented scripting language Ruby
ii  rubygems-integration                  1.7 
   all          integration of Debian Ruby packages with Rubygems


On 06/09/14 17:44, Joseph Herlant wrote:
> Hi Jayen,
>
> I don't have so much ruby installed. Only version 2.1.
>
> Are you running Debian Jessie?
> Are you sure you put all your puppet apply command in one line?
> => I am able to reproduce the error when copy-pasting without putting
> the whole command in one line in my bash terminal.
>
> Could you post the result of the following command block please?
> # -----------------------------
> cat << __EOF__ > /tmp/my_manifest
> exec {
>    'rm /tmp/myfile':
>      onlyif => 'test -L /tmp/myfile',
>      unless => 'stat -L /tmp/myfile',
>      path => '/usr/bin:/usr/sbin:/bin';
> }
> __EOF__
> puppet apply -v /tmp/my_manifest
> # -----------------------------
>
>
> Could you also post the result of:
> # -----------------------------
> puppet config print --verbose | grep log.*level
> # and
> dpkg -l | egrep "(puppet|ruby)"
> # -----------------------------
>
> Best,
> Joseph
>



More information about the Pkg-puppet-devel mailing list