Namespace trick

20 views
Skip to first unread message

Bas van der Vlies

unread,
Jan 3, 2017, 9:37:32 AM1/3/17
to help-cfengine

Hello and I good new year. I just thought about a namespace trick. I
want to be able to define variables in the same namespace, needed
another def.cf file ;-).

now I have: def.json, def.cf, <setup_dir>/def.cf. The trick is to use:
* bundle common def
* bundle agent def

{{{
bundle common def
{
vars:
"common" string => "jajaj";
}

bundle agent def
{
vars:
"src" string => "/var/tmp/src";
"dest" string => "/var/tmp/dst_with (86)";
"exclude_dir" slist => { "\.svn" };

reports:
"def src: $(def.src)";
"common: $(def.common)";
}
}}}

--
---
Bas van der Vlies
| Operations, Support & Development | SURFsara | Science Park 140 | 1098
XG Amsterdam
| T +31 (0) 20 800 1300 | bas.van...@surfsara.nl | www.surfsara.nl |
Reply all
Reply to author
Forward
0 new messages