Skip to content

Instantly share code, notes, and snippets.

@tjormola
Created September 16, 2016 00:23
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 tjormola/a2f2db3580f8b73250e36acd16befe84 to your computer and use it in GitHub Desktop.
Save tjormola/a2f2db3580f8b73250e36acd16befe84 to your computer and use it in GitHub Desktop.
(03:22:33)(tj@ganga)(~)$ cat /tmp/vartest.cf
bundle agent main
{
vars:
"foo"
string => $(cf_null);
classes:
"is_foo_variable"
expression => isvariable("foo");
reports:
"foo=$(foo)";
is_foo_variable::
"foo is a variable alright";
}
(03:22:38)(tj@ganga)(~)$ cf-agent -V
CFEngine Core 3.9.1
(03:22:42)(tj@ganga)(~)$ cf-agent -f /tmp/vartest.cf
R: foo=$(cf_null)
R: foo is a variable alright
(03:22:47)(tj@ganga)(~)$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment