Created
September 2, 2014 10:15
-
-
Save bodepd/96daf31c92f340bebb20 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class foo { | |
$bar = 'one' | |
} | |
node /foo/ { | |
$bar = 'two' | |
include foo | |
notice("${::foo::bar}") | |
} |
# puppet apply --certname foo123 -e '
> class foo {
> $bar = 'one'
> }
>
> node /foo/ {
> $bar = 'two'
> include foo
> notice("${::foo::bar}")
> }
> '
Notice: Scope(Node[foo]): two
Notice: Compiled catalog for foo123 in environment production in 0.02 seconds
Notice: Finished catalog run in 0.03 seconds
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ahpook This error only occurs when the node name happens to match the class name. In that case, it appears that:
will resolve ::foo::bar as the $bar variable from the namespace of the node scope and not as the bar variable from the namespace of the foo class.