[prev in list] [next in list] [prev in thread] [next in thread] 

List:       puppet-dev
Subject:    [Puppet-dev] Tickets #103 and #104
From:       luke () madstop ! com (Luke Kanies)
Date:       2006-03-20 13:56:15
Message-ID: Pine.OSX.4.58.0603201342010.9213 () tsetse ! madstop ! com
[Download RAW message or body]

Hi Mario,

In regards to ticket #103, what does the rest of the manifest look like?

I don't think I have this very well documented, but the variables are
defined in the node's scope, not at the top-level scope.  Take the following
manifest:

    # site.pp
    $a = $hostname

    node mynode {
        $b = $hostname
    }

'$a' gets set to "" because $hostname is not set outside of the node
definition, while '$b' gets set correctly because it uses '$hostname' inside
the node definition.

Does your configuration resemble that?

I would allow that this is not all that clear, and it might not even be
desired.  I did this as a performance optimization, so that everything
outside of the node scope would not need to be recompiled for every node,
but this limitation means that there is generally nothing outside of the
node scope.  I should probably change the parser so that this doesn't
happen.

As to #104, that's a documentation bug, not a code bug.  You'll need to
quote the two variables to join them: "$a$b".  It would be very difficult to
make joined variables a legal term without quotes.

-- 
The Washington Bullets are changing their name.  The owners no longer
want their team's name to be associated with crime.  So from now on the
team will be known as The Bullets.
                -- Paul Harvey, quoting Argus Hamilton
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic