Created
April 1, 2015 15:45
-
-
Save pmuller/a6bb6f9f662271837149 to your computer and use it in GitHub Desktop.
WTF Puppet parameterized class include scope
This file contains 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
$ puppet -V | |
2.7.17 | |
$ cat /tmp/wtf.pp | |
class foo { | |
warning('foo') | |
} | |
class bar::foo { | |
warning('bar::foo') | |
} | |
class bar::bar { | |
warning('bar::bar') | |
# expected behaviors: | |
# The real ::foo is included | |
#include ::foo | |
# ::bar::foo is included | |
#include foo | |
#class { 'foo': } | |
# WTF: Includes both ::foo and ::bar::foo | |
class { '::foo': } | |
} | |
include bar::bar | |
$ puppet apply /tmp/wtf.pp | |
warning: Scope(Class[Bar::Bar]): bar::bar | |
warning: Scope(Class[Bar::Foo]): bar::foo | |
warning: Scope(Class[Foo]): foo | |
notice: Finished catalog run in 0.04 seconds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment