How to use variables in templates?

9 views
Skip to first unread message

Enrico Scholz

unread,
Jun 3, 2017, 10:52:08 AM6/3/17
to help-c...@googlegroups.com
Hello,

I try to expand variables in 'edit_template' which are defined in the
containing bundle.

E.g.

---
bundle agent main {
vars:
"test" string => "test-string";

files:
"/tmp/x"
create => "true",
edit_template => "/tmp/x.tmpl";
}
---

Creating /tmp/x.tmpl with a content of '${test}' does not work; '/tmp/x'
will contain '${test}'.

Using '${main.test}' gives the expected 'test-string' but is not a solution
because it is not applicable for real-world situations ('edit_template' on
same template in different bundles, or trying to expand bundle parameters).


How can I refer to variables of the actual bundle?

[cfengine 3.10.1]



Enrico

Neil H. Watson

unread,
Jun 3, 2017, 11:17:34 AM6/3/17
to help-c...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages