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
parent f80ce60cf9
commit d863027159
92 changed files with 982 additions and 716 deletions

View File

@@ -8,41 +8,31 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'core'}
DOCUMENTATION = '''
DOCUMENTATION = r'''
module: win_disk_image
short_description: Manage ISO/VHD/VHDX mounts on Windows hosts
version_added: '2.3'
description:
- Manages mount behavior for a specified ISO, VHD, or VHDX image on a Windows host. When C(state) is C(present),
the image will be mounted under a system-assigned drive letter, which will be returned in the C(mount_path) value
of the module result. Requires Windows 8+ or Windows Server 2012+.
of the module result.
- Requires Windows 8+ or Windows Server 2012+.
options:
image_path:
description:
- Path to an ISO, VHD, or VHDX image on the target Windows host (the file cannot reside on a network share)
type: str
required: yes
state:
description:
- Whether the image should be present as a drive-letter mount or not.
type: str
choices: [ absent, present ]
default: present
author:
- Matt Davis (@nitzmahone)
'''
RETURN = r'''
mount_path:
description: filesystem path where the target image is mounted, this has been deprecated in favour of C(mount_paths)
returned: when C(state) is C(present)
type: str
sample: F:\
mount_paths:
description: a list of filesystem paths mounted from the target image
returned: when C(state) is C(present)
type: list
sample: [ 'E:\', 'F:\' ]
'''
EXAMPLES = r'''
# Run installer from mounted ISO, then unmount
- name: Ensure an ISO is mounted
@@ -51,14 +41,27 @@ EXAMPLES = r'''
state: present
register: disk_image_out
- name: Run installer from mounted iso
- name: Run installer from mounted ISO
win_package:
path: '{{ disk_image_out.mount_paths[0] }}setup\setup.exe'
product_id: 35a4e767-0161-46b0-979f-e61f282fee21
state: present
- name: Unmount iso
- name: Unmount ISO
win_disk_image:
image_path: C:\install.iso
state: absent
'''
RETURN = r'''
mount_path:
description: Filesystem path where the target image is mounted, this has been deprecated in favour of C(mount_paths).
returned: when C(state) is C(present)
type: str
sample: F:\
mount_paths:
description: A list of filesystem paths mounted from the target image.
returned: when C(state) is C(present)
type: list
sample: [ 'E:\', 'F:\' ]
'''