Windows: Add missing parameter types and doc fixes (#50232)

* Windows: Add missing parameter types and doc fixes

This PR includes:
- Adding missing parameter types
- Various documentation fixes

* Update lib/ansible/modules/windows/win_copy.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_credential.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_domain_computer.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_domain_user.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_environment.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_psexec.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_uri.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_wait_for.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Ensure docstrings are raw strings
This commit is contained in:
Dag Wieers 2019-01-03 17:50:44 +01:00 committed by Alicia Cozine
commit d863027159
92 changed files with 982 additions and 716 deletions

View file

@ -14,45 +14,48 @@ module: win_domain_controller
short_description: Manage domain controller/member server state for a Windows host
version_added: '2.3'
description:
- Ensure that a Windows Server 2012+ host is configured as a domain controller or demoted to member server. This module may require
subsequent use of the M(win_reboot) action if changes are made.
- Ensure that a Windows Server 2012+ host is configured as a domain controller or demoted to member server.
- This module may require subsequent use of the M(win_reboot) action if changes are made.
options:
dns_domain_name:
description:
- When C(state) is C(domain_controller), the DNS name of the domain for which the targeted Windows host should be a DC.
type: str
domain_admin_user:
description:
- Username of a domain admin for the target domain (necessary to promote or demote a domain controller).
type: str
required: true
domain_admin_password:
description:
- Password for the specified C(domain_admin_user).
type: str
required: true
safe_mode_password:
description:
- Safe mode password for the domain controller (required when C(state) is C(domain_controller)).
type: str
local_admin_password:
description:
- Password to be assigned to the local C(Administrator) user (required when C(state) is C(member_server)).
type: str
read_only:
description:
- Whether to install the domain controller as a read only replica for an
existing domain.
- Whether to install the domain controller as a read only replica for an existing domain.
type: bool
default: 'no'
default: no
version_added: '2.5'
site_name:
description:
- Specifies the name of an existing site where you can place the new
domain controller.
- Specifies the name of an existing site where you can place the new domain controller.
- This option is required when I(read_only) is C(yes).
type: str
version_added: '2.5'
state:
description:
- Whether the target host should be a domain controller or a member server.
choices:
- domain_controller
- member_server
type: str
choices: [ domain_controller, member_server ]
database_path:
description:
- The path to a directory on a fixed disk of the Windows host where the
@ -77,17 +80,16 @@ author:
- Matt Davis (@nitzmahone)
'''
RETURN = '''
RETURN = r'''
reboot_required:
description: True if changes were made that require a reboot.
returned: always
type: bool
sample: true
'''
EXAMPLES = r'''
- name: ensure a server is a domain controller
- name: Ensure a server is a domain controller
win_domain_controller:
dns_domain_name: ansible.vagrant
domain_admin_user: testguy@ansible.vagrant
@ -109,7 +111,7 @@ EXAMPLES = r'''
state: member_server
log_path: C:\ansible_win_domain_controller.txt
- name: promote server as a read only domain controller
- name: Promote server as a read only domain controller
win_domain_controller:
dns_domain_name: ansible.vagrant
domain_admin_user: testguy@ansible.vagrant