For Windows hosts, can the template credentials be automatically used as the inventory variable "ansible_user"?

https://docs.ansible.com/ansible-tower/3.7.1/html/administration//kerberos_auth.html

The user guide tells me that ansible_user must be specified in the inventory.
In this way, if multiple operation and maintenance personnel have to operate multiple sets of lists, it seems that there are only two options:

  1. Manually change the list variables and template credentials to their own for each run.
    Or: 2: Everyone uses the same LDAP credential.

I hope there is a way 3: After selecting the template credentials, the LDAP account with the same name is automatically used as the ansible_user in the list, but I did not find where to set this.

So, from the perspective of safety and management, which one is better?
Does the method 3 I want exists and how to set it up?

Thanks for any help! Sorry for my bad English.

If you assign a machine credential to the template, then the username specified in this credential will set ansible_user and the password. You could create a credential for each user and set the template to prompt for a machine credential. Then on each run, a user has to select his credential, for which only he as access permission or for which he has to enter the password.

yes ! Now I set the machine credential’s username as XXX@example.com。 If I write XXX only, I’ll get an error. Now it works, Thank you!

在2020年10月12日星期一 UTC+8 下午2:00:03<André Liebigt> 写道: