Last active
February 9, 2017 01:56
-
-
Save acobaugh/4365850b59209ea1805a0d5f3383a016 to your computer and use it in GitHub Desktop.
CFEngine Mustache template with variable defaults
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
body common control { | |
bundlesequence => { "main" }; | |
} | |
bundle agent main { | |
vars: | |
"var1" string => "this is var1"; | |
"out1" string => string_mustache("{{vars.main.var1}}"); | |
"out2" string => string_mustache("{{vars.main.var2}}"); | |
"out2default" string => string_mustache("{{vars.main.var2}}{{^vars.main.var2}}default{{/vars.main.var2}}"); | |
reports: | |
"var1 = $(out1)"; | |
"var2 = $(out2)"; | |
"var2 w/ default = $(out2default)"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment