Closed charnet1019 closed 1 year ago
Acknowledged. This is caused by the order of calling the group.yml
(first) and users.yml
(second).
I'm not sure how to resolve this exact situation. Keeping the issue open for future reference.
A work-around can be to first define the user to delete:
- name: user mgr
hosts: demo
become: yes
gather_facts: yes
roles:
- role: users
users_user_list:
- name: tim
state: absent
Run ansible, and next run, define the group to delete:
- name: user mgr
hosts: demo
become: yes
gather_facts: yes
roles:
- role: users
users_group_list:
- name: tim
state: absent
It's going to be ugly to address this issue. I'm closing this as there was no further interest.
Thanks for brining it up though.
playbook: