G'day.

It was, until yesterday, my naive expectation that this would work:

node default                    { include broken }
node "krosp" inherits "default" { $value = "not " }
class broken                    { notice("This is ${value}broken") }

Specifically, I expected this would output 'This is not broken', but instead
we get the counter-intuitive and *very* annoying 'This is broken'.

As far as I can tell this is because puppet treats $value as out of scope to
the classes included from default: the order of processing is:

 - node 'default', or any other inherited node.
   - any classes included are processed.
 - node $hostname is processed.

This means our practice of included universal features into the default node,
then inheriting that into other nodes, also makes it impossible for us to do
things like configure features of those universal classes.

I really do *NOT* want to go down the path of having to repeat the same set of
classes in every node; that invites disaster, by forcing me to repeat myself.

I suspect we will turn 'node default' into 'class default', then include that
rather than inheriting that, since that does fix the scope issue.


Anyway, my two questions:

Is this actually the correct behaviour as of 0.25.4?

Is this every likely to change to something that doesn't suck?

        Daniel
-- 
✣ Daniel Pittman            ✉ dan...@rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons

-- 
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