Windows: Fix documentation strings to be raw strings (#20301)

* Windows: Fix documentation strings to be raw strings

Especially when using Windows paths they easily get confused as escaped
sequences or unicode characters. So by default use raw strings

This fixes #20295

* Fixed as hinted by @abadger

And some trailing whitespace fixes.
This commit is contained in:
Dag Wieers 2017-01-19 02:57:33 +01:00 committed by Matt Davis
commit 5b9eb92722
40 changed files with 161 additions and 161 deletions

View file

@ -27,7 +27,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_acl module: win_acl
version_added: "2.0" version_added: "2.0"

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_acl_inheritance module: win_acl_inheritance
version_added: "2.1" version_added: "2.1"
@ -76,6 +76,6 @@ EXAMPLES = r'''
reorganize: True reorganize: True
''' '''
RETURN = ''' RETURN = r'''
''' '''

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'committer', 'supported_by': 'committer',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_chocolatey module: win_chocolatey
version_added: "1.9" version_added: "1.9"
@ -98,7 +98,7 @@ author: "Trond Hindenes (@trondhindenes), Peter Mounce (@petemounce), Pepe Barbe
# * Time each item that is run # * Time each item that is run
# * Support 'changed' with gems - would require shelling out to `gem list` first and parsing, kinda defeating the point of using chocolatey. # * Support 'changed' with gems - would require shelling out to `gem list` first and parsing, kinda defeating the point of using chocolatey.
EXAMPLES = ''' EXAMPLES = r'''
# Install git # Install git
win_chocolatey: win_chocolatey:
name: git name: git

View file

@ -23,7 +23,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_command module: win_command
short_description: Executes a command on a remote Windows node short_description: Executes a command on a remote Windows node
@ -59,24 +59,24 @@ author:
- Matt Davis - Matt Davis
''' '''
EXAMPLES = ''' EXAMPLES = r'''
# Example from Ansible Playbooks. # Example from Ansible Playbooks.
- win_command: whoami - win_command: whoami
register: whoami_out register: whoami_out
# Run the command only if the specified file does not exist. # Run the command only if the specified file does not exist.
- win_command: wbadmin -backupTarget:c:\\backup\\ creates=c:\\backup\\ - win_command: wbadmin -backupTarget:C:\backup\ creates=C:\backup\
# You can also use the 'args' form to provide the options. This command # You can also use the 'args' form to provide the options. This command
# will change the working directory to c:\\somedir\\ and will only run when # will change the working directory to C:\somedir\\ and will only run when
# c:\\backup\\ doesn't exist. # C:\backup\ doesn't exist.
- win_command: wbadmin -backupTarget:c:\\backup\\ creates=c:\\backup\\ - win_command: wbadmin -backupTarget:C:\backup\ creates=C:\backup\
args: args:
chdir: c:\\somedir\\ chdir: C:\somedir\
creates: c:\\backup\\ creates: C:\backup\
''' '''
RETURN = ''' RETURN = r'''
msg: msg:
description: changed description: changed
returned: always returned: always

View file

@ -23,7 +23,7 @@ ANSIBLE_METADATA = {'status': ['stableinterface'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_copy module: win_copy
version_added: "1.9.2" version_added: "1.9.2"
@ -50,7 +50,7 @@ options:
author: "Jon Hawkesworth (@jhawkesworth)" author: "Jon Hawkesworth (@jhawkesworth)"
''' '''
EXAMPLES = ''' EXAMPLES = r'''
- name: Copy a single file - name: Copy a single file
win_copy: win_copy:
src: /srv/myfiles/foo.conf src: /srv/myfiles/foo.conf
@ -61,12 +61,12 @@ EXAMPLES = '''
src: files/temp_files/ src: files/temp_files/
dest: c:\temp dest: c:\temp
''' '''
RETURN = ''' RETURN = r'''
dest: dest:
description: destination file/path description: destination file/path
returned: changed returned: changed
type: string type: string
sample: 'c:\temp' sample: c:\temp
src: src:
description: source file used for the copy on the target machine description: source file used for the copy on the target machine
returned: changed returned: changed

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_dotnet_ngen module: win_dotnet_ngen
version_added: "2.0" version_added: "2.0"
@ -43,7 +43,7 @@ author: Peter Mounce
options: {} options: {}
''' '''
EXAMPLES = ''' EXAMPLES = r'''
# Run ngen tasks # Run ngen tasks
win_dotnet_ngen: win_dotnet_ngen:
''' '''

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_environment module: win_environment
version_added: "2.0" version_added: "2.0"
@ -77,12 +77,12 @@ notes:
and in again before they become available. and in again before they become available.
''' '''
EXAMPLES = ''' EXAMPLES = r'''
# Set an environment variable for all users # Set an environment variable for all users
win_environment: win_environment:
state: present state: present
name: TestVariable name: TestVariable
value: "Test value" value: Test value
level: machine level: machine
# Remove an environment variable for the current users # Remove an environment variable for the current users
win_environment: win_environment:

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_feature module: win_feature
version_added: "1.7" version_added: "1.7"

View file

@ -23,7 +23,7 @@ ANSIBLE_METADATA = {'status': ['stableinterface'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_file module: win_file
version_added: "1.9.2" version_added: "1.9.2"
@ -58,7 +58,7 @@ options:
choices: [ file, directory, touch, absent ] choices: [ file, directory, touch, absent ]
''' '''
EXAMPLES = ''' EXAMPLES = r'''
- name: Create a file - name: Create a file
win_file: win_file:
path: C:\temp\foo.conf path: C:\temp\foo.conf

View file

@ -21,7 +21,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_file_version module: win_file_version
version_added: "2.1" version_added: "2.1"
@ -48,7 +48,7 @@ EXAMPLES = r'''
msg: '{{ exe_file_version }}' msg: '{{ exe_file_version }}'
''' '''
RETURN = """ RETURN = r'''
win_file_version.path: win_file_version.path:
description: file path description: file path
returned: always returned: always
@ -84,4 +84,4 @@ win_file_version.file_private_part:
returned: no error returned: no error
type: string type: string
""" '''

View file

@ -21,7 +21,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_firewall_rule module: win_firewall_rule
version_added: "2.0" version_added: "2.0"
@ -112,7 +112,7 @@ options:
''' '''
EXAMPLES = ''' EXAMPLES = r'''
- name: Firewall rule to allow smtp on TCP port 25 - name: Firewall rule to allow smtp on TCP port 25
action: win_firewall_rule action: win_firewall_rule
args: args:

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['stableinterface'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_get_url module: win_get_url
version_added: "1.7" version_added: "1.7"

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['stableinterface'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_group module: win_group
version_added: "1.7" version_added: "1.7"
@ -57,7 +57,7 @@ options:
author: "Chris Hoffman (@chrishoffman)" author: "Chris Hoffman (@chrishoffman)"
''' '''
EXAMPLES = ''' EXAMPLES = r'''
- name: Create a new group - name: Create a new group
win_group: win_group:
name: deploy name: deploy

View file

@ -22,7 +22,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_iis_virtualdirectory module: win_iis_virtualdirectory
version_added: "2.0" version_added: "2.0"

View file

@ -22,7 +22,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_iis_webapplication module: win_iis_webapplication
version_added: "2.0" version_added: "2.0"

View file

@ -23,7 +23,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_iis_webapppool module: win_iis_webapppool
version_added: "2.0" version_added: "2.0"
@ -57,7 +57,7 @@ options:
author: Henrik Wallström author: Henrik Wallström
''' '''
EXAMPLES = ''' EXAMPLES = r'''
- name: Return information about an existing application pool - name: Return information about an existing application pool
win_iis_webapppool: win_iis_webapppool:
name: DefaultAppPool name: DefaultAppPool

View file

@ -23,7 +23,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_iis_webbinding module: win_iis_webbinding
version_added: "2.0" version_added: "2.0"
@ -85,7 +85,7 @@ options:
author: Henrik Wallström author: Henrik Wallström
''' '''
EXAMPLES = ''' EXAMPLES = r'''
- name: Return binding information for an existing host - name: Return binding information for an existing host
win_iis_webbinding: win_iis_webbinding:
name: Default Web Site name: Default Web Site

View file

@ -22,7 +22,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_iis_website module: win_iis_website
version_added: "2.0" version_added: "2.0"
@ -98,7 +98,7 @@ options:
author: Henrik Wallström author: Henrik Wallström
''' '''
EXAMPLES = ''' EXAMPLES = r'''
# Start a website # Start a website
@ -110,8 +110,8 @@ EXAMPLES = '''
ip: 127.0.0.1 ip: 127.0.0.1
hostname: acme.local hostname: acme.local
application_pool: "acme" application_pool: "acme"
physical_path: 'c:\\sites\\acme' physical_path: c:\sites\acme
parameters: 'logfile.directory:c:\\sites\\logs' parameters: logfile.directory:c:\sites\logs
register: website register: website
# Some commandline examples: # Some commandline examples:

View file

@ -20,7 +20,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = """ DOCUMENTATION = r'''
--- ---
module: win_lineinfile module: win_lineinfile
author: "Brian Lloyd <brian.d.lloyd@gmail.com>" author: "Brian Lloyd <brian.d.lloyd@gmail.com>"
@ -104,9 +104,9 @@ options:
default: "windows" default: "windows"
notes: notes:
- As of Ansible 2.3, the I(dest) option has been changed to I(path) as default, but I(dest) still works as well. - As of Ansible 2.3, the I(dest) option has been changed to I(path) as default, but I(dest) still works as well.
""" '''
EXAMPLES = r""" EXAMPLES = r'''
# Before 2.3, option 'dest', 'destfile' or 'name' was used instead of 'path' # Before 2.3, option 'dest', 'destfile' or 'name' was used instead of 'path'
- win_lineinfile: - win_lineinfile:
path: C:\temp\example.conf path: C:\temp\example.conf
@ -147,4 +147,4 @@ EXAMPLES = r"""
path: C:\temp\testfile.txt path: C:\temp\testfile.txt
line: Line added to file line: Line added to file
newline: unix newline: unix
""" '''

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['deprecated'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_msi module: win_msi
version_added: "1.7" version_added: "1.7"
@ -64,7 +64,7 @@ options:
author: "Matt Martz (@sivel)" author: "Matt Martz (@sivel)"
''' '''
EXAMPLES = ''' EXAMPLES = r'''
- name: Install an MSI file - name: Install an MSI file
win_msi: win_msi:
path: C:\7z920-x64.msi path: C:\7z920-x64.msi

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_nssm module: win_nssm
version_added: "2.0" version_added: "2.0"
@ -105,17 +105,17 @@ author:
- "Hans-Joachim Kliemeck (@h0nIg)" - "Hans-Joachim Kliemeck (@h0nIg)"
''' '''
EXAMPLES = ''' EXAMPLES = r'''
# Install and start the foo service # Install and start the foo service
- win_nssm: - win_nssm:
name: foo name: foo
application: C:\windows\\foo.exe application: C:\windows\foo.exe
# Install and start the foo service with a key-value pair argument # Install and start the foo service with a key-value pair argument
# This will yield the following command: C:\windows\\foo.exe bar "true" # This will yield the following command: C:\windows\foo.exe bar "true"
- win_nssm: - win_nssm:
name: foo name: foo
application: C:\windows\\foo.exe application: C:\windows\foo.exe
app_parameters: app_parameters:
bar: true bar: true
@ -123,7 +123,7 @@ EXAMPLES = '''
# This will yield the following command: C:\windows\\foo.exe -bar "true" # This will yield the following command: C:\windows\\foo.exe -bar "true"
- win_nssm: - win_nssm:
name: foo name: foo
application: C:\windows\\foo.exe application: C:\windows\foo.exe
app_parameters: app_parameters:
"-bar": true "-bar": true
@ -131,7 +131,7 @@ EXAMPLES = '''
# This will yield the following command: C:\windows\\foo.exe bar # This will yield the following command: C:\windows\\foo.exe bar
- win_nssm: - win_nssm:
name: foo name: foo
application: C:\windows\\foo.exe application: C:\windows\foo.exe
app_parameters: app_parameters:
_: bar _: bar
@ -139,7 +139,7 @@ EXAMPLES = '''
# This will yield the following command: C:\windows\\foo.exe bar -file output.bat # This will yield the following command: C:\windows\\foo.exe bar -file output.bat
- win_nssm: - win_nssm:
name: foo name: foo
application: C:\windows\\foo.exe application: C:\windows\foo.exe
app_parameters: app_parameters:
_: bar _: bar
"-file": "output.bat" "-file": "output.bat"
@ -147,27 +147,27 @@ EXAMPLES = '''
# Install and start the foo service, redirecting stdout and stderr to the same file # Install and start the foo service, redirecting stdout and stderr to the same file
- win_nssm: - win_nssm:
name: foo name: foo
application: C:\windows\\foo.exe application: C:\windows\foo.exe
stdout_file: C:\windows\\foo.log stdout_file: C:\windows\foo.log
stderr_file: C:\windows\\foo.log stderr_file: C:\windows\foo.log
# Install and start the foo service, but wait for dependencies tcpip and adf # Install and start the foo service, but wait for dependencies tcpip and adf
- win_nssm: - win_nssm:
name: foo name: foo
application: C:\windows\\foo.exe application: C:\windows\foo.exe
dependencies: 'adf,tcpip' dependencies: 'adf,tcpip'
# Install and start the foo service with dedicated user # Install and start the foo service with dedicated user
- win_nssm: - win_nssm:
name: foo name: foo
application: C:\windows\\foo.exe application: C:\windows\foo.exe
user: foouser user: foouser
password: secret password: secret
# Install the foo service but do not start it automatically # Install the foo service but do not start it automatically
- win_nssm: - win_nssm:
name: foo name: foo
application: C:\windows\\foo.exe application: C:\windows\foo.exe
state: present state: present
start_mode: manual start_mode: manual

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_owner module: win_owner
version_added: "2.1" version_added: "2.1"
@ -66,6 +66,6 @@ EXAMPLES = r'''
recurse: False recurse: False
''' '''
RETURN = ''' RETURN = r'''
''' '''

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_package module: win_package
version_added: "1.7" version_added: "1.7"
@ -33,7 +33,7 @@ author: Trond Hindenes
short_description: Installs/Uninstalls an installable package, either from local file system or url short_description: Installs/Uninstalls an installable package, either from local file system or url
description: description:
- Installs or uninstalls a package. - Installs or uninstalls a package.
- 'Optionally uses a product_id to check if the package needs installing. You can find product ids for installed programs in the windows registry either in C(HKLM:Software\\Microsoft\\Windows\CurrentVersion\\Uninstall) or for 32 bit programs C(HKLM:Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall)' - 'Optionally uses a product_id to check if the package needs installing. You can find product ids for installed programs in the windows registry either in C(HKLM:Software\Microsoft\Windows\CurrentVersion\Uninstall) or for 32 bit programs C(HKLM:Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall)'
options: options:
path: path:
description: description:
@ -47,7 +47,7 @@ options:
product_id: product_id:
description: description:
- Product id of the installed package (used for checking if already installed) - Product id of the installed package (used for checking if already installed)
- You can find product ids for installed programs in the windows registry either in C(HKLM:Software\\Microsoft\\Windows\CurrentVersion\\Uninstall) or for 32 bit programs C(HKLM:Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall)' - You can find product ids for installed programs in the windows registry either in C(HKLM:Software\Microsoft\Windows\CurrentVersion\Uninstall) or for 32 bit programs C(HKLM:Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall)'
required: true required: true
aliases: [productid] aliases: [productid]
arguments: arguments:
@ -76,7 +76,7 @@ options:
required: false required: false
''' '''
EXAMPLES = ''' EXAMPLES = r'''
- name: Install the Visual C thingy - name: Install the Visual C thingy
win_package: win_package:
name: Microsoft Visual C thingy name: Microsoft Visual C thingy

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['stableinterface'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_ping module: win_ping
version_added: "1.7" version_added: "1.7"
@ -42,7 +42,7 @@ options:
author: "Chris Church (@cchurch)" author: "Chris Church (@cchurch)"
''' '''
EXAMPLES = ''' EXAMPLES = r'''
# Test connectivity to a windows host # Test connectivity to a windows host
ansible winserver -m win_ping ansible winserver -m win_ping

View file

@ -23,7 +23,7 @@ ANSIBLE_METADATA = {'status': ['stableinterface'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION=''' DOCUMENTATION = r'''
--- ---
module: win_reboot module: win_reboot
short_description: Reboot a windows machine short_description: Reboot a windows machine
@ -63,7 +63,7 @@ author:
- Matt Davis (@nitzmahone) - Matt Davis (@nitzmahone)
''' '''
EXAMPLES=''' EXAMPLES = r'''
# Unconditionally reboot the machine with all defaults # Unconditionally reboot the machine with all defaults
- win_reboot: - win_reboot:
@ -79,7 +79,7 @@ EXAMPLES='''
reboot_timeout_sec: 3600 reboot_timeout_sec: 3600
''' '''
RETURN=''' RETURN = r'''
rebooted: rebooted:
description: true if the machine was rebooted description: true if the machine was rebooted
returned: always returned: always

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_regedit module: win_regedit
version_added: "2.0" version_added: "2.0"
@ -124,7 +124,7 @@ EXAMPLES = r'''
key: HKCU:\Software\My Company key: HKCU:\Software\My Company
''' '''
RETURN = ''' RETURN = r'''
data_changed: data_changed:
description: whether this invocation changed the data in the registry value description: whether this invocation changed the data in the registry value
returned: success returned: success

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_regmerge module: win_regmerge
version_added: "2.1" version_added: "2.1"
@ -61,7 +61,7 @@ notes:
using M(win_regmerge). using M(win_regmerge).
''' '''
EXAMPLES = ''' EXAMPLES = r'''
# Merge in a registry file without comparing to current registry # Merge in a registry file without comparing to current registry
# Note that paths using / to separate are preferred as they require less special handling than \ # Note that paths using / to separate are preferred as they require less special handling than \
win_regmerge: win_regmerge:
@ -72,7 +72,7 @@ EXAMPLES = '''
compare_to: HKLM:\SOFTWARE\myCompany compare_to: HKLM:\SOFTWARE\myCompany
''' '''
RETURN = ''' RETURN = r'''
compare_to_key_found: compare_to_key_found:
description: whether the parent registry key has been found for comparison description: whether the parent registry key has been found for comparison
returned: when comparison key not found in registry returned: when comparison key not found in registry

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = """ DOCUMENTATION = r'''
--- ---
module: win_robocopy module: win_robocopy
version_added: "2.2" version_added: "2.2"
@ -67,7 +67,7 @@ notes:
- This is not a complete port of the "synchronize" module. Unlike the "synchronize" module this only performs the sync/copy on the remote machine, not from the master to the remote machine. - This is not a complete port of the "synchronize" module. Unlike the "synchronize" module this only performs the sync/copy on the remote machine, not from the master to the remote machine.
- This module does not currently support all Robocopy flags. - This module does not currently support all Robocopy flags.
- Works on Windows 7, Windows 8, Windows Server 2k8, and Windows Server 2k12 - Works on Windows 7, Windows 8, Windows Server 2k8, and Windows Server 2k12
""" '''
EXAMPLES = r''' EXAMPLES = r'''
- name: Sync the contents of one directory to another - name: Sync the contents of one directory to another
@ -103,17 +103,17 @@ EXAMPLES = r'''
flags: /XD SOME_DIR /XF SOME_FILE /MT:32 flags: /XD SOME_DIR /XF SOME_FILE /MT:32
''' '''
RETURN = ''' RETURN = r'''
src: src:
description: The Source file/directory of the sync. description: The Source file/directory of the sync.
returned: always returned: always
type: string type: string
sample: "c:/Some/Path" sample: c:\Some\Path
dest: dest:
description: The Destination file/directory of the sync. description: The Destination file/directory of the sync.
returned: always returned: always
type: string type: string
sample: "c:/Some/Path" sample: c:\Some\Path
recurse: recurse:
description: Whether or not the recurse flag was toggled. description: Whether or not the recurse flag was toggled.
returned: always returned: always

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_say module: win_say
version_added: "2.3" version_added: "2.3"
@ -74,27 +74,27 @@ notes:
- Speech can be surprisingly slow, so its best to keep message text short. - Speech can be surprisingly slow, so its best to keep message text short.
''' '''
EXAMPLES = ''' EXAMPLES = r'''
# Warn of impending deployment # Warn of impending deployment
- win_say: - win_say:
msg: Warning, deployment commencing in 5 minutes, please log out. msg: Warning, deployment commencing in 5 minutes, please log out.
# Using a different voice and a start sound # Using a different voice and a start sound
- win_say: - win_say:
start_sound_path: 'C:\Windows\Media\ding.wav' start_sound_path: C:\Windows\Media\ding.wav
msg: Warning, deployment commencing in 5 minutes, please log out. msg: Warning, deployment commencing in 5 minutes, please log out.
voice: Microsoft Hazel Desktop voice: Microsoft Hazel Desktop
# example with start and end sound # example with start and end sound
- win_say: - win_say:
start_sound_path: 'C:\Windows\Media\Windows Balloon.wav' start_sound_path: C:\Windows\Media\Windows Balloon.wav
msg: "New software installed" msg: New software installed
end_sound_path: 'C:\Windows\Media\chimes.wav' end_sound_path: C:\Windows\Media\chimes.wav
# text from file example # text from file example
- win_say: - win_say:
start_sound_path: 'C:\Windows\Media\Windows Balloon.wav' start_sound_path: C:\Windows\Media\Windows Balloon.wav
msg_file: AppData\Local\Temp\morning_report.txt msg_file: AppData\Local\Temp\morning_report.txt
end_sound_path: 'C:\Windows\Media\chimes.wav' end_sound_path: C:\Windows\Media\chimes.wav
''' '''
RETURN = ''' RETURN = r'''
message_text: message_text:
description: the text that the module attempted to speak description: the text that the module attempted to speak
returned: success returned: success

View file

@ -22,7 +22,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_scheduled_task module: win_scheduled_task
version_added: "2.0" version_added: "2.0"
@ -87,7 +87,7 @@ options:
default: '\' default: '\'
''' '''
EXAMPLES = ''' EXAMPLES = r'''
# Create a scheduled task to open a command prompt # Create a scheduled task to open a command prompt
- win_scheduled_task: - win_scheduled_task:
name: TaskName name: TaskName

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['stableinterface'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_service module: win_service
version_added: "1.7" version_added: "1.7"
@ -62,7 +62,7 @@ options:
author: "Chris Hoffman (@chrishoffman)" author: "Chris Hoffman (@chrishoffman)"
''' '''
EXAMPLES = ''' EXAMPLES = r'''
- name: Restart a service - name: Restart a service
win_service: win_service:
name: spooler name: spooler

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_share module: win_share
version_added: "2.1" version_added: "2.1"
@ -87,7 +87,7 @@ options:
author: Hans-Joachim Kliemeck (@h0nIg) author: Hans-Joachim Kliemeck (@h0nIg)
''' '''
EXAMPLES = ''' EXAMPLES = r'''
# Playbook example # Playbook example
# Add share and set permissions # Add share and set permissions
--- ---
@ -95,7 +95,7 @@ EXAMPLES = '''
win_share: win_share:
name: internal name: internal
description: top secret share description: top secret share
path: C:/shares/internal path: C:\shares\internal
list: 'no' list: 'no'
full: Administrators,CEO full: Administrators,CEO
read: HR-Global read: HR-Global
@ -105,7 +105,7 @@ EXAMPLES = '''
win_share: win_share:
name: company name: company
description: top secret share description: top secret share
path: C:/shares/company path: C:\shares\company
list: 'yes' list: 'yes'
full: Administrators,CEO full: Administrators,CEO
read: Global read: Global
@ -116,6 +116,6 @@ EXAMPLES = '''
state: absent state: absent
''' '''
RETURN = ''' RETURN = r'''
''' '''

View file

@ -23,7 +23,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_shell module: win_shell
short_description: Execute shell commands on target hosts. short_description: Execute shell commands on target hosts.
@ -61,21 +61,21 @@ author:
- Matt Davis - Matt Davis
''' '''
EXAMPLES = ''' EXAMPLES = r'''
# Execute a command in the remote shell; stdout goes to the specified # Execute a command in the remote shell; stdout goes to the specified
# file on the remote. # file on the remote.
- win_shell: C:\\somescript.ps1 >> c:\\somelog.txt - win_shell: C:\somescript.ps1 >> c:\somelog.txt
# Change the working directory to somedir/ before executing the command. # Change the working directory to somedir/ before executing the command.
- win_shell: C:\\somescript.ps1 >> c:\\somelog.txt chdir=c:\\somedir - win_shell: C:\somescript.ps1 >> c:\somelog.txt chdir=c:\somedir
# You can also use the 'args' form to provide the options. This command # You can also use the 'args' form to provide the options. This command
# will change the working directory to somedir/ and will only run when # will change the working directory to somedir/ and will only run when
# somedir/somelog.txt doesn't exist. # somedir/somelog.txt doesn't exist.
- win_shell: C:\\somescript.ps1 >> c:\\somelog.txt - win_shell: C:\somescript.ps1 >> c:\somelog.txt
args: args:
chdir: c:\\somedir chdir: c:\somedir
creates: c:\\somelog.txt creates: c:\somelog.txt
# Run a command under a non-Powershell interpreter (cmd in this case) # Run a command under a non-Powershell interpreter (cmd in this case)
- win_shell: echo %HOMEDIR% - win_shell: echo %HOMEDIR%
@ -84,7 +84,7 @@ EXAMPLES = '''
register: homedir_out register: homedir_out
''' '''
RETURN = ''' RETURN = r'''
msg: msg:
description: changed description: changed
returned: always returned: always

View file

@ -21,7 +21,7 @@ ANSIBLE_METADATA = {'status': ['stableinterface'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_stat module: win_stat
version_added: "1.7" version_added: "1.7"
@ -53,7 +53,7 @@ options:
author: "Chris Church (@cchurch)" author: "Chris Church (@cchurch)"
''' '''
EXAMPLES = ''' EXAMPLES = r'''
- name: Obtain information about a file - name: Obtain information about a file
win_stat: win_stat:
path: C:\foo.ini path: C:\foo.ini

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_timezone module: win_timezone
version_added: "2.1" version_added: "2.1"
@ -44,10 +44,10 @@ author: Phil Schwartz
''' '''
EXAMPLES = ''' EXAMPLES = r'''
# Set machine's timezone to Central Standard Time # Set machine's timezone to Central Standard Time
win_timezone: win_timezone:
timezone: "Central Standard Time" timezone: "Central Standard Time"
''' '''
RETURN = '''# ''' RETURN = r'''# '''

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_unzip module: win_unzip
version_added: "2.0" version_added: "2.0"

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_updates module: win_updates
version_added: "2.0" version_added: "2.0"
@ -72,7 +72,7 @@ notes:
- win_updates can take a significant amount of time to complete (hours, in some cases). Performance depends on many factors, including OS version, number of updates, system load, and update server load. - win_updates can take a significant amount of time to complete (hours, in some cases). Performance depends on many factors, including OS version, number of updates, system load, and update server load.
''' '''
EXAMPLES = ''' EXAMPLES = r'''
# Install all security, critical, and rollup updates # Install all security, critical, and rollup updates
- win_updates: - win_updates:
category_names: category_names:
@ -91,7 +91,7 @@ EXAMPLES = '''
log_path: c:\ansible_wu.txt log_path: c:\ansible_wu.txt
''' '''
RETURN = ''' RETURN = r'''
reboot_required: reboot_required:
description: True when the target server requires a reboot to complete updates (no further updates can be installed until after a reboot) description: True when the target server requires a reboot to complete updates (no further updates can be installed until after a reboot)
returned: success returned: success

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = """ DOCUMENTATION = r'''
--- ---
module: win_uri module: win_uri
version_added: "2.1" version_added: "2.1"
@ -73,9 +73,9 @@ options:
- False - False
default: True default: True
author: Corwin Brown (@blakfeld) author: Corwin Brown (@blakfeld)
""" '''
EXAMPLES = """ EXAMPLES = r'''
- name: Perform a GET and Store Output - name: Perform a GET and Store Output
win_uri: win_uri:
url: http://example.com/endpoint url: http://example.com/endpoint
@ -99,9 +99,9 @@ EXAMPLES = """
url: http://www.somesite.com url: http://www.somesite.com
method: POST method: POST
body: "{ 'some': 'json' }" body: "{ 'some': 'json' }"
""" '''
RETURN = """ RETURN = r'''
url: url:
description: The Target URL description: The Target URL
returned: always returned: always
@ -153,4 +153,4 @@ raw_content_length:
returned: success returned: success
type: int type: int
sample: 54447 sample: 54447
""" '''

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['stableinterface'],
'supported_by': 'core', 'supported_by': 'core',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_user module: win_user
version_added: "1.7" version_added: "1.7"
@ -136,7 +136,7 @@ author:
- "Chris Church (@cchurch)" - "Chris Church (@cchurch)"
''' '''
EXAMPLES = ''' EXAMPLES = r'''
- name: Ensure user bob is present - name: Ensure user bob is present
win_user: win_user:
name: bob name: bob

View file

@ -25,7 +25,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'version': '1.0'} 'version': '1.0'}
DOCUMENTATION = ''' DOCUMENTATION = r'''
--- ---
module: win_webpicmd module: win_webpicmd
version_added: "2.0" version_added: "2.0"
@ -44,7 +44,7 @@ options:
author: Peter Mounce author: Peter Mounce
''' '''
EXAMPLES = ''' EXAMPLES = r'''
# Install URLRewrite2. # Install URLRewrite2.
win_webpicmd: win_webpicmd:
name: URLRewrite2 name: URLRewrite2