Forum: Cfengine Help
Subject: Re: empty slist for zero-item expansion
Author: Seva Gluschenko
Link to topic: https://cfengine.com/forum/read.php?3,17951,17952#msg-17952

Speaking in Cfengine's terms, your example must be rewritten as follows:

bundle agent commands
{
 vars:
    certain_class::
              "cmdlst"   slist => { "foo", "bar" };
   another_class::
              "cmdlist"  slist => { "blah", "blah-blah" };

 classes:
    "todo"  expression => isvariable("cmdlist");

 commands:
    todo::
       "$(sys.workdir)/bin/$(cmdlist)"
                      comment => "execute commands if any";
}


_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to