summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Davis <nitzmahone@users.noreply.github.com>2017-05-04 09:04:02 -0700
committerGitHub <noreply@github.com>2017-05-04 09:04:02 -0700
commit62d3c607f9179807bb498133d6fbcd5748cd6bed (patch)
treef99283f61d2cfcb14038b6aee5e0f5b8ccc03ada
parent54b4769077081f8f7de4333f51e1fed94691818e (diff)
parent2a7ce1059d830bee4edf0b1f29008933a878d9ff (diff)
downloadansible-changelog-fix.tar.gz
Merge branch 'devel' into changelog-fixchangelog-fix
-rw-r--r--CHANGELOG.md15
-rw-r--r--RELEASES.txt6
-rw-r--r--lib/ansible/module_utils/powershell.ps14
-rw-r--r--lib/ansible/modules/network/avi/avi_cloud.py243
-rw-r--r--lib/ansible/modules/network/avi/avi_cloudproperties.py118
-rw-r--r--lib/ansible/modules/network/avi/avi_gslb.py151
-rw-r--r--lib/ansible/modules/network/avi/avi_gslbhealthmonitor.py177
-rw-r--r--lib/ansible/modules/network/avi/avi_gslbservice.py180
-rw-r--r--lib/ansible/modules/network/avi/avi_ipaddrgroup.py159
-rw-r--r--lib/ansible/modules/network/avi/avi_network.py145
-rw-r--r--lib/ansible/modules/network/avi/avi_serviceenginegroup.py491
-rw-r--r--lib/ansible/modules/source_control/github_issue.py129
-rw-r--r--lib/ansible/modules/system/aix_inittab.py20
-rw-r--r--lib/ansible/modules/system/sysctl.py3
-rw-r--r--lib/ansible/modules/windows/win_feature.ps115
-rw-r--r--lib/ansible/modules/windows/win_feature.py63
16 files changed, 1904 insertions, 15 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 220a41cdee..ac5ec42075 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -56,6 +56,21 @@ Ansible Changes By Release
- any : true if any element is true
- all: true if all elements are true
+### Module Notes
+
+### New Modules
+
+- avi
+ * avi_cloud
+ * avi_cloudproperties.
+ * avi_gslb
+ * avi_gslbhealthmonitor
+ * avi_gslbservice
+ * avi_ipaddrgroup
+ * avi_network
+ * avi_serviceenginegroup
+
+
## 2.3 "Ramble On" - 2017-04-12
### Major Changes
diff --git a/RELEASES.txt b/RELEASES.txt
index 9ec601c4aa..5b95719a78 100644
--- a/RELEASES.txt
+++ b/RELEASES.txt
@@ -6,13 +6,13 @@ For more info http://docs.ansible.com/ansible/dev_guide/developing_releases.html
Active Development
++++++++++++++++++
-2.3 TBD - in progress
-2.2 "The Battle of Evermore" - maintenance
+2.4 TBD - in progress
Released
++++++++
-2.2.0 "The Battle of Evermore" 11-01-2016
+2.3.0 "Ramble On" 04-12-2017
+2.2.0 "The Battle of Evermore" 11-01-2016
2.1.3 "The Song Remains the Same" 11-04-2016
2.1.2 "The Song Remains the Same" 10-29-2016
2.1.1 "The Song Remains the Same" 07-28-2016
diff --git a/lib/ansible/module_utils/powershell.ps1 b/lib/ansible/module_utils/powershell.ps1
index bc0caefd83..642d23cb42 100644
--- a/lib/ansible/module_utils/powershell.ps1
+++ b/lib/ansible/module_utils/powershell.ps1
@@ -113,7 +113,7 @@ Function Add-Warning($obj, $message)
# so he does not have to check for the attribute prior to adding.
Function Add-DeprecationWarning($obj, $message, $version = $null)
{
- if (Get-Member -InputObject $obj -Name "deprecations") {
+ if ($obj.ContainsKey("deprecations")) {
if ($obj.deprecations -is [array]) {
$obj.deprecations += @{
msg = $message
@@ -123,7 +123,7 @@ Function Add-DeprecationWarning($obj, $message, $version = $null)
throw "deprecations attribute is not a list"
}
} else {
- $obj.deprecations = ,@(
+ $obj.deprecations = @(
@{
msg = $message
version = $version
diff --git a/lib/ansible/modules/network/avi/avi_cloud.py b/lib/ansible/modules/network/avi/avi_cloud.py
new file mode 100644
index 0000000000..d883ca3c83
--- /dev/null
+++ b/lib/ansible/modules/network/avi/avi_cloud.py
@@ -0,0 +1,243 @@
+#!/usr/bin/python
+#
+# Created on Aug 25, 2016
+# @author: Gaurav Rastogi (grastogi@avinetworks.com)
+# Eric Anderson (eanderson@avinetworks.com)
+# module_check: supported
+# Avi Version: 17.1.1
+#
+#
+# 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/>.
+#
+
+ANSIBLE_METADATA = {'metadata_version': '1.0',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = '''
+---
+module: avi_cloud
+author: Gaurav Rastogi (grastogi@avinetworks.com)
+
+short_description: Module for setup of Cloud Avi RESTful Object
+description:
+ - This module is used to configure Cloud object
+ - more examples at U(https://github.com/avinetworks/devops)
+requirements: [ avisdk ]
+version_added: "2.4"
+options:
+ state:
+ description:
+ - The state that should be applied on the entity.
+ default: present
+ choices: ["absent","present"]
+ apic_configuration:
+ description:
+ - Apicconfiguration settings for cloud.
+ apic_mode:
+ description:
+ - Boolean flag to set apic_mode.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ aws_configuration:
+ description:
+ - Awsconfiguration settings for cloud.
+ cloudstack_configuration:
+ description:
+ - Cloudstackconfiguration settings for cloud.
+ dhcp_enabled:
+ description:
+ - Select the ip address management scheme.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ dns_provider_ref:
+ description:
+ - Dns profile for the cloud.
+ - It is a reference to an object of type ipamdnsproviderprofile.
+ docker_configuration:
+ description:
+ - Dockerconfiguration settings for cloud.
+ east_west_dns_provider_ref:
+ description:
+ - Dns profile for east-west services.
+ - It is a reference to an object of type ipamdnsproviderprofile.
+ east_west_ipam_provider_ref:
+ description:
+ - Ipam profile for east-west services.
+ - Please use virtual subnets in this ipam profile that do not conflict with the underlay networks or any overlay networks in the cluster.
+ - For example in aws and gcp, 169.254.0.0/16 is used for storing instance metadata.
+ - Hence, it should not be used in this profile.
+ - It is a reference to an object of type ipamdnsproviderprofile.
+ enable_vip_static_routes:
+ description:
+ - Use static routes for vip side network resolution during virtualservice placement.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ ipam_provider_ref:
+ description:
+ - Ipam profile for the cloud.
+ - It is a reference to an object of type ipamdnsproviderprofile.
+ license_type:
+ description:
+ - If no license type is specified then default license enforcement for the cloud type is chosen.
+ - The default mappings are container cloud is max ses, openstack and vmware is cores and linux it is sockets.
+ - Enum options - LIC_BACKEND_SERVERS, LIC_SOCKETS, LIC_CORES, LIC_HOSTS.
+ linuxserver_configuration:
+ description:
+ - Linuxserverconfiguration settings for cloud.
+ mesos_configuration:
+ description:
+ - Mesosconfiguration settings for cloud.
+ mtu:
+ description:
+ - Mtu setting for the cloud.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 1500.
+ name:
+ description:
+ - Name of the object.
+ required: true
+ nsx_configuration:
+ description:
+ - Configuration parameters for nsx manager.
+ - Field introduced in 17.1.1.
+ obj_name_prefix:
+ description:
+ - Default prefix for all automatically created objects in this cloud.
+ - This prefix can be overridden by the se-group template.
+ openstack_configuration:
+ description:
+ - Openstackconfiguration settings for cloud.
+ oshiftk8s_configuration:
+ description:
+ - Oshiftk8sconfiguration settings for cloud.
+ prefer_static_routes:
+ description:
+ - Prefer static routes over interface routes during virtualservice placement.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ proxy_configuration:
+ description:
+ - Proxyconfiguration settings for cloud.
+ rancher_configuration:
+ description:
+ - Rancherconfiguration settings for cloud.
+ tenant_ref:
+ description:
+ - It is a reference to an object of type tenant.
+ url:
+ description:
+ - Avi controller URL of the object.
+ uuid:
+ description:
+ - Unique object identifier of the object.
+ vca_configuration:
+ description:
+ - Vcloudairconfiguration settings for cloud.
+ vcenter_configuration:
+ description:
+ - Vcenterconfiguration settings for cloud.
+ vtype:
+ description:
+ - Cloud type.
+ - Enum options - CLOUD_NONE, CLOUD_VCENTER, CLOUD_OPENSTACK, CLOUD_AWS, CLOUD_VCA, CLOUD_APIC, CLOUD_MESOS, CLOUD_LINUXSERVER, CLOUD_DOCKER_UCP,
+ - CLOUD_RANCHER, CLOUD_OSHIFT_K8S.
+ - Default value when not specified in API or module is interpreted by Avi Controller as CLOUD_NONE.
+ required: true
+extends_documentation_fragment:
+ - avi
+'''
+
+
+EXAMPLES = '''
+ - name: Create a VMWare cloud with write access mode
+ avi_cloud:
+ username: ''
+ controller: ''
+ password: ''
+ apic_mode: false
+ dhcp_enabled: true
+ enable_vip_static_routes: false
+ license_type: LIC_CORES
+ mtu: 1500
+ name: VCenter Cloud
+ prefer_static_routes: false
+ tenant_ref: admin
+ vcenter_configuration:
+ datacenter_ref: /api/vimgrdcruntime/datacenter-2-10.10.20.100
+ management_network: /api/vimgrnwruntime/dvportgroup-103-10.10.20.100
+ password: password
+ privilege: WRITE_ACCESS
+ username: user
+ vcenter_url: 10.10.20.100
+ vtype: CLOUD_VCENTER
+'''
+RETURN = '''
+obj:
+ description: Cloud (api/cloud) object
+ returned: success, changed
+ type: dict
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+try:
+ from ansible.module_utils.avi import (
+ avi_common_argument_spec, HAS_AVI, avi_ansible_api)
+except ImportError:
+ HAS_AVI = False
+
+
+def main():
+ argument_specs = dict(
+ state=dict(default='present',
+ choices=['absent', 'present']),
+ apic_configuration=dict(type='dict',),
+ apic_mode=dict(type='bool',),
+ aws_configuration=dict(type='dict',),
+ cloudstack_configuration=dict(type='dict',),
+ dhcp_enabled=dict(type='bool',),
+ dns_provider_ref=dict(type='str',),
+ docker_configuration=dict(type='dict',),
+ east_west_dns_provider_ref=dict(type='str',),
+ east_west_ipam_provider_ref=dict(type='str',),
+ enable_vip_static_routes=dict(type='bool',),
+ ipam_provider_ref=dict(type='str',),
+ license_type=dict(type='str',),
+ linuxserver_configuration=dict(type='dict',),
+ mesos_configuration=dict(type='dict',),
+ mtu=dict(type='int',),
+ name=dict(type='str', required=True),
+ nsx_configuration=dict(type='dict',),
+ obj_name_prefix=dict(type='str',),
+ openstack_configuration=dict(type='dict',),
+ oshiftk8s_configuration=dict(type='dict',),
+ prefer_static_routes=dict(type='bool',),
+ proxy_configuration=dict(type='dict',),
+ rancher_configuration=dict(type='dict',),
+ tenant_ref=dict(type='str',),
+ url=dict(type='str',),
+ uuid=dict(type='str',),
+ vca_configuration=dict(type='dict',),
+ vcenter_configuration=dict(type='dict',),
+ vtype=dict(type='str', required=True),
+ )
+ argument_specs.update(avi_common_argument_spec())
+ module = AnsibleModule(
+ argument_spec=argument_specs, supports_check_mode=True)
+ if not HAS_AVI:
+ return module.fail_json(msg=(
+ 'Avi python API SDK (avisdk>=17.1) is not installed. '
+ 'For more details visit https://github.com/avinetworks/sdk.'))
+ return avi_ansible_api(module, 'cloud',
+ set([]))
+
+if __name__ == '__main__':
+ main()
diff --git a/lib/ansible/modules/network/avi/avi_cloudproperties.py b/lib/ansible/modules/network/avi/avi_cloudproperties.py
new file mode 100644
index 0000000000..4da6fcba7d
--- /dev/null
+++ b/lib/ansible/modules/network/avi/avi_cloudproperties.py
@@ -0,0 +1,118 @@
+#!/usr/bin/python
+#
+# Created on Aug 25, 2016
+# @author: Gaurav Rastogi (grastogi@avinetworks.com)
+# Eric Anderson (eanderson@avinetworks.com)
+# module_check: supported
+# Avi Version: 17.1.1
+#
+#
+# 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/>.
+#
+
+ANSIBLE_METADATA = {'metadata_version': '1.0',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = '''
+---
+module: avi_cloudproperties
+author: Gaurav Rastogi (grastogi@avinetworks.com)
+
+short_description: Module for setup of CloudProperties Avi RESTful Object
+description:
+ - This module is used to configure CloudProperties object
+ - more examples at U(https://github.com/avinetworks/devops)
+requirements: [ avisdk ]
+version_added: "2.4"
+options:
+ state:
+ description:
+ - The state that should be applied on the entity.
+ default: present
+ choices: ["absent","present"]
+ cc_props:
+ description:
+ - Cloudconnector properties.
+ cc_vtypes:
+ description:
+ - Cloud types supported by cloudconnector.
+ - Enum options - CLOUD_NONE, CLOUD_VCENTER, CLOUD_OPENSTACK, CLOUD_AWS, CLOUD_VCA, CLOUD_APIC, CLOUD_MESOS, CLOUD_LINUXSERVER, CLOUD_DOCKER_UCP,
+ - CLOUD_RANCHER, CLOUD_OSHIFT_K8S.
+ hyp_props:
+ description:
+ - Hypervisor properties.
+ info:
+ description:
+ - Properties specific to a cloud type.
+ url:
+ description:
+ - Avi controller URL of the object.
+ uuid:
+ description:
+ - Unique object identifier of the object.
+extends_documentation_fragment:
+ - avi
+'''
+
+EXAMPLES = """
+- name: Example to create CloudProperties object
+ avi_cloudproperties:
+ controller: 10.10.25.42
+ username: admin
+ password: something
+ state: present
+ name: sample_cloudproperties
+"""
+
+RETURN = '''
+obj:
+ description: CloudProperties (api/cloudproperties) object
+ returned: success, changed
+ type: dict
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+try:
+ from ansible.module_utils.avi import (
+ avi_common_argument_spec, HAS_AVI, avi_ansible_api)
+except ImportError:
+ HAS_AVI = False
+
+
+def main():
+ argument_specs = dict(
+ state=dict(default='present',
+ choices=['absent', 'present']),
+ cc_props=dict(type='dict',),
+ cc_vtypes=dict(type='list',),
+ hyp_props=dict(type='list',),
+ info=dict(type='list',),
+ url=dict(type='str',),
+ uuid=dict(type='str',),
+ )
+ argument_specs.update(avi_common_argument_spec())
+ module = AnsibleModule(
+ argument_spec=argument_specs, supports_check_mode=True)
+ if not HAS_AVI:
+ return module.fail_json(msg=(
+ 'Avi python API SDK (avisdk>=17.1) is not installed. '
+ 'For more details visit https://github.com/avinetworks/sdk.'))
+ return avi_ansible_api(module, 'cloudproperties',
+ set([]))
+
+if __name__ == '__main__':
+ main()
diff --git a/lib/ansible/modules/network/avi/avi_gslb.py b/lib/ansible/modules/network/avi/avi_gslb.py
new file mode 100644
index 0000000000..757e88e1cd
--- /dev/null
+++ b/lib/ansible/modules/network/avi/avi_gslb.py
@@ -0,0 +1,151 @@
+#!/usr/bin/python
+#
+# Created on Aug 25, 2016
+# @author: Gaurav Rastogi (grastogi@avinetworks.com)
+# Eric Anderson (eanderson@avinetworks.com)
+# module_check: supported
+# Avi Version: 17.1.1
+#
+#
+# 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/>.
+#
+
+ANSIBLE_METADATA = {'metadata_version': '1.0',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = '''
+---
+module: avi_gslb
+author: Gaurav Rastogi (grastogi@avinetworks.com)
+
+short_description: Module for setup of Gslb Avi RESTful Object
+description:
+ - This module is used to configure Gslb object
+ - more examples at U(https://github.com/avinetworks/devops)
+requirements: [ avisdk ]
+version_added: "2.4"
+options:
+ state:
+ description:
+ - The state that should be applied on the entity.
+ default: present
+ choices: ["absent","present"]
+ clear_on_max_retries:
+ description:
+ - Max retries after which the remote site is treatedas a fresh start.
+ - In fresh start all the configsare downloaded.
+ - Allowed values are 1-1024.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 20.
+ description:
+ description:
+ - User defined description for the object.
+ dns_configs:
+ description:
+ - Sub domain configuration for the gslb.
+ - Gslb service's fqdn must be a match one of these subdomains.
+ leader_cluster_uuid:
+ description:
+ - Mark this site as leader of gslb configuration.
+ - This site is the one among the avi sites.
+ name:
+ description:
+ - Name for the gslb object.
+ required: true
+ send_interval:
+ description:
+ - Frequency with which group members communicate.
+ - Allowed values are 1-3600.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 15.
+ sites:
+ description:
+ - Select avi site member belonging to this gslb.
+ tenant_ref:
+ description:
+ - It is a reference to an object of type tenant.
+ third_party_sites:
+ description:
+ - Third party site member belonging to this gslb.
+ - Field introduced in 17.1.1.
+ url:
+ description:
+ - Avi controller URL of the object.
+ uuid:
+ description:
+ - Uuid of the gslb object.
+ view_id:
+ description:
+ - The view-id is used in maintenance mode to differentiate partitioned groups while they havethe same gslb namespace.
+ - Each partitioned groupwill be able to operate independently by using theview-id.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 0.
+extends_documentation_fragment:
+ - avi
+'''
+
+EXAMPLES = """
+- name: Example to create Gslb object
+ avi_gslb:
+ controller: 10.10.25.42
+ username: admin
+ password: something
+ state: present
+ name: sample_gslb
+"""
+
+RETURN = '''
+obj:
+ description: Gslb (api/gslb) object
+ returned: success, changed
+ type: dict
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+try:
+ from ansible.module_utils.avi import (
+ avi_common_argument_spec, HAS_AVI, avi_ansible_api)
+except ImportError:
+ HAS_AVI = False
+
+
+def main():
+ argument_specs = dict(
+ state=dict(default='present',
+ choices=['absent', 'present']),
+ clear_on_max_retries=dict(type='int',),
+ description=dict(type='str',),
+ dns_configs=dict(type='list',),
+ leader_cluster_uuid=dict(type='str',),
+ name=dict(type='str', required=True),
+ send_interval=dict(type='int',),
+ sites=dict(type='list',),
+ tenant_ref=dict(type='str',),
+ third_party_sites=dict(type='list',),
+ url=dict(type='str',),
+ uuid=dict(type='str',),
+ view_id=dict(type='int',),
+ )
+ argument_specs.update(avi_common_argument_spec())
+ module = AnsibleModule(
+ argument_spec=argument_specs, supports_check_mode=True)
+ if not HAS_AVI:
+ return module.fail_json(msg=(
+ 'Avi python API SDK (avisdk>=17.1) is not installed. '
+ 'For more details visit https://github.com/avinetworks/sdk.'))
+ return avi_ansible_api(module, 'gslb',
+ set([]))
+
+if __name__ == '__main__':
+ main()
diff --git a/lib/ansible/modules/network/avi/avi_gslbhealthmonitor.py b/lib/ansible/modules/network/avi/avi_gslbhealthmonitor.py
new file mode 100644
index 0000000000..14a219d050
--- /dev/null
+++ b/lib/ansible/modules/network/avi/avi_gslbhealthmonitor.py
@@ -0,0 +1,177 @@
+#!/usr/bin/python
+#
+# Created on Aug 25, 2016
+# @author: Gaurav Rastogi (grastogi@avinetworks.com)
+# Eric Anderson (eanderson@avinetworks.com)
+# module_check: supported
+# Avi Version: 17.1.1
+#
+#
+# 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/>.
+#
+
+ANSIBLE_METADATA = {'metadata_version': '1.0',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = '''
+---
+module: avi_gslbhealthmonitor
+author: Gaurav Rastogi (grastogi@avinetworks.com)
+
+short_description: Module for setup of GslbHealthMonitor Avi RESTful Object
+description:
+ - This module is used to configure GslbHealthMonitor object
+ - more examples at U(https://github.com/avinetworks/devops)
+requirements: [ avisdk ]
+version_added: "2.4"
+options:
+ state:
+ description:
+ - The state that should be applied on the entity.
+ default: present
+ choices: ["absent","present"]
+ description:
+ description:
+ - User defined description for the object.
+ dns_monitor:
+ description:
+ - Healthmonitordns settings for gslbhealthmonitor.
+ external_monitor:
+ description:
+ - Healthmonitorexternal settings for gslbhealthmonitor.
+ failed_checks:
+ description:
+ - Number of continuous failed health checks before the server is marked down.
+ - Allowed values are 1-50.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 2.
+ http_monitor:
+ description:
+ - Healthmonitorhttp settings for gslbhealthmonitor.
+ https_monitor:
+ description:
+ - Healthmonitorhttp settings for gslbhealthmonitor.
+ monitor_port:
+ description:
+ - Use this port instead of the port defined for the server in the pool.
+ - If the monitor succeeds to this port, the load balanced traffic will still be sent to the port of the server defined within the pool.
+ - Allowed values are 1-65535.
+ - Special values are 0 - 'use server port'.
+ name:
+ description:
+ - A user friendly name for this health monitor.
+ required: true
+ receive_timeout:
+ description:
+ - A valid response from the server is expected within the receive timeout window.
+ - This timeout must be less than the send interval.
+ - If server status is regularly flapping up and down, consider increasing this value.
+ - Allowed values are 1-300.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 4.
+ send_interval:
+ description:
+ - Frequency, in seconds, that monitors are sent to a server.
+ - Allowed values are 1-3600.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 5.
+ successful_checks:
+ description:
+ - Number of continuous successful health checks before server is marked up.
+ - Allowed values are 1-50.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 2.
+ tcp_monitor:
+ description:
+ - Healthmonitortcp settings for gslbhealthmonitor.
+ tenant_ref:
+ description:
+ - It is a reference to an object of type tenant.
+ type:
+ description:
+ - Type of the health monitor.
+ - Enum options - HEALTH_MONITOR_PING, HEALTH_MONITOR_TCP, HEALTH_MONITOR_HTTP, HEALTH_MONITOR_HTTPS, HEALTH_MONITOR_EXTERNAL, HEALTH_MONITOR_UDP,
+ - HEALTH_MONITOR_DNS, HEALTH_MONITOR_GSLB.
+ required: true
+ udp_monitor:
+ description:
+ - Healthmonitorudp settings for gslbhealthmonitor.
+ url:
+ description:
+ - Avi controller URL of the object.
+ uuid:
+ description:
+ - Uuid of the health monitor.
+extends_documentation_fragment:
+ - avi
+'''
+
+EXAMPLES = """
+- name: Example to create GslbHealthMonitor object
+ avi_gslbhealthmonitor:
+ controller: 10.10.25.42
+ username: admin
+ password: something
+ state: present
+ name: sample_gslbhealthmonitor
+"""
+
+RETURN = '''
+obj:
+ description: GslbHealthMonitor (api/gslbhealthmonitor) object
+ returned: success, changed
+ type: dict
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+try:
+ from ansible.module_utils.avi import (
+ avi_common_argument_spec, HAS_AVI, avi_ansible_api)
+except ImportError:
+ HAS_AVI = False
+
+
+def main():
+ argument_specs = dict(
+ state=dict(default='present',
+ choices=['absent', 'present']),
+ description=dict(type='str',),
+ dns_monitor=dict(type='dict',),
+ external_monitor=dict(type='dict',),
+ failed_checks=dict(type='int',),
+ http_monitor=dict(type='dict',),
+ https_monitor=dict(type='dict',),
+ monitor_port=dict(type='int',),
+ name=dict(type='str', required=True),
+ receive_timeout=dict(type='int',),
+ send_interval=dict(type='int',),
+ successful_checks=dict(type='int',),
+ tcp_monitor=dict(type='dict',),
+ tenant_ref=dict(type='str',),
+ type=dict(type='str', required=True),
+ udp_monitor=dict(type='dict',),
+ url=dict(type='str',),
+ uuid=dict(type='str',),
+ )
+ argument_specs.update(avi_common_argument_spec())
+ module = AnsibleModule(
+ argument_spec=argument_specs, supports_check_mode=True)
+ if not HAS_AVI:
+ return module.fail_json(msg=(
+ 'Avi python API SDK (avisdk>=17.1) is not installed. '
+ 'For more details visit https://github.com/avinetworks/sdk.'))
+ return avi_ansible_api(module, 'gslbhealthmonitor',
+ set([]))
+
+if __name__ == '__main__':
+ main()
diff --git a/lib/ansible/modules/network/avi/avi_gslbservice.py b/lib/ansible/modules/network/avi/avi_gslbservice.py
new file mode 100644
index 0000000000..667962d3c9
--- /dev/null
+++ b/lib/ansible/modules/network/avi/avi_gslbservice.py
@@ -0,0 +1,180 @@
+#!/usr/bin/python
+#
+# Created on Aug 25, 2016
+# @author: Gaurav Rastogi (grastogi@avinetworks.com)
+# Eric Anderson (eanderson@avinetworks.com)
+# module_check: supported
+# Avi Version: 17.1.1
+#
+#
+# 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/>.
+#
+
+ANSIBLE_METADATA = {'metadata_version': '1.0',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = '''
+---
+module: avi_gslbservice
+author: Gaurav Rastogi (grastogi@avinetworks.com)
+
+short_description: Module for setup of GslbService Avi RESTful Object
+description:
+ - This module is used to configure GslbService object
+ - more examples at U(https://github.com/avinetworks/devops)
+requirements: [ avisdk ]
+version_added: "2.4"
+options:
+ state:
+ description:
+ - The state that should be applied on the entity.
+ default: present
+ choices: ["absent","present"]
+ controller_health_status_enabled:
+ description:
+ - Gs member's overall health status is derived based on a combination of controller and datapath health-status inputs.
+ - Note that the datapath status is determined by the association of health monitor profiles.
+ - Only the controller provided status is determined through this configuration.
+ - Default value when not specified in API or module is interpreted by Avi Controller as True.
+ description:
+ description:
+ - User defined description for the object.
+ domain_names:
+ description:
+ - Fully qualified domain name of the gslb service.
+ down_response:
+ description:
+ - Response to the client query when the gslb service is down.
+ enabled:
+ description:
+ - Enable or disable the gslb service.
+ - If the gslb service is enabled, then the vips are sent in the dns responses based on reachability and configured algorithm.
+ - If the gslb service is disabled, then the vips are no longer available in the dns response.
+ - Default value when not specified in API or module is interpreted by Avi Controller as True.
+ groups:
+ description:
+ - Select list of pools belonging to this gslb service.
+ health_monitor_refs:
+ description:
+ - Verify vs health by applying one or more health monitors.
+ - Active monitors generate synthetic traffic from dns service engine and to mark a vs up or down based on the response.
+ - It is a reference to an object of type gslbhealthmonitor.
+ health_monitor_scope:
+ description:
+ - Health monitor probe can be executed for all the members or it can be executed only for third-party members.
+ - This operational mode is useful to reduce the number of health monitor probes in case of a hybrid scenario.
+ - In such a case, avi members can have controller derived status while non-avi members can be probed by via health monitor probes in dataplane.
+ - Enum options - GSLB_SERVICE_HEALTH_MONITOR_ALL_MEMBERS, GSLB_SERVICE_HEALTH_MONITOR_ONLY_NON_AVI_MEMBERS.
+ - Default value when not specified in API or module is interpreted by Avi Controller as GSLB_SERVICE_HEALTH_MONITOR_ALL_MEMBERS.
+ name:
+ description:
+ - Name for the gslb service.
+ required: true
+ num_dns_ip:
+ description:
+ - Number of ip addresses of this gslb service to be returned by the dns service.
+ - Enter 0 to return all ip addresses.
+ - Allowed values are 1-20.
+ - Special values are 0- 'return all ip addresses'.
+ tenant_ref:
+ description:
+ - It is a reference to an object of type tenant.
+ ttl:
+ description:
+ - Ttl value (in seconds) for records served for this gslb service by the dns service.
+ - Allowed values are 1-86400.
+ url:
+ description:
+ - Avi controller URL of the object.
+ use_edns_client_subnet:
+ description:
+ - Use the client ip subnet from the edns option as source ipaddress for client geo-location and consistent hash algorithm.
+ - Default is true.
+ - Field introduced in 17.1.1.
+ - Default value when not specified in API or module is interpreted by Avi Controller as True.
+ uuid:
+ description:
+ - Uuid of the gslb service.
+ wildcard_match:
+ description:
+ - Enable wild-card match of fqdn if an exact match is not found in the dns table, the longest match is chosen by wild-carding the fqdn in the dns
+ - request.
+ - Default is false.
+ - Field introduced in 17.1.1.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+extends_documentation_fragment:
+ - avi
+'''
+
+EXAMPLES = """
+- name: Example to create GslbService object
+ avi_gslbservice:
+ controller: 10.10.25.42
+ username: admin
+ password: something
+ state: present
+ name: sample_gslbservice
+"""
+
+RETURN = '''
+obj:
+ description: GslbService (api/gslbservice) object
+ returned: success, changed
+ type: dict
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+try:
+ from ansible.module_utils.avi import (
+ avi_common_argument_spec, HAS_AVI, avi_ansible_api)
+except ImportError:
+ HAS_AVI = False
+
+
+def main():
+ argument_specs = dict(
+ state=dict(default='present',
+ choices=['absent', 'present']),
+ controller_health_status_enabled=dict(type='bool',),
+ description=dict(type='str',),
+ domain_names=dict(type='list',),
+ down_response=dict(type='dict',),
+ enabled=dict(type='bool',),
+ groups=dict(type='list',),
+ health_monitor_refs=dict(type='list',),
+ health_monitor_scope=dict(type='str',),
+ name=dict(type='str', required=True),
+ num_dns_ip=dict(type='int',),
+ tenant_ref=dict(type='str',),
+ ttl=dict(type='int',),
+ url=dict(type='str',),
+ use_edns_client_subnet=dict(type='bool',),
+ uuid=dict(type='str',),
+ wildcard_match=dict(type='bool',),
+ )
+ argument_specs.update(avi_common_argument_spec())
+ module = AnsibleModule(
+ argument_spec=argument_specs, supports_check_mode=True)
+ if not HAS_AVI:
+ return module.fail_json(msg=(
+ 'Avi python API SDK (avisdk>=17.1) is not installed. '
+ 'For more details visit https://github.com/avinetworks/sdk.'))
+ return avi_ansible_api(module, 'gslbservice',
+ set([]))
+
+if __name__ == '__main__':
+ main()
diff --git a/lib/ansible/modules/network/avi/avi_ipaddrgroup.py b/lib/ansible/modules/network/avi/avi_ipaddrgroup.py
new file mode 100644
index 0000000000..77b17f2b93
--- /dev/null
+++ b/lib/ansible/modules/network/avi/avi_ipaddrgroup.py
@@ -0,0 +1,159 @@
+#!/usr/bin/python
+#
+# Created on Aug 25, 2016
+# @author: Gaurav Rastogi (grastogi@avinetworks.com)
+# Eric Anderson (eanderson@avinetworks.com)
+# module_check: supported
+# Avi Version: 17.1.1
+#
+#
+# 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/>.
+#
+
+ANSIBLE_METADATA = {'metadata_version': '1.0',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = '''
+---
+module: avi_ipaddrgroup
+author: Gaurav Rastogi (grastogi@avinetworks.com)
+
+short_description: Module for setup of IpAddrGroup Avi RESTful Object
+description:
+ - This module is used to configure IpAddrGroup object
+ - more examples at U(https://github.com/avinetworks/devops)
+requirements: [ avisdk ]
+version_added: "2.4"
+options:
+ state:
+ description:
+ - The state that should be applied on the entity.
+ default: present
+ choices: ["absent","present"]
+ addrs:
+ description:
+ - Configure ip address(es).
+ apic_epg_name:
+ description:
+ - Populate ip addresses from members of this cisco apic epg.
+ country_codes:
+ description:
+ - Populate the ip address ranges from the geo database for this country.
+ description:
+ description:
+ - User defined description for the object.
+ ip_ports:
+ description:
+ - Configure (ip address, port) tuple(s).
+ marathon_app_name:
+ description:
+ - Populate ip addresses from tasks of this marathon app.
+ marathon_service_port:
+ description:
+ - Task port associated with marathon service port.
+ - If marathon app has multiple service ports, this is required.
+ - Else, the first task port is used.
+ name:
+ description:
+ - Name of the ip address group.
+ required: true
+ prefixes:
+ description:
+ - Configure ip address prefix(es).
+ ranges:
+ description:
+ - Configure ip address range(s).
+ tenant_ref:
+ description:
+ - It is a reference to an object of type tenant.
+ url:
+ description:
+ - Avi controller URL of the object.
+ uuid:
+ description:
+ - Uuid of the ip address group.
+extends_documentation_fragment:
+ - avi
+'''
+
+
+EXAMPLES = '''
+ - name: Create an IP Address Group configuration
+ avi_ipaddrgroup:
+ controller: ''
+ username: ''
+ password: ''
+ name: Client-Source-Block
+ prefixes:
+ - ip_addr:
+ addr: 10.0.0.0
+ type: V4
+ mask: 8
+ - ip_addr:
+ addr: 172.16.0.0
+ type: V4
+ mask: 12
+ - ip_addr:
+ addr: 192.168.0.0
+ type: V4
+ mask: 16
+'''
+RETURN = '''
+obj:
+ description: IpAddrGroup (api/ipaddrgroup) object
+ returned: success, changed
+ type: dict
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+try:
+ from ansible.module_utils.avi import (
+ avi_common_argument_spec, HAS_AVI, avi_ansible_api)
+except ImportError:
+ HAS_AVI = False
+
+
+def main():
+ argument_specs = dict(
+ state=dict(default='present',
+ choices=['absent', 'present']),
+ addrs=dict(type='list',),
+ apic_epg_name=dict(type='str',),
+ country_codes=dict(type='list',),
+ description=dict(type='str',),
+ ip_ports=dict(type='list',),
+ marathon_app_name=dict(type='str',),
+ marathon_service_port=dict(type='int',),
+ name=dict(type='str', required=True),
+ prefixes=dict(type='list',),
+ ranges=dict(type='list',),
+ tenant_ref=dict(type='str',),
+ url=dict(type='str',),
+ uuid=dict(type='str',),
+ )
+ argument_specs.update(avi_common_argument_spec())
+ module = AnsibleModule(
+ argument_spec=argument_specs, supports_check_mode=True)
+ if not HAS_AVI:
+ return module.fail_json(msg=(
+ 'Avi python API SDK (avisdk>=17.1) is not installed. '
+ 'For more details visit https://github.com/avinetworks/sdk.'))
+ return avi_ansible_api(module, 'ipaddrgroup',
+ set([]))
+
+if __name__ == '__main__':
+ main()
diff --git a/lib/ansible/modules/network/avi/avi_network.py b/lib/ansible/modules/network/avi/avi_network.py
new file mode 100644
index 0000000000..4cc50409fb
--- /dev/null
+++ b/lib/ansible/modules/network/avi/avi_network.py
@@ -0,0 +1,145 @@
+#!/usr/bin/python
+#
+# Created on Aug 25, 2016
+# @author: Gaurav Rastogi (grastogi@avinetworks.com)
+# Eric Anderson (eanderson@avinetworks.com)
+# module_check: supported
+# Avi Version: 17.1.1
+#
+#
+# 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/>.
+#
+
+ANSIBLE_METADATA = {'metadata_version': '1.0',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = '''
+---
+module: avi_network
+author: Gaurav Rastogi (grastogi@avinetworks.com)
+
+short_description: Module for setup of Network Avi RESTful Object
+description:
+ - This module is used to configure Network object
+ - more examples at U(https://github.com/avinetworks/devops)
+requirements: [ avisdk ]
+version_added: "2.4"
+options:
+ state:
+ description:
+ - The state that should be applied on the entity.
+ default: present
+ choices: ["absent","present"]
+ cloud_ref:
+ description:
+ - It is a reference to an object of type cloud.
+ configured_subnets:
+ description:
+ - List of subnet.
+ dhcp_enabled:
+ description:
+ - Select the ip address management scheme for this network.
+ - Default value when not specified in API or module is interpreted by Avi Controller as True.
+ exclude_discovered_subnets:
+ description:
+ - When selected, excludes all discovered subnets in this network from consideration for virtual service placement.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ name:
+ description:
+ - Name of the object.
+ required: true
+ synced_from_se:
+ description:
+ - Boolean flag to set synced_from_se.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ tenant_ref:
+ description:
+ - It is a reference to an object of type tenant.
+ url:
+ description:
+ - Avi controller URL of the object.
+ uuid:
+ description:
+ - Unique object identifier of the object.
+ vcenter_dvs:
+ description:
+ - Boolean flag to set vcenter_dvs.
+ - Default value when not specified in API or module is interpreted by Avi Controller as True.
+ vimgrnw_ref:
+ description:
+ - It is a reference to an object of type vimgrnwruntime.
+ vrf_context_ref:
+ description:
+ - It is a reference to an object of type vrfcontext.
+extends_documentation_fragment:
+ - avi
+'''
+
+EXAMPLES = """
+- name: Example to create Network object
+ avi_network:
+ controller: 10.10.25.42
+ username: admin
+ password: something
+ state: present
+ name: sample_network
+"""
+
+RETURN = '''
+obj:
+ description: Network (api/network) object
+ returned: success, changed
+ type: dict
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+try:
+ from ansible.module_utils.avi import (
+ avi_common_argument_spec, HAS_AVI, avi_ansible_api)
+except ImportError:
+ HAS_AVI = False
+
+
+def main():
+ argument_specs = dict(
+ state=dict(default='present',
+ choices=['absent', 'present']),
+ cloud_ref=dict(type='str',),
+ configured_subnets=dict(type='list',),
+ dhcp_enabled=dict(type='bool',),
+ exclude_discovered_subnets=dict(type='bool',),
+ name=dict(type='str', required=True),
+ synced_from_se=dict(type='bool',),
+ tenant_ref=dict(type='str',),
+ url=dict(type='str',),
+ uuid=dict(type='str',),
+ vcenter_dvs=dict(type='bool',),
+ vimgrnw_ref=dict(type='str',),
+ vrf_context_ref=dict(type='str',),
+ )
+ argument_specs.update(avi_common_argument_spec())
+ module = AnsibleModule(
+ argument_spec=argument_specs, supports_check_mode=True)
+ if not HAS_AVI:
+ return module.fail_json(msg=(
+ 'Avi python API SDK (avisdk>=17.1) is not installed. '
+ 'For more details visit https://github.com/avinetworks/sdk.'))
+ return avi_ansible_api(module, 'network',
+ set([]))
+
+if __name__ == '__main__':
+ main()
diff --git a/lib/ansible/modules/network/avi/avi_serviceenginegroup.py b/lib/ansible/modules/network/avi/avi_serviceenginegroup.py
new file mode 100644
index 0000000000..c4c4942c46
--- /dev/null
+++ b/lib/ansible/modules/network/avi/avi_serviceenginegroup.py
@@ -0,0 +1,491 @@
+#!/usr/bin/python
+#
+# Created on Aug 25, 2016
+# @author: Gaurav Rastogi (grastogi@avinetworks.com)
+# Eric Anderson (eanderson@avinetworks.com)
+# module_check: supported
+# Avi Version: 17.1.1
+#
+#
+# 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/>.
+#
+
+ANSIBLE_METADATA = {'metadata_version': '1.0',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = '''
+---
+module: avi_serviceenginegroup
+author: Gaurav Rastogi (grastogi@avinetworks.com)
+
+short_description: Module for setup of ServiceEngineGroup Avi RESTful Object
+description:
+ - This module is used to configure ServiceEngineGroup object
+ - more examples at U(https://github.com/avinetworks/devops)
+requirements: [ avisdk ]
+version_added: "2.4"
+options:
+ state:
+ description:
+ - The state that should be applied on the entity.
+ default: present
+ choices: ["absent","present"]
+ active_standby:
+ description:
+ - Service engines in active/standby mode for ha failover.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ advertise_backend_networks:
+ description:
+ - Advertise reach-ability of backend server networks via adc through bgp for default gateway feature.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ aggressive_failure_detection:
+ description:
+ - Enable aggressive failover configuration for ha.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ algo:
+ description:
+ - In compact placement, virtual services are placed on existing ses until max_vs_per_se limit is reached.
+ - Enum options - PLACEMENT_ALGO_PACKED, PLACEMENT_ALGO_DISTRIBUTED.
+ - Default value when not specified in API or module is interpreted by Avi Controller as PLACEMENT_ALGO_PACKED.
+ auto_rebalance:
+ description:
+ - If set, virtual services will be automatically migrated when load on an se is less than minimum or more than maximum thresholds.
+ - Only alerts are generated when the auto_rebalance is not set.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ auto_rebalance_interval:
+ description:
+ - Frequency of rebalance, if 'auto rebalance' is enabled.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 300.
+ auto_redistribute_active_standby_load:
+ description:
+ - Redistribution of virtual services from the takeover se to the replacement se can cause momentary traffic loss.
+ - If the auto-redistribute load option is left in its default off state, any desired rebalancing requires calls to rest api.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ buffer_se:
+ description:
+ - Excess service engine capacity provisioned for ha failover.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 1.
+ cloud_ref:
+ description:
+ - It is a reference to an object of type cloud.
+ connection_memory_percentage:
+ description:
+ - Percentage of memory for connection state.
+ - This will come at the expense of memory used for http in-memory cache.
+ - Allowed values are 10-90.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 50.
+ cpu_reserve:
+ description:
+ - Boolean flag to set cpu_reserve.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ cpu_socket_affinity:
+ description:
+ - Allocate all the cpu cores for the service engine virtual machines on the same cpu socket.
+ - Applicable only for vcenter cloud.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ custom_tag:
+ description:
+ - Custom tag will be used to create the tags for se instance in aws.
+ - Note this is not the same as the prefix for se name.
+ dedicated_dispatcher_core:
+ description:
+ - Dedicate the core that handles packet receive/transmit from the network to just the dispatching function.
+ - Don't use it for tcp/ip and ssl functions.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ description:
+ description:
+ - User defined description for the object.
+ disk_per_se:
+ description:
+ - Amount of disk space for each of the service engine virtual machines.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 10.
+ distribute_load_active_standby:
+ description:
+ - Use both the active and standby service engines for virtual service placement in the legacy active standby ha mode.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ enable_routing:
+ description:
+ - Enable routing for this serviceenginegroup .
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ enable_vip_on_all_interfaces:
+ description:
+ - Enable vip on all interfaces of se.
+ - Field introduced in 17.1.1.
+ - Default value when not specified in API or module is interpreted by Avi Controller as True.
+ enable_vmac:
+ description:
+ - Use virtual mac address for interfaces on which floating interface ips are placed.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ extra_config_multiplier:
+ description:
+ - Multiplier for extra config to support large vs/pool config.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 0.0.
+ extra_shared_config_memory:
+ description:
+ - Extra config memory to support large geo db configuration.
+ - Field introduced in 17.1.1.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 0.
+ floating_intf_ip:
+ description:
+ - If serviceenginegroup is configured for legacy 1+1 active standby ha mode, floating ip's will be advertised only by the active se in the pair.
+ - Virtual services in this group must be disabled/enabled for any changes to the floating ip's to take effect.
+ - Only active se hosting vs tagged with active standby se 1 tag will advertise this floating ip when manual load distribution is enabled.
+ floating_intf_ip_se_2:
+ description:
+ - If serviceenginegroup is configured for legacy 1+1 active standby ha mode, floating ip's will be advertised only by the active se in the pair.
+ - Virtual services in this group must be disabled/enabled for any changes to the floating ip's to take effect.
+ - Only active se hosting vs tagged with active standby se 2 tag will advertise this floating ip when manual load distribution is enabled.
+ ha_mode:
+ description:
+ - High availability mode for all the virtual services using this service engine group.
+ - Enum options - HA_MODE_SHARED_PAIR, HA_MODE_SHARED, HA_MODE_LEGACY_ACTIVE_STANDBY.
+ - Default value when not specified in API or module is interpreted by Avi Controller as HA_MODE_SHARED.
+ hardwaresecuritymodulegroup_ref:
+ description:
+ - It is a reference to an object of type hardwaresecuritymodulegroup.
+ hm_on_standby:
+ description:
+ - Enable active health monitoring from the standby se for all placed virtual services.
+ - Default value when not specified in API or module is interpreted by Avi Controller as True.
+ host_attribute_key:
+ description:
+ - Key of a (key, value) pair identifying a set of hosts.
+ - Currently used to separate north-south and east-west se sizing requirements.
+ - This is useful in container ecosystems where ses on east-west traffic nodes are typically smaller than those on north-south traffic nodes.
+ host_attribute_value:
+ description:
+ - Value of a (key, value) pair identifying a set of hosts.
+ - Currently used to separate north-south and east-west se sizing requirements.
+ - This is useful in container ecosystems where ses on east-west traffic nodes are typically smaller than those on north-south traffic nodes.
+ hypervisor:
+ description:
+ - Override default hypervisor.
+ - Enum options - DEFAULT, VMWARE_ESX, KVM, VMWARE_VSAN, XEN.
+ instance_flavor:
+ description:
+ - Instance/flavor type for se instance.
+ iptables:
+ description:
+ - Iptable rules.
+ least_load_core_selection:
+ description:
+ - Select core with least load for new flow.
+ - Default value when not specified in API or module is interpreted by Avi Controller as True.
+ log_disksz:
+ description:
+ - Maximum disk capacity (in mb) to be allocated to an se.
+ - This is exclusively used for debug and log data.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 10000.
+ max_cpu_usage:
+ description:
+ - When cpu usage on an se exceeds this threshold, virtual services hosted on this se may be rebalanced to other ses to reduce load.
+ - A new se may be created as part of this process.
+ - Allowed values are 40-90.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 80.
+ max_scaleout_per_vs:
+ description:
+ - Maximum number of active service engines for the virtual service.
+ - Allowed values are 1-64.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 4.
+ max_se:
+ description:
+ - Maximum number of services engines in this group.
+ - Allowed values are 0-1000.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 10.
+ max_vs_per_se:
+ description:
+ - Maximum number of virtual services that can be placed on a single service engine.
+ - Allowed values are 1-1000.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 10.
+ mem_reserve:
+ description:
+ - Boolean flag to set mem_reserve.
+ - Default value when not specified in API or module is interpreted by Avi Controller as True.
+ memory_per_se:
+ description:
+ - Amount of memory for each of the service engine virtual machines.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 2048.
+ mgmt_network_ref:
+ description:
+ - Management network to use for avi service engines.
+ - It is a reference to an object of type network.
+ mgmt_subnet:
+ description:
+ - Management subnet to use for avi service engines.
+ min_cpu_usage:
+ description:
+ - When cpu usage on an se falls below the minimum threshold, virtual services hosted on the se may be consolidated onto other underutilized ses.
+ - After consolidation, unused service engines may then be eligible for deletion.
+ - Allowed values are 20-60.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 30.
+ min_scaleout_per_vs:
+ description:
+ - Minimum number of active service engines for the virtual service.
+ - Allowed values are 1-64.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 1.
+ name:
+ description:
+ - Name of the object.
+ required: true
+ num_flow_cores_sum_changes_to_ignore:
+ description:
+ - Number of changes in num flow cores sum to ignore.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 8.
+ openstack_availability_zone:
+ description:
+ - Field deprecated in 17.1.1.
+ openstack_availability_zones:
+ description:
+ - Field introduced in 17.1.1.
+ openstack_mgmt_network_name:
+ description:
+ - Avi management network name.
+ openstack_mgmt_network_uuid:
+ description:
+ - Management network uuid.
+ os_reserved_memory:
+ description:
+ - Amount of extra memory to be reserved for use by the operating system on a service engine.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 0.
+ per_app:
+ description:
+ - Per-app se mode is designed for deploying dedicated load balancers per app (vs).
+ - In this mode, each se is limited to a max of 2 vss.
+ - Vcpus in per-app ses count towards licensing usage at 25% rate.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ placement_mode:
+ description:
+ - If placement mode is 'auto', virtual services are automatically placed on service engines.
+ - Enum options - PLACEMENT_MODE_AUTO.
+ - Default value when not specified in API or module is interpreted by Avi Controller as PLACEMENT_MODE_AUTO.
+ realtime_se_metrics:
+ description:
+ - Enable or disable real time se metrics.
+ se_deprovision_delay:
+ description:
+ - Duration to preserve unused service engine virtual machines before deleting them.
+ - If traffic to a virtual service were to spike up abruptly, this se would still be available to be utilized again rather than creating a new se.
+ - If this value is set to 0, controller will never delete any ses and administrator has to manually cleanup unused ses.
+ - Allowed values are 0-525600.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 120.
+ se_dos_profile:
+ description:
+ - Dosthresholdprofile settings for serviceenginegroup.
+ se_name_prefix:
+ description:
+ - Prefix to use for virtual machine name of service engines.
+ - Default value when not specified in API or module is interpreted by Avi Controller as Avi.
+ se_thread_multiplier:
+ description:
+ - Multiplier for se threads based on vcpu.
+ - Allowed values are 1-10.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 1.
+ se_tunnel_mode:
+ description:
+ - Determines if dsr from secondary se is active or not 0 automatically determine based on hypervisor type 1 disable dsr
+ - unconditionally ~[0,1] enable dsr unconditionally.
+ - Field introduced in 17.1.1.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 0.
+ se_vs_hb_max_pkts_in_batch:
+ description:
+ - Maximum number of aggregated vs heartbeat packets to send in a batch.
+ - Allowed values are 1-256.
+ - Field introduced in 17.1.1.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 8.
+ se_vs_hb_max_vs_in_pkt:
+ description:
+ - Maximum number of virtualservices for which heartbeat messages are aggregated in one packet.
+ - Allowed values are 1-1024.
+ - Field introduced in 17.1.1.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 256.
+ service_ip_subnets:
+ description:
+ - Subnets assigned to the se group.
+ - Required for vs group placement.
+ - Field introduced in 17.1.1.
+ tenant_ref:
+ description:
+ - It is a reference to an object of type tenant.
+ url:
+ description:
+ - Avi controller URL of the object.
+ uuid:
+ description:
+ - Unique object identifier of the object.
+ vcenter_clusters:
+ description:
+ - Vcenterclusters settings for serviceenginegroup.
+ vcenter_datastore_mode:
+ description:
+ - Enum options - vcenter_datastore_any, vcenter_datastore_local, vcenter_datastore_shared.
+ - Default value when not specified in API or module is interpreted by Avi Controller as VCENTER_DATASTORE_ANY.
+ vcenter_datastores:
+ description:
+ - List of vcenterdatastore.
+ vcenter_datastores_include:
+ description:
+ - Boolean flag to set vcenter_datastores_include.
+ - Default value when not specified in API or module is interpreted by Avi Controller as False.
+ vcenter_folder:
+ description:
+ - Folder to place all the service engine virtual machines in vcenter.
+ - Default value when not specified in API or module is interpreted by Avi Controller as AviSeFolder.
+ vcenter_hosts:
+ description:
+ - Vcenterhosts settings for serviceenginegroup.
+ vcpus_per_se:
+ description:
+ - Number of vcpus for each of the service engine virtual machines.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 1.
+ vs_host_redundancy:
+ description:
+ - Ensure primary and secondary service engines are deployed on different physical hosts.
+ - Default value when not specified in API or module is interpreted by Avi Controller as True.
+ vs_scalein_timeout:
+ description:
+ - Time to wait for the scaled in se to drain existing flows before marking the scalein done.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 30.
+ vs_scalein_timeout_for_upgrade:
+ description:
+ - During se upgrade, time to wait for the scaled-in se to drain existing flows before marking the scalein done.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 30.
+ vs_scaleout_timeout:
+ description:
+ - Time to wait for the scaled out se to become ready before marking the scaleout done.
+ - Default value when not specified in API or module is interpreted by Avi Controller as 30.
+extends_documentation_fragment:
+ - avi
+'''
+
+EXAMPLES = """
+- name: Example to create ServiceEngineGroup object
+ avi_serviceenginegroup:
+ controller: 10.10.25.42
+ username: admin
+ password: something
+ state: present
+ name: sample_serviceenginegroup
+"""
+
+RETURN = '''
+obj:
+ description: ServiceEngineGroup (api/serviceenginegroup) object
+ returned: success, changed
+ type: dict
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+try:
+ from ansible.module_utils.avi import (
+ avi_common_argument_spec, HAS_AVI, avi_ansible_api)
+except ImportError:
+ HAS_AVI = False
+
+
+def main():
+ argument_specs = dict(
+ state=dict(default='present',
+ choices=['absent', 'present']),
+ active_standby=dict(type='bool',),
+ advertise_backend_networks=dict(type='bool',),
+ aggressive_failure_detection=dict(type='bool',),
+ algo=dict(type='str',),
+ auto_rebalance=dict(type='bool',),
+ auto_rebalance_interval=dict(type='int',),
+ auto_redistribute_active_standby_load=dict(type='bool',),
+ buffer_se=dict(type='int',),
+ cloud_ref=dict(type='str',),
+ connection_memory_percentage=dict(type='int',),
+ cpu_reserve=dict(type='bool',),
+ cpu_socket_affinity=dict(type='bool',),
+ custom_tag=dict(type='list',),
+ dedicated_dispatcher_core=dict(type='bool',),
+ description=dict(type='str',),
+ disk_per_se=dict(type='int',),
+ distribute_load_active_standby=dict(type='bool',),
+ enable_routing=dict(type='bool',),
+ enable_vip_on_all_interfaces=dict(type='bool',),
+ enable_vmac=dict(type='bool',),
+ extra_config_multiplier=dict(type='float',),
+ extra_shared_config_memory=dict(type='int',),
+ floating_intf_ip=dict(type='list',),
+ floating_intf_ip_se_2=dict(type='list',),
+ ha_mode=dict(type='str',),
+ hardwaresecuritymodulegroup_ref=dict(type='str',),
+ hm_on_standby=dict(type='bool',),
+ host_attribute_key=dict(type='str',),
+ host_attribute_value=dict(type='str',),
+ hypervisor=dict(type='str',),
+ instance_flavor=dict(type='str',),
+ iptables=dict(type='list',),
+ least_load_core_selection=dict(type='bool',),
+ log_disksz=dict(type='int',),
+ max_cpu_usage=dict(type='int',),
+ max_scaleout_per_vs=dict(type='int',),
+ max_se=dict(type='int',),
+ max_vs_per_se=dict(type='int',),
+ mem_reserve=dict(type='bool',),
+ memory_per_se=dict(type='int',),
+ mgmt_network_ref=dict(type='str',),
+ mgmt_subnet=dict(type='dict',),
+ min_cpu_usage=dict(type='int',),
+ min_scaleout_per_vs=dict(type='int',),
+ name=dict(type='str', required=True),
+ num_flow_cores_sum_changes_to_ignore=dict(type='int',),
+ openstack_availability_zone=dict(type='str',),
+ openstack_availability_zones=dict(type='list',),
+ openstack_mgmt_network_name=dict(type='str',),
+ openstack_mgmt_network_uuid=dict(type='str',),
+ os_reserved_memory=dict(type='int',),
+ per_app=dict(type='bool',),
+ placement_mode=dict(type='str',),
+ realtime_se_metrics=dict(type='dict',),
+ se_deprovision_delay=dict(type='int',),
+ se_dos_profile=dict(type='dict',),
+ se_name_prefix=dict(type='str',),
+ se_thread_multiplier=dict(type='int',),
+ se_tunnel_mode=dict(type='int',),
+ se_vs_hb_max_pkts_in_batch=dict(type='int',),
+ se_vs_hb_max_vs_in_pkt=dict(type='int',),
+ service_ip_subnets=dict(type='list',),
+ tenant_ref=dict(type='str',),
+ url=dict(type='str',),
+ uuid=dict(type='str',),
+ vcenter_clusters=dict(type='dict',),
+ vcenter_datastore_mode=dict(type='str',),
+ vcenter_datastores=dict(type='list',),
+ vcenter_datastores_include=dict(type='bool',),
+ vcenter_folder=dict(type='str',),
+ vcenter_hosts=dict(type='dict',),
+ vcpus_per_se=dict(type='int',),
+ vs_host_redundancy=dict(type='bool',),
+ vs_scalein_timeout=dict(type='int',),
+ vs_scalein_timeout_for_upgrade=dict(type='int',),
+ vs_scaleout_timeout=dict(type='int',),
+ )
+ argument_specs.update(avi_common_argument_spec())
+ module = AnsibleModule(
+ argument_spec=argument_specs, supports_check_mode=True)
+ if not HAS_AVI:
+ return module.fail_json(msg=(
+ 'Avi python API SDK (avisdk>=17.1) is not installed. '
+ 'For more details visit https://github.com/avinetworks/sdk.'))
+ return avi_ansible_api(module, 'serviceenginegroup',
+ set([]))
+
+if __name__ == '__main__':
+ main()
diff --git a/lib/ansible/modules/source_control/github_issue.py b/lib/ansible/modules/source_control/github_issue.py
new file mode 100644
index 0000000000..73fb8e2156
--- /dev/null
+++ b/lib/ansible/modules/source_control/github_issue.py
@@ -0,0 +1,129 @@
+#!/usr/bin/python
+# (c) 2017, Abhijeet Kasurde <akasurde@redhat.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/>.
+
+ANSIBLE_METADATA = {'metadata_version': '1.0',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+
+DOCUMENTATION = '''
+module: github_issue
+short_description: View GitHub issue.
+description:
+ - View GitHub issue for a given repository.
+version_added: "2.4"
+options:
+ repo:
+ description:
+ - Name of repository from which issue needs to be retrieved.
+ required: true
+ default: none
+ organization:
+ description:
+ - Name of the GitHub organization in which the repository is hosted.
+ required: true
+ default: none
+ issue:
+ description:
+ - Issue number for which information is required.
+ default: none
+ required: true
+ action:
+ description:
+ - Get various details about issue depending upon action specified.
+ default: 'get_status'
+ required: false
+ choices:
+ - ['get_status']
+
+author:
+ - Abhijeet Kasurde (@akasurde)
+requirements:
+ - "github3.py >= 1.0.0a4"
+'''
+
+RETURN = '''
+get_status:
+ description: State of the GitHub issue
+ type: string
+ returned: success
+ sample: open, closed
+'''
+
+EXAMPLES = '''
+- name: Check if GitHub issue is closed or not
+ github_issue:
+ organization: ansible
+ repo: ansible
+ issue: 23642
+ action: get_status
+ register: r
+
+- name: Take action depending upon issue status
+ debug:
+ msg: Do something when issue 23642 is open
+ when: r.issue_status == 'open'
+'''
+
+
+try:
+ import github3
+ HAS_GITHUB_PACKAGE = True
+except ImportError:
+ HAS_GITHUB_PACKAGE = False
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ module = AnsibleModule(
+ argument_spec=dict(
+ organization=dict(required=True),
+ repo=dict(required=True),
+ issue=dict(required=True),
+ action=dict(required=False, choices=['get_status']),
+ ),
+ supports_check_mode=True,
+ )
+
+ if not HAS_GITHUB_PACKAGE:
+ module.fail_json(msg="Missing required github3 module. (check docs or "
+ "install with: pip install github3.py==1.0.0a4)")
+
+ organization = module.params['organization']
+ repo = module.params['repo']
+ issue = module.params['issue']
+ action = module.params['action']
+
+ result = dict()
+
+ gh_obj = github3.issue(organization, repo, issue)
+ if isinstance(gh_obj, github3.null.NullObject):
+ module.fail_json(msg="Failed to get details about issue specified. "
+ "Please check organization, repo and issue "
+ "details and try again.")
+
+ if action == 'get_status' or action is None:
+ if module.check_mode:
+ result.update(changed=True)
+ else:
+ result.update(changed=True, issue_status=gh_obj.state)
+
+ module.exit_json(**result)
+
+if __name__ == '__main__':
+ main()
diff --git a/lib/ansible/modules/system/aix_inittab.py b/lib/ansible/modules/system/aix_inittab.py
index 0f3efbd34b..16c59769e1 100644
--- a/lib/ansible/modules/system/aix_inittab.py
+++ b/lib/ansible/modules/system/aix_inittab.py
@@ -34,14 +34,17 @@ description:
version_added: "2.3"
options:
name:
- description: Name of the inittab entry.
+ description:
+ - Name of the inittab entry.
required: True
aliases: ['service']
runlevel:
- description: Runlevel of the entry.
+ description:
+ - Runlevel of the entry.
required: True
action:
- description: Action what the init has to do with this entry.
+ description:
+ - Action what the init has to do with this entry.
required: True
choices: [
'respawn',
@@ -58,12 +61,15 @@ options:
'sysinit'
]
command:
- description: What command has to run.
+ description:
+ - What command has to run.
required: True
insertafter:
- description: After which inittabline should the new entry inserted.
+ description:
+ - After which inittabline should the new entry inserted.
state:
- description: Whether the entry should be present or absent in the inittab file
+ description:
+ - Whether the entry should be present or absent in the inittab file
choices: [ "present", "absent" ]
default: present
notes:
@@ -112,7 +118,7 @@ name:
returned: always
type: string
sample: startmyservice
-mgs:
+msg:
description: action done with the inittab entry
returned: changed
type: string
diff --git a/lib/ansible/modules/system/sysctl.py b/lib/ansible/modules/system/sysctl.py
index 7d89cbd21d..98826c5eb3 100644
--- a/lib/ansible/modules/system/sysctl.py
+++ b/lib/ansible/modules/system/sysctl.py
@@ -119,6 +119,7 @@ EXAMPLES = '''
import os
import tempfile
from ansible.module_utils.basic import get_platform, get_exception, AnsibleModule, BOOLEANS_TRUE, BOOLEANS_FALSE
+from ansible.module_utils.six import string_types
class SysctlModule(object):
@@ -216,7 +217,7 @@ class SysctlModule(object):
return '1'
else:
return '0'
- elif isinstance(value, basestring):
+ elif isinstance(value, string_types):
if value.lower() in BOOLEANS_TRUE:
return '1'
elif value.lower() in BOOLEANS_FALSE:
diff --git a/lib/ansible/modules/windows/win_feature.ps1 b/lib/ansible/modules/windows/win_feature.ps1
index 03378978ae..e7feabd330 100644
--- a/lib/ansible/modules/windows/win_feature.ps1
+++ b/lib/ansible/modules/windows/win_feature.ps1
@@ -30,6 +30,8 @@ $check_mode = Get-AnsibleParam -obj $params -name "_ansible_check_mode" -type "b
$name = Get-AnsibleParam -obj $params -name "name" -type "str" -failifempty $true
$state = Get-AnsibleParam -obj $params -name "state" -type "str" -default "present" -validateset "present","absent"
+
+# DEPRECATED 2.4, potential removal in 2.6+
$restart = Get-AnsibleParam -obj $params -name "restart" -type "bool" -default $false
$includesubfeatures = Get-AnsibleParam -obj $params -name "include_sub_features" -type "bool" -default $false
$includemanagementtools = Get-AnsibleParam -obj $params -name "include_management_tools" -type "bool" -default $false
@@ -37,6 +39,9 @@ $source = Get-AnsibleParam -obj $params -name "source" -type "str"
$name = $name -split ',' | % { $_.Trim() }
+If ($restart) {
+ Add-DeprecationWarning -obj $result -message "The 'restart' parameter causes instability. Use the 'win_reboot' action conditionally on 'reboot_required' return value instead" -version 2.6
+}
# Determine which cmdlets we need to work with. Then we can set options appropriate for the cmdlet
$installWF= $false
@@ -133,9 +138,12 @@ If ($featureresult.FeatureResult)
id = $item.Id
display_name = $item.DisplayName
message = $message
- restart_needed = $item.RestartNeeded.ToString() | ConvertTo-Bool
+ reboot_required = $item.RestartNeeded.ToString() | ConvertTo-Bool
skip_reason = $item.SkipReason.ToString()
success = $item.Success.ToString() | ConvertTo-Bool
+
+ # DEPRECATED 2.4, potential removal in 2.6+ (standardize naming to "reboot_required")
+ restart_needed = $item.RestartNeeded.ToString() | ConvertTo-Bool
}
}
$result.changed = $true
@@ -144,7 +152,10 @@ If ($featureresult.FeatureResult)
$result.feature_result = $installed_features
$result.success = ($featureresult.Success.ToString() | ConvertTo-Bool)
$result.exitcode = $featureresult.ExitCode.ToString()
-$result.restart_needed = ($featureresult.RestartNeeded.ToString() | ConvertTo-Bool)
+$result.reboot_required = ($featureresult.RestartNeeded.ToString() | ConvertTo-Bool)
+
+# DEPRECATED 2.4, potential removal in 2.6+ (standardize naming to "reboot_required")
+$result.restart_needed = $result.reboot_required
If ($result.success) {
Exit-Json $result
diff --git a/lib/ansible/modules/windows/win_feature.py b/lib/ansible/modules/windows/win_feature.py
index 2c5a62f9a2..05f823bf7a 100644
--- a/lib/ansible/modules/windows/win_feature.py
+++ b/lib/ansible/modules/windows/win_feature.py
@@ -49,6 +49,8 @@ options:
restart:
description:
- Restarts the computer automatically when installation is complete, if restarting is required by the roles or features installed.
+ - DEPRECATED in Ansible 2.4, as unmanaged reboots cause numerous issues under Ansible. Check the C(reboot_required) return value
+ from this module to determine if a reboot is necessary, and if so, use the M(win_reboot) action to perform it.
choices:
- yes
- no
@@ -101,3 +103,64 @@ EXAMPLES = r'''
include_sub_features: True
include_management_tools: True
'''
+
+RETURN = r'''
+exitcode:
+ description: The stringified exit code from the feature installation/removal command
+ returned: always
+ type: string
+ sample: Success
+feature_result:
+ description: List of features that were installed or removed
+ returned: success
+ type: complex
+ sample:
+ contains:
+ display_name:
+ description: Feature display name
+ returned: always
+ type: string
+ sample: "Telnet Client"
+ id:
+ description: A list of KB article IDs that apply to the update
+ returned: always
+ type: int
+ sample: 44
+ message:
+ description: Any messages returned from the feature subsystem that occurred during installation or removal of this feature
+ returned: always
+ type: list of strings
+ sample: []
+ reboot_required:
+ description: True when the target server requires a reboot as a result of installing or removing this feature
+ returned: always
+ type: boolean
+ sample: True
+ restart_needed:
+ description: DEPRECATED in Ansible 2.4 (refer to C(reboot_required) instead). True when the target server requires a reboot as a
+ result of installing or removing this feature
+ returned: always
+ type: boolean
+ sample: True
+ skip_reason:
+ description: The reason a feature installation or removal was skipped
+ returned: always
+ type: string
+ sample: NotSkipped
+ success:
+ description: If the feature installation or removal was successful
+ returned: always
+ type: boolean
+ sample: True
+reboot_required:
+ description: True when the target server requires a reboot to complete updates (no further updates can be installed until after a reboot)
+ returned: success
+ type: boolean
+ sample: True
+restart_needed:
+ description: DEPRECATED in Ansible 2.4 (refer to C(reboot_required) instead). True when the target server requires a reboot to complete updates
+ (no further updates can be installed until after a reboot)
+ returned: success
+ type: boolean
+ sample: True
+'''