Add a force_replace_host flag to win_domain_membership (#53542)

* Add a force_replace_host flag to win_domain_membership

Satisfies https://github.com/ansible/ansible/issues/53539

* Rework backticks

* Bump version_added

* Check for existence of current hostname as well; use LDAPFilter during search

* Rename $force_replace_host to $allow_existing_computer_account

* Added docs, porting guide and minor nit in code
This commit is contained in:
Slava Maslennikov 2019-03-27 21:36:26 -07:00 committed by Jordan Borean
commit 85d836171b
5 changed files with 29 additions and 7 deletions

View file

@ -48,6 +48,13 @@ options:
description:
- When C(state) is C(workgroup), the name of the workgroup that the Windows host should be in.
type: str
allow_existing_computer_account:
description:
- If a host with the same hostname is already in the AD, replace it.
type: bool
choices: [ true, false ]
default: false
version_added: "2.8"
seealso:
- module: win_domain
- module: win_domain_controller