Skip to content

Instantly share code, notes, and snippets.

@acobaugh
Created February 9, 2017 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acobaugh/69b3c9e37070f757e5d67c1ca991ab92 to your computer and use it in GitHub Desktop.
Save acobaugh/69b3c9e37070f757e5d67c1ca991ab92 to your computer and use it in GitHub Desktop.
body common control {
bundlesequence => { "main" };
}
bundle agent main {
vars:
"notempty" string => "foo";
"notempty2" string => "bar";
"data_string" string => string_mustache("not empty = {{vars.main.notempty}} ; empty = {{^vars.main.empty}}default{{/vars.main.empty}} ; not empty with default = {{^vars.main.notempty2}}default{{/vars.main.notempty2}}");
reports:
any::
"$(data_string)";
}
$ cf-agent -K -f `pwd`/test.cf
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
R: $(data_string)
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
warning: Mustache sections can only take a boolean or a container (array or map) value, but section 'vars.main.notempty2' isn't getting one of those.
body common control {
bundlesequence => { "main" };
}
bundle agent main {
vars:
"notempty" string => "foo";
"data_string" string => string_mustache("not empty = {{vars.main.notempty}} ; empty = {{^vars.main.empty}}default{{/vars.main.empty}}");
reports:
any::
"$(data_string)";
}
$ cf-agent -K -f `pwd`/test.cf
R: not empty = foo ; empty = default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment