Last active
March 10, 2020 02:30
-
-
Save binford2k/ea7a172e15ba4d30c4521c1dcd434b96 to your computer and use it in GitHub Desktop.
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
[~]$ cat tmp/append.pp | |
class foo::bar($foo = []) { | |
inline_template('<%= @foo.push("bar") %>') | |
# do things | |
inline_template('<%= @foo.push("foo") %>') | |
# more things | |
inline_template('<%= @foo.push("hello") %>') | |
# even more things | |
inline_template('<%= @foo.push("test") %>') | |
notify{$foo.join(','):} | |
} | |
$foo = [] | |
class { 'foo::bar': | |
foo => $foo, | |
} | |
notify{'another': | |
message => $foo.join(','), | |
} | |
[~]$ puppet apply tmp/append.pp | |
Notice: Compiled catalog for nyx.local in environment production in 0.03 seconds | |
Notice: bar,foo,hello,test | |
Notice: /Stage[main]/Foo::Bar/Notify[bar,foo,hello,test]/message: defined 'message' as 'bar,foo,hello,test' | |
Notice: | |
Notice: /Stage[main]/Main/Notify[another]/message: defined 'message' as '' | |
Notice: Applied catalog in 0.02 seconds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment