Windows: Add "special" parameter types to docs (#42853)

* Windows: Add special parameter types

Adding explicit parameter types now exposes this information in the
module documentation, and proves really helpful.

We only do this for non-string types as strings, mostly because strings
are implicit.

PS We also make copyright statements consistent and use #Requires for
explicit library imports

* Type "string" must be type "str"

* A few more Copyright corrections

* More fixes

* Don't add file encoding to Powershell files

* Don't add missing interfacetypes parameter

Otherwise CI demands an incorrect version_added

* Small fix
This commit is contained in:
Dag Wieers 2018-07-17 23:29:05 +02:00 committed by Matt Davis
parent 290df027e3
commit 95a1170908
127 changed files with 327 additions and 664 deletions

View file

@ -1,23 +1,9 @@
#!powershell
# (c) 2014, Matt Martz <matt@sivel.net>, and others
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# Copyright: (c) 2014, Matt Martz <matt@sivel.net>, and others
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
$params = Parse-Args $args -supports_check_mode $true
$check_mode = Get-AnsibleParam -obj $params -name "_ansible_check_mode" -type "bool" -default $false

View file

@ -28,6 +28,7 @@ options:
description:
- File system path to the MSI file to install.
required: yes
type: path
extra_args:
description:
- Additional arguments to pass to the msiexec.exe command.
@ -40,10 +41,12 @@ options:
description:
- Path to a file created by installing the MSI to prevent from
attempting to reinstall the package on every run.
type: path
removes:
description:
- Path to a file removed by uninstalling the MSI to prevent from
attempting to re-uninstall the package on every run.
type: path
version_added: '2.4'
wait:
description:

View file

@ -1,21 +1,8 @@
#!powershell
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
$results = @{changed=$false}

View file

@ -1,6 +1,6 @@
#!powershell
# Copyright (c) 2018 Ansible Project
# Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -1,21 +1,8 @@
#!powershell
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
$params = Parse-Args $args -supports_check_mode $true;
$src = Get-AnsibleParam -obj $params -name "src" -type "path" -aliases "path" -failifempty $true;

View file

@ -1,7 +1,8 @@
#!powershell
# Copyright 2015, Phil Schwartz <schwartzmx@gmail.com>
# Copyright 2015, Trond Hindenes
# Copyright 2015, Hans-Joachim Kliemeck <git@kliemeck.de>
# Copyright: (c) 2015, Phil Schwartz <schwartzmx@gmail.com>
# Copyright: (c) 2015, Trond Hindenes
# Copyright: (c) 2015, Hans-Joachim Kliemeck <git@kliemeck.de>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -1,23 +1,9 @@
#!powershell
# This file is part of Ansible
#
# Copyright 2015, Hans-Joachim Kliemeck <git@kliemeck.de>
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# Copyright: (c) 2015, Hans-Joachim Kliemeck <git@kliemeck.de>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
$params = Parse-Args $args -supports_check_mode $true
$check_mode = Get-AnsibleParam -obj $params -name "_ansible_check_mode" -default $false

View file

@ -23,6 +23,7 @@ options:
description:
- Path to be used for changing inheritance
required: yes
type: path
state:
description:
- Specify whether to enable I(present) or disable I(absent) ACL inheritance

View file

@ -1,4 +1,5 @@
#!powershell
# Copyright: (c) 2017, Noah Sparks <nsparks@outlook.com>
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View file

@ -34,8 +34,9 @@ options:
description:
- The type of event you would like to audit for.
- Accepts a list. See examples.
choices: [ failure, none, success ]
required: yes
type: list
choices: [ failure, none, success ]
'''
EXAMPLES = r'''

View file

@ -28,6 +28,7 @@ options:
- Registry paths should be in Powershell format, beginning with an abbreviation for the root
such as, 'hklm:\software'.
required: yes
type: path
aliases: [ dest, destination ]
user:
description:
@ -41,12 +42,14 @@ options:
- If I(path) is a registry key, rights can be any right under MSDN
RegistryRights U(https://msdn.microsoft.com/en-us/library/system.security.accesscontrol.registryrights.aspx).
required: yes
type: list
inheritance_flags:
description:
- Defines what objects inside of a folder or registry key will inherit the settings.
- If you are setting a rule on a file, this value has to be changed to C(none).
- For more information on the choices see MSDN PropagationFlags enumeration
at U(https://msdn.microsoft.com/en-us/library/system.security.accesscontrol.inheritanceflags.aspx).
type: list
default: "ContainerInherit,ObjectInherit"
choices: [ ContainerInherit, ObjectInherit ]
propagation_flags:
@ -62,6 +65,7 @@ options:
- Defines whether to log on failure, success, or both.
- To log both define as comma seperated list "Success, Failure".
required: yes
type: list
choices: [ Failure, Success ]
state:
description:

View file

@ -1,5 +1,4 @@
#!powershell
# This file is part of Ansible
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View file

@ -40,6 +40,7 @@ options:
- This is required when I(state) is C(present) or C(exported).
- When I(state) is C(absent) and I(thumbprint) is not specified, the
thumbprint is derived from the certificate at this path.
type: path
thumbprint:
description:
- The thumbprint as a hex string to either export or remove.

View file

@ -80,6 +80,7 @@ options:
timeout:
description:
- The time to allow chocolatey to finish before timing out.
type: int
default: 2700
version_added: '2.3'
aliases: [ execution_timeout ]

View file

@ -1,7 +1,6 @@
#!powershell
# This file is part of Ansible
# Copyright (c) 2017 Ansible Project
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -29,12 +29,15 @@ options:
creates:
description:
- A path or path filter pattern; when the referenced path exists on the target host, the task will be skipped.
type: path
removes:
description:
- A path or path filter pattern; when the referenced path B(does not) exist on the target host, the task will be skipped.
type: path
chdir:
description:
- Set the specified path as the current working directory before executing a command.
type: path
stdin:
description:
- Set the stdin of the command directly to the specified value.

View file

@ -1,5 +1,4 @@
#!powershell
# This file is part of Ansible
# Copyright: (c) 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk>
# Copyright: (c) 2017, Ansible Project

View file

@ -42,6 +42,7 @@ options:
- If C(src) and C(dest) are files and if the parent directory of C(dest)
doesn't exist, then the task will fail.
required: yes
type: path
force:
description:
- If set to C(yes), the file will only be transferred if the content
@ -79,6 +80,7 @@ options:
- If path is a file and dest ends with "\", the file is copied to the
folder with the same filename.
required: yes
type: path
notes:
- For non-Windows targets, use the M(copy) module instead.
- Currently win_copy does not support copying symbolic links from both local to

View file

@ -1,5 +1,4 @@
#!powershell
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@ -16,7 +15,7 @@ $check_mode = Get-AnsibleParam -obj $params -name "_ansible_check_mode" -type "b
$include_volumes = Get-AnsibleParam -obj $params -name "include_volumes" -type "list"
$exclude_volumes = Get-AnsibleParam -obj $params -name "exclude_volumes" -type "list"
$freespace_consolidation = Get-AnsibleParam -obj $params -name "freespace_consolidation" -type "bool" -default $false
$priority = Get-AnsibleParam -obj $params -name "priority" -type "string" -default "low" -validateset "low","normal"
$priority = Get-AnsibleParam -obj $params -name "priority" -type "str" -default "low" -validateset "low","normal"
$parallel = Get-AnsibleParam -obj $params -name "parallel" -type "bool" -default $false
$result = @{

View file

@ -21,9 +21,11 @@ options:
description:
- A list of drive letters or mount point paths of the volumes to be defragmented.
- If this parameter is omitted, all volumes (not excluded) will be fragmented.
type: list
exclude_volumes:
description:
- A list of drive letters or mount point paths to exclude from defragmentation.
type: list
freespace_consolidation:
description:
- Perform free space consolidation on the specified volumes.

View file

@ -5,6 +5,7 @@
#Requires -Module Ansible.ModuleUtils.Legacy
#AnsibleRequires -OSVersion 6.2
$ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0

View file

@ -1,24 +1,9 @@
#!powershell
# (c) 2017, Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Copyright: (c) 2017, Red Hat, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# POWERSHELL_COMMON
# WANT_JSON
#Requires -Module Ansible.ModuleUtils.Legacy
$ErrorActionPreference = "Stop"
Set-StrictMode -Version 2

View file

@ -1,21 +1,8 @@
#!powershell
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
# FUTURE: check statically-set values via registry so we can determine difference between DHCP-source values and static values? (prevent spurious changed
# notifications on DHCP-sourced values)

View file

@ -1,21 +1,8 @@
#!powershell
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
Set-StrictMode -Version 2
$ErrorActionPreference = "Stop"
@ -35,13 +22,13 @@ Function Ensure-Prereqs {
}
}
$parsed_args = Parse-Args $args -supports_check_mode $true
$check_mode = Get-AnsibleParam $parsed_args "_ansible_check_mode" -default $false
$dns_domain_name = Get-AnsibleParam $parsed_args "dns_domain_name" -failifempty $true
$domain_netbios_name = Get-AnsibleParam $parsed_args "domain_netbios_name"
$safe_mode_admin_password = Get-AnsibleParam $parsed_args "safe_mode_password" -failifempty $true
$database_path = Get-AnsibleParam $parsed_args "database_path" -type "path"
$sysvol_path = Get-AnsibleParam $parsed_args "sysvol_path" -type "path"
$params = Parse-Args $args -supports_check_mode $true
$check_mode = Get-AnsibleParam -obj $params -name "_ansible_check_mode" -default $false
$dns_domain_name = Get-AnsibleParam -obj $params -name "dns_domain_name" -failifempty $true
$domain_netbios_name = Get-AnsibleParam -obj $params -name "domain_netbios_name"
$safe_mode_admin_password = Get-AnsibleParam -obj $params -name "safe_mode_password" -failifempty $true
$database_path = Get-AnsibleParam -obj $params -name "database_path" -type "path"
$sysvol_path = Get-AnsibleParam -obj $params -name "sysvol_path" -type "path"
$forest = $null

View file

@ -35,12 +35,14 @@ options:
- The path to a directory on a fixed disk of the Windows host where the
domain database will be created.
- If not set then the default path is C(%SYSTEMROOT%\NTDS).
type: path
version_added: '2.5'
sysvol_path:
description:
- The path to a directory on a fixed disk of the Windows host where the
Sysvol file will be created.
- If not set then the default path is C(%SYSTEMROOT%\SYSVOL).
type: path
version_added: '2.5'
author:
- Matt Davis (@nitzmahone)

View file

@ -1,5 +1,5 @@
#!powershell
#
# Copyright: (c) 2017, AMTEGA - Xunta de Galicia
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View file

@ -1,5 +1,4 @@
#!powershell
# This file is part of Ansible
# Copyright: (c) 2017, Red Hat, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@ -95,21 +94,21 @@ $result = @{
reboot_required = $false
}
$param = Parse-Args -arguments $args -supports_check_mode $true
$params = Parse-Args -arguments $args -supports_check_mode $true
$dns_domain_name = Get-AnsibleParam $param "dns_domain_name"
$safe_mode_password= Get-AnsibleParam $param "safe_mode_password"
$domain_admin_user = Get-AnsibleParam $param "domain_admin_user" -failifempty $result
$domain_admin_password= Get-AnsibleParam $param "domain_admin_password" -failifempty $result
$local_admin_password= Get-AnsibleParam $param "local_admin_password"
$database_path = Get-AnsibleParam $param "database_path" -type "path"
$sysvol_path = Get-AnsibleParam $param "sysvol_path" -type "path"
$read_only = Get-AnsibleParam $param "read_only" -type "bool" -default $false
$site_name = Get-AnsibleParam $param "site_name" -type "str" -failifempty $read_only
$dns_domain_name = Get-AnsibleParam -obj $params -name "dns_domain_name"
$safe_mode_password= Get-AnsibleParam -obj $params -name "safe_mode_password"
$domain_admin_user = Get-AnsibleParam -obj $params -name "domain_admin_user" -failifempty $result
$domain_admin_password= Get-AnsibleParam -obj $params -name "domain_admin_password" -failifempty $result
$local_admin_password= Get-AnsibleParam -obj $params -name "local_admin_password"
$database_path = Get-AnsibleParam -obj $params -name "database_path" -type "path"
$sysvol_path = Get-AnsibleParam -obj $params -name "sysvol_path" -type "path"
$read_only = Get-AnsibleParam -obj $params -name "read_only" -type "bool" -default $false
$site_name = Get-AnsibleParam -obj $params -name "site_name" -type "str" -failifempty $read_only
$state = Get-AnsibleParam $param "state" -validateset ("domain_controller", "member_server") -failifempty $result
$log_path = Get-AnsibleParam $param "log_path"
$_ansible_check_mode = Get-AnsibleParam $param "_ansible_check_mode" -default $false
$state = Get-AnsibleParam -obj $params -name "state" -validateset ("domain_controller", "member_server") -failifempty $result
$log_path = Get-AnsibleParam -obj $params -name "log_path"
$_ansible_check_mode = Get-AnsibleParam -obj $params -name "_ansible_check_mode" -default $false
$global:log_path = $log_path

View file

@ -58,12 +58,14 @@ options:
- The path to a directory on a fixed disk of the Windows host where the
domain database will be created..
- If not set then the default path is C(%SYSTEMROOT%\NTDS).
type: path
version_added: '2.5'
sysvol_path:
description:
- The path to a directory on a fixed disk of the Windows host where the
Sysvol folder will be created.
- If not set then the default path is C(%SYSTEMROOT%\SYSVOL).
type: path
version_added: '2.5'
author:
- Matt Davis (@nitzmahone)

View file

@ -1,7 +1,6 @@
#!powershell
# This file is part of Ansible
# (c) 2017, Jordan Borean <jborean93@gmail.com>, and others
# Copyright: (c) 2017, Jordan Borean <jborean93@gmail.com>, and others
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
@ -10,7 +9,7 @@ $ErrorActionPreference = "Stop"
$params = Parse-Args -arguments $args -supports_check_mode $true
$check_mode = Get-AnsibleParam -obj $params -name "_ansible_check_mode" -type "bool" -default $false
$diff_mode = Get-AnsibleParam -obj $Params -name "_ansible_diff" -type "bool" -default $false
$diff_mode = Get-AnsibleParam -obj $params -name "_ansible_diff" -type "bool" -default $false
$name = Get-AnsibleParam -obj $params -name "name" -type "str" -failifempty $true
$display_name = Get-AnsibleParam -obj $params -name "display_name" -type "str"

View file

@ -1,24 +1,9 @@
#!powershell
# (c) 2017, Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Copyright: (c) 2017, Red Hat, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# WANT_JSON
# POWERSHELL_COMMON
#Requires -Module Ansible.ModuleUtils.Legacy
Set-StrictMode -Version 2

View file

@ -1,5 +1,4 @@
#!powershell
# This file is part of Ansible
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View file

@ -52,6 +52,7 @@ options:
Principal Group, set C(groups=<principal group name>) and
I(groups_action=replace). Note that users cannot be removed from
their principal group (for example, "Domain Users").
type: list
groups_action:
description:
- If C(add), the user is added to each group in I(groups) where not

View file

@ -1,8 +1,7 @@
#!powershell
# This file is part of Ansible
# Copyright 2015, Peter Mounce <public@neverrunwithscissors.com>
# Copyright (c) 2017 Ansible Project
# Copyright: (c) 2015, Peter Mounce <public@neverrunwithscissors.com>
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -1,8 +1,7 @@
#!powershell
# This file is part of Ansible
# (c) 2015, Trond Hindenes <trond@hindenes.com>, and others
# Copyright (c) 2017 Ansible Project
# Copyright: (c) 2015, Trond Hindenes <trond@hindenes.com>, and others
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -1,24 +1,9 @@
#!powershell
# (c) 2017, Andrew Saraceni <andrew.saraceni@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Copyright: (c) 2017, Andrew Saraceni <andrew.saraceni@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# WANT_JSON
# POWERSHELL_COMMON
#Requires -Module Ansible.ModuleUtils.Legacy
$ErrorActionPreference = "Stop"

View file

@ -38,15 +38,19 @@ options:
- A list of one or more sources to ensure are present/absent in the log.
- When C(category_file), C(message_file) and/or C(parameter_file) are specified,
these values are applied across all sources.
type: list
category_file:
description:
- For one or more sources specified, the path to a custom category resource file.
type: path
message_file:
description:
- For one or more sources specified, the path to a custom event message resource file.
type: path
parameter_file:
description:
- For one or more sources specified, the path to a custom parameter resource file.
type: path
maximum_size:
description:
- The maximum size of the event log.
@ -66,6 +70,7 @@ options:
description:
- The minimum number of days event entries must remain in the log.
- This option is only used when C(overflow_action) is C(OverwriteOlder).
type: int
author:
- Andrew Saraceni (@andrewsaraceni)
'''

View file

@ -1,6 +1,6 @@
#!powershell
# (c) 2017, Andrew Saraceni <andrew.saraceni@gmail.com>
# Copyright: (c) 2017, Andrew Saraceni <andrew.saraceni@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Andrew Saraceni <andrew.saraceni@gmail.com>
# Copyright: (c) 2017, Andrew Saraceni <andrew.saraceni@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
@ -29,6 +29,7 @@ options:
- The numeric event identifier for the entry.
- Value must be between 0 and 65535.
required: yes
type: int
message:
description:
- The message for the given log entry.
@ -45,6 +46,7 @@ options:
category:
description:
- A numeric task category associated with the category message file for the log source.
type: int
raw_data:
description:
- Binary data associated with the log entry.

View file

@ -1,5 +1,4 @@
#!powershell
# This file is part of Ansible
# Copyright: (c) 2014, Paul Durivage <paul.durivage@rackspace.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View file

@ -1,9 +1,8 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of Ansible
# (c) 2014, Paul Durivage <paul.durivage@rackspace.com>, Trond Hindenes <trond@hindenes.com> and others
# Copyright: (c) 2014, Paul Durivage <paul.durivage@rackspace.com>
# Copyright: (c) 2014, Trond Hindenes <trond@hindenes.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# this is a windows documentation stub. actual code lives in the .ps1
@ -27,6 +26,7 @@ options:
description:
- Names of roles or features to install as a single feature or a comma-separated list of features.
required: yes
type: list
state:
description:
- State of the features or roles on the system.

View file

@ -1,7 +1,6 @@
#!powershell
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -28,6 +28,7 @@ options:
description:
- Path to the file being managed.
required: yes
type: path
aliases: [ dest, name ]
state:
description:

View file

@ -1,23 +1,9 @@
#!powershell
#this file is part of Ansible
#Copyright © 2015 Sam Liu <sam.liu@activenetwork.com>
# Copyright: (c) 2015, Sam Liu <sam.liu@activenetwork.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
#Requires -Module Ansible.ModuleUtils.Legacy
$params = Parse-Args $args -supports_check_mode $true

View file

@ -23,6 +23,7 @@ options:
- File to get version.
- Always provide absolute path.
required: yes
type: path
author:
- Sam Liu (@SamLiu79)
'''

View file

@ -1,7 +1,6 @@
#!powershell
# This file is part of Ansible
# Copyright (c) 2016 Ansible Project
# Copyright: (c) 2016, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -1,23 +1,9 @@
#!powershell
# This file is part of Ansible
# Copyright 2017, Michael Eaton <meaton@iforium.com>
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Copyright: (c) 2017, Michael Eaton <meaton@iforium.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# WANT_JSON
# POWERSHELL_COMMON
#Requires -Module Ansible.ModuleUtils.Legacy
$ErrorActionPreference = "Stop"
$firewall_profiles = @('Domain', 'Private', 'Public')

View file

@ -22,6 +22,7 @@ options:
profiles:
description:
- Specify one or more profiles to change.
type: list
choices:
- Domain
- Private

View file

@ -1,10 +1,10 @@
#!powershell
# Copyright (c) 2017 Artem Zinenko <zinenkoartem@gmail.com>
# Copyright (c) 2014 Timothy Vandenbrande <timothy.vandenbrande@gmail.com>
# Copyright: (c) 2014, Timothy Vandenbrande <timothy.vandenbrande@gmail.com>
# Copyright: (c) 2017, Artem Zinenko <zinenkoartem@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# WANT_JSON
# POWERSHELL_COMMON
#Requires -Module Ansible.ModuleUtils.Legacy
function Parse-ProtocolType {
param($protocol)

View file

@ -75,6 +75,7 @@ options:
profiles:
description:
- The profile this rule applies to.
type: list
default: domain,private,public
aliases: [ profile ]
force:

View file

@ -1,7 +1,7 @@
#!powershell
# This file is part of Ansible.
#
# Copyright: (c) 2015, Paul Durivage <paul.durivage@rackspace.com>, Tal Auslander <tal@cloudshare.com>
# Copyright: (c) 2015, Paul Durivage <paul.durivage@rackspace.com>
# Copyright: (c) 2015, Tal Auslander <tal@cloudshare.com>
# Copyright: (c) 2017, Dag Wieers <dag@wieers.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View file

@ -33,6 +33,7 @@ options:
- The location to save the file at the URL.
- Be sure to include a filename and extension as appropriate.
required: yes
type: path
force:
description:
- If C(yes), will always download the file. If C(no), will only
@ -47,6 +48,7 @@ options:
headers:
description:
- Add custom HTTP headers to a request (as a dictionary).
type: dict
version_added: '2.4'
url_username:
description:
@ -100,6 +102,7 @@ options:
timeout:
description:
- Timeout in seconds for URL request.
type: int
default: 10
version_added : '2.4'
'''

View file

@ -1,23 +1,9 @@
#!powershell
# This file is part of Ansible
#
# Copyright 2014, Chris Hoffman <choffman@chathamfinancial.com>
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# Copyright: (c) 2014, Chris Hoffman <choffman@chathamfinancial.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
$params = Parse-Args $args;
$check_mode = Get-AnsibleParam -obj $params -name "_ansible_check_mode" -type "bool" -default $false

View file

@ -30,6 +30,7 @@ options:
- Accepts all local, domain and service user types as username,
favoring domain lookups when in a domain.
required: yes
type: list
state:
description:
- Desired state of the members in the group.

View file

@ -1,4 +1,5 @@
#!powershell
# Copyright: (c) 2018, Ripon Banik (@riponbanik)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View file

@ -1,7 +1,6 @@
#!powershell
# This file is part of Ansible
# Copyright (c) 2017 Ansible Project
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -46,6 +46,7 @@ options:
description:
- The path to the downloaded hotfix .msu file.
- This MUST be set if C(state=present) and MUST be a .msu hotfix file.
type: path
notes:
- This must be run on a host that has the DISM powershell module installed and
a Powershell version >= 4.

View file

@ -1,25 +1,9 @@
#!powershell
# -*- coding: utf-8 -*-
# (c) 2015, Henrik Wallström <henrik@wallstroms.nu>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Copyright: (c) 2015, Henrik Wallström <henrik@wallstroms.nu>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# WANT_JSON
# POWERSHELL_COMMON
#Requires -Module Ansible.ModuleUtils.Legacy
$params = Parse-Args $args;

View file

@ -1,24 +1,9 @@
#!powershell
# (c) 2015, Henrik Wallström <henrik@wallstroms.nu>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Copyright: (c) 2015, Henrik Wallström <henrik@wallstroms.nu>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# WANT_JSON
# POWERSHELL_COMMON
#Requires -Module Ansible.ModuleUtils.Legacy
$params = Parse-Args $args -supports_check_mode $true
$check_mode = Get-AnsibleParam -obj $params -name "_ansible_check_mode" -type "bool" -default $false

View file

@ -1,24 +1,9 @@
#!powershell
# (c) 2015, Henrik Wallström <henrik@wallstroms.nu>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Copyright: (c) 2015, Henrik Wallström <henrik@wallstroms.nu>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# WANT_JSON
# POWERSHELL_COMMON
#Requires -Module Ansible.ModuleUtils.Legacy
$params = Parse-Args $args;

View file

@ -24,6 +24,7 @@ options:
- Note that the Windows path delimiter C(\) must be escaped as C(\\) when the line is double quoted.
- Before 2.3 this option was only usable as I(dest), I(destfile) and I(name).
required: yes
type: path
aliases: [ dest, destfile, name ]
regexp:
description:

View file

@ -1,7 +1,6 @@
#!powershell
# This file is part of Ansible
# Copyright (c) 2017 Ansible Project
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -43,6 +43,7 @@ options:
drive regardless of the target.
- If C(state=absent) and the path is set, the module will throw an error if
path does not match the target of the mapped drive.
type: path
state:
description:
- If C(present) will ensure the mapped drive exists.

View file

@ -1,24 +1,10 @@
#!powershell
# This file is part of Ansible
#
# Copyright 2016, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk>
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# Copyright: (c) 2016, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
#
$stopwatch = [system.diagnostics.stopwatch]::startNew()
$params = Parse-Args $args -supports_check_mode $true

View file

@ -26,6 +26,7 @@ options:
display_seconds:
description:
- How long to wait for receiver to acknowledge message, in seconds.
type: int
default: 10
wait:
description:

View file

@ -1,28 +1,14 @@
#!powershell
# This file is part of Ansible
#
# Copyright 2015, George Frank <george@georgefrank.net>
# Copyright 2015, Adam Keech <akeech@chathamfinancial.com>
# Copyright 2015, Hans-Joachim Kliemeck <git@kliemeck.de>
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Copyright: (c) 2015, George Frank <george@georgefrank.net>
# Copyright: (c) 2015, Adam Keech <akeech@chathamfinancial.com>
# Copyright: (c) 2015, Hans-Joachim Kliemeck <git@kliemeck.de>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
$ErrorActionPreference = "Stop"
# WANT_JSON
# POWERSHELL_COMMON
$params = Parse-Args $args
$result = @{

View file

@ -1,5 +1,6 @@
#!powershell
# Copyright 2015, Hans-Joachim Kliemeck <git@kliemeck.de>
# Copyright: (c) 2015, Hans-Joachim Kliemeck <git@kliemeck.de>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -20,6 +20,7 @@ options:
description:
- Path to be used for changing owner
required: yes
type: path
user:
description:
- Name to be used for changing owner

View file

@ -1,8 +1,7 @@
#!powershell
# This file is part of Ansible
# (c) 2014, Trond Hindenes <trond@hindenes.com>, and others
# Copyright (c) 2017 Ansible Project
# Copyright: (c) 2014, Trond Hindenes <trond@hindenes.com>, and others
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -37,6 +37,7 @@ options:
- Will check the existance of the path specified and use the result to
determine whether the package is already installed.
- You can use this in conjunction with C(product_id) and other C(creates_*).
type: path
version_added: '2.4'
creates_service:
description:
@ -59,6 +60,7 @@ options:
C(3010).
- A return code of C(3010) usually means that a reboot is required, the
C(reboot_required) return value is set if the return code is C(3010).
type: list
default: [0, 3010]
password:
description:

View file

@ -1,11 +1,9 @@
#!powershell
# This file is part of Ansible
#
# Copyright 2017, Liran Nisanov <lirannis@gmail.com>
# Copyright: (c) 2017, Liran Nisanov <lirannis@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# WANT_JSON
# POWERSHELL_COMMON
#Requires -Module Ansible.ModuleUtils.Legacy
########

View file

@ -27,9 +27,11 @@ options:
initial_size:
description:
- The initial size of the pagefile in megabytes.
type: int
maximum_size:
description:
- The maximum size of the pagefile in megabytes.
type: int
override:
description:
- Override the current pagefile on the drive.

View file

@ -1,21 +1,8 @@
#!powershell
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
Set-StrictMode -Version 2
$ErrorActionPreference = "Stop"

View file

@ -1,10 +1,8 @@
#!powershell
# This file is part of Ansible
# Copyright: (c) 2017, Erwan Quelin (@equelin) <erwan.quelin@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Author: Erwan Quelin (mail:erwan.quelin@gmail.com - GitHub: @equelin - Twitter: @erwanquelin)
#Requires -Module Ansible.ModuleUtils.Legacy
$ErrorActionPreference = 'Stop'
@ -15,8 +13,8 @@ $diff_mode = Get-AnsibleParam -obj $params -name "_ansible_diff" -type "bool" -d
# Modules parameters
$path = Get-AnsibleParam -obj $params -name "path" -type "string" -failifempty $true
$minimum_version = Get-AnsibleParam -obj $params -name "minimum_version" -type "string" -failifempty $false
$path = Get-AnsibleParam -obj $params -name "path" -type "str" -failifempty $true
$minimum_version = Get-AnsibleParam -obj $params -name "minimum_version" -type "str" -failifempty $false
$result = @{
changed = $false

View file

@ -1,21 +1,8 @@
#!powershell
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
$ErrorActionPreference = "Stop"

View file

@ -1,6 +1,6 @@
#!powershell
# Copyright (c) 2017 Ansible Project
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -1,5 +1,4 @@
#!powershell
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Dag Wieers (dagwieers) <dag@wieers.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View file

@ -24,11 +24,13 @@ options:
executable:
description:
- The location of the PsExec utility (in case it is not located in your PATH).
type: path
default: psexec.exe
hostnames:
description:
- The hostnames to run the command.
- If not provided, the command is run locally.
type: list
username:
description:
- The (remote) user to run the command as.
@ -40,6 +42,7 @@ options:
chdir:
description:
- Run the command from this (remote) directory.
type: path
nobanner:
description:
- Do not display the startup banner and copyright message.
@ -85,6 +88,7 @@ options:
timeout:
description:
- The connection timeout in seconds
type: int
wait:
description:
- Wait for the application to terminate.

View file

@ -1,33 +1,19 @@
#!powershell
# This file is part of Ansible
#
# Copyright 2017, Daniele Lazzari <lazzari@mailup.com>
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# Copyright: (c) 2017, Daniele Lazzari <lazzari@mailup.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
# win_psmodule (Powershell modules Additions/Removal)
$params = Parse-Args $args -supports_check_mode $true
$name = Get-AnsibleParam -obj $params "name" -type "str" -failifempty $true
$repo = Get-AnsibleParam -obj $params "repository" -type "str"
$url = Get-AnsibleParam -obj $params "url" -type "str"
$state = Get-AnsibleParam -obj $params "state" -type "str" -default "present" -validateset "present", "absent"
$allow_clobber = Get-AnsibleParam -obj $params "allow_clobber" -type "bool" -default $false
$name = Get-AnsibleParam -obj $params -name "name" -type "str" -failifempty $true
$repo = Get-AnsibleParam -obj $params -name "repository" -type "str"
$url = Get-AnsibleParam -obj $params -name "url" -type "str"
$state = Get-AnsibleParam -obj $params -name "state" -type "str" -default "present" -validateset "present", "absent"
$allow_clobber = Get-AnsibleParam -obj $params -name "allow_clobber" -type "bool" -default $false
$check_mode = Get-AnsibleParam -obj $params -name "_ansible_check_mode" -default $false
$result = @{"changed" = $false

View file

@ -1,9 +1,9 @@
#!powershell
# Copyright (c) 2017 Ansible Project
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# WANT_JSON
# POWERSHELL_COMMON
#Requires -Module Ansible.ModuleUtils.Legacy
function Get-EnabledPlugins($rabbitmq_plugins_cmd)
{

View file

@ -18,12 +18,14 @@ options:
pre_reboot_delay:
description:
- Seconds for shutdown to wait before requesting reboot
type: int
default: 2
aliases: [ pre_reboot_delay_sec ]
post_reboot_delay:
description:
- Seconds to wait after the reboot was successful and the connection was re-established
- This is useful if you want wait for something to settle despite your connection already working
type: int
default: 0
version_added: '2.4'
aliases: [ post_reboot_delay_sec ]
@ -32,17 +34,20 @@ options:
- Maximum seconds to wait for shutdown to occur
- Increase this timeout for very slow hardware, large update applications, etc
- This option has been removed since Ansible 2.5 as the win_reboot behavior has changed
type: int
default: 600
aliases: [ shutdown_timeout_sec ]
reboot_timeout:
description:
- Maximum seconds to wait for machine to re-appear on the network and respond to a test command
- This timeout is evaluated separately for both network appearance and test command success (so maximum clock time is actually twice this value)
type: int
default: 600
aliases: [ reboot_timeout_sec ]
connect_timeout:
description:
- Maximum seconds to wait for a single successful TCP connection to the WinRM endpoint before trying again
type: int
default: 5
aliases: [ connect_timeout_sec ]
test_command:

View file

@ -1,21 +1,8 @@
#!powershell
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
$ErrorActionPreference = "Stop"

View file

@ -1,8 +1,8 @@
#!powershell
# This file is part of Ansible
# (c) 2015, Adam Keech <akeech@chathamfinancial.com>, Josh Ludwig <jludwig@chathamfinancial.com>
# (c) 2017, Jordan Borean <jborean93@gmail.com>
# Copyright: (c) 2015, Adam Keech <akeech@chathamfinancial.com>
# Copyright: (c) 2015, Josh Ludwig <jludwig@chathamfinancial.com>
# Copyright: (c) 2017, Jordan Borean <jborean93@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -1,7 +1,8 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Adam Keech <akeech@chathamfinancial.com>, Josh Ludwig <jludwig@chathamfinancial.com>
# Copyright: (c) 2015, Adam Keech <akeech@chathamfinancial.com>
# Copyright: (c) 2015, Josh Ludwig <jludwig@chathamfinancial.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# this is a windows documentation stub. actual code lives in the .ps1
@ -79,6 +80,7 @@ options:
other hive saved as a file.
- Using this function requires the user to have the C(SeRestorePrivilege)
and C(SeBackupPrivilege) privileges enabled.
type: path
version_added: '2.5'
notes:
- Check-mode C(-C/--check) and diff output C(-D/--diff) are supported, so that you can test every change against the active configuration before

View file

@ -1,21 +1,8 @@
#!powershell
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
$params = Parse-Args -arguments $args -supports_check_mode $true
$check_mode = Get-AnsibleParam -obj $params "_ansible_check_mode" -type 'bool' -default $false

View file

@ -1,23 +1,9 @@
#!powershell
# This file is part of Ansible
#
# Copyright 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk>
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# Copyright: (c) 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
Function Convert-RegistryPath {
Param (

View file

@ -29,6 +29,7 @@ options:
description:
- The full path including file name to the registry file on the remote machine to be merged
required: yes
type: path
compare_key:
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.

View file

@ -1,10 +1,9 @@
#!powershell
#
# Copyright 2015, Corwin Brown <corwin.brown@maxpoint.com>
# Copyright: (c) 2015, Corwin Brown <corwin.brown@maxpoint.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# WANT_JSON
# POWERSHELL_COMMON
#Requires -Module Ansible.ModuleUtils.Legacy
$params = Parse-Args $args -supports_check_mode $true
$check_mode = Get-AnsibleParam -obj $params -name "_ansible_check_mode" -type "bool" -default $false
@ -13,7 +12,7 @@ $src = Get-AnsibleParam -obj $params -name "src" -type "path" -failifempty $true
$dest = Get-AnsibleParam -obj $params -name "dest" -type "path" -failifempty $true
$purge = Get-AnsibleParam -obj $params -name "purge" -type "bool" -default $false
$recurse = Get-AnsibleParam -obj $params -name "recurse" -type "bool" -default $false
$flags = Get-AnsibleParam -obj $params -name "flags" -type "string"
$flags = Get-AnsibleParam -obj $params -name "flags" -type "str"
$result = @{
changed = $false

View file

@ -25,10 +25,12 @@ options:
description:
- Source file/directory to sync.
required: yes
type: path
dest:
description:
- Destination file/directory to sync (Will receive contents of src).
required: yes
type: path
recurse:
description:
- Includes all subdirectories (Toggles the C(/e) flag to RoboCopy).

View file

@ -1,23 +1,9 @@
#!powershell
# This file is part of Ansible
#
# Copyright 2016, Daniele Lazzari <lazzari@mailup.com>
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# Copyright: (c) 2016, Daniele Lazzari <lazzari@mailup.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
# win_route (Add or remove a network static route)

View file

@ -30,6 +30,7 @@ options:
metric:
description:
- Metric used by the static route.
type: int
default: 1
state:
description:

View file

@ -1,23 +1,9 @@
#!powershell
# This file is part of Ansible
#
# Copyright 2016, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk>
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# Copyright: (c) 2016, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
$params = Parse-Args $args -supports_check_mode $true
$check_mode = Get-AnsibleParam -obj $params -name "_ansible_check_mode" -type "bool" -default $false

View file

@ -30,6 +30,7 @@ options:
- Full path to a windows format text file containing the text to be spokend.
- Use either C(msg) or C(msg_file).
- Optional so that you can use this module just to play sounds.
type: path
voice:
description:
- Which voice to use. See notes for how to discover installed voices.
@ -41,15 +42,18 @@ options:
- How fast or slow to speak the text.
- Must be an integer value in the range -10 to 10.
- -10 is slowest, 10 is fastest.
type: int
default: 0
start_sound_path:
description:
- Full path to a C(.wav) file containing a sound to play before the text is spoken.
- Useful on conference calls to alert other speakers that ansible has something to say.
type: path
end_sound_path:
description:
- Full path to a C(.wav) file containing a sound to play after the text has been spoken.
- Useful on conference calls to alert other speakers that ansible has finished speaking.
type: path
author:
- Jon Hawkesworth (@jhawkesworth)
notes:

View file

@ -1,9 +1,8 @@
#!powershell
# This file is part of Ansible
# Copyright 2015, Peter Mounce <public@neverrunwithscissors.com>
# Michael Perzel <michaelperzel@gmail.com>
# Copyright (c) 2017 Ansible Project
# Copyright: (c) 2015, Peter Mounce <public@neverrunwithscissors.com>
# Copyright: (c) 2015, Michael Perzel <michaelperzel@gmail.com>
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -53,6 +53,7 @@ options:
is kept when modifying the task.
- This module only supports the C(ExecAction) type but can still delete the
older legacy types.
type: list
suboptions:
path:
description:
@ -78,6 +79,7 @@ options:
- DEPRECATED since 2.5, use the C(actions) option instead to specify a list
of actions to run.
- Will be removed in 2.7.
type: path
# Trigger options
triggers:
@ -90,6 +92,7 @@ options:
for a list of trigger types and their options.
- The suboption options listed below are not required for all trigger
types, read the description for more details.
type: list
suboptions:
type:
description:
@ -209,6 +212,7 @@ options:
- DEPRECATED since 2.5, use the C(triggers) option list with the type of
C(monthlydow) or C(weekly).
- Will be removed in 2.7.
type: list
frequency:
description:
- The frequency of the task to run.
@ -330,6 +334,7 @@ options:
- C(0) means the task is compatible with the AT command.
- C(1) means the task is compatible with Task Scheduler 1.0.
- C(2) means the task is compatible with Task Scheduler 2.0.
type: int
choices: [ 0, 1, 2 ]
version_added: '2.5'
delete_expired_task_after:
@ -372,6 +377,7 @@ options:
before starting itself.
- C(2) will not start a new instance if another is running.
- C(3) will stop other instances of the task and start the new one.
type: int
choices: [ 0, 1, 2, 3 ]
version_added: '2.5'
priority:
@ -380,11 +386,13 @@ options:
- When creating a new task the default if C(7).
- See U(https://msdn.microsoft.com/en-us/library/windows/desktop/aa383512.aspx)
for details on the priority levels.
type: int
version_added: '2.5'
restart_count:
description:
- The number of times that the Task Scheduler will attempt to restart the
task.
type: int
version_added: '2.5'
restart_interval:
description:

View file

@ -1,6 +1,6 @@
#!powershell
# Copyright (c) 2017 Ansible Project
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.CamelConversion

View file

@ -1,23 +1,9 @@
#!powershell
# This file is part of Ansible
#
# Copyright 2017, Jordan Borean <jborean93@gmail.com>
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
# Copyright: (c) 2017, Jordan Borean <jborean93@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
$ErrorActionPreference = 'Stop'

View file

@ -1,7 +1,6 @@
#!powershell
# This file is part of Ansible
# Copyright 2014, Chris Hoffman <choffman@chathamfinancial.com>
# Copyright: (c) 2014, Chris Hoffman <choffman@chathamfinancial.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -24,6 +24,7 @@ options:
service.
- This works by C(dependency_action) to either add/remove or set the
services in this list.
type: list
version_added: "2.3"
dependency_action:
description:

View file

@ -1,5 +1,6 @@
#!powershell
# Copyright 2015, Hans-Joachim Kliemeck <git@kliemeck.de>
# Copyright: (c) 2015, Hans-Joachim Kliemeck <git@kliemeck.de>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy

View file

@ -30,6 +30,7 @@ options:
description:
- Share directory.
required: yes
type: path
state:
description:
- Specify whether to add C(present) or remove C(absent) the specified share.

Some files were not shown because too many files have changed in this diff Show more