Hey Guys,
I was experimenting with puppet lang ( as in just learning ), found
something like below happening, i couldn't explain it to myself so
thought asking here. I have installed puppet 2.6.7 using rubygems.
here's the manifest:
====
$ cat 7.stage_run_example.pp
stage {"first": before => Stage[main]}
stage {"last": require => Stage[main]}
class {
"unix": stage => first;
"apache": stage => main;
"praddy": stage => last;
}
class unix {
notify{"unix": message => "this is a unix class"}
}
class apache inherits unix {
notify{"apache": message => "this is an apache class"}
}
class praddy inherits apache {
Notify["apache"] { message => "this is overridden" }
notify {"praddy": message => "this is a praddy class" }
}
class param_notify ($message="default message") {
notify{"$message":}
}
include unix
/* the invocation below should emit "this is an apache class" message,
but ???? */
include apache
class {param_notify: message => "I am a parameterized class"}
====
And here's the output that I get:
====
$ puppet apply 7.stage_run_example.pp
warning: Could not retrieve fact fqdn
notice: this is a unix class
notice: /Stage[first]/Unix/Notify[unix]/message: defined 'message' as
'this is a unix class'
notice: I am a parameterized class
notice: /Stage[main]/Param_notify/Notify[I am a parameterized class]/
message: defined 'message' as 'I am a parameterized class'
notice: this is overridden
notice: /Stage[main]/Apache/Notify[apache]/message: defined 'message'
as 'this is overridden'
notice: this is a praddy class
notice: /Stage[last]/Praddy/Notify[praddy]/message: defined 'message'
as 'this is a praddy class'
notice: Finished catalog run in 0.03 seconds
====
So, when including the "apache" class i should not be getting the the
message which is overridden in the "praddy" class, or am i
interpreting it all wrong?
puppet version:
====
$ puppet -V
2.6.7
====
- praddy
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.