Forum: Cfengine Help
Subject: Re: slist from module?
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,21255,21264#msg-21264
Working example:
$ cf-agent -IKf ./bugs.cf
-> Executing '/home/nwatson/bin/modb' ...(timeout=-678,owner=-1,group=-1)
-> Completed execution of /home/nwatson/bin/modb
R: a list: one
R: a list: two
R: a list: three
R: a list: four
$ cat bugs.cf
body common control
{
bundlesequence => { "test" };
}
bundle agent test
{
vars:
"a" slist => { @{modb.b} };
commands:
"/home/nwatson/bin/modb", module => "true";
reports:
linux::
"a list: ${a}";
}
$ cat ~/bin/modb
#!/bin/sh
printf '@b= { "one", "two", "three", "four" }'
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine