only add users, but dont allow changing users

Hallo,
I want to manage some users with the users module on running systems. At the moment, there is a lot of garbage with different attributes (UIDs, Homedir) of users with the same name. As there are running processes, ansible should not change these users, but add them if they are absent (e.g. at new systems).

One way to do this is using host_vars like ‘new_server=true’ or something like that and managing users only for servers with this variable. But thats only a dirty solution.

Is there any other way to do this? Something like the “update_password” parameter of the users module, but for all properties would be perfect!

You should consider separating your provisioning playbook from your reconfiguration playbook in this case, using common roles as needed between them.

Generally speaking you would want all user attributes centrally managed so should modify them in Ansible rather than relying on user configuration.