Skip to content

Instantly share code, notes, and snippets.

@zaphod42
Created April 5, 2013 20:57
Show Gist options
  • Select an option

  • Save zaphod42/5322575 to your computer and use it in GitHub Desktop.

Select an option

Save zaphod42/5322575 to your computer and use it in GitHub Desktop.
> bundle exec puppet apply t.pp
Notice: Scope(Class[Foo]): Class: foo
Notice: Scope(Class[Foo]): Module:
Notice: Scope(Class[Foo]): Module Orig: foo
Notice: Scope(Class[Foo]): Module Alias:
Notice: Scope(Class[Foo]): Module Puppet:
Notice: Scope(Class[Foo::Bar]): Class: foo::bar
Notice: Scope(Class[Foo::Bar]): Module:
Notice: Scope(Class[Foo::Bar]): Module Orig: foo
Notice: Scope(Class[Foo::Bar]): Module Alias:
Notice: Scope(Class[Foo::Bar]): Module Puppet:
Notice: Scope(Class[Common]): Class: common
Notice: Scope(Class[Common]): Module: common
Notice: Scope(Class[Common]): Module Orig: common
Notice: Scope(Class[Common]): Module Alias: common
Notice: Scope(Class[Common]): Module Puppet: common
Notice: Scope(Something::Else[in foo::bar]): Class(in foo::bar): foo::bar
Notice: Scope(Something::Else[in foo::bar]): Module(in foo::bar):
Notice: Scope(Something::Else[in foo::bar]): Module Orig(in foo::bar): in foo
Notice: Scope(Something::Else[in foo::bar]): Module Alias:
Notice: Scope(Something::Else[in foo::bar]): Module Puppet:
Notice: Scope(Common::Something[in foo::bar]): Class(in foo::bar): foo::bar
Notice: Scope(Common::Something[in foo::bar]): Module(in foo::bar): common
Notice: Scope(Common::Something[in foo::bar]): Module Orig(in foo::bar): in foo
Notice: Scope(Common::Something[in foo::bar]): Module Alias: common
Notice: Scope(Common::Something[in foo::bar]): Module Puppet: common
Notice: Scope(Something::Else[in common]): Class(in common): common
Notice: Scope(Something::Else[in common]): Module(in common):
Notice: Scope(Something::Else[in common]): Module Orig(in common): in common
Notice: Scope(Something::Else[in common]): Module Alias:
Notice: Scope(Something::Else[in common]): Module Puppet:
Notice: Scope(Common::Something[in common]): Class(in common): common
Notice: Scope(Common::Something[in common]): Module(in common): common
Notice: Scope(Common::Something[in common]): Module Orig(in common): in common
Notice: Scope(Common::Something[in common]): Module Alias: common
Notice: Scope(Common::Something[in common]): Module Puppet: common
Notice: Scope(Something::Else[top]): Class(top):
Notice: Scope(Something::Else[top]): Module(top):
Notice: Scope(Something::Else[top]): Module Orig(top): top
Notice: Scope(Something::Else[top]): Module Alias:
Notice: Scope(Something::Else[top]): Module Puppet:
class common {
notice hiera('unknown', 'Class: %{calling_class}')
notice hiera('unknown', 'Module: %{calling_module}')
notice hiera('unknown', 'Module Orig: %{calling_module_orig}')
notice hiera('unknown', 'Module Alias: %{calling_module_alias}')
notice "Module Puppet: ${module_name}"
something::else { 'in common': }
common::something { 'in common': }
}
define common::something() {
notice hiera('unknown', "Class($title): %{calling_class}")
notice hiera('unknown', "Module($title): %{calling_module}")
notice hiera('unknown', "Module Orig($title): %{calling_module_orig}")
notice hiera('unknown', 'Module Alias: %{calling_module_alias}')
notice "Module Puppet: ${module_name}"
}
class foo {
notice hiera('unknown', 'Class: %{calling_class}')
notice hiera('unknown', 'Module: %{calling_module}')
notice hiera('unknown', 'Module Orig: %{calling_module_orig}')
notice hiera('unknown', 'Module Alias: %{calling_module_alias}')
notice "Module Puppet: ${module_name}"
}
class foo::bar {
notice hiera('unknown', 'Class: %{calling_class}')
notice hiera('unknown', 'Module: %{calling_module}')
notice hiera('unknown', 'Module Orig: %{calling_module_orig}')
notice hiera('unknown', 'Module Alias: %{calling_module_alias}')
notice "Module Puppet: ${module_name}"
something::else { 'in foo::bar': }
common::something { 'in foo::bar': }
}
define something::else() {
notice hiera('unknown', "Class($title): %{calling_class}")
notice hiera('unknown', "Module($title): %{calling_module}")
notice hiera('unknown', "Module Orig($title): %{calling_module_orig}")
notice hiera('unknown', 'Module Alias: %{calling_module_alias}')
notice "Module Puppet: ${module_name}"
}
include foo
include foo::bar
include common
something::else { 'top': }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment