I've seen a few user management bundles floating around but I haven't
seen much for group management.

I like the array pattern for defining user and group configuration but I
am running into an issue with groups. Here are my bundles

bundle agent definegroups {
  vars:
    "group[users]" slist =>  { "user1",
                               "user2",
                             };
    "group[admins]" slist => { "user1", };

  methods:
    "group" usebundle => creategroups("definegroups.group");
}

bundle agent creategroups(groups) {
  vars:
    "groupname" slist => getindices("$(groups)");
  files:
    "/tmp/group"
      edit_line =>
append_user_field("$(groupname)","4","@creategroups.groups($(groupname)])";
}


@creategroups.groups[$(groupname)] doesnt get expanded and It ends up
going directly into the group.




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

Reply via email to