I'm running a javaprogram with shell module to iterate over a list of users, for each user I want to loop through a number of groups to add to each user.
I'm not looking to add new users/groups to the OS but to a program that runs on the server.
All users in USER_LIST should be added to all groups in GROUP_LIST.
Non working example:
vars:
GROUP_LIST:
- DATA
- ONE
- TWO
USER_LIST:
- USER1
- USER2
- USER3
- name: add all users to all groups
shell:
cmd: |
java -jar /opt/alt/Manager.jar mod -g {{GROUP_LIST}} {{item}}
loop: {{USER_LIST}}