Forum: CFEngine Help
Subject: Re: variable method calls using arrays
Author: toddnni
Link to topic: https://cfengine.com/forum/read.php?3,26900,26902#msg-26902

I can reproduce the bug. Usebundle works with normal variables so I propose a 
workaround until you fix the bug :).

bundle agent main {
        vars:
                "b1" string => "b1";
                "b" string => "b2";

        methods:
                "${b1}" usebundle => ${b1}(param);
                "${b}" usebundle => method_wrapper("${b}",param);
}

bundle agent method_wrapper (method, param) {
        methods:
                "${method}" usebundle => $(method)("$(param)");

}


_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to