Commit Graph

1 Commits (cae9d633b06a62cdc40df0b5fc96db1f1df6d4e9)

Author SHA1 Message Date
Marius Rieder d2e1aeeb67 win_domain_user: Make Identification of the user to work with more robust (#61594)
* Ensure we work on only one user.

After the initial get/create use the GUID of the found/created user to
ensure we will not start to work with  a different user. If we create a
user or modify it's attributes an he is not identified with the name
parameter afterwards this module fails in rather unpredictable ways.

This addressed #45298

* Use splatting create_args for creating user.

This prepars this for adding more optional create arguments without 
nesting of condictions.

* Set the UserPrincipalName and SamAccountName on create.

Set the UserPrincipalName and SamAccountName on the create operation if 
upn is given to ensure the User is created with a contollable 
SamAccountName.

* Rename $username to $name.

$username is missleading as its not the SamAccountName.

* Add a identity parameter to win_domain_user

This gives the user full controll over how the user is identified in the 
AD.

* Add version_added information for new parameter and fix yaml syntax.

* Added changelog fragment
5 years ago