mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
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:
parent
4ba9f63afe
commit
5b9eb92722
40 changed files with 161 additions and 161 deletions
|
@ -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"
|
||||||
|
|
|
@ -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'''
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -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"
|
||||||
|
@ -75,16 +75,16 @@ options:
|
||||||
version_added: '2.1'
|
version_added: '2.1'
|
||||||
allow_empty_checksums:
|
allow_empty_checksums:
|
||||||
description:
|
description:
|
||||||
- Allow empty Checksums to be used
|
- Allow empty Checksums to be used
|
||||||
require: false
|
require: false
|
||||||
default: false
|
default: false
|
||||||
version_added: '2.2'
|
version_added: '2.2'
|
||||||
ignore_checksums:
|
ignore_checksums:
|
||||||
description:
|
description:
|
||||||
- Ignore Checksums
|
- Ignore Checksums
|
||||||
require: false
|
require: false
|
||||||
default: false
|
default: false
|
||||||
version_added: '2.2'
|
version_added: '2.2'
|
||||||
ignore_dependencies:
|
ignore_dependencies:
|
||||||
description:
|
description:
|
||||||
- Ignore dependencies, only install/upgrade the package itself
|
- Ignore dependencies, only install/upgrade the package itself
|
||||||
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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:
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -25,13 +25,13 @@ 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"
|
||||||
short_description: Modifies environment variables on windows hosts.
|
short_description: Modifies environment variables on windows hosts.
|
||||||
description:
|
description:
|
||||||
- Uses .net Environment to set or remove environment variables and can set at User, Machine or Process level.
|
- Uses .net Environment to set or remove environment variables and can set at User, Machine or Process level.
|
||||||
- User level environment variables will be set, but not available until the user has logged off and on again.
|
- User level environment variables will be set, but not available until the user has logged off and on again.
|
||||||
options:
|
options:
|
||||||
state:
|
state:
|
||||||
|
@ -48,12 +48,12 @@ options:
|
||||||
required: true
|
required: true
|
||||||
default: no default
|
default: no default
|
||||||
value:
|
value:
|
||||||
description:
|
description:
|
||||||
- The value to store in the environment variable. Can be omitted for state=absent
|
- The value to store in the environment variable. Can be omitted for state=absent
|
||||||
required: false
|
required: false
|
||||||
default: no default
|
default: no default
|
||||||
level:
|
level:
|
||||||
description:
|
description:
|
||||||
- The level at which to set the environment variable.
|
- The level at which to set the environment variable.
|
||||||
- Use 'machine' to set for all users.
|
- Use 'machine' to set for all users.
|
||||||
- Use 'user' to set for the current user that ansible is connected as.
|
- Use 'user' to set for the current user that ansible is connected as.
|
||||||
|
@ -69,20 +69,20 @@ notes:
|
||||||
- This module is best-suited for setting the entire value of an
|
- This module is best-suited for setting the entire value of an
|
||||||
environment variable. For safe element-based management of
|
environment variable. For safe element-based management of
|
||||||
path-like environment vars, use the M(win_path) module.
|
path-like environment vars, use the M(win_path) module.
|
||||||
- This module does not broadcast change events.
|
- This module does not broadcast change events.
|
||||||
This means that the minority of windows applications which can have
|
This means that the minority of windows applications which can have
|
||||||
their environment changed without restarting will not be notified and
|
their environment changed without restarting will not be notified and
|
||||||
therefore will need restarting to pick up new environment settings.
|
therefore will need restarting to pick up new environment settings.
|
||||||
User level environment variables will require the user to log out
|
User level environment variables will require the user to log out
|
||||||
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:
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
"""
|
'''
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -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"
|
||||||
|
@ -92,7 +92,7 @@ options:
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r'''
|
||||||
- name: Download earthrise.jpg to specified path
|
- name: Download earthrise.jpg to specified path
|
||||||
win_get_url:
|
win_get_url:
|
||||||
url: http://www.example.com/earthrise.jpg
|
url: http://www.example.com/earthrise.jpg
|
||||||
dest: C:\Users\RandomUser\earthrise.jpg
|
dest: C:\Users\RandomUser\earthrise.jpg
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -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
|
||||||
"""
|
'''
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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'''
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
@ -47,7 +47,7 @@ options:
|
||||||
aliases: []
|
aliases: []
|
||||||
data:
|
data:
|
||||||
description:
|
description:
|
||||||
- Registry Value Data. Binary data should be expressed a yaml byte array or as comma separated hex values. An easy way to generate this is to run C(regedit.exe) and use the I(Export) option to save the registry values to a file. In the exported file binary values will look like C(hex:be,ef,be,ef). The C(hex:) prefix is optional.
|
- Registry Value Data. Binary data should be expressed a yaml byte array or as comma separated hex values. An easy way to generate this is to run C(regedit.exe) and use the I(Export) option to save the registry values to a file. In the exported file binary values will look like C(hex:be,ef,be,ef). The C(hex:) prefix is optional.
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default: null
|
||||||
aliases: []
|
aliases: []
|
||||||
|
@ -80,7 +80,7 @@ EXAMPLES = r'''
|
||||||
- name: Create Registry Key called MyCompany
|
- name: Create Registry Key called MyCompany
|
||||||
win_regedit:
|
win_regedit:
|
||||||
key: HKCU:\Software\MyCompany
|
key: HKCU:\Software\MyCompany
|
||||||
|
|
||||||
- name: Create Registry Key called MyCompany, a value within MyCompany Key called "hello", and data for the value "hello" containing "world".
|
- name: Create Registry Key called MyCompany, a value within MyCompany Key called "hello", and data for the value "hello" containing "world".
|
||||||
win_regedit:
|
win_regedit:
|
||||||
key: HKCU:\Software\MyCompany
|
key: HKCU:\Software\MyCompany
|
||||||
|
@ -112,7 +112,7 @@ EXAMPLES = r'''
|
||||||
win_regedit:
|
win_regedit:
|
||||||
key: HKCU:\Software\MyCompany
|
key: HKCU:\Software\MyCompany
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Delete Registry Value "hello" from MyCompany Key
|
- name: Delete Registry Value "hello" from MyCompany Key
|
||||||
win_regedit:
|
win_regedit:
|
||||||
key: HKCU:\Software\MyCompany
|
key: HKCU:\Software\MyCompany
|
||||||
|
@ -124,14 +124,14 @@ 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
|
||||||
type: boolean
|
type: boolean
|
||||||
sample: False
|
sample: False
|
||||||
data_type_changed:
|
data_type_changed:
|
||||||
description: whether this invocation changed the datatype of the registry value
|
description: whether this invocation changed the datatype of the registry value
|
||||||
returned: success
|
returned: success
|
||||||
type: boolean
|
type: boolean
|
||||||
sample: True
|
sample: True
|
||||||
|
|
|
@ -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"
|
||||||
|
@ -33,7 +33,7 @@ short_description: Merges the contents of a registry file into the windows regis
|
||||||
description:
|
description:
|
||||||
- Wraps the reg.exe command to import the contents of a registry file.
|
- Wraps the reg.exe command to import the contents of a registry file.
|
||||||
- Suitable for use with registry files created using M(win_template).
|
- Suitable for use with registry files created using M(win_template).
|
||||||
- Windows registry files have a specific format and must be constructed correctly with carriage return and line feed line endings otherwise they will not be merged.
|
- Windows registry files have a specific format and must be constructed correctly with carriage return and line feed line endings otherwise they will not be merged.
|
||||||
- Exported registry files often start with a Byte Order Mark which must be removed if the file is to templated using M(win_template).
|
- Exported registry files often start with a Byte Order Mark which must be removed if the file is to templated using M(win_template).
|
||||||
- Registry file format is described at U(https://support.microsoft.com/en-us/kb/310516)
|
- Registry file format is described at U(https://support.microsoft.com/en-us/kb/310516)
|
||||||
- See also M(win_template), M(win_regedit)
|
- See also M(win_template), M(win_regedit)
|
||||||
|
@ -44,24 +44,24 @@ options:
|
||||||
required: true
|
required: true
|
||||||
default: no default
|
default: no default
|
||||||
compare_key:
|
compare_key:
|
||||||
description:
|
description:
|
||||||
- The parent key to use when comparing the contents of the registry to the contents of the file. Needs to be in HKLM or HKCU part of registry. Use a PS-Drive style path for example HKLM:\SOFTWARE not HKEY_LOCAL_MACHINE\SOFTWARE
|
- The parent key to use when comparing the contents of the registry to the contents of the file. Needs to be in HKLM or HKCU part of registry. Use a PS-Drive style path for example HKLM:\SOFTWARE not HKEY_LOCAL_MACHINE\SOFTWARE
|
||||||
If not supplied, or the registry key is not found, no comparison will be made, and the module will report changed.
|
If not supplied, or the registry key is not found, no comparison will be made, and the module will report changed.
|
||||||
required: false
|
required: false
|
||||||
default: no default
|
default: no default
|
||||||
author: "Jon Hawkesworth (@jhawkesworth)"
|
author: "Jon Hawkesworth (@jhawkesworth)"
|
||||||
notes:
|
notes:
|
||||||
- Organise your registry files so that they contain a single root registry
|
- Organise your registry files so that they contain a single root registry
|
||||||
key if you want to use the compare_to functionality.
|
key if you want to use the compare_to functionality.
|
||||||
This module does not force registry settings to be in the state
|
This module does not force registry settings to be in the state
|
||||||
described in the file. If registry settings have been modified externally
|
described in the file. If registry settings have been modified externally
|
||||||
the module will merge the contents of the file but continue to report
|
the module will merge the contents of the file but continue to report
|
||||||
differences on subsequent runs.
|
differences on subsequent runs.
|
||||||
To force registry change, use M(win_regedit) with state=absent before
|
To force registry change, use M(win_regedit) with state=absent before
|
||||||
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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
@ -64,37 +64,37 @@ options:
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default: null
|
||||||
author: "Jon Hawkesworth (@jhawkesworth)"
|
author: "Jon Hawkesworth (@jhawkesworth)"
|
||||||
notes:
|
notes:
|
||||||
- Needs speakers or headphones to do anything useful.
|
- Needs speakers or headphones to do anything useful.
|
||||||
- To find which voices are installed, run the following powershell
|
- To find which voices are installed, run the following powershell
|
||||||
Add-Type -AssemblyName System.Speech
|
Add-Type -AssemblyName System.Speech
|
||||||
$speech = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer
|
$speech = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer
|
||||||
$speech.GetInstalledVoices() | ForEach-Object { $_.VoiceInfo }
|
$speech.GetInstalledVoices() | ForEach-Object { $_.VoiceInfo }
|
||||||
$speech.Dispose()
|
$speech.Dispose()
|
||||||
- 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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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'''
|
||||||
|
|
||||||
'''
|
'''
|
|
@ -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.
|
||||||
|
@ -57,25 +57,25 @@ notes:
|
||||||
explicitly required. When running ad-hoc commands, use your best judgement.
|
explicitly required. When running ad-hoc commands, use your best judgement.
|
||||||
- WinRM will not return from a command execution until all child processes created have exited. Thus, it is not possible to use win_shell to spawn long-running child or background processes.
|
- WinRM will not return from a command execution until all child processes created have exited. Thus, it is not possible to use win_shell to spawn long-running child or background processes.
|
||||||
Consider creating a Windows service for managing background processes.
|
Consider creating a Windows service for managing background processes.
|
||||||
author:
|
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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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'''# '''
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
@ -60,7 +60,7 @@ options:
|
||||||
choices:
|
choices:
|
||||||
- installed
|
- installed
|
||||||
- searched
|
- searched
|
||||||
log_path:
|
log_path:
|
||||||
description:
|
description:
|
||||||
- If set, win_updates will append update progress to the specified file. The directory must already exist.
|
- If set, win_updates will append update progress to the specified file. The directory must already exist.
|
||||||
required: false
|
required: false
|
||||||
|
@ -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
|
||||||
|
@ -99,11 +99,11 @@ reboot_required:
|
||||||
sample: True
|
sample: True
|
||||||
|
|
||||||
updates:
|
updates:
|
||||||
description: List of updates that were found/installed
|
description: List of updates that were found/installed
|
||||||
returned: success
|
returned: success
|
||||||
type: dictionary
|
type: dictionary
|
||||||
sample:
|
sample:
|
||||||
contains:
|
contains:
|
||||||
title:
|
title:
|
||||||
description: Display name
|
description: Display name
|
||||||
returned: always
|
returned: always
|
||||||
|
|
|
@ -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
|
||||||
"""
|
'''
|
||||||
|
|
|
@ -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"
|
||||||
|
@ -131,12 +131,12 @@ options:
|
||||||
- query
|
- query
|
||||||
default: present
|
default: present
|
||||||
aliases: []
|
aliases: []
|
||||||
author:
|
author:
|
||||||
- "Paul Durivage (@angstwad)"
|
- "Paul Durivage (@angstwad)"
|
||||||
- "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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue