Forum: Cfengine Help
Subject: Re: Cfengine Help: Re: slist from module?
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,21266,21269#msg-21269
Nakarin,
You might be on to something. I changed my example to have the module set a
class aswell as the slist.
$ cat ~/bin/modb
#!/bin/sh
printf '@b= { "one", "two", "three", "four" }\n'
printf '+foo\n'
$ modb
@b= { "one", "two", "three", "four" }
+foo
$ cat bugs.cf
body common control
{
bundlesequence => { "test" };
}
bundle agent test
{
vars:
foo::
"a" slist => { @{modb.b} };
commands:
"/home/nwatson/bin/modb", module => "true";
reports:
foo::
"a list: ${a}";
}
$ cf-agent -IKf ./bugs.cf
-> Executing '/home/nwatson/bin/modb' ...(timeout=-678,owner=-1,group=-1)
M "/home/nwatson/bin/modb":
-> Completed execution of /home/nwatson/bin/modb
R: a list: ${a}
$ cf-agent -V
This comprises cf-agent core community version 3.1.4 - Copyright Copyright (C)
Cfengine AS 2008,2010-
It seems that the agent never returns to the vars promise possibly because of
promise locking.
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine