
body common control
{
bundlesequence => { "main" };
inputs => { "unit_namespace1.cf", "unit_namespace2.cf", "unit_namespace3.cf" };
}


bundle agent main
{
vars: 

  "alien_list" slist => { getindices("name1:mymethod.array")};

  "local_list" slist => { getindices("test.array") };

files:

 "/tmp/bla"

    create => "true",
    perms => zub("700");
    # or perms => default:zub("700");

methods:

  "namespace demo" usebundle => name1:mymethod("arg1");

  "namespace demo" usebundle => name2:mymethod("arg1","arg2");

  "namespace demo" usebundle => test;
  # Or "namespace demo" usebundle => default:test;

  "namespace demo" usebundle => test_in_last_file;

reports:

  cfengine_3::

    "Foreign namespace index list: $(alien_list)";
    "Local index list: $(local_list)";
}


body perms zub(x)
{
mode => "$(x)";
}


bundle agent test
{
vars:

  "array[one]" string => "text one";
  "array[two]" string => "text two";
  "array[three]" string => "text three";

reports:

   cfengine_3::

     "TEST OK in no namespace";
}