Created
June 20, 2019 12:31
-
-
Save ripienaar/1e6869a82935969258ce5c0e00a14388 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
# .puppetlabs/etc/code/modules/acme/lib/puppet/functions/acme/callstack.rb | |
Puppet::Functions.create_function(:'acme::callstack') do | |
dispatch :stack do | |
end | |
def stack | |
Puppet::Pops::PuppetStack.stacktrace() | |
end | |
end |
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
$ puppet apply test.pp | |
Notice: Scope(Class[One]): [/home/rip/test.pp, 3] | |
Notice: Scope(Class[One]): [/home/rip/test.pp, 8] | |
Notice: Compiled catalog for dev1.devco.net in environment production in 0.03 seconds |
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
# test.pp | |
class one { | |
acme::callstack().each |$trace| { | |
notice($trace) | |
} | |
} | |
include one |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment