Hi,
I would like to add a user to a group like that:
- name: Set main user
action: user name={{ main_user }} groups={{ local_admin_group }} append=yes state=present
when: main_user is defined
tags: - users
However, it is possible that at the point this runs the user is not available (e. g. sssd not running, LDAP server not available, …) which leads to the user being added to /etc/passwd.
How can I prevent the user from being created locally by the user module? I feel this is something that could be easily added to the module, but maybe there is another way already.
Sebastian