I have no idea what you current playbook looks like, and I have not
used ansible to manage Windows, so I am going to assume you are using
the win_domain_user module to create a user.
Looking at the docs, the 'state' parameter accepts a 'query' value:

https://docs.ansible.com/ansible/2.9/modules/win_domain_user_module.html#parameter-state

I would do something like this:

- win_domain_user to query existing user, and register result
- set_fact to change only a few value in that data structure
- win_domain_user to create a new users with that data structure

On Fri, 6 Nov 2020 at 11:42, Nicolas Talvasson <[email protected]> wrote:
>
> Hi
> I found how to create a new user in my Windows active directory with ansible, 
> but we usually copy a, existing in order to add the group needed more easyly
>
> Is there a similiare possibility to copy an existing user with all the 
> specification and just modify first name and last name and password
>
> Thanks
> Nicolas
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/c208c274-955b-41e7-b98b-882a2bf17b63n%40googlegroups.com.



-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwPmBSRJ_dT_COZ6-4_VDXN5nSsS9SmkskmBWwzFyuAYmQ%40mail.gmail.com.

Reply via email to