puppet 2.6.3
How i can make this work?
class a {
if ($b::x) { notify "yeah!" }
}
class b {
$x=true
}
node base {
include a
}
node test inherits base {
include b
}
currently i got "Could not look up qualified variable
''b::x''; class b
has not been evaluated"
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
> currently i got "Could not look up qualified variable ''b::x''; class b > has not been evaluated"Node Inheritance isn''t working the way you are assuming it should work [1]. I would generally get rid off of any node inheritance. ~pete [1] http://projects.puppetlabs.com/projects/1/wiki/Frequently_Asked_Questions#Node+Inheritance+and+Variable+Scope -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
The following would work:
class a {
if $x { notify "yeah!" }
}
node base {
$x = true
}
node test inherits base {
include a
}
On Nov 29, 12:21 pm, walexey <wale...@gmail.com>
wrote:> puppet 2.6.3
>
> How i can make this work?
>
> class a {
> if ($b::x) { notify "yeah!" }
>
> }
>
> class b {
> $x=true
>
> }
>
> node base {
> include a
>
> }
>
> node test inherits base {
> include b
>
> }
>
> currently i got "Could not look up qualified variable
''b::x''; class b
> has not been evaluated"
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.