Skip to content

Instantly share code, notes, and snippets.

@pmuller
Created April 1, 2015 15:45
Show Gist options
  • Save pmuller/a6bb6f9f662271837149 to your computer and use it in GitHub Desktop.
Save pmuller/a6bb6f9f662271837149 to your computer and use it in GitHub Desktop.
WTF Puppet parameterized class include scope
$ 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