code
stringlengths 2.5k
150k
| kind
stringclasses 1
value |
---|---|
ansible community.general.apache2_module β Enables/disables a module of the Apache2 webserver. community.general.apache2\_module β Enables/disables a module of the Apache2 webserver.
=======================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.apache2_module`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Enables or disables a specified module of the Apache2 webserver.
Requirements
------------
The below requirements are needed on the host that executes this module.
* a2enmod
* a2dismod
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **force** boolean | **Choices:*** **no** β
* yes
| Force disabling of default modules and override Debian warnings. |
| **identifier** string | | Identifier of the module as listed by `apache2ctl -M`. This is optional and usually determined automatically by the common convention of appending `_module` to *name* as well as custom exception for popular modules. |
| **ignore\_configcheck** boolean | **Choices:*** **no** β
* yes
| Ignore configuration checks about inconsistent module configuration. Especially for mpm\_\* modules. |
| **name** string / required | | Name of the module to enable/disable as given to `a2enmod/a2dismod`. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the module. |
Notes
-----
Note
* This does not work on RedHat-based distributions. It does work on Debian- and SuSE-based distributions. Whether it works on others depend on whether the `a2enmod` and `a2dismod` tools are available or not.
Examples
--------
```
- name: Enable the Apache2 module wsgi
community.general.apache2_module:
state: present
name: wsgi
- name: Disables the Apache2 module wsgi
community.general.apache2_module:
state: absent
name: wsgi
- name: Disable default modules for Debian
community.general.apache2_module:
state: absent
name: autoindex
force: True
- name: Disable mpm_worker and ignore warnings about missing mpm module
community.general.apache2_module:
state: absent
name: mpm_worker
ignore_configcheck: True
- name: Enable dump_io module, which is identified as dumpio_module inside apache2
community.general.apache2_module:
state: present
name: dump_io
identifier: dumpio_module
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **rc** integer | failed | return code of underlying command |
| **result** string | always | message about action taken |
| **stderr** string | failed | stderr of underlying command |
| **stdout** string | failed | stdout of underlying command |
| **warnings** list / elements=string | when needed | list of warning messages |
### Authors
* Christian Berendt (@berendt)
* Ralf Hertel (@n0trax)
* Robin Roth (@robinro)
ansible community.general.pushbullet β Sends notifications to Pushbullet community.general.pushbullet β Sends notifications to Pushbullet
================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.pushbullet`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module sends push notifications via Pushbullet to channels or devices.
Requirements
------------
The below requirements are needed on the host that executes this module.
* pushbullet.py
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string / required | | Push bullet API token |
| **body** string | | Body of the notification, e.g. Details of the fault you're alerting. |
| **channel** string | | The channel TAG you wish to broadcast a push notification, as seen on the "My Channels" > "Edit your channel" at Pushbullet page. |
| **device** string | | The device NAME you wish to send a push notification, as seen on the Pushbullet main page. |
| **push\_type** string | **Choices:*** **note** β
* link
| Thing you wish to push. |
| **title** string / required | | Title of the notification. |
| **url** string | | URL field, used when *push\_type* is `link`. |
Notes
-----
Note
* Requires pushbullet.py Python package on the remote host. You can install it via pip with ($ pip install pushbullet.py). See <https://github.com/randomchars/pushbullet.py>
Examples
--------
```
- name: Sends a push notification to a device
community.general.pushbullet:
api_key: "ABC123abc123ABC123abc123ABC123ab"
device: "Chrome"
title: "You may see this on Google Chrome"
- name: Sends a link to a device
community.general.pushbullet:
api_key: ABC123abc123ABC123abc123ABC123ab
device: Chrome
push_type: link
title: Ansible Documentation
body: https://docs.ansible.com/
- name: Sends a push notification to a channel
community.general.pushbullet:
api_key: ABC123abc123ABC123abc123ABC123ab
channel: my-awesome-channel
title: Broadcasting a message to the #my-awesome-channel folks
- name: Sends a push notification with title and body to a channel
community.general.pushbullet:
api_key: ABC123abc123ABC123abc123ABC123ab
channel: my-awesome-channel
title: ALERT! Signup service is down
body: Error rate on signup service is over 90% for more than 2 minutes
```
### Authors
* Willy Barro (@willybarro)
ansible community.general.nios_fixed_address β Configure Infoblox NIOS DHCP Fixed Address community.general.nios\_fixed\_address β Configure Infoblox NIOS DHCP Fixed Address
===================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.nios_fixed_address`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Status](#status)
DEPRECATED
----------
Removed in
version 5.0.0
Why
Please install the infoblox.nios\_modules collection and use the corresponding module from it.
Alternative
infoblox.nios\_modules.nios\_fixed\_address
Synopsis
--------
* A fixed address is a specific IP address that a DHCP server always assigns when a lease request comes from a particular MAC address of the client.
* Supports both IPV4 and IPV6 internet protocols
Requirements
------------
The below requirements are needed on the host that executes this module.
* infoblox-client
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **comment** string | | Configures a text string comment to be associated with the instance of this object. The provided text string will be configured on the object instance. |
| **extattrs** dictionary | | Allows for the configuration of Extensible Attributes on the instance of the object. This argument accepts a set of key / value pairs for configuration. |
| **ipaddr** string / required | | IPV4/V6 address of the fixed address. |
| **mac** string / required | | The MAC address of the interface. |
| **name** string / required | | Specifies the hostname with which fixed DHCP ip-address is stored for respective mac. |
| **network** string / required | | Specifies the network range in which ipaddr exists. |
| **network\_view** string | **Default:**"default" | Configures the name of the network view to associate with this configured instance. |
| **options** list / elements=dictionary | | Configures the set of DHCP options to be included as part of the configured network instance. This argument accepts a list of values (see suboptions). When configuring suboptions at least one of `name` or `num` must be specified. |
| | **name** string | | The name of the DHCP option to configure |
| | **num** integer | | The number of the DHCP option to configure |
| | **use\_option** boolean | **Choices:*** no
* **yes** β
| Only applies to a subset of options (see NIOS API documentation) |
| | **value** string / required | | The value of the DHCP option specified by `name`
|
| | **vendor\_class** string | **Default:**"DHCP" | The name of the space this DHCP option is associated to |
| **provider** dictionary | | A dict object containing connection details. |
| | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. |
| | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. |
| | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. |
| | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. |
| | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. |
| | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. |
| | **silent\_ssl\_warnings** boolean | **Choices:*** no
* **yes** β
| Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. |
| | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. |
| | **validate\_certs** boolean | **Choices:*** **no** β
* yes
| Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable.
aliases: ssl\_verify |
| | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 |
| **state** string | **Choices:*** **present** β
* absent
| Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. |
Notes
-----
Note
* This module must be run locally, which can be achieved by specifying `connection: local`.
* Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible.
Examples
--------
```
- name: Configure ipv4 dhcp fixed address
community.general.nios_fixed_address:
name: ipv4_fixed
ipaddr: 192.168.10.1
mac: 08:6d:41:e8:fd:e8
network: 192.168.10.0/24
network_view: default
comment: this is a test comment
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Configure a ipv6 dhcp fixed address
community.general.nios_fixed_address:
name: ipv6_fixed
ipaddr: fe80::1/10
mac: 08:6d:41:e8:fd:e8
network: fe80::/64
network_view: default
comment: this is a test comment
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Set dhcp options for a ipv4 fixed address
community.general.nios_fixed_address:
name: ipv4_fixed
ipaddr: 192.168.10.1
mac: 08:6d:41:e8:fd:e8
network: 192.168.10.0/24
network_view: default
comment: this is a test comment
options:
- name: domain-name
value: ansible.com
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Remove a ipv4 dhcp fixed address
community.general.nios_fixed_address:
name: ipv4_fixed
ipaddr: 192.168.10.1
mac: 08:6d:41:e8:fd:e8
network: 192.168.10.0/24
network_view: default
state: absent
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
```
Status
------
* This module will be removed in version 5.0.0. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Sumit Jaiswal (@sjaiswal)
ansible community.general.nios_a_record β Configure Infoblox NIOS A records community.general.nios\_a\_record β Configure Infoblox NIOS A records
=====================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.nios_a_record`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Status](#status)
DEPRECATED
----------
Removed in
version 5.0.0
Why
Please install the infoblox.nios\_modules collection and use the corresponding module from it.
Alternative
infoblox.nios\_modules.nios\_a\_record
Synopsis
--------
* Adds and/or removes instances of A record objects from Infoblox NIOS servers. This module manages NIOS `record:a` objects using the Infoblox WAPI interface over REST.
Requirements
------------
The below requirements are needed on the host that executes this module.
* infoblox-client
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **comment** string | | Configures a text string comment to be associated with the instance of this object. The provided text string will be configured on the object instance. |
| **extattrs** dictionary | | Allows for the configuration of Extensible Attributes on the instance of the object. This argument accepts a set of key / value pairs for configuration. |
| **ipv4addr** string | | Configures the IPv4 address for this A record. Users can dynamically allocate ipv4 address to A record by passing dictionary containing, *nios\_next\_ip* and *CIDR network range*. See example
aliases: ipv4 |
| **name** string / required | | Specifies the fully qualified hostname to add or remove from the system |
| **provider** dictionary | | A dict object containing connection details. |
| | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. |
| | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. |
| | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. |
| | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. |
| | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. |
| | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. |
| | **silent\_ssl\_warnings** boolean | **Choices:*** no
* **yes** β
| Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. |
| | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. |
| | **validate\_certs** boolean | **Choices:*** **no** β
* yes
| Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable.
aliases: ssl\_verify |
| | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 |
| **state** string | **Choices:*** **present** β
* absent
| Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. |
| **ttl** integer | | Configures the TTL to be associated with this A record |
| **view** string | **Default:**"default" | Sets the DNS view to associate this A record with. The DNS view must already be configured on the system
aliases: dns\_view |
Notes
-----
Note
* This module must be run locally, which can be achieved by specifying `connection: local`.
* Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible.
Examples
--------
```
- name: Configure an A record
community.general.nios_a_record:
name: a.ansible.com
ipv4: 192.168.10.1
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Add a comment to an existing A record
community.general.nios_a_record:
name: a.ansible.com
ipv4: 192.168.10.1
comment: this is a test comment
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Remove an A record from the system
community.general.nios_a_record:
name: a.ansible.com
ipv4: 192.168.10.1
state: absent
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Update an A record name
community.general.nios_a_record:
name: {new_name: a_new.ansible.com, old_name: a.ansible.com}
ipv4: 192.168.10.1
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Dynamically add a record to next available ip
community.general.nios_a_record:
name: a.ansible.com
ipv4: {nios_next_ip: 192.168.10.0/24}
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
```
Status
------
* This module will be removed in version 5.0.0. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Blair Rampling (@brampling)
| programming_docs |
ansible community.general.honeybadger_deployment β Notify Honeybadger.io about app deployments community.general.honeybadger\_deployment β Notify Honeybadger.io about app deployments
=======================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.honeybadger_deployment`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Notify Honeybadger.io about app deployments (see <http://docs.honeybadger.io/article/188-deployment-tracking>)
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **environment** string / required | | The environment name, typically 'production', 'staging', etc. |
| **repo** string | | URL of the project repository |
| **revision** string | | A hash, number, tag, or other identifier showing what revision was deployed |
| **token** string / required | | API token. |
| **url** string | **Default:**"https://api.honeybadger.io/v1/deploys" | Optional URL to submit the notification to. |
| **user** string | | The username of the person doing the deployment |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates for the target url will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Notify Honeybadger.io about an app deployment
community.general.honeybadger_deployment:
token: AAAAAA
environment: staging
user: ansible
revision: b6826b8
repo: '[email protected]:user/repo.git'
```
### Authors
* Benjamin Curtis (@stympy)
ansible community.general.ipa_host β Manage FreeIPA host community.general.ipa\_host β Manage FreeIPA host
=================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ipa_host`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add, modify and delete an IPA host using IPA API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **description** string | | A description of this host. |
| **force** boolean | **Choices:*** no
* yes
| Force host name even if not in DNS. |
| **fqdn** string / required | | Full qualified domain name. Can not be changed as it is the unique identifier.
aliases: name |
| **ip\_address** string | | Add the host to DNS with this IP address. |
| **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_prot** string | **Choices:*** http
* **https** β
| Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. |
| **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. |
| **mac\_address** list / elements=string | | List of Hardware MAC address(es) off this host. If option is omitted MAC addresses will not be checked or changed. If an empty list is passed all assigned MAC addresses will be removed. MAC addresses that are already assigned but not passed will be removed.
aliases: macaddress |
| **ns\_hardware\_platform** string | | Host hardware platform (e.g. "Lenovo T61")
aliases: nshardwareplatform |
| **ns\_host\_location** string | | Host location (e.g. "Lab 2")
aliases: nshostlocation |
| **ns\_os\_version** string | | Host operating system and version (e.g. "Fedora 9")
aliases: nsosversion |
| **random\_password** boolean | **Choices:*** no
* yes
| Generate a random password to be used in bulk enrollment. |
| **state** string | **Choices:*** absent
* disabled
* enabled
* **present** β
| State to ensure. |
| **update\_dns** boolean | **Choices:*** no
* yes
| If set `"True"` with state as `"absent"`, then removes DNS records of the host managed by FreeIPA DNS. This option has no effect for states other than "absent". |
| **user\_certificate** list / elements=string | | List of Base-64 encoded server certificates. If option is omitted certificates will not be checked or changed. If an empty list is passed all assigned certificates will be removed. Certificates already assigned but not passed will be removed.
aliases: usercertificate |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Ensure host is present
community.general.ipa_host:
name: host01.example.com
description: Example host
ip_address: 192.168.0.123
ns_host_location: Lab
ns_os_version: CentOS 7
ns_hardware_platform: Lenovo T61
mac_address:
- "08:00:27:E3:B1:2D"
- "52:54:00:BD:97:1E"
state: present
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
- name: Generate a random password for bulk enrolment
community.general.ipa_host:
name: host01.example.com
description: Example host
ip_address: 192.168.0.123
state: present
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
validate_certs: False
random_password: True
- name: Ensure host is disabled
community.general.ipa_host:
name: host01.example.com
state: disabled
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
- name: Ensure that all user certificates are removed
community.general.ipa_host:
name: host01.example.com
user_certificate: []
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
- name: Ensure host is absent
community.general.ipa_host:
name: host01.example.com
state: absent
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
- name: Ensure host and its DNS record is absent
community.general.ipa_host:
name: host01.example.com
state: absent
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
update_dns: True
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **host** dictionary | always | Host as returned by IPA API. |
| **host\_diff** list / elements=string | if check mode and a difference is found | List of options that differ and would be changed |
### Authors
* Thomas Krahn (@Nosmoht)
ansible community.general.pritunl_user β Manage Pritunl Users using the Pritunl API community.general.pritunl\_user β Manage Pritunl Users using the Pritunl API
============================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.pritunl_user`.
New in version 2.3.0: of community.general
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A module to manage Pritunl users using the Pritunl API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **organization** string / required | | The name of the organization the user is part of.
aliases: org |
| **pritunl\_api\_secret** string / required | | API Secret found in Administrators > USERNAME > API Secret. |
| **pritunl\_api\_token** string / required | | API Token of a Pritunl admin user. It needs to be enabled in Administrators > USERNAME > Enable Token Authentication. |
| **pritunl\_url** string / required | | URL and port of the Pritunl server on which the API is enabled. |
| **state** string | **Choices:*** **present** β
* absent
| If `present`, the module adds user *user\_name* to the Pritunl *organization*. If `absent`, removes the user *user\_name* from the Pritunl *organization*. |
| **user\_disabled** boolean | **Choices:*** no
* yes
| Enable/Disable the user *user\_name*. |
| **user\_email** string | | Email address associated with the user *user\_name*. |
| **user\_gravatar** boolean | **Choices:*** no
* yes
| Enable/Disable Gravatar usage for the user *user\_name*. |
| **user\_groups** list / elements=string | | List of groups associated with the user *user\_name*. |
| **user\_name** string / required | | Name of the user to create or delete from Pritunl. |
| **user\_type** string | **Choices:*** **client** β
* server
| Type of the user *user\_name*. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If certificates should be validated or not. This should never be set to `false`, except if you are very sure that your connection to the server can not be subject to a Man In The Middle attack. |
Examples
--------
```
- name: Create the user Foo with email address [email protected] in MyOrg
community.general.pritunl_user:
state: present
name: MyOrg
user_name: Foo
user_email: [email protected]
- name: Disable the user Foo but keep it in Pritunl
community.general.pritunl_user:
state: present
name: MyOrg
user_name: Foo
user_email: [email protected]
user_disabled: yes
- name: Make sure the user Foo is not part of MyOrg anymore
community.general.pritunl_user:
state: absent
name: MyOrg
user_name: Foo
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **response** dictionary | success | JSON representation of Pritunl Users. **Sample:** {'audit': False, 'auth\_type': 'google', 'bypass\_secondary': False, 'client\_to\_client': False, 'disabled': False, 'dns\_mapping': None, 'dns\_servers': None, 'dns\_suffix': None, 'email': '[email protected]', 'gravatar': True, 'groups': ['foo', 'bar'], 'id': '5d070dafe63q3b2e6s472c3b', 'name': '[email protected]', 'network\_links': [], 'organization': '58070daee6sf342e6e4s2c36', 'organization\_name': 'Acme', 'otp\_auth': True, 'otp\_secret': '35H5EJA3XB2$4CWG', 'pin': False, 'port\_forwarding': [], 'servers': []} |
### Authors
* Florian Dambrine (@Lowess)
ansible community.general.scaleway_volume_info β Gather information about the Scaleway volumes available. community.general.scaleway\_volume\_info β Gather information about the Scaleway volumes available.
===================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.scaleway_volume_info`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather information about the Scaleway volumes available.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds.
aliases: timeout |
| **api\_token** string / required | | Scaleway OAuth token.
aliases: oauth\_token |
| **api\_url** string | **Default:**"https://api.scaleway.com" | Scaleway API URL.
aliases: base\_url |
| **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. |
| **region** string / required | **Choices:*** ams1
* EMEA-NL-EVS
* par1
* EMEA-FR-PAR1
* par2
* EMEA-FR-PAR2
* waw1
* EMEA-PL-WAW1
| Scaleway region to use (for example `par1`). |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Scaleway API. |
Notes
-----
Note
* Also see the API documentation on <https://developer.scaleway.com/>
* If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`.
* If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable.
Examples
--------
```
- name: Gather Scaleway volumes information
community.general.scaleway_volume_info:
region: par1
register: result
- ansible.builtin.debug:
msg: "{{ result.scaleway_volume_info }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **scaleway\_volume\_info** list / elements=dictionary | success | Response from Scaleway API. For more details please refer to: <https://developers.scaleway.com/en/products/instance/api/>. **Sample:** {'scaleway\_volume\_info': [{'creation\_date': '2018-08-14T20:56:24.949660+00:00', 'export\_uri': None, 'id': 'b8d51a06-daeb-4fef-9539-a8aea016c1ba', 'modification\_date': '2018-08-14T20:56:24.949660+00:00', 'name': 'test-volume', 'organization': '3f709602-5e6c-4619-b80c-e841c89734af', 'server': None, 'size': 50000000000, 'state': 'available', 'volume\_type': 'l\_ssd'}]} |
### Authors
* Yanis Guenane (@Spredzy)
* Remy Leone (@sieben)
ansible community.general.ansible_galaxy_install β Install Ansible roles or collections using ansible-galaxy community.general.ansible\_galaxy\_install β Install Ansible roles or collections using ansible-galaxy
======================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ansible_galaxy_install`.
New in version 3.5.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module allows the installation of Ansible collections or roles using `ansible-galaxy`.
Requirements
------------
The below requirements are needed on the host that executes this module.
* Ansible 2.9, ansible-base 2.10, or ansible-core 2.11 or newer
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **ack\_ansible29** boolean | **Choices:*** **no** β
* yes
| Acknowledge using Ansible 2.9 with its limitations, and prevents the module from generating warnings about them. This option is completely ignored if using a version Ansible greater than `2.9.x`. |
| **dest** path | | The path to the directory containing your collections or roles, according to the value of *type*. Please notice that `ansible-galaxy` will not install collections with *type=both*, when *requirements\_file* contains both roles and collections and *dest* is specified. |
| **force** boolean | **Choices:*** **no** β
* yes
| Force overwriting an existing role or collection. Using *force=true* is mandatory when downgrading.
**Ansible 2.9 and 2.10**: Must be `true` to upgrade roles and collections. |
| **name** string | | Name of the collection or role being installed. Versions can be specified with `ansible-galaxy` usual formats. For example, `community.docker:1.6.1` or `ansistrano.deploy,3.8.0`.
*name* and *requirements\_file* are mutually exclusive. |
| **requirements\_file** path | | Path to a file containing a list of requirements to be installed. It works for *type* equals to `collection` and `role`.
*name* and *requirements\_file* are mutually exclusive.
**Ansible 2.9**: It can only be used to install either *type=role* or *type=collection*, but not both at the same run. |
| **type** string / required | **Choices:*** collection
* role
* both
| The type of installation performed by `ansible-galaxy`. If *type* is `both`, then *requirements\_file* must be passed and it may contain both roles and collections. Note however that the opposite is not true: if using a *requirements\_file*, then *type* can be any of the three choices.
**Ansible 2.9**: The option `both` will have the same effect as `role`. |
Notes
-----
Note
* **Ansible 2.9/2.10**: The `ansible-galaxy` command changed significantly between Ansible 2.9 and ansible-base 2.10 (later ansible-core 2.11). See comments in the parameters.
Examples
--------
```
- name: Install collection community.network
community.general.ansible_galaxy_install:
type: collection
name: community.network
- name: Install role at specific path
community.general.ansible_galaxy_install:
type: role
name: ansistrano.deploy
dest: /ansible/roles
- name: Install collections and roles together
community.general.ansible_galaxy_install:
type: both
requirements_file: requirements.yml
- name: Force-install collection community.network at specific version
community.general.ansible_galaxy_install:
type: collection
name: community.network:3.0.2
force: true
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **dest** string | always | The value of the *dest* parameter. |
| **force** boolean | always | The value of the *force* parameter. |
| **installed\_collections** dictionary | always when installing collections | If *requirements\_file* is specified instead, returns dictionary with all the collections installed per path. If *name* is specified, returns that collection name and the version installed per path.
**Ansible 2.9**: Returns empty because `ansible-galaxy` has no `list` subcommand. **Sample:** {'/custom/ansible/ansible\_collections': {'community.general': '3.1.0'}, '/home/az/.ansible/collections/ansible\_collections': {'community.docker': '1.6.0', 'community.general': '3.0.2'}} |
| | dictionary | success | Collections and versions for that path |
| **installed\_roles** dictionary | always when installing roles | If *requirements\_file* is specified instead, returns dictionary with all the roles installed per path. If *name* is specified, returns that role name and the version installed per path.
**Ansible 2.9**: Returns empty because `ansible-galaxy` has no `list` subcommand. **Sample:** {'/custom/ansible/roles': {'ansistrano.deploy': '3.8.0'}, '/home/user42/.ansible/roles': {'ansistrano.deploy': '3.9.0', 'baztian.xfce': 'v0.0.3'}} |
| | dictionary | success | Roles and versions for that path. |
| **name** string | always | The value of the *name* parameter. |
| **new\_collections** dictionary | success | New collections installed by this module. **Sample:** {'community.docker': '1.6.1', 'community.general': '3.1.0'} |
| **new\_roles** dictionary | success | New roles installed by this module. **Sample:** {'ansistrano.deploy': '3.8.0', 'baztian.xfce': 'v0.0.3'} |
| **requirements\_file** string | always | The value of the *requirements\_file* parameter. |
| **type** string | always | The value of the *type* parameter. |
### Authors
* Alexei Znamensky (@russoz)
| programming_docs |
ansible community.general.haproxy β Enable, disable, and set weights for HAProxy backend servers using socket commands community.general.haproxy β Enable, disable, and set weights for HAProxy backend servers using socket commands
==============================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.haproxy`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Enable, disable, drain and set weights for HAProxy backend servers using socket commands.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **agent** boolean added in 1.0.0 of community.general | **Choices:*** **no** β
* yes
| Disable/enable agent checks (depending on *state* value). |
| **backend** string | | Name of the HAProxy backend pool. If this parameter is unset, it will be auto-detected. |
| **drain** boolean | **Choices:*** **no** β
* yes
| Wait until the server has no active connections or until the timeout determined by wait\_interval and wait\_retries is reached. Continue only after the status changes to 'MAINT'. This overrides the shutdown\_sessions option. |
| **fail\_on\_not\_found** boolean | **Choices:*** **no** β
* yes
| Fail whenever trying to enable/disable a backend host that does not exist |
| **health** boolean added in 1.0.0 of community.general | **Choices:*** **no** β
* yes
| Disable/enable health checks (depending on *state* value). |
| **host** string / required | | Name of the backend host to change. |
| **shutdown\_sessions** boolean | **Choices:*** **no** β
* yes
| When disabling a server, immediately terminate all the sessions attached to the specified server. This can be used to terminate long-running sessions after a server is put into maintenance mode. Overridden by the drain option. |
| **socket** path | **Default:**"/var/run/haproxy.sock" | Path to the HAProxy socket file. |
| **state** string / required | **Choices:*** disabled
* drain
* enabled
| Desired state of the provided backend host. Note that `drain` state was added in version 2.4. It is supported only by HAProxy version 1.5 or later, When used on versions < 1.5, it will be ignored. |
| **wait** boolean | **Choices:*** **no** β
* yes
| Wait until the server reports a status of 'UP' when `state=enabled`, status of 'MAINT' when `state=disabled` or status of 'DRAIN' when `state=drain`
|
| **wait\_interval** integer | **Default:**5 | Number of seconds to wait between retries. |
| **wait\_retries** integer | **Default:**25 | Number of times to check for status after changing the state. |
| **weight** string | | The value passed in argument. If the value ends with the `%` sign, then the new weight will be relative to the initially configured weight. Relative weights are only permitted between 0 and 100% and absolute weights are permitted between 0 and 256. |
Notes
-----
Note
* Enable, disable and drain commands are restricted and can only be issued on sockets configured for level βadminβ. For example, you can add the line βstats socket /var/run/haproxy.sock level adminβ to the general section of haproxy.cfg. See <http://haproxy.1wt.eu/download/1.5/doc/configuration.txt>.
* Depends on netcat (nc) being available; you need to install the appropriate package for your operating system before this module can be used.
Examples
--------
```
- name: Disable server in 'www' backend pool
community.general.haproxy:
state: disabled
host: '{{ inventory_hostname }}'
backend: www
- name: Disable server in 'www' backend pool, also stop health/agent checks
community.general.haproxy:
state: disabled
host: '{{ inventory_hostname }}'
health: yes
agent: yes
- name: Disable server without backend pool name (apply to all available backend pool)
community.general.haproxy:
state: disabled
host: '{{ inventory_hostname }}'
- name: Disable server, provide socket file
community.general.haproxy:
state: disabled
host: '{{ inventory_hostname }}'
socket: /var/run/haproxy.sock
backend: www
- name: Disable server, provide socket file, wait until status reports in maintenance
community.general.haproxy:
state: disabled
host: '{{ inventory_hostname }}'
socket: /var/run/haproxy.sock
backend: www
wait: yes
# Place server in drain mode, providing a socket file. Then check the server's
# status every minute to see if it changes to maintenance mode, continuing if it
# does in an hour and failing otherwise.
- community.general.haproxy:
state: disabled
host: '{{ inventory_hostname }}'
socket: /var/run/haproxy.sock
backend: www
wait: yes
drain: yes
wait_interval: 60
wait_retries: 60
- name: Disable backend server in 'www' backend pool and drop open sessions to it
community.general.haproxy:
state: disabled
host: '{{ inventory_hostname }}'
backend: www
socket: /var/run/haproxy.sock
shutdown_sessions: yes
- name: Disable server without backend pool name (apply to all available backend pool) but fail when the backend host is not found
community.general.haproxy:
state: disabled
host: '{{ inventory_hostname }}'
fail_on_not_found: yes
- name: Enable server in 'www' backend pool
community.general.haproxy:
state: enabled
host: '{{ inventory_hostname }}'
backend: www
- name: Enable server in 'www' backend pool wait until healthy
community.general.haproxy:
state: enabled
host: '{{ inventory_hostname }}'
backend: www
wait: yes
- name: Enable server in 'www' backend pool wait until healthy. Retry 10 times with intervals of 5 seconds to retrieve the health
community.general.haproxy:
state: enabled
host: '{{ inventory_hostname }}'
backend: www
wait: yes
wait_retries: 10
wait_interval: 5
- name: Enable server in 'www' backend pool with change server(s) weight
community.general.haproxy:
state: enabled
host: '{{ inventory_hostname }}'
socket: /var/run/haproxy.sock
weight: 10
backend: www
- name: Set the server in 'www' backend pool to drain mode
community.general.haproxy:
state: drain
host: '{{ inventory_hostname }}'
socket: /var/run/haproxy.sock
backend: www
```
### Authors
* Ravi Bhure (@ravibhure)
ansible community.general.clc_alert_policy β Create or Delete Alert Policies at CenturyLink Cloud. community.general.clc\_alert\_policy β Create or Delete Alert Policies at CenturyLink Cloud.
============================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.clc_alert_policy`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* An Ansible module to Create or Delete Alert Policies at CenturyLink Cloud.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python = 2.7
* requests >= 2.5.0
* clc-sdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **alert\_recipients** list / elements=string | | A list of recipient email ids to notify the alert. This is required for state 'present' |
| **alias** string / required | | The alias of your CLC Account |
| **duration** string | | The length of time in minutes that the condition must exceed the threshold. This is required for state 'present' |
| **id** string | | The alert policy id. This is mutually exclusive with name |
| **metric** string | **Choices:*** cpu
* memory
* disk
| The metric on which to measure the condition that will trigger the alert. This is required for state 'present' |
| **name** string | | The name of the alert policy. This is mutually exclusive with id |
| **state** string | **Choices:*** **present** β
* absent
| Whether to create or delete the policy. |
| **threshold** integer | | The threshold that will trigger the alert when the metric equals or exceeds it. This is required for state 'present' This number represents a percentage and must be a value between 5.0 - 95.0 that is a multiple of 5.0 |
Notes
-----
Note
* To use this module, it is required to set the below environment variables which enables access to the Centurylink Cloud - CLC\_V2\_API\_USERNAME, the account login id for the centurylink cloud - CLC\_V2\_API\_PASSWORD, the account password for the centurylink cloud
* Alternatively, the module accepts the API token and account alias. The API token can be generated using the CLC account login and password via the HTTP api call @ <https://api.ctl.io/v2/authentication/login> - CLC\_V2\_API\_TOKEN, the API token generated from <https://api.ctl.io/v2/authentication/login> - CLC\_ACCT\_ALIAS, the account alias associated with the centurylink cloud
* Users can set CLC\_V2\_API\_URL to specify an endpoint for pointing to a different CLC environment.
Examples
--------
```
# Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples
---
- name: Create Alert Policy Example
hosts: localhost
gather_facts: False
connection: local
tasks:
- name: Create an Alert Policy for disk above 80% for 5 minutes
community.general.clc_alert_policy:
alias: wfad
name: 'alert for disk > 80%'
alert_recipients:
- [email protected]
- [email protected]
metric: 'disk'
duration: '00:05:00'
threshold: 80
state: present
register: policy
- name: Debug
ansible.builtin.debug: var=policy
- name: Delete Alert Policy Example
hosts: localhost
gather_facts: False
connection: local
tasks:
- name: Delete an Alert Policy
community.general.clc_alert_policy:
alias: wfad
name: 'alert for disk > 80%'
state: absent
register: policy
- name: Debug
ansible.builtin.debug: var=policy
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **policy** dictionary | success | The alert policy information **Sample:** {'actions': [{'action': 'email', 'settings': {'recipients': ['[email protected]', '[email protected]']}}], 'id': 'ba54ac54a60d4a4f1ed6d48c1ce240a7', 'links': [{'href': '/v2/alertPolicies/alias/ba54ac54a60d4a4fb1d6d48c1ce240a7', 'rel': 'self', 'verbs': ['GET', 'DELETE', 'PUT']}], 'name': 'test\_alert', 'triggers': [{'duration': '00:05:00', 'metric': 'disk', 'threshold': 80.0}]} |
### Authors
* CLC Runner (@clc-runner)
ansible community.general.hiera β get info from hiera data community.general.hiera β get info from hiera data
==================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.hiera`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieves data from an Puppetmaster node using Hiera as ENC
Requirements
------------
The below requirements are needed on the local controller node that executes this lookup.
* hiera (command line utility)
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_bin\_file** string | **Default:**"/usr/bin/hiera" | env:ANSIBLE\_HIERA\_BIN | Binary file to execute Hiera |
| **\_hiera\_key** list / elements=string / required | | | The list of keys to lookup on the Puppetmaster |
| **\_hierarchy\_file** string | **Default:**"/etc/hiera.yaml" | env:ANSIBLE\_HIERA\_CFG | File that describes the hierarchy of Hiera |
Examples
--------
```
# All this examples depends on hiera.yml that describes the hierarchy
- name: "a value from Hiera 'DB'"
ansible.builtin.debug:
msg: "{{ lookup('community.general.hiera', 'foo') }}"
- name: "a value from a Hiera 'DB' on other environment"
ansible.builtin.debug:
msg: "{{ lookup('community.general.hiera', 'foo environment=production') }}"
- name: "a value from a Hiera 'DB' for a concrete node"
ansible.builtin.debug:
msg: "{{ lookup('community.general.hiera', 'foo fqdn=puppet01.localdomain') }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:
| Key | Returned | Description |
| --- | --- | --- |
| **\_raw** list / elements=string | success | a value associated with input key |
### Authors
* Juan Manuel Parrilla (@jparrill)
ansible community.general.deploy_helper β Manages some of the steps common in deploying projects. community.general.deploy\_helper β Manages some of the steps common in deploying projects.
==========================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.deploy_helper`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* The Deploy Helper manages some of the steps common in deploying software. It creates a folder structure, manages a symlink for the current release and cleans up old releases.
* Running it with the `state=query` or `state=present` will return the `deploy_helper` fact. `project_path`, whatever you set in the path parameter, `current_path`, the path to the symlink that points to the active release, `releases_path`, the path to the folder to keep releases in, `shared_path`, the path to the folder to keep shared resources in, `unfinished_filename`, the file to check for to recognize unfinished builds, `previous_release`, the release the βcurrentβ symlink is pointing to, `previous_release_path`, the full path to the βcurrentβ symlink target, `new_release`, either the βreleaseβ parameter or a generated timestamp, `new_release_path`, the path to the new release folder (not created by the module).
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **attributes** string added in 2.3 of ansible.builtin | | The attributes the resulting file or directory should have. To get supported flags look at the man page for *chattr* on the target system. This string should contain the attributes in the same order as the one displayed by *lsattr*. The `=` operator is assumed as default, otherwise `+` or `-` operators need to be included in the string.
aliases: attr |
| **clean** boolean | **Choices:*** no
* **yes** β
| Whether to run the clean procedure in case of `state=finalize`. |
| **current\_path** path | **Default:**"current" | the name of the symlink that is created when the deploy is finalized. Used in `finalize` and `clean`. Returned in the `deploy_helper.current_path` fact. |
| **group** string | | Name of the group that should own the file/directory, as would be fed to *chown*. |
| **keep\_releases** integer | **Default:**5 | the number of old releases to keep when cleaning. Used in `finalize` and `clean`. Any unfinished builds will be deleted first, so only correct releases will count. The current version will not count. |
| **mode** raw | | The permissions the resulting file or directory should have. For those used to */usr/bin/chmod* remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like `0644` or `01777`) or quote it (like `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination file **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created file. If `mode` is not specified and the destination file **does** exist, the mode of the existing file will be used. Specifying `mode` is the best way to ensure files are created with the correct permissions. See CVE-2020-1736 for further details. |
| **owner** string | | Name of the user that should own the file/directory, as would be fed to *chown*. |
| **path** path / required | | the root path of the project. Alias *dest*. Returned in the `deploy_helper.project_path` fact.
aliases: dest |
| **release** string | | the release version that is being deployed. Defaults to a timestamp format %Y%m%d%H%M%S (i.e. '20141119223359'). This parameter is optional during `state=present`, but needs to be set explicitly for `state=finalize`. You can use the generated fact `release={{ deploy_helper.new_release }}`. |
| **releases\_path** string | **Default:**"releases" | the name of the folder that will hold the releases. This can be relative to `path` or absolute. Returned in the `deploy_helper.releases_path` fact. |
| **selevel** string | | The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the `range`. When set to `_default`, it will use the `level` portion of the policy if available. |
| **serole** string | | The role part of the SELinux file context. When set to `_default`, it will use the `role` portion of the policy if available. |
| **setype** string | | The type part of the SELinux file context. When set to `_default`, it will use the `type` portion of the policy if available. |
| **seuser** string | | The user part of the SELinux file context. By default it uses the `system` policy, where applicable. When set to `_default`, it will use the `user` portion of the policy if available. |
| **shared\_path** path | **Default:**"shared" | the name of the folder that will hold the shared resources. This can be relative to `path` or absolute. If this is set to an empty string, no shared folder will be created. Returned in the `deploy_helper.shared_path` fact. |
| **state** string | **Choices:*** **present** β
* finalize
* absent
* clean
* query
| the state of the project. `query` will only gather facts, `present` will create the project *root* folder, and in it the *releases* and *shared* folders, `finalize` will remove the unfinished\_filename file, create a symlink to the newly deployed release and optionally clean old releases, `clean` will remove failed & old releases, `absent` will remove the project folder (synonymous to the [ansible.builtin.file](../../ansible/builtin/file_module) module with `state=absent`) |
| **unfinished\_filename** string | **Default:**"DEPLOY\_UNFINISHED" | the name of the file that indicates a deploy has not finished. All folders in the releases\_path that contain this file will be deleted on `state=finalize` with clean=True, or `state=clean`. This file is automatically deleted from the *new\_release\_path* during `state=finalize`. |
| **unsafe\_writes** boolean added in 2.2 of ansible.builtin | **Choices:*** **no** β
* yes
| Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. |
Notes
-----
Note
* Facts are only returned for `state=query` and `state=present`. If you use both, you should pass any overridden parameters to both calls, otherwise the second call will overwrite the facts of the first one.
* When using `state=clean`, the releases are ordered by *creation date*. You should be able to switch to a new naming strategy without problems.
* Because of the default behaviour of generating the *new\_release* fact, this module will not be idempotent unless you pass your own release name with `release`. Due to the nature of deploying software, this should not be much of a problem.
Examples
--------
```
# General explanation, starting with an example folder structure for a project:
# root:
# releases:
# - 20140415234508
# - 20140415235146
# - 20140416082818
#
# shared:
# - sessions
# - uploads
#
# current: releases/20140416082818
# The 'releases' folder holds all the available releases. A release is a complete build of the application being
# deployed. This can be a clone of a repository for example, or a sync of a local folder on your filesystem.
# Having timestamped folders is one way of having distinct releases, but you could choose your own strategy like
# git tags or commit hashes.
#
# During a deploy, a new folder should be created in the releases folder and any build steps required should be
# performed. Once the new build is ready, the deploy procedure is 'finalized' by replacing the 'current' symlink
# with a link to this build.
#
# The 'shared' folder holds any resource that is shared between releases. Examples of this are web-server
# session files, or files uploaded by users of your application. It's quite common to have symlinks from a release
# folder pointing to a shared/subfolder, and creating these links would be automated as part of the build steps.
#
# The 'current' symlink points to one of the releases. Probably the latest one, unless a deploy is in progress.
# The web-server's root for the project will go through this symlink, so the 'downtime' when switching to a new
# release is reduced to the time it takes to switch the link.
#
# To distinguish between successful builds and unfinished ones, a file can be placed in the folder of the release
# that is currently in progress. The existence of this file will mark it as unfinished, and allow an automated
# procedure to remove it during cleanup.
# Typical usage
- name: Initialize the deploy root and gather facts
community.general.deploy_helper:
path: /path/to/root
- name: Clone the project to the new release folder
ansible.builtin.git:
repo: ansible.builtin.git://foosball.example.org/path/to/repo.git
dest: '{{ deploy_helper.new_release_path }}'
version: v1.1.1
- name: Add an unfinished file, to allow cleanup on successful finalize
ansible.builtin.file:
path: '{{ deploy_helper.new_release_path }}/{{ deploy_helper.unfinished_filename }}'
state: touch
- name: Perform some build steps, like running your dependency manager for example
composer:
command: install
working_dir: '{{ deploy_helper.new_release_path }}'
- name: Create some folders in the shared folder
ansible.builtin.file:
path: '{{ deploy_helper.shared_path }}/{{ item }}'
state: directory
with_items:
- sessions
- uploads
- name: Add symlinks from the new release to the shared folder
ansible.builtin.file:
path: '{{ deploy_helper.new_release_path }}/{{ item.path }}'
src: '{{ deploy_helper.shared_path }}/{{ item.src }}'
state: link
with_items:
- path: app/sessions
src: sessions
- path: web/uploads
src: uploads
- name: Finalize the deploy, removing the unfinished file and switching the symlink
community.general.deploy_helper:
path: /path/to/root
release: '{{ deploy_helper.new_release }}'
state: finalize
# Retrieving facts before running a deploy
- name: Run 'state=query' to gather facts without changing anything
community.general.deploy_helper:
path: /path/to/root
state: query
# Remember to set the 'release' parameter when you actually call 'state=present' later
- name: Initialize the deploy root
community.general.deploy_helper:
path: /path/to/root
release: '{{ deploy_helper.new_release }}'
state: present
# all paths can be absolute or relative (to the 'path' parameter)
- community.general.deploy_helper:
path: /path/to/root
releases_path: /var/www/project/releases
shared_path: /var/www/shared
current_path: /var/www/active
# Using your own naming strategy for releases (a version tag in this case):
- community.general.deploy_helper:
path: /path/to/root
release: v1.1.1
state: present
- community.general.deploy_helper:
path: /path/to/root
release: '{{ deploy_helper.new_release }}'
state: finalize
# Using a different unfinished_filename:
- community.general.deploy_helper:
path: /path/to/root
unfinished_filename: README.md
release: '{{ deploy_helper.new_release }}'
state: finalize
# Postponing the cleanup of older builds:
- community.general.deploy_helper:
path: /path/to/root
release: '{{ deploy_helper.new_release }}'
state: finalize
clean: False
- community.general.deploy_helper:
path: /path/to/root
state: clean
# Or running the cleanup ahead of the new deploy
- community.general.deploy_helper:
path: /path/to/root
state: clean
- community.general.deploy_helper:
path: /path/to/root
state: present
# Keeping more old releases:
- community.general.deploy_helper:
path: /path/to/root
release: '{{ deploy_helper.new_release }}'
state: finalize
keep_releases: 10
# Or, if you use 'clean=false' on finalize:
- community.general.deploy_helper:
path: /path/to/root
state: clean
keep_releases: 10
# Removing the entire project root folder
- community.general.deploy_helper:
path: /path/to/root
state: absent
# Debugging the facts returned by the module
- community.general.deploy_helper:
path: /path/to/root
- ansible.builtin.debug:
var: deploy_helper
```
### Authors
* Ramon de la Fuente (@ramondelafuente)
| programming_docs |
ansible community.general.clc_group β Create/delete Server Groups at Centurylink Cloud community.general.clc\_group β Create/delete Server Groups at Centurylink Cloud
===============================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.clc_group`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create or delete Server Groups at Centurylink Centurylink Cloud
Requirements
------------
The below requirements are needed on the host that executes this module.
* python = 2.7
* requests >= 2.5.0
* clc-sdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **description** string | | A description of the Server Group |
| **location** string | | Datacenter to create the group in. If location is not provided, the group gets created in the default datacenter associated with the account |
| **name** string / required | | The name of the Server Group |
| **parent** string | | The parent group of the server group. If parent is not provided, it creates the group at top level. |
| **state** string | **Choices:*** **present** β
* absent
| Whether to create or delete the group |
| **wait** boolean | **Choices:*** no
* **yes** β
| Whether to wait for the tasks to finish before returning. |
Notes
-----
Note
* To use this module, it is required to set the below environment variables which enables access to the Centurylink Cloud - CLC\_V2\_API\_USERNAME, the account login id for the centurylink cloud - CLC\_V2\_API\_PASSWORD, the account password for the centurylink cloud
* Alternatively, the module accepts the API token and account alias. The API token can be generated using the CLC account login and password via the HTTP api call @ <https://api.ctl.io/v2/authentication/login> - CLC\_V2\_API\_TOKEN, the API token generated from <https://api.ctl.io/v2/authentication/login> - CLC\_ACCT\_ALIAS, the account alias associated with the centurylink cloud
* Users can set CLC\_V2\_API\_URL to specify an endpoint for pointing to a different CLC environment.
Examples
--------
```
# Create a Server Group
---
- name: Create Server Group
hosts: localhost
gather_facts: False
connection: local
tasks:
- name: Create / Verify a Server Group at CenturyLink Cloud
community.general.clc_group:
name: My Cool Server Group
parent: Default Group
state: present
register: clc
- name: Debug
ansible.builtin.debug:
var: clc
# Delete a Server Group
- name: Delete Server Group
hosts: localhost
gather_facts: False
connection: local
tasks:
- name: Delete / Verify Absent a Server Group at CenturyLink Cloud
community.general.clc_group:
name: My Cool Server Group
parent: Default Group
state: absent
register: clc
- name: Debug
ansible.builtin.debug:
var: clc
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **group** dictionary | success | The group information **Sample:** {'changeInfo': {'createdBy': 'service.wfad', 'createdDate': '2015-07-29T18:52:47Z', 'modifiedBy': 'service.wfad', 'modifiedDate': '2015-07-29T18:52:47Z'}, 'customFields': [], 'description': 'test group', 'groups': [], 'id': 'bb5f12a3c6044ae4ad0a03e73ae12cd1', 'links': [{'href': '/v2/groups/wfad', 'rel': 'createGroup', 'verbs': ['POST']}, {'href': '/v2/servers/wfad', 'rel': 'createServer', 'verbs': ['POST']}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1', 'rel': 'self', 'verbs': ['GET', 'PATCH', 'DELETE']}, {'href': '/v2/groups/wfad/086ac1dfe0b6411989e8d1b77c4065f0', 'id': '086ac1dfe0b6411989e8d1b77c4065f0', 'rel': 'parentGroup'}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1/defaults', 'rel': 'defaults', 'verbs': ['GET', 'POST']}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1/billing', 'rel': 'billing'}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1/archive', 'rel': 'archiveGroupAction'}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1/statistics', 'rel': 'statistics'}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1/upcomingScheduledActivities', 'rel': 'upcomingScheduledActivities'}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1/horizontalAutoscalePolicy', 'rel': 'horizontalAutoscalePolicyMapping', 'verbs': ['GET', 'PUT', 'DELETE']}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1/scheduledActivities', 'rel': 'scheduledActivities', 'verbs': ['GET', 'POST']}], 'locationId': 'UC1', 'name': 'test group', 'status': 'active', 'type': 'default'} |
### Authors
* CLC Runner (@clc-runner)
ansible community.general.packet_sshkey β Create/delete an SSH key in Packet host. community.general.packet\_sshkey β Create/delete an SSH key in Packet host.
===========================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.packet_sshkey`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create/delete an SSH key in Packet host.
* API is documented at <https://www.packet.net/help/api/#page:ssh-keys,header:ssh-keys-ssh-keys-post>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* packet-python
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_token** string | | Packet API token. You can also supply it in env var `PACKET_API_TOKEN`. |
| **fingerprint** string | | Fingerprint of the key which you want to remove. |
| **id** string | | UUID of the key which you want to remove. |
| **key** string | | Public Key string ({type} {base64 encoded key} {description}). |
| **key\_file** path | | File with the public key. |
| **label** string | | Label for the key. If you keep it empty, it will be read from key string.
aliases: name |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the target. |
Examples
--------
```
# All the examples assume that you have your Packet API token in env var PACKET_API_TOKEN.
# You can also pass the api token in module param auth_token.
- name: Create sshkey from string
hosts: localhost
tasks:
community.general.packet_sshkey:
key: "{{ lookup('file', 'my_packet_sshkey.pub') }}"
- name: Create sshkey from file
hosts: localhost
tasks:
community.general.packet_sshkey:
label: key from file
key_file: ~/ff.pub
- name: Remove sshkey by id
hosts: localhost
tasks:
community.general.packet_sshkey:
state: absent
id: eef49903-7a09-4ca1-af67-4087c29ab5b6
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | True if a sshkey was created or removed. **Sample:** True |
| **sshkeys** list / elements=string | always | Information about sshkeys that were created/removed. **Sample:** [{'fingerprint': '5c:93:74:7c:ed:07:17:62:28:75:79:23:d6:08:93:46', 'id': '41d61bd8-3342-428b-a09c-e67bdd18a9b7', 'key': 'ssh-dss AAAAB3NzaC1kc3MAAACBAIfNT5S0ncP4BBJBYNhNPxFF9lqVhfPeu6SM1LoCocxqDc1AT3zFRi8hjIf6TLZ2AA4FYbcAWxLMhiBxZRVldT9GdBXile78kAK5z3bKTwq152DCqpxwwbaTIggLFhsU8wrfBsPWnDuAxZ0h7mmrCjoLIE3CNLDA/NmV3iB8xMThAAAAFQCStcesSgR1adPORzBxTr7hug92LwAAAIBOProm3Gk+HWedLyE8IfofLaOeRnbBRHAOL4z0SexKkVOnQ/LGN/uDIIPGGBDYTvXgKZT+jbHeulRJ2jKgfSpGKN4JxFQ8uzVH492jEiiUJtT72Ss1dCV4PmyERVIw+f54itihV3z/t25dWgowhb0int8iC/OY3cGodlmYb3wdcQAAAIBuLbB45djZXzUkOTzzcRDIRfhaxo5WipbtEM2B1fuBt2gyrvksPpH/LK6xTjdIIb0CxPu4OCxwJG0aOz5kJoRnOWIXQGhH7VowrJhsqhIc8gN9ErbO5ea8b1L76MNcAotmBDeTUiPw01IJ8MdDxfmcsCslJKgoRKSmQpCwXQtN2g== tomk@hp2', 'label': 'mynewkey33'}] |
### Authors
* Tomas Karasek (@t0mk) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#13677c7e3530272528677c3530272528677b76353027252878353020242835302621283530272b28747e727a7f3530272528707c7e)>
ansible community.general.packet_volume β Create/delete a volume in Packet host. community.general.packet\_volume β Create/delete a volume in Packet host.
=========================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.packet_volume`.
New in version 0.2.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create/delete a volume in Packet host.
* API is documented at <https://www.packet.com/developers/api/#volumes>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* packet-python >= 1.35
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_token** string | | Packet API token. You can also supply it in env var `PACKET_API_TOKEN`. |
| **billing\_cycle** string | **Choices:*** **hourly** β
* monthly
| Billing cycle for new volume. |
| **description** string | | User-defined description attribute for Packet volume. It is used used as idempotent identifier - if volume with given description exists, new one is not created. |
| **facility** string | | Location of the volume. Volumes can only be attached to device in the same location. |
| **id** string | | UUID of a volume. |
| **locked** boolean | **Choices:*** **no** β
* yes
| Create new volume locked. |
| **name** string | | Selector for API-generated name of the volume |
| **plan** string | **Choices:*** **storage\_1** β
* storage\_2
| storage\_1 for standard tier, storage\_2 for premium (performance) tier. Tiers are described at <https://www.packet.com/cloud/storage/>. |
| **project\_id** string / required | | ID of project of the device. |
| **size** integer | | Size of the volume in gigabytes. |
| **snapshot\_policy** dictionary | | Snapshot policy for new volume. |
| | **snapshot\_count** integer / required | | How many snapshots to keep, a positive integer. |
| | **snapshot\_frequency** string / required | **Choices:*** 15min
* 1hour
* 1day
* 1week
* 1month
* 1year
| Frequency of snapshots. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the volume. |
Examples
--------
```
# All the examples assume that you have your Packet API token in env var PACKET_API_TOKEN.
# You can also pass the api token in module param auth_token.
- hosts: localhost
vars:
volname: testvol123
project_id: 53000fb2-ee46-4673-93a8-de2c2bdba33b
tasks:
- name: Create volume
community.general.packet_volume:
description: "{{ volname }}"
project_id: "{{ project_id }}"
facility: 'ewr1'
plan: 'storage_1'
state: present
size: 10
snapshot_policy:
snapshot_count: 10
snapshot_frequency: 1day
register: result_create
- name: Delete volume
community.general.packet_volume:
id: "{{ result_create.id }}"
project_id: "{{ project_id }}"
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **description** string | success | The user-defined description of the volume resource. **Sample:** Just another volume |
| **id** string | success | UUID of specified volume **Sample:** 53000fb2-ee46-4673-93a8-de2c2bdba33c |
| **name** string | if volume is attached/detached to/from some device | The API-generated name of the volume resource. **Sample:** volume-a91dc506 |
### Authors
* Tomas Karasek (@t0mk) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#f1859e9cd7d2c5c7ca859ed7d2c5c7ca859994d7d2c5c7ca9ad7d2c2c6cad7d2c4c3cad7d2c5c9ca969c90989dd7d2c5c7ca929e9c)>
* Nurfet Becirevic (@nurfet-becirevic) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#c4aab1b6a2a1b0e2e7f0f2ffa6a1a7adb6a1b2ada7e2e7f7f3ffe2e7f1f6ffe2e7f0fcffa3a9a5ada8e2e7f0f2ffa7aba9)>
ansible community.general.terraform β Manages a Terraform deployment (and plans) community.general.terraform β Manages a Terraform deployment (and plans)
========================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.terraform`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Provides support for deploying resources with Terraform and pulling resource information back into Ansible.
Requirements
------------
The below requirements are needed on the host that executes this module.
* terraform
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **backend\_config** dictionary | | A group of key-values to provide at init stage to the -backend-config parameter. |
| **backend\_config\_files** list / elements=path added in 0.2.0 of community.general | | The path to a configuration file to provide at init state to the -backend-config parameter. This can accept a list of paths to multiple configuration files. |
| **binary\_path** path | | The path of a terraform binary to use, relative to the 'service\_path' unless you supply an absolute path. |
| **check\_destroy** boolean added in 3.3.0 of community.general | **Choices:*** **no** β
* yes
| Apply only when no resources are destroyed. Note that this only prevents "destroy" actions, but not "destroy and re-create" actions. This option is ignored when *state=absent*. |
| **force\_init** boolean | **Choices:*** **no** β
* yes
| To avoid duplicating infra, if a state file can't be found this will force a `terraform init`. Generally, this should be turned off unless you intend to provision an entirely new Terraform deployment. |
| **init\_reconfigure** boolean added in 1.3.0 of community.general | **Choices:*** **no** β
* yes
| Forces backend reconfiguration during init. |
| **lock** boolean | **Choices:*** no
* **yes** β
| Enable statefile locking, if you use a service that accepts locks (such as S3+DynamoDB) to store your statefile. |
| **lock\_timeout** integer | | How long to maintain the lock on the statefile, if you use a service that accepts locks (such as S3+DynamoDB). |
| **overwrite\_init** boolean added in 3.2.0 of community.general | **Choices:*** no
* **yes** β
| Run init even if `.terraform/terraform.tfstate` already exists in *project\_path*. |
| **parallelism** integer added in 3.8.0 of community.general | | Restrict concurrent operations when Terraform applies the plan. |
| **plan\_file** path | | The path to an existing Terraform plan file to apply. If this is not specified, Ansible will build a new TF plan and execute it. Note that this option is required if 'state' has the 'planned' value. |
| **plugin\_paths** list / elements=path added in 3.0.0 of community.general | | List of paths containing Terraform plugin executable files. Plugin executables can be downloaded from <https://releases.hashicorp.com/>. When set, the plugin discovery and auto-download behavior of Terraform is disabled. The directory structure in the plugin path can be tricky. The Terraform docs <https://learn.hashicorp.com/tutorials/terraform/automate-terraform#pre-installed-plugins> show a simple directory of files, but actually, the directory structure has to follow the same structure you would see if Terraform auto-downloaded the plugins. See the examples below for a tree output of an example plugin directory. |
| **project\_path** path / required | | The path to the root of the Terraform directory with the vars.tf/main.tf/etc to use. |
| **purge\_workspace** boolean | **Choices:*** **no** β
* yes
| Only works with state = absent If true, the workspace will be deleted after the "terraform destroy" action. The 'default' workspace will not be deleted. |
| **state** string | **Choices:*** planned
* **present** β
* absent
| Goal state of given stage/project |
| **state\_file** path | | The path to an existing Terraform state file to use when building plan. If this is not specified, the default `terraform.tfstate` will be used. This option is ignored when plan is specified. |
| **targets** list / elements=string | | A list of specific resources to target in this plan/application. The resources selected here will also auto-include any dependencies. |
| **variables** dictionary | | A group of key-values to override template variables or those in variables files. |
| **variables\_files** list / elements=path | | The path to a variables file for Terraform to fill into the TF configurations. This can accept a list of paths to multiple variables files. Up until Ansible 2.9, this option was usable as *variables\_file*.
aliases: variables\_file |
| **workspace** string | **Default:**"default" | The terraform workspace to work with. |
Notes
-----
Note
* To just run a `terraform plan`, use check mode.
Examples
--------
```
- name: Basic deploy of a service
community.general.terraform:
project_path: '{{ project_dir }}'
state: present
- name: Define the backend configuration at init
community.general.terraform:
project_path: 'project/'
state: "{{ state }}"
force_init: true
backend_config:
region: "eu-west-1"
bucket: "some-bucket"
key: "random.tfstate"
- name: Define the backend configuration with one or more files at init
community.general.terraform:
project_path: 'project/'
state: "{{ state }}"
force_init: true
backend_config_files:
- /path/to/backend_config_file_1
- /path/to/backend_config_file_2
- name: Disable plugin discovery and auto-download by setting plugin_paths
community.general.terraform:
project_path: 'project/'
state: "{{ state }}"
force_init: true
plugin_paths:
- /path/to/plugins_dir_1
- /path/to/plugins_dir_2
### Example directory structure for plugin_paths example
# $ tree /path/to/plugins_dir_1
# /path/to/plugins_dir_1/
# βββ registry.terraform.io
# βββ hashicorp
# βββ vsphere
# βββ 1.24.0
# β βββ linux_amd64
# β βββ terraform-provider-vsphere_v1.24.0_x4
# βββ 1.26.0
# βββ linux_amd64
# βββ terraform-provider-vsphere_v1.26.0_x4
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **command** string | always | Full `terraform` command built by this module, in case you want to re-run the command outside the module or debug a problem. **Sample:** terraform apply ... |
| **outputs** complex | on success | A dictionary of all the TF outputs by their assigned name. Use `.outputs.MyOutputName.value` to access the value. **Sample:** {"bukkit\_arn": {"sensitive": false, "type": "string", "value": "arn:aws:s3:::tf-test-bukkit"} |
| | **sensitive** boolean | always | Whether Terraform has marked this value as sensitive |
| | **type** string | always | The type of the value (string, int, etc) |
| | **value** string | always | The value of the output as interpolated by Terraform |
| **stdout** string | always | Full `terraform` command stdout, in case you want to display it or examine the event log |
### Authors
* Ryan Scott Brown (@ryansb)
| programming_docs |
ansible community.general.znode β Create, delete, retrieve, and update znodes using ZooKeeper community.general.znode β Create, delete, retrieve, and update znodes using ZooKeeper
=====================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.znode`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Create, delete, retrieve, and update znodes using ZooKeeper.
Requirements
------------
The below requirements are needed on the host that executes this module.
* kazoo >= 2.1
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **hosts** string / required | | A list of ZooKeeper servers (format '[server]:[port]'). |
| **name** string / required | | The path of the znode. |
| **op** string | **Choices:*** get
* wait
* list
| An operation to perform. Mutually exclusive with state. |
| **recursive** boolean | **Choices:*** **no** β
* yes
| Recursively delete node and all its children. |
| **state** string | **Choices:*** present
* absent
| The state to enforce. Mutually exclusive with op. |
| **timeout** integer | **Default:**300 | The amount of time to wait for a node to appear. |
| **value** string | | The value assigned to the znode. |
Examples
--------
```
- name: Creating or updating a znode with a given value
community.general.znode:
hosts: 'localhost:2181'
name: /mypath
value: myvalue
state: present
- name: Getting the value and stat structure for a znode
community.general.znode:
hosts: 'localhost:2181'
name: /mypath
op: get
- name: Listing a particular znode's children
community.general.znode:
hosts: 'localhost:2181'
name: /zookeeper
op: list
- name: Waiting 20 seconds for a znode to appear at path /mypath
community.general.znode:
hosts: 'localhost:2181'
name: /mypath
op: wait
timeout: 20
- name: Deleting a znode at path /mypath
community.general.znode:
hosts: 'localhost:2181'
name: /mypath
state: absent
- name: Creating or updating a znode with a given value on a remote Zookeeper
community.general.znode:
hosts: 'my-zookeeper-node:2181'
name: /mypath
value: myvalue
state: present
delegate_to: 127.0.0.1
```
### Authors
* Trey Perry (@treyperry)
ansible community.general.ali_instance_info β Gather information on instances of Alibaba Cloud ECS. community.general.ali\_instance\_info β Gather information on instances of Alibaba Cloud ECS.
=============================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ali_instance_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module fetches data from the Open API in Alicloud. The module must be called from within the ECS instance itself.
* This module was called `ali_instance_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* footmark >= 1.13.0
* python >= 3.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **alicloud\_access\_key** string | | Alibaba Cloud access key. If not set then the value of environment variable `ALICLOUD_ACCESS_KEY`, `ALICLOUD_ACCESS_KEY_ID` will be used instead.
aliases: access\_key\_id, access\_key |
| **alicloud\_assume\_role** dictionary | | If provided with a role ARN, Ansible will attempt to assume this role using the supplied credentials. The nested assume\_role block supports *alicloud\_assume\_role\_arn*, *alicloud\_assume\_role\_session\_name*, *alicloud\_assume\_role\_session\_expiration* and *alicloud\_assume\_role\_policy*
aliases: assume\_role |
| **alicloud\_assume\_role\_arn** string | | The Alibaba Cloud role\_arn. The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports environment variable ALICLOUD\_ASSUME\_ROLE\_ARN. ansible will execute with provided credentials.
aliases: assume\_role\_arn |
| **alicloud\_assume\_role\_session\_expiration** integer | | The Alibaba Cloud session\_expiration. The time after which the established session for assuming role expires. Valid value range 900-3600 seconds. Default to 3600 (in this case Alicloud use own default value). It supports environment variable ALICLOUD\_ASSUME\_ROLE\_SESSION\_EXPIRATION
aliases: assume\_role\_session\_expiration |
| **alicloud\_assume\_role\_session\_name** string | | The Alibaba Cloud session\_name. The session name to use when assuming the role. If omitted, 'ansible' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD\_ASSUME\_ROLE\_SESSION\_NAME
aliases: assume\_role\_session\_name |
| **alicloud\_region** string / required | | The Alibaba Cloud region to use. If not specified then the value of environment variable `ALICLOUD_REGION`, `ALICLOUD_REGION_ID` will be used instead.
aliases: region, region\_id |
| **alicloud\_secret\_key** string | | Alibaba Cloud secret key. If not set then the value of environment variable `ALICLOUD_SECRET_KEY`, `ALICLOUD_SECRET_ACCESS_KEY` will be used instead.
aliases: secret\_access\_key, secret\_key |
| **alicloud\_security\_token** string | | The Alibaba Cloud security token. If not specified then the value of environment variable `ALICLOUD_SECURITY_TOKEN` will be used instead.
aliases: security\_token |
| **availability\_zone** string | | Aliyun availability zone ID in which to launch the instance. Deprecated parameter, it will be removed in community.general 5.0.0. Please use filter item *zone\_id* instead.
aliases: alicloud\_zone |
| **ecs\_role\_name** string | | The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console. If you're running Ansible from an ECS instance with RAM Instance using RAM Role, Ansible will just access the metadata [http://100.100.100.200/latest/meta-data/ram/security-credentials/<ecs\_role\_name>](#) to obtain the STS credential. This is a preferred approach over any other when running in ECS as you can avoid hard coding credentials. Instead these are leased on-the-fly by Ansible which reduces the chance of leakage.
aliases: role\_name |
| **filters** dictionary added in 0.2.0 of community.general | | A dict of filters to apply. Each dict item consists of a filter key and a filter value. The filter keys can be all of request parameters. See <https://www.alibabacloud.com/help/doc-detail/25506.htm> for parameter details. Filter keys can be same as request parameter name or be lower case and use underscore ("\_") or dash ("-") to connect different words in one parameter. 'InstanceIds' should be a list and it will be appended to *instance\_ids* automatically. 'Tag.n.Key' and 'Tag.n.Value' should be a dict and using *tags* instead. |
| **instance\_ids** list / elements=string | | A list of ECS instance ids.
aliases: ids |
| **instance\_names** list / elements=string | | A list of ECS instance names. Deprecated parameter, it will be removed in community.general 5.0.0. Please use filter item *instance\_name* instead.
aliases: names |
| **name\_prefix** string added in 0.2.0 of community.general | | Use a instance name prefix to filter ecs instances. |
| **profile** string | | This is the Alicloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD\_PROFILE environment variable. |
| **shared\_credentials\_file** string | | This is the path to the shared credentials file. It can also be sourced from the ALICLOUD\_SHARED\_CREDENTIALS\_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used. |
| **tags** dictionary | | A hash/dictionaries of instance tags. `{"key":"value"}`
aliases: instance\_tags |
Notes
-----
Note
* If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence `ALICLOUD_ACCESS_KEY` or `ALICLOUD_ACCESS_KEY_ID`, `ALICLOUD_SECRET_KEY` or `ALICLOUD_SECRET_ACCESS_KEY`, `ALICLOUD_REGION` or `ALICLOUD_REGION_ID`, `ALICLOUD_SECURITY_TOKEN`, `ALICLOUD_ECS_ROLE_NAME`, `ALICLOUD_SHARED_CREDENTIALS_FILE`, `ALICLOUD_PROFILE`, `ALICLOUD_ASSUME_ROLE_ARN`, `ALICLOUD_ASSUME_ROLE_SESSION_NAME`, `ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION`,
* `ALICLOUD_REGION` or `ALICLOUD_REGION_ID` can be typically be used to specify the ALICLOUD region, when required, but this can also be configured in the footmark config file
Examples
--------
```
# Fetch instances details according to setting different filters
- name: Find all instances in the specified region
community.general.ali_instance_info:
register: all_instances
- name: Find all instances based on the specified ids
community.general.ali_instance_info:
instance_ids:
- "i-35b333d9"
- "i-ddav43kd"
register: instances_by_ids
- name: Find all instances based on the specified name_prefix
community.general.ali_instance_info:
name_prefix: "ecs_instance_"
register: instances_by_name_prefix
- name: Find instances based on tags
community.general.ali_instance_info:
tags:
Test: "add"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ids** list / elements=string | always | List of ECS instance IDs **Sample:** ['i-12345er', 'i-3245fs'] |
| **instances** complex | always | List of ECS instances |
| | **availability\_zone** string | always | The availability zone of the instance is in. **Sample:** cn-beijing-a |
| | **block\_device\_mappings** complex | always | Any block device mapping entries for the instance. |
| | | **attach\_time** string | always | The time stamp when the attachment initiated. **Sample:** 2018-06-25T04:08:26Z |
| | | **delete\_on\_termination** boolean | always | Indicates whether the volume is deleted on instance termination. **Sample:** True |
| | | **device\_name** string | always | The device name exposed to the instance (for example, /dev/xvda). **Sample:** /dev/xvda |
| | | **status** string | always | The attachment state. **Sample:** in\_use |
| | | **volume\_id** string | always | The ID of the cloud disk. **Sample:** d-2zei53pjsi117y6gf9t6 |
| | **cpu** integer | always | The CPU core count of the instance. **Sample:** 4 |
| | **creation\_time** string | always | The time the instance was created. **Sample:** 2018-06-25T04:08Z |
| | **description** string | always | The instance description. **Sample:** my ansible instance |
| | **eip** complex | always | The attribution of EIP associated with the instance. |
| | | **allocation\_id** string | always | The ID of the EIP. **Sample:** eip-12345 |
| | | **internet\_charge\_type** string | always | The internet charge type of the EIP. **Sample:** paybybandwidth |
| | | **ip\_address** string | always | EIP address. **Sample:** 42.10.2.2 |
| | **expired\_time** string | always | The time the instance will expire. **Sample:** 2099-12-31T15:59Z |
| | **gpu** complex | always | The attribution of instance GPU. |
| | | **amount** integer | always | The count of the GPU. |
| | | **spec** string | always | The specification of the GPU. |
| | **host\_name** string | always | The host name of the instance. **Sample:** iZ2zewaoZ |
| | **id** string | always | Alias of instance\_id. **Sample:** i-abc12345 |
| | **image\_id** string | always | The ID of the image used to launch the instance. **Sample:** m-0011223344 |
| | **inner\_ip\_address** string | always | The inner IPv4 address of the classic instance. **Sample:** 10.0.0.2 |
| | **instance\_charge\_type** string | always | The instance charge type. **Sample:** PostPaid |
| | **instance\_id** string | always | ECS instance resource ID. **Sample:** i-abc12345 |
| | **instance\_name** string | always | The name of the instance. **Sample:** my-ecs |
| | **instance\_type** string | always | The instance type of the running instance. **Sample:** ecs.sn1ne.xlarge |
| | **instance\_type\_family** string | always | The instance type family of the instance belongs. **Sample:** ecs.sn1ne |
| | **internet\_charge\_type** string | always | The billing method of the network bandwidth. **Sample:** PayByBandwidth |
| | **internet\_max\_bandwidth\_in** integer | always | Maximum incoming bandwidth from the internet network. **Sample:** 200 |
| | **internet\_max\_bandwidth\_out** integer | always | Maximum incoming bandwidth from the internet network. **Sample:** 20 |
| | **io\_optimized** boolean | always | Indicates whether the instance is optimized for EBS I/O. |
| | **memory** integer | always | Memory size of the instance. **Sample:** 8192 |
| | **network\_interfaces** complex | always | One or more network interfaces for the instance. |
| | | **mac\_address** string | always | The MAC address. **Sample:** 00:11:22:33:44:55 |
| | | **network\_interface\_id** string | always | The ID of the network interface. **Sample:** eni-01234567 |
| | | **primary\_ip\_address** string | always | The primary IPv4 address of the network interface within the vswitch. **Sample:** 10.0.0.1 |
| | **osname** string | always | The operation system name of the instance owned. **Sample:** CentOS |
| | **ostype** string | always | The operation system type of the instance owned. **Sample:** linux |
| | **private\_ip\_address** string | always | The IPv4 address of the network interface within the subnet. **Sample:** 10.0.0.1 |
| | **public\_ip\_address** string | always | The public IPv4 address assigned to the instance or eip address **Sample:** 43.0.0.1 |
| | **resource\_group\_id** string | always | The id of the resource group to which the instance belongs. **Sample:** my-ecs-group |
| | **security\_groups** list / elements=dictionary | always | One or more security groups for the instance. |
| | | **group\_id** string | always | The ID of the security group. **Sample:** sg-0123456 |
| | | **group\_name** string | always | The name of the security group. **Sample:** my-security-group |
| | **status** string | always | The current status of the instance. **Sample:** running |
| | **tags** dictionary | always | Any tags assigned to the instance. |
| | **vpc\_id** string | always | The ID of the VPC the instance is in. **Sample:** vpc-0011223344 |
| | **vswitch\_id** string | always | The ID of the vswitch in which the instance is running. **Sample:** vsw-dew00abcdef |
### Authors
* He Guimin (@xiaozhu36)
ansible community.general.consul_kv β Manipulate entries in the key/value store of a consul cluster community.general.consul\_kv β Manipulate entries in the key/value store of a consul cluster
============================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.consul_kv`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Allows the retrieval, addition, modification and deletion of key/value entries in a consul cluster via the agent. The entire contents of the record, including the indices, flags and session are returned as `value`.
* If the `key` represents a prefix then note that when a value is removed, the existing value if any is returned as part of the results.
* See <http://www.consul.io/docs/agent/http.html#kv> for more details.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python-consul
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cas** string | | Used when acquiring a lock with a session. If the `cas` is `0`, then Consul will only put the key if it does not already exist. If the `cas` value is non-zero, then the key is only set if the index matches the ModifyIndex of that key. |
| **flags** string | | Opaque positive integer value that can be passed when setting a value. |
| **host** string | **Default:**"localhost" | Host of the consul agent. |
| **key** string / required | | The key at which the value should be stored. |
| **port** integer | **Default:**8500 | The port on which the consul agent is running. |
| **recurse** boolean | **Choices:*** no
* yes
| If the key represents a prefix, each entry with the prefix can be retrieved by setting this to `yes`. |
| **retrieve** boolean | **Choices:*** no
* **yes** β
| If the *state* is `present` and *value* is set, perform a read after setting the value and return this value. |
| **scheme** string | **Default:**"http" | The protocol scheme on which the consul agent is running. |
| **session** string | | The session that should be used to acquire or release a lock associated with a key/value pair. |
| **state** string | **Choices:*** absent
* acquire
* **present** β
* release
| The action to take with the supplied key and value. If the state is 'present' and `value` is set, the key contents will be set to the value supplied and `changed` will be set to `true` only if the value was different to the current contents. If the state is 'present' and `value` is not set, the existing value associated to the key will be returned. The state 'absent' will remove the key/value pair, again 'changed' will be set to true only if the key actually existed prior to the removal. An attempt can be made to obtain or free the lock associated with a key/value pair with the states 'acquire' or 'release' respectively. a valid session must be supplied to make the attempt changed will be true if the attempt is successful, false otherwise. |
| **token** string | | The token key identifying an ACL rule set that controls access to the key value pair |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Whether to verify the tls certificate of the consul agent. |
| **value** string | | The value should be associated with the given key, required if `state` is `present`. |
Examples
--------
```
# If the key does not exist, the value associated to the "data" property in `retrieved_key` will be `None`
# If the key value is empty string, `retrieved_key["data"]["Value"]` will be `None`
- name: Retrieve a value from the key/value store
community.general.consul_kv:
key: somekey
register: retrieved_key
- name: Add or update the value associated with a key in the key/value store
community.general.consul_kv:
key: somekey
value: somevalue
- name: Remove a key from the store
community.general.consul_kv:
key: somekey
state: absent
- name: Add a node to an arbitrary group via consul inventory (see consul.ini)
community.general.consul_kv:
key: ansible/groups/dc1/somenode
value: top_secret
- name: Register a key/value pair with an associated session
community.general.consul_kv:
key: stg/node/server_birthday
value: 20160509
session: "{{ sessionid }}"
state: acquire
```
### Authors
* Steve Gargan (@sgargan)
* Colin Nolan (@colin-nolan)
| programming_docs |
ansible community.general.pfexec β profile based execution community.general.pfexec β profile based execution
==================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.pfexec`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
Synopsis
--------
* This become plugins allows your remote/login user to execute commands as another user via the pfexec utility.
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **become\_exe** string | **Default:**"pfexec" | ini entries: [privilege\_escalation]become\_exe = pfexec [pfexec\_become\_plugin]executable = pfexec env:ANSIBLE\_BECOME\_EXE env:ANSIBLE\_PFEXEC\_EXE var: ansible\_become\_exe var: ansible\_pfexec\_exe | Sudo executable |
| **become\_flags** string | **Default:**"-H -S -n" | ini entries: [privilege\_escalation]become\_flags = -H -S -n [pfexec\_become\_plugin]flags = -H -S -n env:ANSIBLE\_BECOME\_FLAGS env:ANSIBLE\_PFEXEC\_FLAGS var: ansible\_become\_flags var: ansible\_pfexec\_flags | Options to pass to pfexec |
| **become\_pass** string | | ini entries: [pfexec\_become\_plugin]password = None env:ANSIBLE\_BECOME\_PASS env:ANSIBLE\_PFEXEC\_PASS var: ansible\_become\_password var: ansible\_become\_pass var: ansible\_pfexec\_pass | pfexec password |
| **become\_user** string | **Default:**"root" | ini entries: [privilege\_escalation]become\_user = root [pfexec\_become\_plugin]user = root env:ANSIBLE\_BECOME\_USER env:ANSIBLE\_PFEXEC\_USER var: ansible\_become\_user var: ansible\_pfexec\_user | User you 'become' to execute the task This plugin ignores this setting as pfexec uses it's own `exec_attr` to figure this out, but it is supplied here for Ansible to make decisions needed for the task execution, like file permissions. |
| **wrap\_exe** boolean | **Choices:*** **no** β
* yes
| ini entries: [pfexec\_become\_plugin]wrap\_execution = no env:ANSIBLE\_PFEXEC\_WRAP\_EXECUTION var: ansible\_pfexec\_wrap\_execution | Toggle to wrap the command pfexec calls in 'shell -c' or not |
Notes
-----
Note
* This plugin ignores *become\_user* as pfexec uses itβs own `exec_attr` to figure this out.
### Authors
* Ansible Core Team
ansible community.general.ldap_passwd β Set passwords in LDAP. community.general.ldap\_passwd β Set passwords in LDAP.
=======================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ldap_passwd`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Set a password for an LDAP entry. This module only asserts that a given password is valid for a given entry. To assert the existence of an entry, see [community.general.ldap\_entry](ldap_entry_module#ansible-collections-community-general-ldap-entry-module).
Requirements
------------
The below requirements are needed on the host that executes this module.
* python-ldap
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bind\_dn** string | | A DN to bind with. If this is omitted, we'll try a SASL bind with the EXTERNAL mechanism as default. If this is blank, we'll use an anonymous bind. |
| **bind\_pw** string | | The password to use with *bind\_dn*. |
| **dn** string / required | | The DN of the entry to add or remove. |
| **passwd** string | | The (plaintext) password to be set for *dn*. |
| **referrals\_chasing** string added in 2.0.0 of community.general | **Choices:*** disabled
* **anonymous** β
| Set the referrals chasing behavior.
`anonymous` follow referrals anonymously. This is the default behavior.
`disabled` disable referrals chasing. This sets `OPT_REFERRALS` to off. |
| **sasl\_class** string added in 2.0.0 of community.general | **Choices:*** **external** β
* gssapi
| The class to use for SASL authentication. possible choices are `external`, `gssapi`. |
| **server\_uri** string | **Default:**"ldapi:///" | A URI to the LDAP server. The default value lets the underlying LDAP client library look for a UNIX domain socket in its default location. |
| **start\_tls** boolean | **Choices:*** **no** β
* yes
| If true, we'll use the START\_TLS LDAP extension. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, SSL certificates will not be validated. This should only be used on sites using self-signed certificates. |
Notes
-----
Note
* The default authentication settings will attempt to use a SASL EXTERNAL bind over a UNIX domain socket. This works well with the default Ubuntu install for example, which includes a cn=peercred,cn=external,cn=auth ACL rule allowing root to modify the server configuration. If you need to use a simple bind to access your server, pass the credentials in *bind\_dn* and *bind\_pw*.
Examples
--------
```
- name: Set a password for the admin user
community.general.ldap_passwd:
dn: cn=admin,dc=example,dc=com
passwd: "{{ vault_secret }}"
- name: Setting passwords in bulk
community.general.ldap_passwd:
dn: "{{ item.key }}"
passwd: "{{ item.value }}"
with_dict:
alice: alice123123
bob: "|30b!"
admin: "{{ vault_secret }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **modlist** list / elements=string | success | list of modified parameters **Sample:** [[2, "olcRootDN", ["cn=root,dc=example,dc=com"]]] |
### Authors
* Keller Fuchs (@KellerFuchs)
ansible community.general.opentelemetry β Create distributed traces with OpenTelemetry community.general.opentelemetry β Create distributed traces with OpenTelemetry
==============================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.opentelemetry`.
New in version 3.7.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* This callback creates distributed traces for each Ansible task with OpenTelemetry.
* You can configure the OpenTelemetry exporter and SDK with environment variables.
* See <https://opentelemetry-python.readthedocs.io/en/latest/exporter/otlp/otlp.html>.
* See <https://opentelemetry-python.readthedocs.io/en/latest/sdk/environment_variables.html#opentelemetry-sdk-environment-variables>.
Requirements
------------
The below requirements are needed on the local controller node that executes this callback.
* opentelemetry-api (Python library)
* opentelemetry-exporter-otlp (Python library)
* opentelemetry-sdk (Python library)
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **enable\_from\_environment** string added in 3.8.0 of community.general | | env:ANSIBLE\_OPENTELEMETRY\_ENABLE\_FROM\_ENVIRONMENT | Whether to enable this callback only if the given environment variable exists and it is set to `true`. This is handy when you use Configuration as Code and want to send distributed traces if running in the CI rather when running Ansible locally. For such, it evaluates the given *enable\_from\_environment* value as environment variable and if set to true this plugin will be enabled. |
| **hide\_task\_arguments** boolean | **Choices:*** **no** β
* yes
| env:ANSIBLE\_OPENTELEMETRY\_HIDE\_TASK\_ARGUMENTS | Hide the arguments for a task. |
| **otel\_service\_name** string | **Default:**"ansible" | env:OTEL\_SERVICE\_NAME | The service name resource attribute. |
| **traceparent** string | **Default:**"None" | env:TRACEPARENT | The [W3C Trace Context header traceparent](https://www.w3.org/TR/trace-context-1/#traceparent-header). |
Examples
--------
```
examples: |
Enable the plugin in ansible.cfg:
[defaults]
callbacks_enabled = community.general.opentelemetry
Set the environment variable:
export OTEL_EXPORTER_OTLP_ENDPOINT=<your endpoint (OTLP/HTTP)>
export OTEL_EXPORTER_OTLP_HEADERS="authorization=Bearer your_otel_token"
export OTEL_SERVICE_NAME=your_service_name
```
### Authors
* Victor Martinez (@v1v) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#da8cb3b9aeb5a897bba8aeb3b4bfa088afb8b3b5fcf9e9ede1fcf9efe8e1fcf9eee2e1bdb7bbb3b6fcf9eeece1b9b5b7)>
ansible community.general.github_deploy_key β Manages deploy keys for GitHub repositories. community.general.github\_deploy\_key β Manages deploy keys for GitHub repositories.
====================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.github_deploy_key`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Adds or removes deploy keys for GitHub repositories. Supports authentication using username and password, username and password and 2-factor authentication code (OTP), OAuth2 token, or personal access token. Admin rights on the repository are required.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **force** boolean | **Choices:*** **no** β
* yes
| If `true`, forcefully adds the deploy key by deleting any existing deploy key with the same public key or title. |
| **github\_url** string added in 0.2.0 of community.general | **Default:**"https://api.github.com" | The base URL of the GitHub API |
| **key** string / required | | The SSH public key to add to the repository as a deploy key. |
| **name** string / required | | The name for the deploy key.
aliases: title, label |
| **otp** integer | | The 6 digit One Time Password for 2-Factor Authentication. Required together with *username* and *password*. Alias `2fa_token` has been deprecated and will be removed in community.general 5.0.0.
aliases: 2fa\_token |
| **owner** string / required | | The name of the individual account or organization that owns the GitHub repository.
aliases: account, organization |
| **password** string | | The password to authenticate with. Alternatively, a personal access token can be used instead of *username* and *password* combination. |
| **read\_only** boolean | **Choices:*** no
* **yes** β
| If `true`, the deploy key will only be able to read repository contents. Otherwise, the deploy key will be able to read and write. |
| **repo** string / required | | The name of the GitHub repository.
aliases: repository |
| **state** string | **Choices:*** **present** β
* absent
| The state of the deploy key. |
| **token** string | | The OAuth2 token or personal access token to authenticate with. Mutually exclusive with *password*. |
| **username** string | | The username to authenticate with. Should not be set when using personal access token |
Notes
-----
Note
* Refer to GitHubβs API documentation here: <https://developer.github.com/v3/repos/keys/>.
Examples
--------
```
- name: Add a new read-only deploy key to a GitHub repository using basic authentication
community.general.github_deploy_key:
owner: "johndoe"
repo: "example"
name: "new-deploy-key"
key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAwXxn7kIMNWzcDfou..."
read_only: yes
username: "johndoe"
password: "supersecretpassword"
- name: Remove an existing deploy key from a GitHub repository
community.general.github_deploy_key:
owner: "johndoe"
repository: "example"
name: "new-deploy-key"
key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAwXxn7kIMNWzcDfou..."
force: yes
username: "johndoe"
password: "supersecretpassword"
state: absent
- name: Add a new deploy key to a GitHub repository, replace an existing key, use an OAuth2 token to authenticate
community.general.github_deploy_key:
owner: "johndoe"
repository: "example"
name: "new-deploy-key"
key: "{{ lookup('file', '~/.ssh/github.pub') }}"
force: yes
token: "ABAQDAwXxn7kIMNWzcDfo..."
- name: Re-add a deploy key to a GitHub repository but with a different name
community.general.github_deploy_key:
owner: "johndoe"
repository: "example"
name: "replace-deploy-key"
key: "{{ lookup('file', '~/.ssh/github.pub') }}"
username: "johndoe"
password: "supersecretpassword"
- name: Add a new deploy key to a GitHub repository using 2FA
community.general.github_deploy_key:
owner: "johndoe"
repo: "example"
name: "new-deploy-key-2"
key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAwXxn7kIMNWzcDfou..."
username: "johndoe"
password: "supersecretpassword"
otp: 123456
- name: Add a read-only deploy key to a repository hosted on GitHub Enterprise
community.general.github_deploy_key:
github_url: "https://api.example.com"
owner: "janedoe"
repo: "example"
name: "new-deploy-key"
key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAwXxn7kIMNWzcDfou..."
read_only: yes
username: "janedoe"
password: "supersecretpassword"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **error** string | failed | the error message returned by the GitHub API **Sample:** key is already in use |
| **http\_status\_code** integer | failed | the HTTP status code returned by the GitHub API **Sample:** 400 |
| **id** integer | changed | the key identifier assigned by GitHub for the deploy key **Sample:** 24381901 |
| **msg** string | always | the status message describing what occurred **Sample:** Deploy key added successfully |
### Authors
* Ali (@bincyber)
ansible community.general.xfs_quota β Manage quotas on XFS filesystems community.general.xfs\_quota β Manage quotas on XFS filesystems
===============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.xfs_quota`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Configure quotas on XFS filesystems.
* Before using this module /etc/projects and /etc/projid need to be configured.
Requirements
------------
The below requirements are needed on the host that executes this module.
* xfsprogs
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bhard** string | | Hard blocks quota limit. This argument supports human readable sizes. |
| **bsoft** string | | Soft blocks quota limit. This argument supports human readable sizes. |
| **ihard** integer | | Hard inodes quota limit. |
| **isoft** integer | | Soft inodes quota limit. |
| **mountpoint** string / required | | The mount point on which to apply the quotas. |
| **name** string | | The name of the user, group or project to apply the quota to, if other than default. |
| **rtbhard** string | | Hard realtime blocks quota limit. This argument supports human readable sizes. |
| **rtbsoft** string | | Soft realtime blocks quota limit. This argument supports human readable sizes. |
| **state** string | **Choices:*** **present** β
* absent
| Whether to apply the limits or remove them. When removing limit, they are set to 0, and not quite removed. |
| **type** string / required | **Choices:*** user
* group
* project
| The XFS quota type. |
Examples
--------
```
- name: Set default project soft and hard limit on /opt of 1g
community.general.xfs_quota:
type: project
mountpoint: /opt
bsoft: 1g
bhard: 1g
state: present
- name: Remove the default limits on /opt
community.general.xfs_quota:
type: project
mountpoint: /opt
state: absent
- name: Set default soft user inode limits on /home of 1024 inodes and hard of 2048
community.general.xfs_quota:
type: user
mountpoint: /home
isoft: 1024
ihard: 2048
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **bhard** integer | always | the current bhard setting in bytes **Sample:** 1024 |
| **bsoft** integer | always | the current bsoft setting in bytes **Sample:** 1024 |
| **ihard** integer | always | the current ihard setting in bytes **Sample:** 100 |
| **isoft** integer | always | the current isoft setting in bytes **Sample:** 100 |
| **rtbhard** integer | always | the current rtbhard setting in bytes **Sample:** 1024 |
| **rtbsoft** integer | always | the current rtbsoft setting in bytes **Sample:** 1024 |
### Authors
* William Leemans (@bushvin)
ansible community.general.utm_ca_host_key_cert_info β Get info for a ca host_key_cert entry in Sophos UTM community.general.utm\_ca\_host\_key\_cert\_info β Get info for a ca host\_key\_cert entry in Sophos UTM
========================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.utm_ca_host_key_cert_info`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Get info for a ca host\_key\_cert entry in SOPHOS UTM.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **headers** dictionary | | A dictionary of additional headers to be sent to POST and PUT requests. Is needed for some modules |
| **name** string / required | | The name of the object. Will be used to identify the entry |
| **state** string | **Choices:*** absent
* **present** β
| The desired state of the object.
`present` will create or update an object
`absent` will delete an object if it was present |
| **utm\_host** string / required | | The REST Endpoint of the Sophos UTM. |
| **utm\_port** integer | **Default:**4444 | The port of the REST interface. |
| **utm\_protocol** string | **Choices:*** http
* **https** β
| The protocol of the REST Endpoint. |
| **utm\_token** string / required | | The token used to identify at the REST-API. See <https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en>, Chapter 2.4.2. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Whether the REST interface's ssl certificate should be verified or not. |
Examples
--------
```
- name: Get info for a ca host_key_cert entry
community.general.utm_ca_host_key_cert_info:
utm_host: sophos.host.name
utm_token: abcdefghijklmno1234
name: TestHostKeyCertEntry
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **result** complex | success | The utm object that was created |
| | **\_locked** boolean | success | Whether or not the object is currently locked |
| | **\_ref** string | success | The reference name of the object |
| | **\_type** string | success | The type of the object |
| | **ca** string | success | A reference to an existing utm\_ca\_signing\_ca or utm\_ca\_verification\_ca object. |
| | **certificate** string | success | The certificate in PEM format |
| | **comment** string | success | Comment string (may be empty string) |
| | **encrypted** boolean | success | If encryption is enabled |
| | **key** string | success | Private key in PEM format (may be empty string) |
| | **meta** string | success | A reference to an existing utm\_ca\_meta\_x509 object. |
| | **name** string | success | The name of the object |
### Authors
* Stephan Schwarz (@stearz)
| programming_docs |
ansible community.general.dzdo β Centrifyβs Direct Authorize community.general.dzdo β Centrifyβs Direct Authorize
====================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.dzdo`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
Synopsis
--------
* This become plugins allows your remote/login user to execute commands as another user via the dzdo utility.
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **become\_exe** string | **Default:**"dzdo" | ini entries: [privilege\_escalation]become\_exe = dzdo [dzdo\_become\_plugin]executable = dzdo env:ANSIBLE\_BECOME\_EXE env:ANSIBLE\_DZDO\_EXE var: ansible\_become\_exe var: ansible\_dzdo\_exe | Dzdo executable |
| **become\_flags** string | **Default:**"-H -S -n" | ini entries: [privilege\_escalation]become\_flags = -H -S -n [dzdo\_become\_plugin]flags = -H -S -n env:ANSIBLE\_BECOME\_FLAGS env:ANSIBLE\_DZDO\_FLAGS var: ansible\_become\_flags var: ansible\_dzdo\_flags | Options to pass to dzdo |
| **become\_pass** string | | ini entries: [dzdo\_become\_plugin]password = None env:ANSIBLE\_BECOME\_PASS env:ANSIBLE\_DZDO\_PASS var: ansible\_become\_password var: ansible\_become\_pass var: ansible\_dzdo\_pass | Options to pass to dzdo |
| **become\_user** string | | ini entries: [privilege\_escalation]become\_user = None [dzdo\_become\_plugin]user = None env:ANSIBLE\_BECOME\_USER env:ANSIBLE\_DZDO\_USER var: ansible\_become\_user var: ansible\_dzdo\_user | User you 'become' to execute the task |
### Authors
* Ansible Core Team
ansible community.general.etcd3 β Get key values from etcd3 server community.general.etcd3 β Get key values from etcd3 server
==========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.etcd3`.
New in version 0.2.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieves key values and/or key prefixes from etcd3 server using its native gRPC API.
* Try to reuse [community.general.etcd3](etcd3_module#ansible-collections-community-general-etcd3-module) options for connection parameters, but add support for some `ETCDCTL_*` environment variables.
* See <https://github.com/etcd-io/etcd/tree/master/Documentation/op-guide> for etcd overview.
Requirements
------------
The below requirements are needed on the local controller node that executes this lookup.
* etcd3 >= 0.10
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_terms** list / elements=string / required | | | The list of keys (or key prefixes) to look up on the etcd3 server. |
| **ca\_cert** string | | env:ETCDCTL\_CACERT | etcd3 CA authority. |
| **cert\_cert** string | | env:ETCDCTL\_CERT | etcd3 client certificate. |
| **cert\_key** string | | env:ETCDCTL\_KEY | etcd3 client private key. |
| **endpoints** string | **Default:**"127.0.0.1:2379" | env:ETCDCTL\_ENDPOINTS | Counterpart of `ETCDCTL_ENDPOINTS` environment variable. Specify the etcd3 connection with and URL form eg. `https://hostname:2379` or `<host>:<port>` form. The `host` part is overwritten by *host* option, if defined. The `port` part is overwritten by *port* option, if defined. |
| **host** string | | | etcd3 listening client host. Takes precedence over *endpoints*. |
| **password** string | | env:ETCDCTL\_PASSWORD | Authenticated user password. |
| **port** integer | | | etcd3 listening client port. Takes precedence over *endpoints*. |
| **prefix** boolean | **Choices:*** **no** β
* yes
| | Look for key or prefix key. |
| **timeout** integer | **Default:**60 | env:ETCDCTL\_DIAL\_TIMEOUT | Client timeout. |
| **user** string | | env:ETCDCTL\_USER | Authenticated user name. |
Notes
-----
Note
* *host* and *port* options take precedence over (endpoints) option.
* The recommended way to connect to etcd3 server is using `ETCDCTL_ENDPOINT` environment variable and keep *endpoints*, *host*, and *port* unused.
See Also
--------
See also
[community.general.etcd3](etcd3_module#ansible-collections-community-general-etcd3-module)
The official documentation on the **community.general.etcd3** module.
[etcd β get info from an etcd server](https://docs.ansible.com/ansible/2.9/plugins/lookup/etcd.html#etcd-lookup "(in Ansible v2.9)")
The etcd v2 lookup.
Examples
--------
```
- name: "a value from a locally running etcd"
ansible.builtin.debug:
msg: "{{ lookup('community.general.etcd3', 'foo/bar') }}"
- name: "values from multiple folders on a locally running etcd"
ansible.builtin.debug:
msg: "{{ lookup('community.general.etcd3', 'foo', 'bar', 'baz') }}"
- name: "look for a key prefix"
ansible.builtin.debug:
msg: "{{ lookup('community.general.etcd3', '/foo/bar', prefix=True) }}"
- name: "connect to etcd3 with a client certificate"
ansible.builtin.debug:
msg: "{{ lookup('community.general.etcd3', 'foo/bar', cert_cert='/etc/ssl/etcd/client.pem', cert_key='/etc/ssl/etcd/client.key') }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:
| Key | Returned | Description |
| --- | --- | --- |
| **\_raw** list / elements=dictionary | success | List of keys and associated values. |
| | **key** string | success | The element's key. |
| | **value** string | success | The element's value. |
### Authors
* Eric Belhomme (@eric-belhomme) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#4f2a2d2a23272022222a696c7c7874696c7a7d74696c7b7774293d696c7b79743c2c2c696c7b79742c2022)>
ansible community.general.pacman_key β Manage pacmanβs list of trusted keys community.general.pacman\_key β Manage pacmanβs list of trusted keys
====================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.pacman_key`.
New in version 3.2.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Add or remove gpg keys from the pacman keyring.
Requirements
------------
The below requirements are needed on the host that executes this module.
* gpg
* pacman-key
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **data** string | | The keyfile contents to add to the keyring. Must be of `PGP PUBLIC KEY BLOCK` type. |
| **file** path | | The path to a keyfile on the remote server to add to the keyring. Remote file must be of `PGP PUBLIC KEY BLOCK` type. |
| **force\_update** boolean | **Choices:*** **no** β
* yes
| This forces the key to be updated if it already exists in the keyring. |
| **id** string / required | | The 40 character identifier of the key. Including this allows check mode to correctly report the changed state. Do not specify a subkey ID, instead specify the primary key ID. |
| **keyring** path | **Default:**"/etc/pacman.d/gnupg" | The full path to the keyring folder on the remote server. If not specified, module will use pacman's default (`/etc/pacman.d/gnupg`). Useful if the remote system requires an alternative gnupg directory. |
| **keyserver** string | | The keyserver used to retrieve key from. |
| **state** string | **Choices:*** absent
* **present** β
| Ensures that the key is present (added) or absent (revoked). |
| **url** string | | The URL to retrieve keyfile from. Remote file must be of `PGP PUBLIC KEY BLOCK` type. |
| **verify** boolean | **Choices:*** no
* **yes** β
| Whether or not to verify the keyfile's key ID against specified key ID. |
Notes
-----
Note
* Use full-length key ID (40 characters).
* Keys will be verified when using *data*, *file*, or *url* unless *verify* is overridden.
* Keys will be locally signed after being imported into the keyring.
* If the key ID exists in the keyring, the key will not be added unless *force\_update* is specified.
* *data*, *file*, *url*, and *keyserver* are mutually exclusive.
* Supports `check_mode`.
Examples
--------
```
- name: Import a key via local file
community.general.pacman_key:
data: "{{ lookup('file', 'keyfile.asc') }}"
state: present
- name: Import a key via remote file
community.general.pacman_key:
file: /tmp/keyfile.asc
state: present
- name: Import a key via url
community.general.pacman_key:
id: 01234567890ABCDE01234567890ABCDE12345678
url: https://domain.tld/keys/keyfile.asc
state: present
- name: Import a key via keyserver
community.general.pacman_key:
id: 01234567890ABCDE01234567890ABCDE12345678
keyserver: keyserver.domain.tld
- name: Import a key into an alternative keyring
community.general.pacman_key:
id: 01234567890ABCDE01234567890ABCDE12345678
file: /tmp/keyfile.asc
keyring: /etc/pacman.d/gnupg-alternative
- name: Remove a key from the keyring
community.general.pacman_key:
id: 01234567890ABCDE01234567890ABCDE12345678
state: absent
```
### Authors
* George Rawlinson (@grawlinson)
ansible community.general.ibm_sa_pool β Handles pools on IBM Spectrum Accelerate Family storage systems. community.general.ibm\_sa\_pool β Handles pools on IBM Spectrum Accelerate Family storage systems.
==================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ibm_sa_pool`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module creates or deletes pools to be used on IBM Spectrum Accelerate Family storage systems
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* pyxcli
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **domain** string | | Adds the pool to the specified domain. |
| **endpoints** string / required | | The hostname or management IP of Spectrum Accelerate storage system. |
| **password** string / required | | Password for username on the spectrum accelerate storage system. |
| **perf\_class** string | | Assigns a perf\_class to the pool. |
| **pool** string / required | | Pool name. |
| **size** string | | Pool size in GB |
| **snapshot\_size** string | | Pool snapshot size in GB |
| **state** string | **Choices:*** **present** β
* absent
| Pool state. |
| **username** string / required | | Management user on the spectrum accelerate storage system. |
Notes
-----
Note
* This module requires pyxcli python library. Use βpip install pyxcliβ in order to get pyxcli.
Examples
--------
```
- name: Create new pool.
community.general.ibm_sa_pool:
name: pool_name
size: 300
state: present
username: admin
password: secret
endpoints: hostdev-system
- name: Delete pool.
community.general.ibm_sa_pool:
name: pool_name
state: absent
username: admin
password: secret
endpoints: hostdev-system
```
### Authors
* Tzur Eliyahu (@tzure)
ansible community.general.ssh_config β Manage SSH config for user community.general.ssh\_config β Manage SSH config for user
==========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ssh_config`.
New in version 2.0.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Configures SSH hosts with special [``](#id1)IdentityFile``s and hostnames.
Requirements
------------
The below requirements are needed on the host that executes this module.
* StormSSH
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **group** string | | Which group this configuration file belongs to. If none given, *user* is used. |
| **host** string / required | | The endpoint this configuration is valid for. Can be an actual address on the internet or an alias that will connect to the value of *hostname*. |
| **hostname** string | | The actual host to connect to when connecting to the host defined. |
| **identity\_file** path | | The path to an identity file (SSH private key) that will be used when connecting to this host. File need to exist and have mode `0600` to be valid. |
| **port** string | | The actual port to connect to when connecting to the host defined. |
| **proxycommand** string | | Sets the `ProxyCommand` option. |
| **remote\_user** string | | Specifies the user to log in as. |
| **ssh\_config\_file** path | | SSH config file. If *user* and this option are not specified, `/etc/ssh/ssh_config` is used. Mutually exclusive with *user*. |
| **state** string | **Choices:*** **present** β
* absent
| Whether a host entry should exist or not. |
| **strict\_host\_key\_checking** string | **Choices:*** yes
* no
* ask
| Whether to strictly check the host key when doing connections to the remote host. |
| **user** string | | Which user account this configuration file belongs to. If none given and *ssh\_config\_file* is not specified, `/etc/ssh/ssh_config` is used. If a user is given, `~/.ssh/config` is used. Mutually exclusive with *ssh\_config\_file*. |
| **user\_known\_hosts\_file** string | | Sets the user known hosts file option. |
Notes
-----
Note
* Supports check mode.
Examples
--------
```
- name: Add a host in the configuration
community.general.ssh_config:
user: akasurde
host: "example.com"
hostname: "github.com"
identity_file: "/home/akasurde/.ssh/id_rsa"
port: '2223'
state: present
- name: Delete a host from the configuration
community.general.ssh_config:
ssh_config_file: "{{ ssh_config_test }}"
host: "example.com"
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **hosts\_added** list / elements=string | success | A list of host added. **Sample:** ['example.com'] |
| **hosts\_change\_diff** list / elements=string | on change | A list of host diff changes. **Sample:** [{'example.com': {'new': {'hostname': 'github.com', 'identityfile': ['/tmp/test\_ssh\_config/fake\_id\_rsa'], 'port': '2224'}, 'old': {'hostname': 'github.com', 'identityfile': ['/tmp/test\_ssh\_config/fake\_id\_rsa'], 'port': '2224'}}}] |
| **hosts\_changed** list / elements=string | success | A list of host changed. **Sample:** ['example.com'] |
| **hosts\_removed** list / elements=string | success | A list of host removed. **Sample:** ['example.com'] |
### Authors
* BjΓΆrn Andersson (@gaqzi)
* Abhijeet Kasurde (@Akasurde)
ansible community.general.memcached β Use memcached DB for cache community.general.memcached β Use memcached DB for cache
========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.memcached`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
Synopsis
--------
* This cache uses JSON formatted, per host records saved in memcached.
Requirements
------------
The below requirements are needed on the local controller node that executes this cache.
* memcache (python lib)
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_prefix** string | **Default:**"ansible\_facts" | ini entries: [defaults]fact\_caching\_prefix = ansible\_facts env:ANSIBLE\_CACHE\_PLUGIN\_PREFIX | User defined prefix to use when creating the DB entries |
| **\_timeout** integer | **Default:**86400 | ini entries: [defaults]fact\_caching\_timeout = 86400 env:ANSIBLE\_CACHE\_PLUGIN\_TIMEOUT | Expiration timeout in seconds for the cache plugin data. Set to 0 to never expire |
| **\_uri** list / elements=string | **Default:**["127.0.0.1:11211"] | ini entries: [defaults]fact\_caching\_connection = ['127.0.0.1:11211'] env:ANSIBLE\_CACHE\_PLUGIN\_CONNECTION | List of connection information for the memcached DBs |
### Authors
* Unknown (!UNKNOWN)
ansible community.general.bitbucket_pipeline_variable β Manages Bitbucket pipeline variables community.general.bitbucket\_pipeline\_variable β Manages Bitbucket pipeline variables
======================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.bitbucket_pipeline_variable`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manages Bitbucket pipeline variables.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **client\_id** string | | The OAuth consumer key. If not set the environment variable `BITBUCKET_CLIENT_ID` will be used. |
| **client\_secret** string | | The OAuth consumer secret. If not set the environment variable `BITBUCKET_CLIENT_SECRET` will be used. |
| **name** string / required | | The pipeline variable name. |
| **repository** string / required | | The repository name. |
| **secured** boolean | **Choices:*** **no** β
* yes
| Whether to encrypt the variable value. |
| **state** string / required | **Choices:*** absent
* present
| Indicates desired state of the variable. |
| **username** string / required | | The repository owner. |
| **value** string | | The pipeline variable value. |
Notes
-----
Note
* Bitbucket OAuth consumer key and secret can be obtained from Bitbucket profile -> Settings -> Access Management -> OAuth.
* Check mode is supported.
* For secured values return parameter `changed` is always `True`.
Examples
--------
```
- name: Create or update pipeline variables from the list
community.general.bitbucket_pipeline_variable:
repository: 'bitbucket-repo'
username: bitbucket_username
name: '{{ item.name }}'
value: '{{ item.value }}'
secured: '{{ item.secured }}'
state: present
with_items:
- { name: AWS_ACCESS_KEY, value: ABCD1234, secured: False }
- { name: AWS_SECRET, value: qwe789poi123vbn0, secured: True }
- name: Remove pipeline variable
community.general.bitbucket_pipeline_variable:
repository: bitbucket-repo
username: bitbucket_username
name: AWS_ACCESS_KEY
state: absent
```
### Authors
* Evgeniy Krysanov (@catcombo)
| programming_docs |
ansible community.general.shutdown β Shut down a machine community.general.shutdown β Shut down a machine
================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.shutdown`.
New in version 1.1.0: of community.general
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Shut downs a machine.
Note
This module has a corresponding [action plugin](../../../plugins/action#action-plugins).
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **delay** integer | **Default:**0 | Seconds to wait before shutdown. Passed as a parameter to the shutdown command. On Linux, macOS and OpenBSD, this is converted to minutes and rounded down. If less than 60, it will be set to 0. On Solaris and FreeBSD, this will be seconds. |
| **msg** string | **Default:**"Shut down initiated by Ansible" | Message to display to users before shutdown. |
| **search\_paths** list / elements=path | **Default:**["/sbin", "/usr/sbin", "/usr/local/sbin"] | Paths to search on the remote machine for the `shutdown` command.
*Only* these paths will be searched for the `shutdown` command. `PATH` is ignored in the remote node when searching for the `shutdown` command. |
Notes
-----
Note
* `PATH` is ignored on the remote node when searching for the `shutdown` command. Use *search\_paths* to specify locations to search if the default paths do not work.
See Also
--------
See also
[ansible.builtin.reboot](../../ansible/builtin/reboot_module#ansible-collections-ansible-builtin-reboot-module)
The official documentation on the **ansible.builtin.reboot** module.
Examples
--------
```
- name: Unconditionally shut down the machine with all defaults
community.general.shutdown:
- name: Delay shutting down the remote node
community.general.shutdown:
delay: 60
- name: Shut down a machine with shutdown command in unusual place
community.general.shutdown:
search_paths:
- '/lib/molly-guard'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **shutdown** boolean | always |
`true` if the machine has been shut down. **Sample:** True |
### Authors
* Matt Davis (@nitzmahone)
* Sam Doran (@samdoran)
* Amin Vakil (@aminvakil)
ansible community.general.npm β Manage node.js packages with npm community.general.npm β Manage node.js packages with npm
========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.npm`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Manage node.js packages with Node Package Manager (npm).
Requirements
------------
The below requirements are needed on the host that executes this module.
* npm installed in bin path (recommended /usr/local/bin)
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **ci** boolean | **Choices:*** **no** β
* yes
| Install packages based on package-lock file, same as running `npm ci`. |
| **executable** path | | The executable location for npm. This is useful if you are using a version manager, such as nvm. |
| **global** boolean | **Choices:*** **no** β
* yes
| Install the node.js library globally. |
| **ignore\_scripts** boolean | **Choices:*** **no** β
* yes
| Use the `--ignore-scripts` flag when installing. |
| **name** string | | The name of a node.js library to install. |
| **no\_bin\_links** boolean added in 2.5.0 of community.general | **Choices:*** **no** β
* yes
| Use the `--no-bin-links` flag when installing. |
| **no\_optional** boolean added in 2.0.0 of community.general | **Choices:*** **no** β
* yes
| Use the `--no-optional` flag when installing. |
| **path** path | | The base path where to install the node.js libraries. |
| **production** boolean | **Choices:*** **no** β
* yes
| Install dependencies in production mode, excluding devDependencies. |
| **registry** string | | The registry to install modules from. |
| **state** string | **Choices:*** **present** β
* absent
* latest
| The state of the node.js library. |
| **unsafe\_perm** boolean | **Choices:*** **no** β
* yes
| Use the `--unsafe-perm` flag when installing. |
| **version** string | | The version to be installed. |
Examples
--------
```
- name: Install "coffee-script" node.js package.
community.general.npm:
name: coffee-script
path: /app/location
- name: Install "coffee-script" node.js package on version 1.6.1.
community.general.npm:
name: coffee-script
version: '1.6.1'
path: /app/location
- name: Install "coffee-script" node.js package globally.
community.general.npm:
name: coffee-script
global: yes
- name: Remove the globally package "coffee-script".
community.general.npm:
name: coffee-script
global: yes
state: absent
- name: Install "coffee-script" node.js package from custom registry.
community.general.npm:
name: coffee-script
registry: 'http://registry.mysite.com'
- name: Install packages based on package.json.
community.general.npm:
path: /app/location
- name: Update packages based on package.json to their latest version.
community.general.npm:
path: /app/location
state: latest
- name: Install packages based on package.json using the npm installed with nvm v0.10.1.
community.general.npm:
path: /app/location
executable: /opt/nvm/v0.10.1/bin/npm
state: present
```
### Authors
* Chris Hoffman (@chrishoffman)
ansible community.general.hwc_vpc_peering_connect β Creates a resource of Vpc/PeeringConnect in Huawei Cloud community.general.hwc\_vpc\_peering\_connect β Creates a resource of Vpc/PeeringConnect in Huawei Cloud
=======================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.hwc_vpc_peering_connect`.
New in version 0.2.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* vpc peering management.
Requirements
------------
The below requirements are needed on the host that executes this module.
* keystoneauth1 >= 3.6.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **description** string | | The description of vpc peering connection. |
| **domain** string / required | | The name of the Domain to scope to (Identity v3). (currently only domain names are supported, and not domain IDs). |
| **id** string | | The id of resource to be managed. |
| **identity\_endpoint** string / required | | The Identity authentication URL. |
| **local\_vpc\_id** string / required | | Specifies the ID of local VPC. |
| **name** string / required | | Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters. |
| **password** string / required | | The password to login with. |
| **peering\_vpc** dictionary / required | | Specifies information about the peering VPC. |
| | **project\_id** string | | Specifies the ID of the project which the peering vpc belongs to. |
| | **vpc\_id** string / required | | Specifies the ID of peering VPC. |
| **project** string / required | | The name of the Tenant (Identity v2) or Project (Identity v3). (currently only project names are supported, and not project IDs). |
| **region** string | | The region to which the project belongs. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in Huawei Cloud. |
| **timeouts** dictionary | | The timeouts for each operations. |
| | **create** string | **Default:**"15m" | The timeouts for create operation. |
| **user** string / required | | The user name to login with (currently only user names are supported, and not user IDs). |
Notes
-----
Note
* For authentication, you can set identity\_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT` env variable.
* For authentication, you can set user using the `ANSIBLE_HWC_USER` env variable.
* For authentication, you can set password using the `ANSIBLE_HWC_PASSWORD` env variable.
* For authentication, you can set domain using the `ANSIBLE_HWC_DOMAIN` env variable.
* For authentication, you can set project using the `ANSIBLE_HWC_PROJECT` env variable.
* For authentication, you can set region using the `ANSIBLE_HWC_REGION` env variable.
* Environment variables values will only be used if the playbook values are not set.
Examples
--------
```
# create a peering connect
- name: Create a local vpc
hwc_network_vpc:
cidr: "192.168.0.0/16"
name: "ansible_network_vpc_test_local"
register: vpc1
- name: Create a peering vpc
hwc_network_vpc:
cidr: "192.168.0.0/16"
name: "ansible_network_vpc_test_peering"
register: vpc2
- name: Create a peering connect
community.general.hwc_vpc_peering_connect:
local_vpc_id: "{{ vpc1.id }}"
name: "ansible_network_peering_test"
peering_vpc:
vpc_id: "{{ vpc2.id }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **description** string | success | The description of vpc peering connection. |
| **local\_vpc\_id** string | success | Specifies the ID of local VPC. |
| **name** string | success | Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters. |
| **peering\_vpc** dictionary | success | Specifies information about the peering VPC. |
| | **project\_id** string | success | Specifies the ID of the project which the peering vpc belongs to. |
| | **vpc\_id** string | success | Specifies the ID of peering VPC. |
### Authors
* Huawei Inc. (@huaweicloud)
ansible community.general.selogin β Manages linux user to SELinux user mapping community.general.selogin β Manages linux user to SELinux user mapping
======================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.selogin`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manages linux user to SELinux user mapping
Requirements
------------
The below requirements are needed on the host that executes this module.
* libselinux
* policycoreutils
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **ignore\_selinux\_state** boolean | **Choices:*** **no** β
* yes
| Run independent of selinux runtime state |
| **login** string / required | | a Linux user |
| **reload** boolean | **Choices:*** no
* **yes** β
| Reload SELinux policy after commit. |
| **selevel** string | **Default:**"s0" | MLS/MCS Security Range (MLS/MCS Systems only) SELinux Range for SELinux login mapping defaults to the SELinux user record range.
aliases: serange |
| **seuser** string | | SELinux user name |
| **state** string | **Choices:*** **present** β
* absent
| Desired mapping value. |
Notes
-----
Note
* The changes are persistent across reboots
* Not tested on any debian based system
Examples
--------
```
- name: Modify the default user on the system to the guest_u user
community.general.selogin:
login: __default__
seuser: guest_u
state: present
- name: Assign gijoe user on an MLS machine a range and to the staff_u user
community.general.selogin:
login: gijoe
seuser: staff_u
serange: SystemLow-Secret
state: present
- name: Assign all users in the engineering group to the staff_u user
community.general.selogin:
login: '%engineering'
seuser: staff_u
state: present
```
### Authors
* Dan Keder (@dankeder)
* Petr Lautrbach (@bachradsusi)
* James Cassell (@jamescassell)
ansible community.general.profitbricks_datacenter β Create or destroy a ProfitBricks Virtual Datacenter. community.general.profitbricks\_datacenter β Create or destroy a ProfitBricks Virtual Datacenter.
=================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.profitbricks_datacenter`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* This is a simple module that supports creating or removing vDCs. A vDC is required before you can create servers. This module has a dependency on profitbricks >= 1.0.0
Requirements
------------
The below requirements are needed on the host that executes this module.
* profitbricks
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **description** string | | The description of the virtual datacenter. |
| **location** string | **Choices:*** **us/las** β
* de/fra
* de/fkb
| The datacenter location. |
| **name** string | | The name of the virtual datacenter. |
| **state** string | **Default:**"present" | Create or terminate datacenters. The available choices are: `present`, `absent`. |
| **subscription\_password** string | | THe ProfitBricks password. Overrides the PB\_PASSWORD environment variable. |
| **subscription\_user** string | | The ProfitBricks username. Overrides the PB\_SUBSCRIPTION\_ID environment variable. |
| **wait** boolean | **Choices:*** no
* **yes** β
| wait for the datacenter to be created before returning |
| **wait\_timeout** integer | **Default:**600 | how long before wait gives up, in seconds |
Examples
--------
```
- name: Create a datacenter
community.general.profitbricks_datacenter:
datacenter: Tardis One
wait_timeout: 500
- name: Destroy a datacenter (remove all servers, volumes, and other objects in the datacenter)
community.general.profitbricks_datacenter:
datacenter: Tardis One
wait_timeout: 500
state: absent
```
### Authors
* Matt Baldwin (@baldwinSPC) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#5634373a32213f38707565616d707563646d7075626e6d252237353d26393f3822353a392332707562606d35393b)>
ansible community.general.hwc_vpc_port β Creates a resource of Vpc/Port in Huawei Cloud community.general.hwc\_vpc\_port β Creates a resource of Vpc/Port in Huawei Cloud
=================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.hwc_vpc_port`.
New in version 0.2.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* vpc port management.
Requirements
------------
The below requirements are needed on the host that executes this module.
* keystoneauth1 >= 3.6.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **admin\_state\_up** boolean | **Choices:*** no
* yes
| Specifies the administrative state of the port. |
| **allowed\_address\_pairs** list / elements=dictionary | | Specifies a set of zero or more allowed address pairs. |
| | **ip\_address** string | | Specifies the IP address. It cannot set it to 0.0.0.0. Configure an independent security group for the port if a large CIDR block (subnet mask less than 24) is configured for parameter allowed\_address\_pairs. |
| | **mac\_address** string | | Specifies the MAC address. |
| **domain** string / required | | The name of the Domain to scope to (Identity v3). (currently only domain names are supported, and not domain IDs). |
| **extra\_dhcp\_opts** list / elements=dictionary | | Specifies the extended option of DHCP. |
| | **name** string | | Specifies the option name. |
| | **value** string | | Specifies the option value. |
| **id** string | | The id of resource to be managed. |
| **identity\_endpoint** string / required | | The Identity authentication URL. |
| **ip\_address** string | | Specifies the port IP address. |
| **name** string | | Specifies the port name. The value can contain no more than 255 characters. |
| **password** string / required | | The password to login with. |
| **project** string / required | | The name of the Tenant (Identity v2) or Project (Identity v3). (currently only project names are supported, and not project IDs). |
| **region** string | | The region to which the project belongs. |
| **security\_groups** list / elements=string | | Specifies the ID of the security group. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in Huawei Cloud. |
| **subnet\_id** string / required | | Specifies the ID of the subnet to which the port belongs. |
| **timeouts** dictionary | | The timeouts for each operations. |
| | **create** string | **Default:**"15m" | The timeouts for create operation. |
| **user** string / required | | The user name to login with (currently only user names are supported, and not user IDs). |
Notes
-----
Note
* For authentication, you can set identity\_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT` env variable.
* For authentication, you can set user using the `ANSIBLE_HWC_USER` env variable.
* For authentication, you can set password using the `ANSIBLE_HWC_PASSWORD` env variable.
* For authentication, you can set domain using the `ANSIBLE_HWC_DOMAIN` env variable.
* For authentication, you can set project using the `ANSIBLE_HWC_PROJECT` env variable.
* For authentication, you can set region using the `ANSIBLE_HWC_REGION` env variable.
* Environment variables values will only be used if the playbook values are not set.
Examples
--------
```
# create a port
- name: Create vpc
hwc_network_vpc:
cidr: "192.168.100.0/24"
name: "ansible_network_vpc_test"
register: vpc
- name: Create subnet
hwc_vpc_subnet:
gateway_ip: "192.168.100.32"
name: "ansible_network_subnet_test"
dhcp_enable: True
vpc_id: "{{ vpc.id }}"
cidr: "192.168.100.0/26"
register: subnet
- name: Create a port
community.general.hwc_vpc_port:
subnet_id: "{{ subnet.id }}"
ip_address: "192.168.100.33"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **admin\_state\_up** boolean | success | Specifies the administrative state of the port. |
| **allowed\_address\_pairs** list / elements=string | success | Specifies a set of zero or more allowed address pairs. |
| | **ip\_address** string | success | Specifies the IP address. It cannot set it to 0.0.0.0. Configure an independent security group for the port if a large CIDR block (subnet mask less than 24) is configured for parameter allowed\_address\_pairs. |
| | **mac\_address** string | success | Specifies the MAC address. |
| **extra\_dhcp\_opts** list / elements=string | success | Specifies the extended option of DHCP. |
| | **name** string | success | Specifies the option name. |
| | **value** string | success | Specifies the option value. |
| **ip\_address** string | success | Specifies the port IP address. |
| **mac\_address** string | success | Specifies the port MAC address. |
| **name** string | success | Specifies the port name. The value can contain no more than 255 characters. |
| **security\_groups** list / elements=string | success | Specifies the ID of the security group. |
| **subnet\_id** string | success | Specifies the ID of the subnet to which the port belongs. |
### Authors
* Huawei Inc. (@huaweicloud)
| programming_docs |
ansible community.general.shelvefile β read keys from Python shelve file community.general.shelvefile β read keys from Python shelve file
================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.shelvefile`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Read keys from Python shelve file.
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_terms** string | | | sets of key value pairs of parameters |
| **file** string / required | | | path to shelve file |
| **key** string / required | | | key to query |
Examples
--------
```
- name: retrieve a string value corresponding to a key inside a Python shelve file
ansible.builtin.debug: msg="{{ lookup('community.general.shelvefile', 'file=path_to_some_shelve_file.db key=key_to_retrieve') }}
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:
| Key | Returned | Description |
| --- | --- | --- |
| **\_list** list / elements=string | success | value(s) of key(s) in shelve file(s) |
### Authors
* Alejandro Guirao (!UNKNOWN) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#8ee2ebe5fbe3ecebfcfce7a8adbdb9b5a8adbbbcb5a8adbab6b5e9e3efe7e2a8adbab8b5ede1e3)>
ansible community.general.redis β Use Redis DB for cache community.general.redis β Use Redis DB for cache
================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.redis`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
Synopsis
--------
* This cache uses JSON formatted, per host records saved in Redis.
Requirements
------------
The below requirements are needed on the local controller node that executes this cache.
* redis>=2.4.5 (python lib)
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_keyset\_name** string added in 1.3.0 of community.general | **Default:**"ansible\_cache\_keys" | ini entries: [defaults]fact\_caching\_redis\_keyset\_name = ansible\_cache\_keys env:ANSIBLE\_CACHE\_REDIS\_KEYSET\_NAME | User defined name for cache keyset name. |
| **\_prefix** string | **Default:**"ansible\_facts" | ini entries: [defaults]fact\_caching\_prefix = ansible\_facts env:ANSIBLE\_CACHE\_PLUGIN\_PREFIX | User defined prefix to use when creating the DB entries |
| **\_sentinel\_service\_name** string added in 1.3.0 of community.general | | ini entries: [defaults]fact\_caching\_redis\_sentinel = None env:ANSIBLE\_CACHE\_REDIS\_SENTINEL | The redis sentinel service name (or referenced as cluster name). |
| **\_timeout** integer | **Default:**86400 | ini entries: [defaults]fact\_caching\_timeout = 86400 env:ANSIBLE\_CACHE\_PLUGIN\_TIMEOUT | Expiration timeout in seconds for the cache plugin data. Set to 0 to never expire |
| **\_uri** string / required | | ini entries: [defaults]fact\_caching\_connection = None env:ANSIBLE\_CACHE\_PLUGIN\_CONNECTION | A colon separated string of connection information for Redis. The format is `host:port:db:password`, for example `localhost:6379:0:changeme`. To use encryption in transit, prefix the connection with `tls://`, as in `tls://localhost:6379:0:changeme`. To use redis sentinel, use separator `;`, for example `localhost:26379;localhost:26379;0:changeme`. Requires redis>=2.9.0. |
### Authors
* Unknown (!UNKNOWN)
ansible community.general.twilio β Sends a text message to a mobile phone through Twilio. community.general.twilio β Sends a text message to a mobile phone through Twilio.
=================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.twilio`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Sends a text message to a phone number through the Twilio messaging API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account\_sid** string / required | | user's Twilio account token found on the account page |
| **auth\_token** string / required | | user's Twilio authentication token |
| **from\_number** string / required | | the Twilio number to send the text message from, format +15551112222 |
| **media\_url** string | | a URL with a picture, video or sound clip to send with an MMS (multimedia message) instead of a plain SMS |
| **msg** string / required | | the body of the text message |
| **to\_numbers** list / elements=string / required | | one or more phone numbers to send the text message to, format +15551112222
aliases: to\_number |
Notes
-----
Note
* This module is non-idempotent because it sends an email through the external API. It is idempotent only in the case that the module fails.
* Like the other notification modules, this one requires an external dependency to work. In this case, youβll need a Twilio account with a purchased or verified phone number to send the text message.
Examples
--------
```
# send an SMS about the build status to (555) 303 5681
# note: replace account_sid and auth_token values with your credentials
# and you have to have the 'from_number' on your Twilio account
- name: Send a text message to a mobile phone through Twilio
community.general.twilio:
msg: All servers with webserver role are now configured.
account_sid: ACXXXXXXXXXXXXXXXXX
auth_token: ACXXXXXXXXXXXXXXXXX
from_number: +15552014545
to_number: +15553035681
delegate_to: localhost
# send an SMS to multiple phone numbers about the deployment
# note: replace account_sid and auth_token values with your credentials
# and you have to have the 'from_number' on your Twilio account
- name: Send a text message to a mobile phone through Twilio
community.general.twilio:
msg: This server configuration is now complete.
account_sid: ACXXXXXXXXXXXXXXXXX
auth_token: ACXXXXXXXXXXXXXXXXX
from_number: +15553258899
to_numbers:
- +15551113232
- +12025551235
- +19735559010
delegate_to: localhost
# send an MMS to a single recipient with an update on the deployment
# and an image of the results
# note: replace account_sid and auth_token values with your credentials
# and you have to have the 'from_number' on your Twilio account
- name: Send a text message to a mobile phone through Twilio
community.general.twilio:
msg: Deployment complete!
account_sid: ACXXXXXXXXXXXXXXXXX
auth_token: ACXXXXXXXXXXXXXXXXX
from_number: +15552014545
to_number: +15553035681
media_url: https://demo.twilio.com/logo.png
delegate_to: localhost
```
### Authors
* Matt Makai (@makaimc)
ansible community.general.filetree β recursively match all files in a directory tree community.general.filetree β recursively match all files in a directory tree
============================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.filetree`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This lookup enables you to template a complete tree of files on a target system while retaining permissions and ownership.
* Supports directories, files and symlinks, including SELinux and other file properties.
* If you provide more than one path, it will implement a first\_found logic, and will not process entries it already processed in previous paths. This enables merging different trees in order of importance, or add role\_vars to specific paths to influence different instances of the same role.
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_terms** string / required | | | path(s) of files to read |
Examples
--------
```
- name: Create directories
ansible.builtin.file:
path: /web/{{ item.path }}
state: directory
mode: '{{ item.mode }}'
with_community.general.filetree: web/
when: item.state == 'directory'
- name: Template files (explicitly skip directories in order to use the 'src' attribute)
ansible.builtin.template:
src: '{{ item.src }}'
# Your template files should be stored with a .j2 file extension,
# but should not be deployed with it. splitext|first removes it.
dest: /web/{{ item.path | splitext | first }}
mode: '{{ item.mode }}'
with_community.general.filetree: web/
when: item.state == 'file'
- name: Recreate symlinks
ansible.builtin.file:
src: '{{ item.src }}'
dest: /web/{{ item.path }}
state: link
follow: false # avoid corrupting target files if the link already exists
force: yes
mode: '{{ item.mode }}'
with_community.general.filetree: web/
when: item.state == 'link'
- name: list all files under web/
ansible.builtin.debug:
msg: "{{ lookup('community.general.filetree', 'web/') }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:
| Key | Returned | Description |
| --- | --- | --- |
| **\_raw** list / elements=dictionary | success | List of dictionaries with file information. |
| | **ctime** float | success | Time of last metadata update or creation (depends on OS). |
| | **gid** integer | success | Group ID of the file/directory. |
| | **group** any | success | Name of the group that owns the file/directory. |
| | **mode** string | success | The permissions the resulting file or directory. |
| | **mtime** float | success | Time of last modification. |
| | **owner** any | success | Name of the user that owns the file/directory. |
| | **path** path | success | Contains the relative path to root. |
| | **root** path | success | Allows filtering by original location. |
| | **selevel** any | success | The level part of the SELinux file context. |
| | **serole** any | success | The role part of the SELinux file context. |
| | **setype** any | success | The type part of the SELinux file context. |
| | **seuser** any | success | The user part of the SELinux file context. |
| | **size** integer | success | Size of the target. |
| | **src** path | success | Full path to file. Not returned when *item.state* is set to `directory`. |
| | **state** string | success | TODO |
| | **uid** integer | success | Owner ID of the file/directory. |
### Authors
* Dag Wieers (@dagwieers) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#a2c6c3c5848191959984819790998481969a99d5cbc7c7d0d18481969499c1cdcf)>
ansible community.general.github_release β Interact with GitHub Releases community.general.github\_release β Interact with GitHub Releases
=================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.github_release`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Fetch metadata about GitHub Releases
Requirements
------------
The below requirements are needed on the host that executes this module.
* github3.py >= 1.0.0a3
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string / required | **Choices:*** latest\_release
* create\_release
| Action to perform |
| **body** string | | Description of the release when creating a release |
| **draft** boolean | **Choices:*** **no** β
* yes
| Sets if the release is a draft or not. (boolean) |
| **name** string | | Name of release when creating a release |
| **password** string | | The GitHub account password for the user. Mutually exclusive with `token`. |
| **prerelease** boolean | **Choices:*** **no** β
* yes
| Sets if the release is a prerelease or not. (boolean) |
| **repo** string / required | | Repository name |
| **tag** string | | Tag name when creating a release. Required when using action is set to `create_release`. |
| **target** string | | Target of release when creating a release |
| **token** string | | GitHub Personal Access Token for authenticating. Mutually exclusive with `password`. |
| **user** string / required | | The GitHub account that owns the repository |
Examples
--------
```
- name: Get latest release of a public repository
community.general.github_release:
user: ansible
repo: ansible
action: latest_release
- name: Get latest release of testuseer/testrepo
community.general.github_release:
token: tokenabc1234567890
user: testuser
repo: testrepo
action: latest_release
- name: Get latest release of test repo using username and password. Ansible 2.4.
community.general.github_release:
user: testuser
password: secret123
repo: testrepo
action: latest_release
- name: Create a new release
community.general.github_release:
token: tokenabc1234567890
user: testuser
repo: testrepo
action: create_release
tag: test
target: master
name: My Release
body: Some description
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **create\_release** string | success | Version of the created release For Ansible version 2.5 and later, if specified release version already exists, then State is unchanged For Ansible versions prior to 2.5, if specified release version already exists, then State is skipped **Sample:** 1.1.0 |
| **latest\_release** string | success | Version of the latest release **Sample:** 1.1.0 |
### Authors
* Adrian Moisey (@adrianmoisey)
ansible community.general.pbrun β PowerBroker run community.general.pbrun β PowerBroker run
=========================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.pbrun`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
Synopsis
--------
* This become plugins allows your remote/login user to execute commands as another user via the pbrun utility.
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **become\_exe** string | **Default:**"pbrun" | ini entries: [privilege\_escalation]become\_exe = pbrun [pbrun\_become\_plugin]executable = pbrun env:ANSIBLE\_BECOME\_EXE env:ANSIBLE\_PBRUN\_EXE var: ansible\_become\_exe var: ansible\_pbrun\_exe | Sudo executable |
| **become\_flags** string | **Default:**"" | ini entries: [privilege\_escalation]become\_flags = [pbrun\_become\_plugin]flags = env:ANSIBLE\_BECOME\_FLAGS env:ANSIBLE\_PBRUN\_FLAGS var: ansible\_become\_flags var: ansible\_pbrun\_flags | Options to pass to pbrun |
| **become\_pass** string | | ini entries: [pbrun\_become\_plugin]password = None env:ANSIBLE\_BECOME\_PASS env:ANSIBLE\_PBRUN\_PASS var: ansible\_become\_password var: ansible\_become\_pass var: ansible\_pbrun\_pass | Password for pbrun |
| **become\_user** string | **Default:**"" | ini entries: [privilege\_escalation]become\_user = [pbrun\_become\_plugin]user = env:ANSIBLE\_BECOME\_USER env:ANSIBLE\_PBRUN\_USER var: ansible\_become\_user var: ansible\_pbrun\_user | User you 'become' to execute the task |
| **wrap\_exe** boolean | **Choices:*** **no** β
* yes
| ini entries: [pbrun\_become\_plugin]wrap\_execution = no env:ANSIBLE\_PBRUN\_WRAP\_EXECUTION var: ansible\_pbrun\_wrap\_execution | Toggle to wrap the command pbrun calls in 'shell -c' or not |
### Authors
* Ansible Core Team
ansible community.general.filesystem β Makes a filesystem community.general.filesystem β Makes a filesystem
=================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.filesystem`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
Synopsis
--------
* This module creates a filesystem.
Requirements
------------
The below requirements are needed on the host that executes this module.
* Uses specific tools related to the *fstype* for creating or resizing a filesystem (from packages e2fsprogs, xfsprogs, dosfstools, and so on).
* Uses generic tools mostly related to the Operating System (Linux or FreeBSD) or available on both, as `blkid`.
* On FreeBSD, either `util-linux` or `e2fsprogs` package is required.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dev** path / required | | Target path to block device (Linux) or character device (FreeBSD) or regular file (both). When setting Linux-specific filesystem types on FreeBSD, this module only works when applying to regular files, aka disk images. Currently `lvm` (Linux-only) and `ufs` (FreeBSD-only) don't support a regular file as their target *dev*. Support for character devices on FreeBSD has been added in community.general 3.4.0.
aliases: device |
| **force** boolean | **Choices:*** **no** β
* yes
| If `yes`, allows to create new filesystem on devices that already has filesystem. |
| **fstype** string | **Choices:*** btrfs
* ext2
* ext3
* ext4
* ext4dev
* f2fs
* lvm
* ocfs2
* reiserfs
* xfs
* vfat
* swap
* ufs
| Filesystem type to be created. This option is required with `state=present` (or if *state* is omitted). ufs support has been added in community.general 3.4.0.
aliases: type |
| **opts** string | | List of options to be passed to mkfs command. |
| **resizefs** boolean | **Choices:*** **no** β
* yes
| If `yes`, if the block device and filesystem size differ, grow the filesystem into the space. Supported for `ext2`, `ext3`, `ext4`, `ext4dev`, `f2fs`, `lvm`, `xfs`, `ufs` and `vfat` filesystems. Attempts to resize other filesystem types will fail. XFS Will only grow if mounted. Currently, the module is based on commands from `util-linux` package to perform operations, so resizing of XFS is not supported on FreeBSD systems. vFAT will likely fail if fatresize < 1.04. |
| **state** string added in 1.3.0 of community.general | **Choices:*** **present** β
* absent
| If `state=present`, the filesystem is created if it doesn't already exist, that is the default behaviour if *state* is omitted. If `state=absent`, filesystem signatures on *dev* are wiped if it contains a filesystem (as known by `blkid`). When `state=absent`, all other options but *dev* are ignored, and the module doesn't fail if the device *dev* doesn't actually exist. |
Notes
-----
Note
* Potential filesystems on *dev* are checked using `blkid`. In case `blkid` is unable to detect a filesystem (and in case `fstyp` on FreeBSD is also unable to detect a filesystem), this filesystem is overwritten even if *force* is `no`.
* On FreeBSD systems, both `e2fsprogs` and `util-linux` packages provide a `blkid` command that is compatible with this module. However, these packages conflict with each other, and only the `util-linux` package provides the command required to not fail when *state=absent*.
* This module supports *check\_mode*.
See Also
--------
See also
[community.general.filesize](filesize_module#ansible-collections-community-general-filesize-module)
The official documentation on the **community.general.filesize** module.
[ansible.posix.mount](../../ansible/posix/mount_module#ansible-collections-ansible-posix-mount-module)
The official documentation on the **ansible.posix.mount** module.
Examples
--------
```
- name: Create a ext2 filesystem on /dev/sdb1
community.general.filesystem:
fstype: ext2
dev: /dev/sdb1
- name: Create a ext4 filesystem on /dev/sdb1 and check disk blocks
community.general.filesystem:
fstype: ext4
dev: /dev/sdb1
opts: -cc
- name: Blank filesystem signature on /dev/sdb1
community.general.filesystem:
dev: /dev/sdb1
state: absent
- name: Create a filesystem on top of a regular file
community.general.filesystem:
dev: /path/to/disk.img
fstype: vfat
```
### Authors
* Alexander Bulimov (@abulimov)
* quidame (@quidame)
| programming_docs |
ansible community.general.ipa_subca β Manage FreeIPA Lightweight Sub Certificate Authorities. community.general.ipa\_subca β Manage FreeIPA Lightweight Sub Certificate Authorities.
======================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ipa_subca`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add, modify, enable, disable and delete an IPA Lightweight Sub Certificate Authorities using IPA API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_prot** string | **Choices:*** http
* **https** β
| Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. |
| **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. |
| **state** string | **Choices:*** absent
* disabled
* enabled
* **present** β
| State to ensure. State 'disable' and 'enable' is available for FreeIPA 4.4.2 version and onwards. |
| **subca\_desc** string | | The Sub Certificate Authority's description. |
| **subca\_name** string / required | | The Sub Certificate Authority name which needs to be managed.
aliases: name |
| **subca\_subject** string / required | | The Sub Certificate Authority's Subject. e.g., 'CN=SampleSubCA1,O=testrelm.test'. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Ensure IPA Sub CA is present
community.general.ipa_subca:
ipa_host: spider.example.com
ipa_pass: Passw0rd!
state: present
subca_name: AnsibleSubCA1
subca_subject: 'CN=AnsibleSubCA1,O=example.com'
subca_desc: Ansible Sub CA
- name: Ensure that IPA Sub CA is removed
community.general.ipa_subca:
ipa_host: spider.example.com
ipa_pass: Passw0rd!
state: absent
subca_name: AnsibleSubCA1
- name: Ensure that IPA Sub CA is disabled
community.general.ipa_subca:
ipa_host: spider.example.com
ipa_pass: Passw0rd!
state: disable
subca_name: AnsibleSubCA1
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **subca** dictionary | always | IPA Sub CA record as returned by IPA API. |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.general.yaml β yaml-ized Ansible screen output community.general.yaml β yaml-ized Ansible screen output
========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.yaml`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
Synopsis
--------
* Ansible output that can be quite a bit easier to read than the default JSON formatting.
Requirements
------------
The below requirements are needed on the local controller node that executes this callback.
* set as stdout in configuration
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **check\_mode\_markers** boolean added in 2.9 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [defaults]check\_mode\_markers = no env:ANSIBLE\_CHECK\_MODE\_MARKERS | Toggle to control displaying markers when running in check mode. The markers are `DRY RUN` at the beggining and ending of playbook execution (when calling `ansible-playbook --check`) and `CHECK MODE` as a suffix at every play and task that is run in check mode. |
| **display\_failed\_stderr** boolean added in 2.7 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [defaults]display\_failed\_stderr = no env:ANSIBLE\_DISPLAY\_FAILED\_STDERR | Toggle to control whether failed and unreachable tasks are displayed to STDERR (vs. STDOUT) |
| **display\_ok\_hosts** boolean added in 2.7 of ansible.builtin | **Choices:*** no
* **yes** β
| ini entries: [defaults]display\_ok\_hosts = yes env:ANSIBLE\_DISPLAY\_OK\_HOSTS | Toggle to control displaying 'ok' task/host results in a task |
| **display\_skipped\_hosts** boolean | **Choices:*** no
* **yes** β
| ini entries: [defaults]display\_skipped\_hosts = yes env:DISPLAY\_SKIPPED\_HOSTS Removed in: version 2.12 of ansible.builtin Why: environment variables without "ANSIBLE\_" prefix are deprecated Alternative: the "ANSIBLE\_DISPLAY\_SKIPPED\_HOSTS" environment variable env:ANSIBLE\_DISPLAY\_SKIPPED\_HOSTS | Toggle to control displaying skipped task/host results in a task |
| **show\_custom\_stats** boolean | **Choices:*** **no** β
* yes
| ini entries: [defaults]show\_custom\_stats = no env:ANSIBLE\_SHOW\_CUSTOM\_STATS | This adds the custom stats set via the set\_stats plugin to the play recap |
| **show\_per\_host\_start** boolean added in 2.9 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [defaults]show\_per\_host\_start = no env:ANSIBLE\_SHOW\_PER\_HOST\_START | This adds output that shows when a task is started to execute for each host |
| **show\_task\_path\_on\_failure** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [defaults]show\_task\_path\_on\_failure = no env:ANSIBLE\_SHOW\_TASK\_PATH\_ON\_FAILURE | When a task fails, display the path to the file containing the failed task and the line number. This information is displayed automatically for every task when running with `-vv` or greater verbosity. |
### Authors
* Unknown (!UNKNOWN)
ansible community.general.clc_firewall_policy β Create/delete/update firewall policies community.general.clc\_firewall\_policy β Create/delete/update firewall policies
================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.clc_firewall_policy`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create or delete or update firewall policies on Centurylink Cloud
Requirements
------------
The below requirements are needed on the host that executes this module.
* python = 2.7
* requests >= 2.5.0
* clc-sdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **destination** list / elements=string | | The list of destination addresses for traffic on the terminating firewall. This is required when state is 'present' |
| **destination\_account\_alias** string | | CLC alias for the destination account |
| **enabled** string | **Choices:*** True
* False
**Default:**"yes" | Whether the firewall policy is enabled or disabled |
| **firewall\_policy\_id** string | | Id of the firewall policy. This is required to update or delete an existing firewall policy |
| **location** string / required | | Target datacenter for the firewall policy |
| **ports** list / elements=string | | The list of ports associated with the policy. TCP and UDP can take in single ports or port ranges. Example: `['any', 'icmp', 'TCP/123', 'UDP/123', 'TCP/123-456', 'UDP/123-456']`. |
| **source** list / elements=string | | The list of source addresses for traffic on the originating firewall. This is required when state is 'present' |
| **source\_account\_alias** string / required | | CLC alias for the source account |
| **state** string | **Choices:*** **present** β
* absent
| Whether to create or delete the firewall policy |
| **wait** string | **Default:**"True" | Whether to wait for the provisioning tasks to finish before returning. |
Notes
-----
Note
* To use this module, it is required to set the below environment variables which enables access to the Centurylink Cloud - CLC\_V2\_API\_USERNAME, the account login id for the centurylink cloud - CLC\_V2\_API\_PASSWORD, the account password for the centurylink cloud
* Alternatively, the module accepts the API token and account alias. The API token can be generated using the CLC account login and password via the HTTP api call @ <https://api.ctl.io/v2/authentication/login> - CLC\_V2\_API\_TOKEN, the API token generated from <https://api.ctl.io/v2/authentication/login> - CLC\_ACCT\_ALIAS, the account alias associated with the centurylink cloud
* Users can set CLC\_V2\_API\_URL to specify an endpoint for pointing to a different CLC environment.
Examples
--------
```
---
- name: Create Firewall Policy
hosts: localhost
gather_facts: False
connection: local
tasks:
- name: Create / Verify an Firewall Policy at CenturyLink Cloud
clc_firewall:
source_account_alias: WFAD
location: VA1
state: present
source: 10.128.216.0/24
destination: 10.128.216.0/24
ports: Any
destination_account_alias: WFAD
- name: Delete Firewall Policy
hosts: localhost
gather_facts: False
connection: local
tasks:
- name: Delete an Firewall Policy at CenturyLink Cloud
clc_firewall:
source_account_alias: WFAD
location: VA1
state: absent
firewall_policy_id: c62105233d7a4231bd2e91b9c791e43e1
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **firewall\_policy** dictionary | success | The fire wall policy information **Sample:** {'destination': ['10.1.1.0/24', '10.2.2.0/24'], 'destinationAccount': 'wfad', 'enabled': True, 'id': 'fc36f1bfd47242e488a9c44346438c05', 'links': [{'href': 'http://api.ctl.io/v2-experimental/firewallPolicies/wfad/uc1/fc36f1bfd47242e488a9c44346438c05', 'rel': 'self', 'verbs': ['GET', 'PUT', 'DELETE']}], 'ports': ['any'], 'source': ['10.1.1.0/24', '10.2.2.0/24'], 'status': 'active'} |
| **firewall\_policy\_id** string | success | The fire wall policy id **Sample:** fc36f1bfd47242e488a9c44346438c05 |
### Authors
* CLC Runner (@clc-runner)
ansible community.general.proxmox_storage_info β Retrieve information about one or more Proxmox VE storages community.general.proxmox\_storage\_info β Retrieve information about one or more Proxmox VE storages
=====================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.proxmox_storage_info`.
New in version 2.2.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more Proxmox VE storages.
Requirements
------------
The below requirements are needed on the host that executes this module.
* proxmoxer
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_host** string / required | | Specify the target host of the Proxmox VE cluster. |
| **api\_password** string | | Specify the password to authenticate with. You can use `PROXMOX_PASSWORD` environment variable. |
| **api\_token\_id** string added in 1.3.0 of community.general | | Specify the token ID. |
| **api\_token\_secret** string added in 1.3.0 of community.general | | Specify the token secret. |
| **api\_user** string / required | | Specify the user to authenticate with. |
| **storage** string | | Only return informations on a specific storage.
aliases: name |
| **type** string | | Filter on a specifc storage type. |
| **validate\_certs** boolean | **Choices:*** **no** β
* yes
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* Storage specific options can be returned by this module, please look at the documentation at <https://pve.proxmox.com/wiki/Storage>.
Examples
--------
```
- name: List existing storages
community.general.proxmox_storage_info:
api_host: helldorado
api_user: root@pam
api_password: "{{ password | default(omit) }}"
api_token_id: "{{ token_id | default(omit) }}"
api_token_secret: "{{ token_secret | default(omit) }}"
register: proxmox_storages
- name: List NFS storages only
community.general.proxmox_storage_info:
api_host: helldorado
api_user: root@pam
api_password: "{{ password | default(omit) }}"
api_token_id: "{{ token_id | default(omit) }}"
api_token_secret: "{{ token_secret | default(omit) }}"
type: nfs
register: proxmox_storages_nfs
- name: Retrieve information about the lvm2 storage
community.general.proxmox_storage_info:
api_host: helldorado
api_user: root@pam
api_password: "{{ password | default(omit) }}"
api_token_id: "{{ token_id | default(omit) }}"
api_token_secret: "{{ token_secret | default(omit) }}"
storage: lvm2
register: proxmox_storage_lvm
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **proxmox\_storages** list / elements=dictionary | on success | List of storage pools. |
| | **content** list / elements=string | on success | Proxmox content types available in this storage |
| | **digest** string | on success | Storage's digest |
| | **nodes** list / elements=string | on success, if storage is not local | List of nodes associated to this storage |
| | **path** string | on success | Physical path to this storage |
| | **prune-backups** list / elements=dictionary | on success | Backup retention options |
| | **shared** boolean | on success | Is this storage shared |
| | **storage** string | on success | Storage name |
| | **type** string | on success | Storage type |
### Authors
* Tristan Le Guern (@tleguern)
ansible community.general.bearychat β Send BearyChat notifications community.general.bearychat β Send BearyChat notifications
==========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.bearychat`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* The [community.general.bearychat](#ansible-collections-community-general-bearychat-module) module sends notifications to <https://bearychat.com> via the Incoming Robot integration.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **attachments** list / elements=dictionary | | Define a list of attachments. For more information, see https://github.com/bearyinnovative/bearychat-tutorial/blob/master/robots/incoming.md#attachments |
| **channel** string | | Channel to send the message to. If absent, the message goes to the default channel selected by the *url*. |
| **markdown** boolean | **Choices:*** no
* **yes** β
| If `yes`, text will be parsed as markdown. |
| **text** string | | Message to send. |
| **url** string / required | | BearyChat WebHook URL. This authenticates you to the bearychat service. It looks like `https://hook.bearychat.com/=ae2CF/incoming/e61bd5c57b164e04b11ac02e66f47f60`. |
Examples
--------
```
- name: Send notification message via BearyChat
local_action:
module: bearychat
url: |
https://hook.bearychat.com/=ae2CF/incoming/e61bd5c57b164e04b11ac02e66f47f60
text: "{{ inventory_hostname }} completed"
- name: Send notification message via BearyChat all options
local_action:
module: bearychat
url: |
https://hook.bearychat.com/=ae2CF/incoming/e61bd5c57b164e04b11ac02e66f47f60
text: "{{ inventory_hostname }} completed"
markdown: no
channel: "#ansible"
attachments:
- title: "Ansible on {{ inventory_hostname }}"
text: "May the Force be with you."
color: "#ffffff"
images:
- http://example.com/index.png
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | success | execution result **Sample:** OK |
### Authors
* Jiangge Zhang (@tonyseek)
| programming_docs |
ansible community.general.aix_lvol β Configure AIX LVM logical volumes community.general.aix\_lvol β Configure AIX LVM logical volumes
===============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.aix_lvol`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module creates, removes or resizes AIX logical volumes. Inspired by lvol module.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **copies** integer | **Default:**1 | The number of copies of the logical volume. Maximum copies are 3. |
| **lv** string / required | | The name of the logical volume. |
| **lv\_type** string | **Default:**"jfs2" | The type of the logical volume. |
| **opts** string | | Free-form options to be passed to the mklv command. |
| **policy** string | **Choices:*** **maximum** β
* minimum
| Sets the interphysical volume allocation policy.
`maximum` allocates logical partitions across the maximum number of physical volumes.
`minimum` allocates logical partitions across the minimum number of physical volumes. |
| **pvs** list / elements=string | | A list of physical volumes e.g. `hdisk1,hdisk2`. |
| **size** string | | The size of the logical volume with one of the [MGT] units. |
| **state** string | **Choices:*** absent
* **present** β
| Control if the logical volume exists. If `present` and the volume does not already exist then the `size` option is required. |
| **vg** string / required | | The volume group this logical volume is part of. |
Examples
--------
```
- name: Create a logical volume of 512M
community.general.aix_lvol:
vg: testvg
lv: testlv
size: 512M
- name: Create a logical volume of 512M with disks hdisk1 and hdisk2
community.general.aix_lvol:
vg: testvg
lv: test2lv
size: 512M
pvs: [ hdisk1, hdisk2 ]
- name: Create a logical volume of 512M mirrored
community.general.aix_lvol:
vg: testvg
lv: test3lv
size: 512M
copies: 2
- name: Create a logical volume of 1G with a minimum placement policy
community.general.aix_lvol:
vg: rootvg
lv: test4lv
size: 1G
policy: minimum
- name: Create a logical volume with special options like mirror pool
community.general.aix_lvol:
vg: testvg
lv: testlv
size: 512M
opts: -p copy1=poolA -p copy2=poolB
- name: Extend the logical volume to 1200M
community.general.aix_lvol:
vg: testvg
lv: test4lv
size: 1200M
- name: Remove the logical volume
community.general.aix_lvol:
vg: testvg
lv: testlv
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | always | A friendly message describing the task result. **Sample:** Logical volume testlv created. |
### Authors
* Alain Dejoux (@adejoux)
ansible community.general.proxmox_template β management of OS templates in Proxmox VE cluster community.general.proxmox\_template β management of OS templates in Proxmox VE cluster
======================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.proxmox_template`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* allows you to upload/delete templates in Proxmox VE cluster
Requirements
------------
The below requirements are needed on the host that executes this module.
* proxmoxer
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_host** string / required | | Specify the target host of the Proxmox VE cluster. |
| **api\_password** string | | Specify the password to authenticate with. You can use `PROXMOX_PASSWORD` environment variable. |
| **api\_token\_id** string added in 1.3.0 of community.general | | Specify the token ID. |
| **api\_token\_secret** string added in 1.3.0 of community.general | | Specify the token secret. |
| **api\_user** string / required | | Specify the user to authenticate with. |
| **content\_type** string | **Choices:*** **vztmpl** β
* iso
| content type required only for `state=present`
|
| **force** boolean | **Choices:*** **no** β
* yes
| can be used only with `state=present`, exists template will be overwritten |
| **node** string | | Proxmox VE node on which to operate. |
| **src** path | | path to uploaded file required only for `state=present`
|
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the template |
| **storage** string | **Default:**"local" | target storage |
| **template** string | | the template name Required for state `absent` to delete a template. Required for state `present` to download an appliance container template (pveam). |
| **timeout** integer | **Default:**30 | timeout for operations |
| **validate\_certs** boolean | **Choices:*** **no** β
* yes
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* Requires proxmoxer and requests modules on host. This modules can be installed with pip.
Examples
--------
```
- name: Upload new openvz template with minimal options
community.general.proxmox_template:
node: uk-mc02
api_user: root@pam
api_password: 1q2w3e
api_host: node1
src: ~/ubuntu-14.04-x86_64.tar.gz
- name: >
Upload new openvz template with minimal options use environment
PROXMOX_PASSWORD variable(you should export it before)
community.general.proxmox_template:
node: uk-mc02
api_user: root@pam
api_host: node1
src: ~/ubuntu-14.04-x86_64.tar.gz
- name: Upload new openvz template with all options and force overwrite
community.general.proxmox_template:
node: uk-mc02
api_user: root@pam
api_password: 1q2w3e
api_host: node1
storage: local
content_type: vztmpl
src: ~/ubuntu-14.04-x86_64.tar.gz
force: yes
- name: Delete template with minimal options
community.general.proxmox_template:
node: uk-mc02
api_user: root@pam
api_password: 1q2w3e
api_host: node1
template: ubuntu-14.04-x86_64.tar.gz
state: absent
- name: Download proxmox appliance container template
community.general.proxmox_template:
node: uk-mc02
api_user: root@pam
api_password: 1q2w3e
api_host: node1
storage: local
content_type: vztmpl
template: ubuntu-20.04-standard_20.04-1_amd64.tar.gz
```
### Authors
* Sergei Antipov (@UnderGreen)
ansible community.general.maven_artifact β Downloads an Artifact from a Maven Repository community.general.maven\_artifact β Downloads an Artifact from a Maven Repository
=================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.maven_artifact`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Downloads an artifact from a maven repository given the maven coordinates provided to the module.
* Can retrieve snapshots or release versions of the artifact and will resolve the latest available version if one is not available.
Requirements
------------
The below requirements are needed on the host that executes this module.
* lxml
* boto if using a S3 repository (s3://β¦)
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **artifact\_id** string / required | | The maven artifactId coordinate |
| **attributes** string added in 2.3 of ansible.builtin | | The attributes the resulting file or directory should have. To get supported flags look at the man page for *chattr* on the target system. This string should contain the attributes in the same order as the one displayed by *lsattr*. The `=` operator is assumed as default, otherwise `+` or `-` operators need to be included in the string.
aliases: attr |
| **checksum\_alg** string added in 3.2.0 of community.general | **Choices:*** **md5** β
* sha1
| If `md5`, checksums will use the MD5 algorithm. This is the default. If `sha1`, checksums will use the SHA1 algorithm. This can be used on systems configured to use FIPS-compliant algorithms, since MD5 will be blocked on such systems. |
| **classifier** string | | The maven classifier coordinate |
| **client\_cert** path added in 1.3.0 of community.general | | PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, *client\_key* is not required. |
| **client\_key** path added in 1.3.0 of community.general | | PEM formatted file that contains your private key to be used for SSL client authentication. If *client\_cert* contains both the certificate and key, this option is not required. |
| **dest** path / required | | The path where the artifact should be written to If file mode or ownerships are specified and destination path already exists, they affect the downloaded file |
| **directory\_mode** string | | Filesystem permission mode applied recursively to *dest* when it is a directory. |
| **extension** string | **Default:**"jar" | The maven type/extension coordinate |
| **force\_basic\_auth** boolean added in 0.2.0 of community.general | **Choices:*** **no** β
* yes
| httplib2, the library used by the uri module only sends authentication information when a webservice responds to an initial request with a 401 status. Since some basic auth services do not properly send a 401, logins will fail. This option forces the sending of the Basic authentication header upon initial request. |
| **group** string | | Name of the group that should own the file/directory, as would be fed to *chown*. |
| **group\_id** string / required | | The Maven groupId coordinate |
| **headers** dictionary | | Add custom HTTP headers to a request in hash/dict format. |
| **keep\_name** boolean | **Choices:*** **no** β
* yes
| If `yes`, the downloaded artifact's name is preserved, i.e the version number remains part of it. This option only has effect when `dest` is a directory and `version` is set to `latest` or `version_by_spec` is defined. |
| **mode** raw | | The permissions the resulting file or directory should have. For those used to */usr/bin/chmod* remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like `0644` or `01777`) or quote it (like `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination file **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created file. If `mode` is not specified and the destination file **does** exist, the mode of the existing file will be used. Specifying `mode` is the best way to ensure files are created with the correct permissions. See CVE-2020-1736 for further details. |
| **owner** string | | Name of the user that should own the file/directory, as would be fed to *chown*. |
| **password** string | | The password to authenticate with to the Maven Repository. Use AWS secret access key of the repository is hosted on S3
aliases: aws\_secret\_access\_key |
| **repository\_url** string | **Default:**"https://repo1.maven.org/maven2" | The URL of the Maven Repository to download from. Use s3://... if the repository is hosted on Amazon S3, added in version 2.2. Use file://... if the repository is local, added in version 2.6 |
| **selevel** string | | The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the `range`. When set to `_default`, it will use the `level` portion of the policy if available. |
| **serole** string | | The role part of the SELinux file context. When set to `_default`, it will use the `role` portion of the policy if available. |
| **setype** string | | The type part of the SELinux file context. When set to `_default`, it will use the `type` portion of the policy if available. |
| **seuser** string | | The user part of the SELinux file context. By default it uses the `system` policy, where applicable. When set to `_default`, it will use the `user` portion of the policy if available. |
| **state** string | **Choices:*** **present** β
* absent
| The desired state of the artifact |
| **timeout** integer | **Default:**10 | Specifies a timeout in seconds for the connection attempt |
| **unsafe\_writes** boolean added in 2.2 of ansible.builtin | **Choices:*** **no** β
* yes
| Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. |
| **username** string | | The username to authenticate as to the Maven Repository. Use AWS secret key of the repository is hosted on S3
aliases: aws\_secret\_key |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be set to `no` when no other option exists. |
| **verify\_checksum** string | **Choices:*** never
* **download** β
* change
* always
| If `never`, the MD5/SHA1 checksum will never be downloaded and verified. If `download`, the MD5/SHA1 checksum will be downloaded and verified only after artifact download. This is the default. If `change`, the MD5/SHA1 checksum will be downloaded and verified if the destination already exist, to verify if they are identical. This was the behaviour before 2.6. Since it downloads the checksum before (maybe) downloading the artifact, and since some repository software, when acting as a proxy/cache, return a 404 error if the artifact has not been cached yet, it may fail unexpectedly. If you still need it, you should consider using `always` instead - if you deal with a checksum, it is better to use it to verify integrity after download.
`always` combines `download` and `change`. |
| **version** string | | The maven version coordinate Mutually exclusive with *version\_by\_spec*. |
| **version\_by\_spec** string added in 0.2.0 of community.general | | The maven dependency version ranges. See supported version ranges on <https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution>
The range type "(,1.0],[1.2,)" and "(,1.1),(1.1,)" is not supported. Mutually exclusive with *version*. |
Examples
--------
```
- name: Download the latest version of the JUnit framework artifact from Maven Central
community.general.maven_artifact:
group_id: junit
artifact_id: junit
dest: /tmp/junit-latest.jar
- name: Download JUnit 4.11 from Maven Central
community.general.maven_artifact:
group_id: junit
artifact_id: junit
version: 4.11
dest: /tmp/junit-4.11.jar
- name: Download an artifact from a private repository requiring authentication
community.general.maven_artifact:
group_id: com.company
artifact_id: library-name
repository_url: 'https://repo.company.com/maven'
username: user
password: pass
dest: /tmp/library-name-latest.jar
- name: Download an artifact from a private repository requiring certificate authentication
community.general.maven_artifact:
group_id: com.company
artifact_id: library-name
repository_url: 'https://repo.company.com/maven'
client_cert: /path/to/cert.pem
client_key: /path/to/key.pem
dest: /tmp/library-name-latest.jar
- name: Download a WAR File to the Tomcat webapps directory to be deployed
community.general.maven_artifact:
group_id: com.company
artifact_id: web-app
extension: war
repository_url: 'https://repo.company.com/maven'
dest: /var/lib/tomcat7/webapps/web-app.war
- name: Keep a downloaded artifact's name, i.e. retain the version
community.general.maven_artifact:
version: latest
artifact_id: spring-core
group_id: org.springframework
dest: /tmp/
keep_name: yes
- name: Download the latest version of the JUnit framework artifact from Maven local
community.general.maven_artifact:
group_id: junit
artifact_id: junit
dest: /tmp/junit-latest.jar
repository_url: "file://{{ lookup('env','HOME') }}/.m2/repository"
- name: Download the latest version between 3.8 and 4.0 (exclusive) of the JUnit framework artifact from Maven Central
community.general.maven_artifact:
group_id: junit
artifact_id: junit
version_by_spec: "[3.8,4.0)"
dest: /tmp/
```
### Authors
* Chris Schmidt (@chrisisbeef)
ansible community.general.udm_user β Manage posix users on a univention corporate server community.general.udm\_user β Manage posix users on a univention corporate server
=================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.udm_user`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* This module allows to manage posix users on a univention corporate server (UCS). It uses the python API of the UCS to create a new object or edit it.
Requirements
------------
The below requirements are needed on the host that executes this module.
* Python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **birthday** string | | Birthday |
| **city** string | | City of users business address. |
| **country** string | | Country of users business address. |
| **department\_number** string | | Department number of users business address.
aliases: departmentNumber |
| **description** string | | Description (not gecos) |
| **display\_name** string | | Display name (not gecos)
aliases: displayName |
| **email** list / elements=string | **Default:**[""] | A list of e-mail addresses. |
| **employee\_number** string | | Employee number
aliases: employeeNumber |
| **employee\_type** string | | Employee type
aliases: employeeType |
| **firstname** string | | First name. Required if `state=present`. |
| **gecos** string | | GECOS |
| **groups** list / elements=string | **Default:**[] | POSIX groups, the LDAP DNs of the groups will be found with the LDAP filter for each group as $GROUP: `(&(objectClass=posixGroup`(cn=$GROUP))). |
| **home\_share** string | | Home NFS share. Must be a LDAP DN, e.g. `cn=home,cn=shares,ou=school,dc=example,dc=com`.
aliases: homeShare |
| **home\_share\_path** string | | Path to home NFS share, inside the homeShare.
aliases: homeSharePath |
| **home\_telephone\_number** list / elements=string | **Default:**[] | List of private telephone numbers.
aliases: homeTelephoneNumber |
| **homedrive** string | | Windows home drive, e.g. `"H:"`. |
| **lastname** string | | Last name. Required if `state=present`. |
| **mail\_alternative\_address** list / elements=string | **Default:**[] | List of alternative e-mail addresses.
aliases: mailAlternativeAddress |
| **mail\_home\_server** string | | FQDN of mail server
aliases: mailHomeServer |
| **mail\_primary\_address** string | | Primary e-mail address
aliases: mailPrimaryAddress |
| **mobile\_telephone\_number** list / elements=string | **Default:**[] | Mobile phone number
aliases: mobileTelephoneNumber |
| **organisation** string | | Organisation
aliases: organization |
| **ou** string | **Default:**"" | Organizational Unit inside the LDAP Base DN, e.g. `school` for LDAP OU `ou=school,dc=example,dc=com`. |
| **overridePWHistory** boolean | **Choices:*** **no** β
* yes
| Override password history
aliases: override\_pw\_history |
| **overridePWLength** boolean | **Choices:*** **no** β
* yes
| Override password check
aliases: override\_pw\_length |
| **pager\_telephonenumber** list / elements=string | **Default:**[] | List of pager telephone numbers.
aliases: pagerTelephonenumber |
| **password** string | | Password. Required if `state=present`. |
| **phone** list / elements=string | | List of telephone numbers. |
| **position** string | **Default:**"" | Define the whole position of users object inside the LDAP tree, e.g. `cn=employee,cn=users,ou=school,dc=example,dc=com`. |
| **postcode** string | | Postal code of users business address. |
| **primary\_group** string | | Primary group. This must be the group LDAP DN. If not specified, it defaults to `cn=Domain Users,cn=groups,$LDAP_BASE_DN`.
aliases: primaryGroup |
| **profilepath** string | | Windows profile directory |
| **pwd\_change\_next\_login** string | **Choices:*** 0
* 1
| Change password on next login.
aliases: pwdChangeNextLogin |
| **room\_number** string | | Room number of users business address.
aliases: roomNumber |
| **samba\_privileges** list / elements=string | | Samba privilege, like allow printer administration, do domain join.
aliases: sambaPrivileges |
| **samba\_user\_workstations** list / elements=string | | Allow the authentication only on this Microsoft Windows host.
aliases: sambaUserWorkstations |
| **sambahome** string | | Windows home path, e.g. `'\\$FQDN\$USERNAME'`. |
| **scriptpath** string | | Windows logon script. |
| **secretary** list / elements=string | **Default:**[] | A list of superiors as LDAP DNs. |
| **serviceprovider** list / elements=string | **Default:**[""] | Enable user for the following service providers. |
| **shell** string | **Default:**"/bin/bash" | Login shell |
| **state** string | **Choices:*** **present** β
* absent
| Whether the user is present or not. |
| **street** string | | Street of users business address. |
| **subpath** string | **Default:**"cn=users" | LDAP subpath inside the organizational unit, e.g. `cn=teachers,cn=users` for LDAP container `cn=teachers,cn=users,dc=example,dc=com`. |
| **title** string | | Title, e.g. `Prof.`. |
| **unixhome** string | | Unix home directory If not specified, it defaults to `/home/$USERNAME`. |
| **update\_password** string | **Choices:*** **always** β
* on\_create
|
`always` will update passwords if they differ. `on_create` will only set the password for newly created users. |
| **userexpiry** string | | Account expiry date, e.g. `1999-12-31`. If not specified, it defaults to the current day plus one year. |
| **username** string / required | | User name
aliases: name |
Examples
--------
```
- name: Create a user on a UCS
community.general.udm_user:
name: FooBar
password: secure_password
firstname: Foo
lastname: Bar
- name: Create a user with the DN C(uid=foo,cn=teachers,cn=users,ou=school,dc=school,dc=example,dc=com)
community.general.udm_user:
name: foo
password: secure_password
firstname: Foo
lastname: Bar
ou: school
subpath: 'cn=teachers,cn=users'
# or define the position
- name: Create a user with the DN C(uid=foo,cn=teachers,cn=users,ou=school,dc=school,dc=example,dc=com)
community.general.udm_user:
name: foo
password: secure_password
firstname: Foo
lastname: Bar
position: 'cn=teachers,cn=users,ou=school,dc=school,dc=example,dc=com'
```
### Authors
* Tobias RΓΌetschi (@keachi)
| programming_docs |
ansible community.general.consul_kv β Fetch metadata from a Consul key value store. community.general.consul\_kv β Fetch metadata from a Consul key value store.
============================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.consul_kv`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Lookup metadata for a playbook from the key value store in a Consul cluster. Values can be easily set in the kv store with simple rest commands
* `curl -X PUT -d 'some-value' http://localhost:8500/v1/kv/ansible/somedata`
Requirements
------------
The below requirements are needed on the local controller node that executes this lookup.
* python-consul python library <https://python-consul.readthedocs.io/en/latest/#installation>
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_raw** list / elements=string | | | List of key(s) to retrieve. |
| **client\_cert** string | | ini entries: [lookup\_consul]client\_cert = None env:ANSIBLE\_CONSUL\_CLIENT\_CERT | The client cert to verify the ssl connection. |
| **datacenter** string | | | Retrieve the key from a consul datacenter other than the default for the consul host. |
| **host** string | **Default:**"localhost" | ini entries: [lookup\_consul]host = localhost env:ANSIBLE\_CONSUL\_URL | The target to connect to, must be a resolvable address. Will be determined from `ANSIBLE_CONSUL_URL` if that is set.
`ANSIBLE_CONSUL_URL` should look like this: `https://my.consul.server:8500`
|
| **index** string | | | If the key has a value with the specified index then this is returned allowing access to historical values. |
| **port** string | **Default:**8500 | | The port of the target host to connect to. If you use `ANSIBLE_CONSUL_URL` this value will be used from there. |
| **recurse** boolean | **Choices:*** **no** β
* yes
| | If true, will retrieve all the values that have the given key as prefix. |
| **scheme** string | **Default:**"http" | | Whether to use http or https. If you use `ANSIBLE_CONSUL_URL` this value will be used from there. |
| **token** string | | | The acl token to allow access to restricted values. |
| **url** string added in 1.0.0 of community.general | | ini entries: [lookup\_consul]url = None env:ANSIBLE\_CONSUL\_URL | The target to connect to, should look like this: `https://my.consul.server:8500`. |
| **validate\_certs** string | **Default:**"yes" | ini entries: [lookup\_consul]validate\_certs = yes env:ANSIBLE\_CONSUL\_VALIDATE\_CERTS | Whether to verify the ssl connection or not. |
Examples
--------
```
- ansible.builtin.debug:
msg: 'key contains {{item}}'
with_community.general.consul_kv:
- 'key/to/retrieve'
- name: Parameters can be provided after the key be more specific about what to retrieve
ansible.builtin.debug:
msg: 'key contains {{item}}'
with_community.general.consul_kv:
- 'key/to recurse=true token=E6C060A9-26FB-407A-B83E-12DDAFCB4D98'
- name: retrieving a KV from a remote cluster on non default port
ansible.builtin.debug:
msg: "{{ lookup('community.general.consul_kv', 'my/key', host='10.10.10.10', port='2000') }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:
| Key | Returned | Description |
| --- | --- | --- |
| **\_raw** dictionary | success | Value(s) stored in consul. |
### Authors
* Unknown (!UNKNOWN)
ansible community.general.nsupdate β Manage DNS records. community.general.nsupdate β Manage DNS records.
================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.nsupdate`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and remove DNS records using DDNS updates
Requirements
------------
The below requirements are needed on the host that executes this module.
* dnspython
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **key\_algorithm** string | **Choices:*** HMAC-MD5.SIG-ALG.REG.INT
* **hmac-md5** β
* hmac-sha1
* hmac-sha224
* hmac-sha256
* hmac-sha384
* hmac-sha512
| Specify key algorithm used by `key_secret`. |
| **key\_name** string | | Use TSIG key name to authenticate against DNS `server`
|
| **key\_secret** string | | Use TSIG key secret, associated with `key_name`, to authenticate against `server`
|
| **port** integer | **Default:**53 | Use this TCP port when connecting to `server`. |
| **protocol** string | **Choices:*** **tcp** β
* udp
| Sets the transport protocol (TCP or UDP). TCP is the recommended and a more robust option. |
| **record** string / required | | Sets the DNS record to modify. When zone is omitted this has to be absolute (ending with a dot). |
| **server** string / required | | Apply DNS modification on this server, specified by IPv4 or IPv6 address. |
| **state** string | **Choices:*** **present** β
* absent
| Manage DNS record. |
| **ttl** integer | **Default:**3600 | Sets the record TTL. |
| **type** string | **Default:**"A" | Sets the record type. |
| **value** list / elements=string | | Sets the record value. |
| **zone** string | | DNS record will be modified on this `zone`. When omitted DNS will be queried to attempt finding the correct zone. Starting with Ansible 2.7 this parameter is optional. |
Examples
--------
```
- name: Add or modify ansible.example.org A to 192.168.1.1"
community.general.nsupdate:
key_name: "nsupdate"
key_secret: "+bFQtBCta7j2vWkjPkAFtgA=="
server: "10.1.1.1"
zone: "example.org"
record: "ansible"
value: "192.168.1.1"
- name: Add or modify ansible.example.org A to 192.168.1.1, 192.168.1.2 and 192.168.1.3"
community.general.nsupdate:
key_name: "nsupdate"
key_secret: "+bFQtBCta7j2vWkjPkAFtgA=="
server: "10.1.1.1"
zone: "example.org"
record: "ansible"
value: ["192.168.1.1", "192.168.1.2", "192.168.1.3"]
- name: Remove puppet.example.org CNAME
community.general.nsupdate:
key_name: "nsupdate"
key_secret: "+bFQtBCta7j2vWkjPkAFtgA=="
server: "10.1.1.1"
zone: "example.org"
record: "puppet"
type: "CNAME"
state: absent
- name: Add 1.1.168.192.in-addr.arpa. PTR for ansible.example.org
community.general.nsupdate:
key_name: "nsupdate"
key_secret: "+bFQtBCta7j2vWkjPkAFtgA=="
server: "10.1.1.1"
record: "1.1.168.192.in-addr.arpa."
type: "PTR"
value: "ansible.example.org."
state: present
- name: Remove 1.1.168.192.in-addr.arpa. PTR
community.general.nsupdate:
key_name: "nsupdate"
key_secret: "+bFQtBCta7j2vWkjPkAFtgA=="
server: "10.1.1.1"
record: "1.1.168.192.in-addr.arpa."
type: "PTR"
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** string | success | If module has modified record |
| **dns\_rc** integer | always | dnspython return code **Sample:** 4 |
| **dns\_rc\_str** string | always | dnspython return code (string representation) **Sample:** REFUSED |
| **record** string | success | DNS record **Sample:** ansible |
| **ttl** integer | success | DNS record TTL **Sample:** 86400 |
| **type** string | success | DNS record type **Sample:** CNAME |
| **value** list / elements=string | success | DNS record value(s) **Sample:** 192.168.1.1 |
| **zone** string | success | DNS record zone **Sample:** example.org. |
### Authors
* Loic Blot (@nerzhul)
ansible community.general.rax_dns β Manage domains on Rackspace Cloud DNS community.general.rax\_dns β Manage domains on Rackspace Cloud DNS
==================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.rax_dns`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage domains on Rackspace Cloud DNS
Requirements
------------
The below requirements are needed on the host that executes this module.
* pyrax
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string | | Rackspace API key, overrides *credentials*.
aliases: password |
| **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/>
|
| **comment** string | | Brief description of the domain. Maximum length of 160 characters |
| **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided.
aliases: creds\_file |
| **email** string | | Email address of the domain administrator |
| **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. |
| **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. |
| **name** string | | Domain name to create |
| **region** string | | Region to create an instance in. |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the resource |
| **tenant\_id** string | | The tenant ID used for authentication. |
| **tenant\_name** string | | The tenant name used for authentication. |
| **ttl** integer | **Default:**3600 | Time to live of domain in seconds |
| **username** string | | Rackspace username, overrides *credentials*. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether or not to require SSL validation of API endpoints.
aliases: verify\_ssl |
Notes
-----
Note
* It is recommended that plays utilizing this module be run with `serial: 1` to avoid exceeding the API request limit imposed by the Rackspace CloudDNS API
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
Examples
--------
```
- name: Create domain
hosts: all
gather_facts: False
tasks:
- name: Domain create request
local_action:
module: rax_dns
credentials: ~/.raxpub
name: example.org
email: [email protected]
register: rax_dns
```
### Authors
* Matt Martz (@sivel)
ansible community.general.etcd3 β Set or delete key value pairs from an etcd3 cluster community.general.etcd3 β Set or delete key value pairs from an etcd3 cluster
=============================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.etcd3`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Sets or deletes values in etcd3 cluster using its v3 api.
* Needs python etcd3 lib to work
Requirements
------------
The below requirements are needed on the host that executes this module.
* etcd3
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **ca\_cert** path | | The Certificate Authority to use to verify the etcd host. Required if *client\_cert* and *client\_key* are defined. |
| **client\_cert** path | | PEM formatted certificate chain file to be used for SSL client authentication. Required if *client\_key* is defined. |
| **client\_key** path | | PEM formatted file that contains your private key to be used for SSL client authentication. Required if *client\_cert* is defined. |
| **host** string | **Default:**"localhost" | the IP address of the cluster |
| **key** string / required | | the key where the information is stored in the cluster |
| **password** string | | The password to use for authentication. Required if *user* is defined. |
| **port** integer | **Default:**2379 | the port number used to connect to the cluster |
| **state** string / required | **Choices:*** present
* absent
| the state of the value for the key. can be present or absent |
| **timeout** integer | | The socket level timeout in seconds. |
| **user** string | | The etcd user to authenticate with. |
| **value** string / required | | the information stored |
Examples
--------
```
- name: Store a value "bar" under the key "foo" for a cluster located "http://localhost:2379"
community.general.etcd3:
key: "foo"
value: "baz3"
host: "localhost"
port: 2379
state: "present"
- name: Authenticate using user/password combination with a timeout of 10 seconds
community.general.etcd3:
key: "foo"
value: "baz3"
state: "present"
user: "someone"
password: "password123"
timeout: 10
- name: Authenticate using TLS certificates
community.general.etcd3:
key: "foo"
value: "baz3"
state: "present"
ca_cert: "/etc/ssl/certs/CA_CERT.pem"
client_cert: "/etc/ssl/certs/cert.crt"
client_key: "/etc/ssl/private/key.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **key** string | always | The key that was queried |
| **old\_value** string | always | The previous value in the cluster |
### Authors
* Jean-Philippe Evrard (@evrardjp)
* Victor Fauth (@vfauth)
ansible community.general.opkg β Package manager for OpenWrt community.general.opkg β Package manager for OpenWrt
====================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.opkg`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Manages OpenWrt packages
Requirements
------------
The below requirements are needed on the host that executes this module.
* opkg
* python
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **force** string | **Choices:*** * depends
* maintainer
* reinstall
* overwrite
* downgrade
* space
* postinstall
* remove
* checksum
* removal-of-dependent-packages
| opkg --force parameter used |
| **name** string / required | | name of package to install/remove
aliases: pkg |
| **state** string | **Choices:*** **present** β
* absent
* installed
* removed
| state of the package |
| **update\_cache** boolean | **Choices:*** **no** β
* yes
| update the package db first Alias `update-cache` has been deprecated and will be removed in community.general 5.0.0.
aliases: update-cache |
Examples
--------
```
- name: Install foo
community.general.opkg:
name: foo
state: present
- name: Update cache and install foo
community.general.opkg:
name: foo
state: present
update_cache: yes
- name: Remove foo
community.general.opkg:
name: foo
state: absent
- name: Remove foo and bar
community.general.opkg:
name: foo,bar
state: absent
- name: Install foo using overwrite option forcibly
community.general.opkg:
name: foo
state: present
force: overwrite
```
### Authors
* Patrick Pelletier (@skinp)
ansible community.general.github_webhook_info β Query information about GitHub webhooks community.general.github\_webhook\_info β Query information about GitHub webhooks
=================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.github_webhook_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Query information about GitHub webhooks
* This module was called `github_webhook_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* PyGithub >= 1.3.5
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **github\_url** string | **Default:**"https://api.github.com" | Base URL of the github api |
| **password** string | | Password to authenticate to GitHub with |
| **repository** string / required | | Full name of the repository to configure a hook for
aliases: repo |
| **token** string | | Token to authenticate to GitHub with |
| **user** string / required | | User to authenticate to GitHub as |
Examples
--------
```
- name: List hooks for a repository (password auth)
community.general.github_webhook_info:
repository: ansible/ansible
user: "{{ github_user }}"
password: "{{ github_password }}"
register: ansible_webhooks
- name: List hooks for a repository on GitHub Enterprise (token auth)
community.general.github_webhook_info:
repository: myorg/myrepo
user: "{{ github_user }}"
token: "{{ github_user_api_token }}"
github_url: https://github.example.com/api/v3/
register: myrepo_webhooks
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **hooks** list / elements=string | always | A list of hooks that exist for the repo **Sample:** [{"has\_shared\_secret": true, "url": "https://jenkins.example.com/ghprbhook/", "events": ["issue\_comment", "pull\_request"], "insecure\_ssl": "1", "content\_type": "json", "active": true, "id": 6206, "last\_response": {"status": "active", "message": "OK", "code": 200}}] |
### Authors
* Chris St. Pierre (@stpierre)
| programming_docs |
ansible community.general.opendj_backendprop β Will update the backend configuration of OpenDJ via the dsconfig set-backend-prop command. community.general.opendj\_backendprop β Will update the backend configuration of OpenDJ via the dsconfig set-backend-prop command.
==================================================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.opendj_backendprop`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* This module will update settings for OpenDJ with the command set-backend-prop.
* It will check first via de get-backend-prop if configuration needs to be applied.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **backend** string / required | | The name of the backend on which the property needs to be updated. |
| **hostname** string / required | | The hostname of the OpenDJ server. |
| **name** string / required | | The configuration setting to update. |
| **opendj\_bindir** path | **Default:**"/opt/opendj/bin" | The path to the bin directory of OpenDJ. |
| **password** string | | The password for the cn=Directory Manager user. Either password or passwordfile is needed. |
| **passwordfile** path | | Location to the password file which holds the password for the cn=Directory Manager user. Either password or passwordfile is needed. |
| **port** string / required | | The Admin port on which the OpenDJ instance is available. |
| **state** string | **Default:**"present" | If configuration needs to be added/updated |
| **username** string | **Default:**"cn=Directory Manager" | The username to connect to. |
| **value** string / required | | The value for the configuration item. |
Examples
--------
```
- name: Add or update OpenDJ backend properties
action: opendj_backendprop
hostname=localhost
port=4444
username="cn=Directory Manager"
password=password
backend=userRoot
name=index-entry-limit
value=5000
```
### Authors
* Werner Dijkerman (@dj-wasabi)
ansible community.general.vertica_info β Gathers Vertica database facts. community.general.vertica\_info β Gathers Vertica database facts.
=================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.vertica_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Gathers Vertica database information.
* This module was called `vertica_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [community.general.vertica\_info](#ansible-collections-community-general-vertica-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* unixODBC
* pyodbc
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster** string | **Default:**"localhost" | Name of the cluster running the schema. |
| **db** string | | Name of the database running the schema. |
| **login\_password** string | | The password used to authenticate with. |
| **login\_user** string | **Default:**"dbadmin" | The username used to authenticate with. |
| **port** string | **Default:**5433 | Database port to connect to. |
Notes
-----
Note
* The default authentication assumes that you are either logging in as or sudoβing to the `dbadmin` account on the host.
* This module uses `pyodbc`, a Python ODBC database adapter. You must ensure that `unixODBC` and `pyodbc` are installed on the host and properly configured.
* Configuring `unixODBC` for Vertica requires `Driver = /opt/vertica/lib64/libverticaodbc.so` to be added to the `Vertica` section of either `/etc/odbcinst.ini` or `$HOME/.odbcinst.ini` and both `ErrorMessagesPath = /opt/vertica/lib64` and `DriverManagerEncoding = UTF-16` to be added to the `Driver` section of either `/etc/vertica.ini` or `$HOME/.vertica.ini`.
Examples
--------
```
- name: Gathering vertica facts
community.general.vertica_info: db=db_name
register: result
- name: Print schemas
ansible.builtin.debug:
msg: "{{ result.vertica_schemas }}"
```
### Authors
* Dariusz Owczarek (@dareko)
ansible community.general.infinity β Manage Infinity IPAM using Rest API community.general.infinity β Manage Infinity IPAM using Rest API
================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.infinity`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage Infinity IPAM using REST API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string / required | **Choices:*** add\_network
* delete\_network
* get\_network
* get\_network\_id
* release\_ip
* release\_network
* reserve\_network
* reserve\_next\_available\_ip
| Action to perform |
| **ip\_address** string | **Default:**"" | IP Address for a reservation or a release. |
| **network\_address** string | **Default:**"" | Network address with CIDR format (e.g., 192.168.310.0). |
| **network\_family** string | **Choices:*** 4
* 6
* dual
**Default:**4 | Network family defined by Infinity, e.g. IPv4, IPv6 and Dual stack |
| **network\_id** string | **Default:**"" | Network ID. |
| **network\_location** integer | **Default:**-1 | The parent network id for a given network. |
| **network\_name** string | **Default:**"" | The name of a network. |
| **network\_size** string | **Default:**"" | Network bitmask (e.g. 255.255.255.220) or CIDR format (e.g., /26). |
| **network\_type** string | **Choices:*** **lan** β
* shared\_lan
* supernet
| Network type defined by Infinity |
| **password** string / required | | Infinity password. |
| **server\_ip** string / required | | Infinity server\_ip with IP address. |
| **username** string / required | | Username to access Infinity. The user must have REST API privileges. |
Examples
--------
```
---
- hosts: localhost
connection: local
strategy: debug
tasks:
- name: Reserve network into Infinity IPAM
community.general.infinity:
server_ip: 80.75.107.12
username: username
password: password
action: reserve_network
network_name: reserve_new_ansible_network
network_family: 4
network_type: lan
network_id: 1201
network_size: /28
register: infinity
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ip\_info** string | success | when reserve next available ip address from a network, the ip address info ) is returned. **Sample:** {"address": "192.168.10.3", "hostname": "", "FQDN": "", "domainname": "", "id": 3229} |
| **network\_id** string | success | id for a given network **Sample:** 1501 |
| **network\_info** string | success | when reserving a LAN network from a Infinity supernet by providing network\_size, the information about the reserved network is returned. **Sample:** {'description': None, 'network\_address': '192.168.10.32/28', 'network\_family': '4', 'network\_id': 3102, 'network\_location': '3085', 'network\_name': "'reserve\_new\_ansible\_network'", 'network\_size': None, 'network\_type': 'lan', 'ranges': {'first\_ip': None, 'id': 0, 'last\_ip': None, 'name': None, 'type': None}} |
### Authors
* Meirong Liu (@MeganLiu)
ansible community.general.lxd β Run tasks in lxc containers via lxc CLI community.general.lxd β Run tasks in lxc containers via lxc CLI
===============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.lxd`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
Synopsis
--------
* Run commands or put/fetch files to an existing lxc container using lxc CLI
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **executable** string | **Default:**"/bin/sh" | var: ansible\_executable var: ansible\_lxd\_executable | shell to use for execution inside container |
| **project** string added in 2.0.0 of community.general | | var: ansible\_lxd\_project | Name of the LXD project to use. |
| **remote** string added in 2.0.0 of community.general | **Default:**"local" | var: ansible\_lxd\_remote | Name of the LXD remote to use. |
| **remote\_addr** string | **Default:**"inventory\_hostname" | var: ansible\_host var: ansible\_lxd\_host | Container identifier. |
### Authors
* Matt Clay (@mattclay) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#c8a5a9bcbceeebfbfff3eeebfdfaf3eeebfcf0f3a5b1bbbca1a4adeeebfcfef3aba7a5)>
ansible community.general.lxca_cmms β Custom module for lxca cmms inventory utility community.general.lxca\_cmms β Custom module for lxca cmms inventory utility
============================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.lxca_cmms`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module returns/displays a inventory details of cmms
Requirements
------------
The below requirements are needed on the host that executes this module.
* pylxca
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_url** string / required | | lxca https full web address |
| **chassis** string | | uuid of chassis, this is string with length greater than 16. |
| **command\_options** string | **Choices:*** **cmms** β
* cmms\_by\_uuid
* cmms\_by\_chassis\_uuid
| options to filter nodes information |
| **login\_password** string / required | | The password for use in HTTP basic authentication. |
| **login\_user** string / required | | The username for use in HTTP basic authentication. |
| **uuid** string | | uuid of device, this is string with length greater than 16. |
Notes
-----
Note
* Additional detail about pylxca can be found at <https://github.com/lenovo/pylxca>
* Playbooks using these modules can be found at <https://github.com/lenovo/ansible.lenovo-lxca>
* Check mode is not supported.
Examples
--------
```
# get all cmms info
- name: Get nodes data from LXCA
community.general.lxca_cmms:
login_user: USERID
login_password: Password
auth_url: "https://10.243.15.168"
# get specific cmms info by uuid
- name: Get nodes data from LXCA
community.general.lxca_cmms:
login_user: USERID
login_password: Password
auth_url: "https://10.243.15.168"
uuid: "3C737AA5E31640CE949B10C129A8B01F"
command_options: cmms_by_uuid
# get specific cmms info by chassis uuid
- name: Get nodes data from LXCA
community.general.lxca_cmms:
login_user: USERID
login_password: Password
auth_url: "https://10.243.15.168"
chassis: "3C737AA5E31640CE949B10C129A8B01F"
command_options: cmms_by_chassis_uuid
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **result** dictionary | success | cmms detail from lxca **Sample:** {'cmmList': [{'machineType': '', 'model': '', 'type': 'CMM', 'uuid': '118D2C88C8FD11E4947B6EAE8B4BDCDF'}, {'machineType': '', 'model': '', 'type': 'CMM', 'uuid': '223D2C88C8FD11E4947B6EAE8B4BDCDF'}]} |
### Authors
* Naval Patel (@navalkp)
* Prashant Bhosale (@prabhosa)
ansible community.general.udm_share β Manage samba shares on a univention corporate server community.general.udm\_share β Manage samba shares on a univention corporate server
===================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.udm_share`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* This module allows to manage samba shares on a univention corporate server (UCS). It uses the python API of the UCS to create a new object or edit it.
Requirements
------------
The below requirements are needed on the host that executes this module.
* Python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **directorymode** string | **Default:**"00755" | Permissions for the share's root directory. |
| **group** string | **Default:**"0" | Directory owner group of the share's root directory. |
| **host** string | | Host FQDN (server which provides the share), e.g. `{{ ansible_fqdn }}`. Required if `state=present`. |
| **name** string / required | | Name |
| **nfs\_hosts** list / elements=string | **Default:**[] | Only allow access for this host, IP address or network. |
| **nfsCustomSettings** list / elements=string | **Default:**[] | Option name in exports file.
aliases: nfs\_custom\_settings |
| **ou** string / required | | Organisational unit, inside the LDAP Base DN. |
| **owner** string | **Default:**"0" | Directory owner of the share's root directory. |
| **path** path | | Directory on the providing server, e.g. `/home`. Required if `state=present`. |
| **root\_squash** boolean | **Choices:*** no
* **yes** β
| Modify user ID for root user (root squashing). |
| **sambaBlockingLocks** boolean | **Choices:*** no
* **yes** β
| Blocking locks.
aliases: samba\_blocking\_locks |
| **sambaBlockSize** string | | Blocking size.
aliases: samba\_block\_size |
| **sambaBrowseable** boolean | **Choices:*** no
* **yes** β
| Show in Windows network environment.
aliases: samba\_browsable |
| **sambaCreateMode** string | **Default:**"0744" | File mode.
aliases: samba\_create\_mode |
| **sambaCscPolicy** string | **Default:**"manual" | Client-side caching policy.
aliases: samba\_csc\_policy |
| **sambaCustomSettings** list / elements=string | **Default:**[] | Option name in smb.conf and its value.
aliases: samba\_custom\_settings |
| **sambaDirectoryMode** string | **Default:**"0755" | Directory mode.
aliases: samba\_directory\_mode |
| **sambaDirectorySecurityMode** string | **Default:**"0777" | Directory security mode.
aliases: samba\_directory\_security\_mode |
| **sambaDosFilemode** boolean | **Choices:*** **no** β
* yes
| Users with write access may modify permissions.
aliases: samba\_dos\_filemode |
| **sambaFakeOplocks** boolean | **Choices:*** **no** β
* yes
| Fake oplocks.
aliases: samba\_fake\_oplocks |
| **sambaForceCreateMode** boolean | **Choices:*** **no** β
* yes
| Force file mode.
aliases: samba\_force\_create\_mode |
| **sambaForceDirectoryMode** boolean | **Choices:*** **no** β
* yes
| Force directory mode.
aliases: samba\_force\_directory\_mode |
| **sambaForceDirectorySecurityMode** boolean | **Choices:*** **no** β
* yes
| Force directory security mode.
aliases: samba\_force\_directory\_security\_mode |
| **sambaForceGroup** string | | Force group.
aliases: samba\_force\_group |
| **sambaForceSecurityMode** boolean | **Choices:*** **no** β
* yes
| Force security mode.
aliases: samba\_force\_security\_mode |
| **sambaForceUser** string | | Force user.
aliases: samba\_force\_user |
| **sambaHideFiles** string | | Hide files.
aliases: samba\_hide\_files |
| **sambaHideUnreadable** boolean | **Choices:*** **no** β
* yes
| Hide unreadable files/directories.
aliases: samba\_hide\_unreadable |
| **sambaHostsAllow** list / elements=string | **Default:**[] | Allowed host/network.
aliases: samba\_hosts\_allow |
| **sambaHostsDeny** list / elements=string | **Default:**[] | Denied host/network.
aliases: samba\_hosts\_deny |
| **sambaInheritAcls** boolean | **Choices:*** no
* **yes** β
| Inherit ACLs.
aliases: samba\_inherit\_acls |
| **sambaInheritOwner** boolean | **Choices:*** **no** β
* yes
| Create files/directories with the owner of the parent directory.
aliases: samba\_inherit\_owner |
| **sambaInheritPermissions** boolean | **Choices:*** **no** β
* yes
| Create files/directories with permissions of the parent directory.
aliases: samba\_inherit\_permissions |
| **sambaInvalidUsers** string | | Invalid users or groups.
aliases: samba\_invalid\_users |
| **sambaLevel2Oplocks** boolean | **Choices:*** no
* **yes** β
| Level 2 oplocks.
aliases: samba\_level\_2\_oplocks |
| **sambaLocking** boolean | **Choices:*** no
* **yes** β
| Locking.
aliases: samba\_locking |
| **sambaMSDFSRoot** boolean | **Choices:*** **no** β
* yes
| MSDFS root.
aliases: samba\_msdfs\_root |
| **sambaName** string | | Windows name. Required if `state=present`.
aliases: samba\_name |
| **sambaNtAclSupport** boolean | **Choices:*** no
* **yes** β
| NT ACL support.
aliases: samba\_nt\_acl\_support |
| **sambaOplocks** boolean | **Choices:*** no
* **yes** β
| Oplocks.
aliases: samba\_oplocks |
| **sambaPostexec** string | | Postexec script.
aliases: samba\_postexec |
| **sambaPreexec** string | | Preexec script.
aliases: samba\_preexec |
| **sambaPublic** boolean | **Choices:*** **no** β
* yes
| Allow anonymous read-only access with a guest user.
aliases: samba\_public |
| **sambaSecurityMode** string | **Default:**"0777" | Security mode.
aliases: samba\_security\_mode |
| **sambaStrictLocking** string | **Default:**"Auto" | Strict locking.
aliases: samba\_strict\_locking |
| **sambaValidUsers** string | | Valid users or groups.
aliases: samba\_valid\_users |
| **sambaVFSObjects** string | | VFS objects.
aliases: samba\_vfs\_objects |
| **sambaWriteable** boolean | **Choices:*** no
* **yes** β
| Samba write access.
aliases: samba\_writeable |
| **sambaWriteList** string | | Restrict write access to these users/groups.
aliases: samba\_write\_list |
| **state** string | **Choices:*** **present** β
* absent
| Whether the share is present or not. |
| **subtree\_checking** boolean | **Choices:*** no
* **yes** β
| Subtree checking. |
| **sync** string | **Default:**"sync" | NFS synchronisation. |
| **writeable** boolean | **Choices:*** no
* **yes** β
| NFS write access. |
Examples
--------
```
- name: Create a share named home on the server ucs.example.com with the path /home
community.general.udm_share:
name: home
path: /home
host: ucs.example.com
sambaName: Home
```
### Authors
* Tobias RΓΌetschi (@keachi)
| programming_docs |
ansible community.general.rpm_ostree_pkg β Install or uninstall overlay additional packages community.general.rpm\_ostree\_pkg β Install or uninstall overlay additional packages
=====================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.rpm_ostree_pkg`.
New in version 2.0.0: of community.general
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Install or uninstall overlay additional packages using `rpm-ostree` command.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name** list / elements=string / required | | Name of overlay package to install or remove.
aliases: pkg |
| **state** string | **Choices:*** absent
* **present** β
| State of the overlay package.
`present` simply ensures that a desired package is installed.
`absent` removes the specified package. |
Notes
-----
Note
* Does not support `check_mode`.
Examples
--------
```
- name: Install overlay package
community.general.rpm_ostree_pkg:
name: nfs-utils
state: present
- name: Remove overlay package
community.general.rpm_ostree_pkg:
name: nfs-utils
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **action** string | always | Action performed. **Sample:** install |
| **changed** boolean | always | State changes. **Sample:** True |
| **cmd** string | always | Full command used for performed action. **Sample:** rpm-ostree uninstall --allow-inactive --idempotent --unchanged-exit-77 nfs-utils |
| **packages** list / elements=string | always | A list of packages specified. **Sample:** ['nfs-utils'] |
| **rc** integer | always | Return code of rpm-ostree command. |
| **stderr** string | always | Stderr of rpm-ostree command. |
| **stdout** string | always | Stdout of rpm-ostree command. **Sample:** Staging deployment...done\n... |
### Authors
* Dusty Mabe (@dustymabe)
* Abhijeet Kasurde (@Akasurde)
ansible community.general.svc β Manage daemontools services community.general.svc β Manage daemontools services
===================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.svc`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Controls daemontools services on remote hosts using the svc utility.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **downed** boolean | **Choices:*** no
* yes
| Should a 'down' file exist or not, if it exists it disables auto startup. Defaults to no. Downed does not imply stopped. |
| **enabled** boolean | **Choices:*** no
* yes
| Whether the service is enabled or not, if disabled it also implies stopped. Take note that a service can be enabled and downed (no auto restart). |
| **name** string / required | | Name of the service to manage. |
| **service\_dir** string | **Default:**"/service" | Directory svscan watches for services |
| **service\_src** string | **Default:**"/etc/service" | Directory where services are defined, the source of symlinks to service\_dir. |
| **state** string | **Choices:*** killed
* once
* reloaded
* restarted
* started
* stopped
|
`Started`/`stopped` are idempotent actions that will not run commands unless necessary. `restarted` will always bounce the svc (svc -t) and `killed` will always bounce the svc (svc -k). `reloaded` will send a sigusr1 (svc -1). `once` will run a normally downed svc once (svc -o), not really an idempotent operation. |
Examples
--------
```
- name: Start svc dnscache, if not running
community.general.svc:
name: dnscache
state: started
- name: Stop svc dnscache, if running
community.general.svc:
name: dnscache
state: stopped
- name: Kill svc dnscache, in all cases
community.general.svc:
name: dnscache
state: killed
- name: Restart svc dnscache, in all cases
community.general.svc:
name: dnscache
state: restarted
- name: Reload svc dnscache, in all cases
community.general.svc:
name: dnscache
state: reloaded
- name: Using alternative svc directory location
community.general.svc:
name: dnscache
state: reloaded
service_dir: /var/service
```
### Authors
* Brian Coca (@bcoca)
ansible community.general.cisco_webex β Send a message to a Cisco Webex Teams Room or Individual community.general.cisco\_webex β Send a message to a Cisco Webex Teams Room or Individual
=========================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.cisco_webex`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Send a message to a Cisco Webex Teams Room or Individual with options to control the formatting.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **msg** string / required | | The message you would like to send. |
| **msg\_type** string | **Choices:*** **text** β
* markdown
| Specifies how you would like the message formatted.
aliases: message\_type |
| **personal\_token** string / required | | Your personal access token required to validate the Webex Teams API.
aliases: token |
| **recipient\_id** string / required | | The unique identifier associated with the supplied `recipient_type`. |
| **recipient\_type** string / required | **Choices:*** roomId
* toPersonEmail
* toPersonId
| The request parameter you would like to send the message to. Messages can be sent to either a room or individual (by ID or E-Mail). |
Notes
-----
Note
* The `recipient_id` type must be valid for the supplied `recipient_id`.
* Full API documentation can be found at <https://developer.webex.com/docs/api/basics>.
Examples
--------
```
# Note: The following examples assume a variable file has been imported
# that contains the appropriate information.
- name: Cisco Webex Teams - Markdown Message to a Room
community.general.cisco_webex:
recipient_type: roomId
recipient_id: "{{ room_id }}"
msg_type: markdown
personal_token: "{{ token }}"
msg: "**Cisco Webex Teams Ansible Module - Room Message in Markdown**"
- name: Cisco Webex Teams - Text Message to a Room
community.general.cisco_webex:
recipient_type: roomId
recipient_id: "{{ room_id }}"
msg_type: text
personal_token: "{{ token }}"
msg: "Cisco Webex Teams Ansible Module - Room Message in Text"
- name: Cisco Webex Teams - Text Message by an Individuals ID
community.general.cisco_webex:
recipient_type: toPersonId
recipient_id: "{{ person_id}}"
msg_type: text
personal_token: "{{ token }}"
msg: "Cisco Webex Teams Ansible Module - Text Message to Individual by ID"
- name: Cisco Webex Teams - Text Message by an Individuals E-Mail Address
community.general.cisco_webex:
recipient_type: toPersonEmail
recipient_id: "{{ person_email }}"
msg_type: text
personal_token: "{{ token }}"
msg: "Cisco Webex Teams Ansible Module - Text Message to Individual by E-Mail"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **message** string | always | The Response Message returned by the Webex Teams API. Full Response Code explanations can be found at <https://developer.webex.com/docs/api/basics>. **Sample:** OK (585 bytes) |
| **status\_code** integer | always | The Response Code returned by the Webex Teams API. Full Response Code explanations can be found at <https://developer.webex.com/docs/api/basics>. **Sample:** 200 |
### Authors
* Drew Rusell (@drew-russell)
ansible community.general.jenkins_build β Manage jenkins builds community.general.jenkins\_build β Manage jenkins builds
========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.jenkins_build`.
New in version 2.2.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage Jenkins builds with Jenkins REST API.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python-jenkins >= 0.4.12
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **args** dictionary | | A list of parameters to pass to the build. |
| **build\_number** integer | | An integer which specifies a build of a job. Is required to remove a build from the queue. |
| **name** string / required | | Name of the Jenkins job to build. |
| **password** string | | Password to authenticate with the Jenkins server. |
| **state** string | **Choices:*** **present** β
* absent
* stopped
| Attribute that specifies if the build is to be created, deleted or stopped. The `stopped` state has been added in community.general 3.3.0. |
| **token** string | | API token used to authenticate with the Jenkins server. |
| **url** string | **Default:**"http://localhost:8080" | URL of the Jenkins server. |
| **user** string | | User to authenticate with the Jenkins server. |
Examples
--------
```
- name: Create a jenkins build using basic authentication
community.general.jenkins_build:
name: "test-check"
args:
cloud: "test"
availability_zone: "test_az"
state: present
user: admin
password: asdfg
url: http://localhost:8080
- name: Stop a running jenkins build anonymously
community.general.jenkins_build:
name: "stop-check"
build_number: 3
state: stopped
url: http://localhost:8080
- name: Delete a jenkins build using token authentication
community.general.jenkins_build:
name: "delete-experiment"
build_number: 30
state: absent
user: Jenkins
token: abcdefghijklmnopqrstuvwxyz123456
url: http://localhost:8080
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **build\_info** dictionary | success | Build info of the jenkins job. |
| **name** string | success | Name of the jenkins job. **Sample:** test-job |
| **state** string | success | State of the jenkins job. **Sample:** present |
| **url** string | success | Url to connect to the Jenkins server. **Sample:** https://jenkins.mydomain.com |
| **user** string | success | User used for authentication. **Sample:** admin |
### Authors
* Brett Milford (@brettmilford)
* Tong He (@unnecessary-username)
ansible community.general.kibana_plugin β Manage Kibana plugins community.general.kibana\_plugin β Manage Kibana plugins
========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.kibana_plugin`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to manage Kibana plugins.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_root** boolean added in 2.3.0 of community.general | **Choices:*** **no** β
* yes
| Whether to allow `kibana` and `kibana-plugin` to be run as root. Passes the `--allow-root` flag to these commands. |
| **force** boolean | **Choices:*** **no** β
* yes
| Delete and re-install the plugin. Can be useful for plugins update. |
| **name** string / required | | Name of the plugin to install. |
| **plugin\_bin** path | **Default:**"/opt/kibana/bin/kibana" | Location of the Kibana binary. |
| **plugin\_dir** path | **Default:**"/opt/kibana/installedPlugins/" | Your configured plugin directory specified in Kibana. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of a plugin. |
| **timeout** string | **Default:**"1m" | Timeout setting: 30s, 1m, 1h etc. |
| **url** string | | Set exact URL to download the plugin from. For local file, prefix its absolute path with file:// |
| **version** string | | Version of the plugin to be installed. If plugin exists with previous version, plugin will NOT be updated unless `force` is set to yes. |
Examples
--------
```
- name: Install Elasticsearch head plugin
community.general.kibana_plugin:
state: present
name: elasticsearch/marvel
- name: Install specific version of a plugin
community.general.kibana_plugin:
state: present
name: elasticsearch/marvel
version: '2.3.3'
- name: Uninstall Elasticsearch head plugin
community.general.kibana_plugin:
state: absent
name: elasticsearch/marvel
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cmd** string | success | the launched command during plugin management (install / remove) |
| **name** string | success | the plugin name to install or remove |
| **state** string | success | the state for the managed plugin |
| **stderr** string | success | the command stderr |
| **stdout** string | success | the command stdout |
| **timeout** string | success | the timeout for plugin download |
| **url** string | success | the url from where the plugin is installed from |
### Authors
* Thierno IB. BARRY (@barryib)
ansible community.general.packet_device β Manage a bare metal server in the Packet Host. community.general.packet\_device β Manage a bare metal server in the Packet Host.
=================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.packet_device`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage a bare metal server in the Packet Host (a βdeviceβ in the API terms).
* When the machine is created it can optionally wait for public IP address, or for active state.
* This module has a dependency on packet >= 1.0.
* API is documented at <https://www.packet.net/developers/api/devices>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* packet-python >= 1.35
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **always\_pxe** boolean | **Choices:*** **no** β
* yes
| Persist PXE as the first boot option. Normally, the PXE process happens only on the first boot. Set this arg to have your device continuously boot to iPXE. |
| **auth\_token** string | | Packet API token. You can also supply it in env var `PACKET_API_TOKEN`. |
| **count** integer | **Default:**1 | The number of devices to create. Count number can be included in hostname via the %d string formatter. |
| **count\_offset** integer | **Default:**1 | From which number to start the count. |
| **device\_ids** list / elements=string | | List of device IDs on which to operate. |
| **facility** string | | Facility slug for device creation. See Packet API for current list - <https://www.packet.net/developers/api/facilities/>. |
| **features** dictionary | | Dict with "features" for device creation. See Packet API docs for details. |
| **hostnames** list / elements=string | | A hostname of a device, or a list of hostnames. If given string or one-item list, you can use the `"%d"` Python string format to expand numbers from *count*. If only one hostname, it might be expanded to list if *count*>1.
aliases: name |
| **ipxe\_script\_url** string | | URL of custom iPXE script for provisioning. More about custom iPXE for Packet devices at <https://help.packet.net/technical/infrastructure/custom-ipxe>. |
| **locked** boolean | **Choices:*** **no** β
* yes
| Whether to lock a created device.
aliases: lock |
| **operating\_system** string | | OS slug for device creation. See Packet API for current list - <https://www.packet.net/developers/api/operatingsystems/>. |
| **plan** string | | Plan slug for device creation. See Packet API for current list - <https://www.packet.net/developers/api/plans/>. |
| **project\_id** string / required | | ID of project of the device. |
| **state** string | **Choices:*** **present** β
* absent
* active
* inactive
* rebooted
| Desired state of the device. If set to `present` (the default), the module call will return immediately after the device-creating HTTP request successfully returns. If set to `active`, the module call will block until all the specified devices are in state active due to the Packet API, or until *wait\_timeout*. |
| **tags** list / elements=string added in 0.2.0 of community.general | | List of device tags. Currently implemented only for device creation. |
| **user\_data** string | | Userdata blob made available to the machine |
| **wait\_for\_public\_IPv** integer | **Choices:*** 4
* 6
| Whether to wait for the instance to be assigned a public IPv4/IPv6 address. If set to 4, it will wait until IPv4 is assigned to the instance. If set to 6, wait until public IPv6 is assigned to the instance. |
| **wait\_timeout** integer | **Default:**900 | How long (seconds) to wait either for automatic IP address assignment, or for the device to reach the `active` *state*. If *wait\_for\_public\_IPv* is set and *state* is `active`, the module will wait for both events consequently, applying the timeout twice. |
Notes
-----
Note
* Doesnβt support check mode.
Examples
--------
```
# All the examples assume that you have your Packet API token in env var PACKET_API_TOKEN.
# You can also pass it to the auth_token parameter of the module instead.
# Creating devices
- name: Create 1 device
hosts: localhost
tasks:
- community.general.packet_device:
project_id: 89b497ee-5afc-420a-8fb5-56984898f4df
hostnames: myserver
tags: ci-xyz
operating_system: ubuntu_16_04
plan: baremetal_0
facility: sjc1
# Create the same device and wait until it is in state "active", (when it's
# ready for other API operations). Fail if the device is not "active" in
# 10 minutes.
- name: Create device and wait up to 10 minutes for active state
hosts: localhost
tasks:
- community.general.packet_device:
project_id: 89b497ee-5afc-420a-8fb5-56984898f4df
hostnames: myserver
operating_system: ubuntu_16_04
plan: baremetal_0
facility: sjc1
state: active
wait_timeout: 600
- name: Create 3 ubuntu devices called server-01, server-02 and server-03
hosts: localhost
tasks:
- community.general.packet_device:
project_id: 89b497ee-5afc-420a-8fb5-56984898f4df
hostnames: server-%02d
count: 3
operating_system: ubuntu_16_04
plan: baremetal_0
facility: sjc1
- name: Create 3 coreos devices with userdata, wait until they get IPs and then wait for SSH
hosts: localhost
tasks:
- name: Create 3 devices and register their facts
community.general.packet_device:
hostnames: [coreos-one, coreos-two, coreos-three]
operating_system: coreos_stable
plan: baremetal_0
facility: ewr1
locked: true
project_id: 89b497ee-5afc-420a-8fb5-56984898f4df
wait_for_public_IPv: 4
user_data: |
#cloud-config
ssh_authorized_keys:
- {{ lookup('file', 'my_packet_sshkey') }}
coreos:
etcd:
discovery: https://discovery.etcd.io/6a28e078895c5ec737174db2419bb2f3
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
fleet:
public-ip: $private_ipv4
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
register: newhosts
- name: Wait for ssh
ansible.builtin.wait_for:
delay: 1
host: "{{ item.public_ipv4 }}"
port: 22
state: started
timeout: 500
with_items: "{{ newhosts.devices }}"
# Other states of devices
- name: Remove 3 devices by uuid
hosts: localhost
tasks:
- community.general.packet_device:
project_id: 89b497ee-5afc-420a-8fb5-56984898f4df
state: absent
device_ids:
- 1fb4faf8-a638-4ac7-8f47-86fe514c30d8
- 2eb4faf8-a638-4ac7-8f47-86fe514c3043
- 6bb4faf8-a638-4ac7-8f47-86fe514c301f
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | success | True if a device was altered in any way (created, modified or removed) **Sample:** True |
| **devices** list / elements=string | success | Information about each device that was processed **Sample:** [{"hostname": "my-server.com", "id": "2a5122b9-c323-4d5c-b53c-9ad3f54273e7", "public\_ipv4": "147.229.15.12", "private-ipv4": "10.0.15.12", "tags": [], "locked": false, "state": "provisioning", "public\_ipv6": ""2604:1380:2:5200::3"}] |
### Authors
* Tomas Karasek (@t0mk) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#1c6873713a3f282a2768733a3f282a276874793a3f282a27773a3f2f2b273a3f292e273a3f2824277b717d75703a3f282a277f7371)>
* Matt Baldwin (@baldwinSPC) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#5537343931223c3b737666626e737660676e7376616d6e262134363e253a3c3b2136393a2031737661636e363a38)>
* Thibaud Morel lβHorset (@teebes) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#5a2e3f3f383f297c79696d617c796f68617c796e62613d373b33367c796e6c61393537)>
| programming_docs |
ansible community.general.ipa_group β Manage FreeIPA group community.general.ipa\_group β Manage FreeIPA group
===================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ipa_group`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add, modify and delete group within IPA server
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cn** string / required | | Canonical name. Can not be changed as it is the unique identifier.
aliases: name |
| **description** string | | Description of the group. |
| **external** boolean | **Choices:*** no
* yes
| Allow adding external non-IPA members from trusted domains. |
| **gidnumber** string | | GID (use this option to set it manually).
aliases: gid |
| **group** list / elements=string | | List of group names assigned to this group. If an empty list is passed all groups will be removed from this group. If option is omitted assigned groups will not be checked or changed. Groups that are already assigned but not passed will be removed. |
| **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_prot** string | **Choices:*** http
* **https** β
| Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. |
| **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. |
| **nonposix** boolean | **Choices:*** no
* yes
| Create as a non-POSIX group. |
| **state** string | **Choices:*** absent
* **present** β
| State to ensure |
| **user** list / elements=string | | List of user names assigned to this group. If an empty list is passed all users will be removed from this group. If option is omitted assigned users will not be checked or changed. Users that are already assigned but not passed will be removed. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Ensure group is present
community.general.ipa_group:
name: oinstall
gidnumber: '54321'
state: present
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
- name: Ensure that groups sysops and appops are assigned to ops but no other group
community.general.ipa_group:
name: ops
group:
- sysops
- appops
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
- name: Ensure that users linus and larry are assign to the group, but no other user
community.general.ipa_group:
name: sysops
user:
- linus
- larry
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
- name: Ensure group is absent
community.general.ipa_group:
name: sysops
state: absent
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **group** dictionary | always | Group as returned by IPA API |
### Authors
* Thomas Krahn (@Nosmoht)
ansible community.general.rax_dns_record β Manage DNS records on Rackspace Cloud DNS community.general.rax\_dns\_record β Manage DNS records on Rackspace Cloud DNS
==============================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.rax_dns_record`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage DNS records on Rackspace Cloud DNS
Requirements
------------
The below requirements are needed on the host that executes this module.
* pyrax
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string | | Rackspace API key, overrides *credentials*.
aliases: password |
| **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/>
|
| **comment** string | | Brief description of the domain. Maximum length of 160 characters |
| **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided.
aliases: creds\_file |
| **data** string / required | | IP address for A/AAAA record, FQDN for CNAME/MX/NS, or text data for SRV/TXT |
| **domain** string | | Domain name to create the record in. This is an invalid option when type=PTR |
| **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. |
| **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. |
| **loadbalancer** string | | Load Balancer ID to create a PTR record for. Only used with type=PTR |
| **name** string / required | | FQDN record name to create |
| **overwrite** boolean | **Choices:*** no
* **yes** β
| Add new records if data doesn't match, instead of updating existing record with matching name. If there are already multiple records with matching name and overwrite=true, this module will fail. |
| **priority** integer | | Required for MX and SRV records, but forbidden for other record types. If specified, must be an integer from 0 to 65535. |
| **region** string | | Region to create an instance in. |
| **server** string | | Server ID to create a PTR record for. Only used with type=PTR |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the resource |
| **tenant\_id** string | | The tenant ID used for authentication. |
| **tenant\_name** string | | The tenant name used for authentication. |
| **ttl** integer | **Default:**3600 | Time to live of record in seconds |
| **type** string / required | **Choices:*** A
* AAAA
* CNAME
* MX
* NS
* SRV
* TXT
* PTR
| DNS record type |
| **username** string | | Rackspace username, overrides *credentials*. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether or not to require SSL validation of API endpoints.
aliases: verify\_ssl |
Notes
-----
Note
* It is recommended that plays utilizing this module be run with `serial: 1` to avoid exceeding the API request limit imposed by the Rackspace CloudDNS API
* To manipulate a `PTR` record either `loadbalancer` or `server` must be supplied
* As of version 1.7, the `type` field is required and no longer defaults to an `A` record.
* `PTR` record support was added in version 1.7
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
Examples
--------
```
- name: Create DNS Records
hosts: all
gather_facts: False
tasks:
- name: Create A record
local_action:
module: rax_dns_record
credentials: ~/.raxpub
domain: example.org
name: www.example.org
data: "{{ rax_accessipv4 }}"
type: A
register: a_record
- name: Create PTR record
local_action:
module: rax_dns_record
credentials: ~/.raxpub
server: "{{ rax_id }}"
name: "{{ inventory_hostname }}"
region: DFW
register: ptr_record
```
### Authors
* Matt Martz (@sivel)
ansible community.general.ipa_user β Manage FreeIPA users community.general.ipa\_user β Manage FreeIPA users
==================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ipa_user`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add, modify and delete user within IPA server.
Requirements
------------
The below requirements are needed on the host that executes this module.
* base64
* hashlib
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **displayname** string | | Display name. |
| **gidnumber** string | | Posix Group ID. |
| **givenname** string | | First name. |
| **homedirectory** string added in 0.2.0 of community.general | | Default home directory of the user. |
| **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_prot** string | **Choices:*** http
* **https** β
| Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. |
| **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. |
| **krbpasswordexpiration** string | | Date at which the user password will expire. In the format YYYYMMddHHmmss. e.g. 20180121182022 will expire on 21 January 2018 at 18:20:22. |
| **loginshell** string | | Login shell. |
| **mail** list / elements=string | | List of mail addresses assigned to the user. If an empty list is passed all assigned email addresses will be deleted. If None is passed email addresses will not be checked or changed. |
| **password** string | | Password for a user. Will not be set for an existing user unless *update\_password=always*, which is the default. |
| **sn** string | | Surname. |
| **sshpubkey** list / elements=string | | List of public SSH key. If an empty list is passed all assigned public keys will be deleted. If None is passed SSH public keys will not be checked or changed. |
| **state** string | **Choices:*** absent
* disabled
* enabled
* **present** β
| State to ensure. |
| **telephonenumber** list / elements=string | | List of telephone numbers assigned to the user. If an empty list is passed all assigned telephone numbers will be deleted. If None is passed telephone numbers will not be checked or changed. |
| **title** string | | Title. |
| **uid** string / required | | uid of the user.
aliases: name |
| **uidnumber** string | | Account Settings UID/Posix User ID number. |
| **update\_password** string | **Choices:*** **always** β
* on\_create
| Set password for a user. |
| **userauthtype** list / elements=string added in 1.2.0 of community.general | **Choices:*** password
* radius
* otp
* pkinit
* hardened
| The authentication type to use for the user. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Ensure pinky is present and always reset password
community.general.ipa_user:
name: pinky
state: present
krbpasswordexpiration: 20200119235959
givenname: Pinky
sn: Acme
mail:
- [email protected]
telephonenumber:
- '+555123456'
sshpubkey:
- ssh-rsa ....
- ssh-dsa ....
uidnumber: '1001'
gidnumber: '100'
homedirectory: /home/pinky
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
- name: Ensure brain is absent
community.general.ipa_user:
name: brain
state: absent
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
- name: Ensure pinky is present but don't reset password if already exists
community.general.ipa_user:
name: pinky
state: present
givenname: Pinky
sn: Acme
password: zounds
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
update_password: on_create
- name: Ensure pinky is present and using one time password and RADIUS authentication
community.general.ipa_user:
name: pinky
state: present
userauthtype:
- otp
- radius
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **user** dictionary | always | User as returned by IPA API |
### Authors
* Thomas Krahn (@Nosmoht)
ansible community.general.keycloak_clienttemplate β Allows administration of Keycloak client templates via Keycloak API community.general.keycloak\_clienttemplate β Allows administration of Keycloak client templates via Keycloak API
================================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.keycloak_clienttemplate`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module allows the administration of Keycloak client templates via the Keycloak REST API. It requires access to the REST API via OpenID Connect; the user connecting and the client being used must have the requisite access rights. In a default Keycloak installation, admin-cli and an admin user would work, as would a separate client definition with the scope tailored to your needs and a user having the expected roles.
* The names of module options are snake\_cased versions of the camelCase ones found in the Keycloak API and its documentation at <https://www.keycloak.org/docs-api/8.0/rest-api/index.html>
* The Keycloak API does not always enforce for only sensible settings to be used β you can set SAML-specific settings on an OpenID Connect client for instance and vice versa. Be careful. If you do not specify a setting, usually a sensible default is chosen.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **attributes** dictionary | | A dict of further attributes for this client template. This can contain various configuration settings, though in the default installation of Keycloak as of 3.4, none are documented or known, so this is usually empty. |
| **auth\_client\_id** string | **Default:**"admin-cli" | OpenID Connect *client\_id* to authenticate to the API with. |
| **auth\_client\_secret** string | | Client Secret to use in conjunction with *auth\_client\_id* (if required). |
| **auth\_keycloak\_url** string / required | | URL to the Keycloak instance.
aliases: url |
| **auth\_password** string | | Password to authenticate for API access with.
aliases: password |
| **auth\_realm** string | | Keycloak realm name to authenticate to for API access. |
| **auth\_username** string | | Username to authenticate for API access with.
aliases: username |
| **description** string | | Description of the client template in Keycloak |
| **full\_scope\_allowed** boolean | **Choices:*** no
* yes
| Is the "Full Scope Allowed" feature set for this client template or not. This is 'fullScopeAllowed' in the Keycloak REST API. |
| **id** string | | Id of client template to be worked on. This is usually a UUID. |
| **name** string | | Name of the client template |
| **protocol** string | **Choices:*** openid-connect
* saml
| Type of client template (either `openid-connect` or `saml`. |
| **protocol\_mappers** list / elements=dictionary | | a list of dicts defining protocol mappers for this client template. This is 'protocolMappers' in the Keycloak REST API. |
| | **config** dictionary | | Dict specifying the configuration options for the protocol mapper; the contents differ depending on the value of *protocolMapper* and are not documented other than by the source of the mappers and its parent class(es). An example is given below. It is easiest to obtain valid config values by dumping an already-existing protocol mapper configuration through check-mode in the "existing" field. |
| | **consentRequired** boolean | **Choices:*** no
* yes
| Specifies whether a user needs to provide consent to a client for this mapper to be active. |
| | **consentText** string | | The human-readable name of the consent the user is presented to accept. |
| | **id** string | | Usually a UUID specifying the internal ID of this protocol mapper instance. |
| | **name** string | | The name of this protocol mapper. |
| | **protocol** string | **Choices:*** openid-connect
* saml
| is either 'openid-connect' or 'saml', this specifies for which protocol this protocol mapper is active. |
| | **protocolMapper** string | | The Keycloak-internal name of the type of this protocol-mapper. While an exhaustive list is impossible to provide since this may be extended through SPIs by the user of Keycloak, by default Keycloak as of 3.4 ships with at least `docker-v2-allow-all-mapper` `oidc-address-mapper` `oidc-full-name-mapper` `oidc-group-membership-mapper` `oidc-hardcoded-claim-mapper` `oidc-hardcoded-role-mapper` `oidc-role-name-mapper` `oidc-script-based-protocol-mapper` `oidc-sha256-pairwise-sub-mapper` `oidc-usermodel-attribute-mapper` `oidc-usermodel-client-role-mapper` `oidc-usermodel-property-mapper` `oidc-usermodel-realm-role-mapper` `oidc-usersessionmodel-note-mapper` `saml-group-membership-mapper` `saml-hardcode-attribute-mapper` `saml-hardcode-role-mapper` `saml-role-list-mapper` `saml-role-name-mapper` `saml-user-attribute-mapper` `saml-user-property-mapper` `saml-user-session-note-mapper` An exhaustive list of available mappers on your installation can be obtained on the admin console by going to Server Info -> Providers and looking under 'protocol-mapper'. |
| **realm** string | **Default:**"master" | Realm this client template is found in. |
| **state** string | **Choices:*** **present** β
* absent
| State of the client template On `present`, the client template will be created (or updated if it exists already). On `absent`, the client template will be removed if it exists |
| **token** string added in 3.0.0 of community.general | | Authentication token for Keycloak API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Verify TLS certificates (do not disable this in production). |
Notes
-----
Note
* The Keycloak REST API defines further fields (namely *bearerOnly*, *consentRequired*, *standardFlowEnabled*, *implicitFlowEnabled*, *directAccessGrantsEnabled*, *serviceAccountsEnabled*, *publicClient*, and *frontchannelLogout*) which, while available with keycloak\_client, do not have any effect on Keycloak client-templates and are discarded if supplied with an API request changing client-templates. As such, they are not available through this module.
Examples
--------
```
- name: Create or update Keycloak client template (minimal), authentication with credentials
community.general.keycloak_client:
auth_client_id: admin-cli
auth_keycloak_url: https://auth.example.com/auth
auth_realm: master
auth_username: USERNAME
auth_password: PASSWORD
realm: master
name: this_is_a_test
delegate_to: localhost
- name: Create or update Keycloak client template (minimal), authentication with token
community.general.keycloak_clienttemplate:
auth_client_id: admin-cli
auth_keycloak_url: https://auth.example.com/auth
auth_realm: master
token: TOKEN
realm: master
name: this_is_a_test
delegate_to: localhost
- name: Delete Keycloak client template
community.general.keycloak_client:
auth_client_id: admin-cli
auth_keycloak_url: https://auth.example.com/auth
auth_realm: master
auth_username: USERNAME
auth_password: PASSWORD
realm: master
state: absent
name: test01
delegate_to: localhost
- name: Create or update Keycloak client template (with a protocol mapper)
community.general.keycloak_client:
auth_client_id: admin-cli
auth_keycloak_url: https://auth.example.com/auth
auth_realm: master
auth_username: USERNAME
auth_password: PASSWORD
realm: master
name: this_is_a_test
protocol_mappers:
- config:
access.token.claim: True
claim.name: "family_name"
id.token.claim: True
jsonType.label: String
user.attribute: lastName
userinfo.token.claim: True
consentRequired: True
consentText: "${familyName}"
name: family name
protocol: openid-connect
protocolMapper: oidc-usermodel-property-mapper
full_scope_allowed: false
id: bce6f5e9-d7d3-4955-817e-c5b7f8d65b3f
delegate_to: localhost
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **end\_state** dictionary | always | client template representation of client template after module execution (sample is truncated) **Sample:** {'description': 'test01', 'fullScopeAllowed': False, 'id': '9c3712ab-decd-481e-954f-76da7b006e5f', 'name': 'test01', 'protocol': 'saml'} |
| **existing** dictionary | always | client template representation of existing client template (sample is truncated) **Sample:** {'description': 'test01', 'fullScopeAllowed': False, 'id': '9c3712ab-decd-481e-954f-76da7b006e5f', 'name': 'test01', 'protocol': 'saml'} |
| **msg** string | always | Message as to what action was taken **Sample:** Client template testclient has been updated |
| **proposed** dictionary | always | client template representation of proposed changes to client template **Sample:** {'name': 'test01'} |
### Authors
* Eike Frost (@eikef)
| programming_docs |
ansible community.general.rax_cbs_attachments β Manipulate Rackspace Cloud Block Storage Volume Attachments community.general.rax\_cbs\_attachments β Manipulate Rackspace Cloud Block Storage Volume Attachments
=====================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.rax_cbs_attachments`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manipulate Rackspace Cloud Block Storage Volume Attachments
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* pyrax
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string | | Rackspace API key, overrides *credentials*.
aliases: password |
| **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/>
|
| **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided.
aliases: creds\_file |
| **device** string | | The device path to attach the volume to, e.g. /dev/xvde. Before 2.4 this was a required field. Now it can be left to null to auto assign the device name. |
| **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. |
| **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. |
| **region** string | | Region to create an instance in. |
| **server** string / required | | Name or id of the server to attach/detach |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the resource |
| **tenant\_id** string | | The tenant ID used for authentication. |
| **tenant\_name** string | | The tenant name used for authentication. |
| **username** string | | Rackspace username, overrides *credentials*. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether or not to require SSL validation of API endpoints.
aliases: verify\_ssl |
| **volume** string / required | | Name or id of the volume to attach/detach |
| **wait** boolean | **Choices:*** **no** β
* yes
| wait for the volume to be in 'in-use'/'available' state before returning |
| **wait\_timeout** integer | **Default:**300 | how long before wait gives up, in seconds |
Notes
-----
Note
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
Examples
--------
```
- name: Attach a Block Storage Volume
gather_facts: False
hosts: local
connection: local
tasks:
- name: Storage volume attach request
local_action:
module: rax_cbs_attachments
credentials: ~/.raxpub
volume: my-volume
server: my-server
device: /dev/xvdd
region: DFW
wait: yes
state: present
register: my_volume
```
### Authors
* Christopher H. Laco (@claco)
* Matt Martz (@sivel)
ansible community.general.vertica_role β Adds or removes Vertica database roles and assigns roles to them. community.general.vertica\_role β Adds or removes Vertica database roles and assigns roles to them.
===================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.vertica_role`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Adds or removes Vertica database role and, optionally, assign other roles.
Requirements
------------
The below requirements are needed on the host that executes this module.
* unixODBC
* pyodbc
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **assigned\_roles** string | | Comma separated list of roles to assign to the role.
aliases: assigned\_role |
| **cluster** string | **Default:**"localhost" | Name of the Vertica cluster. |
| **db** string | | Name of the Vertica database. |
| **login\_password** string | | The password used to authenticate with. |
| **login\_user** string | **Default:**"dbadmin" | The username used to authenticate with. |
| **port** string | **Default:**5433 | Vertica cluster port to connect to. |
| **role** string / required | | Name of the role to add or remove.
aliases: name |
| **state** string | **Choices:*** **present** β
* absent
| Whether to create `present`, drop `absent` or lock `locked` a role. |
Notes
-----
Note
* The default authentication assumes that you are either logging in as or sudoβing to the `dbadmin` account on the host.
* This module uses `pyodbc`, a Python ODBC database adapter. You must ensure that `unixODBC` and `pyodbc` is installed on the host and properly configured.
* Configuring `unixODBC` for Vertica requires `Driver = /opt/vertica/lib64/libverticaodbc.so` to be added to the `Vertica` section of either `/etc/odbcinst.ini` or `$HOME/.odbcinst.ini` and both `ErrorMessagesPath = /opt/vertica/lib64` and `DriverManagerEncoding = UTF-16` to be added to the `Driver` section of either `/etc/vertica.ini` or `$HOME/.vertica.ini`.
Examples
--------
```
- name: Creating a new vertica role
community.general.vertica_role: name=role_name db=db_name state=present
- name: Creating a new vertica role with other role assigned
community.general.vertica_role: name=role_name assigned_role=other_role_name state=present
```
### Authors
* Dariusz Owczarek (@dareko)
ansible community.general.one_image β Manages OpenNebula images community.general.one\_image β Manages OpenNebula images
========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.one_image`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages OpenNebula images
Requirements
------------
The below requirements are needed on the host that executes this module.
* pyone
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_password** string | | Password of the user to login into OpenNebula RPC server. If not set then the value of the `ONE_PASSWORD` environment variable is used. |
| **api\_url** string | | URL of the OpenNebula RPC server. It is recommended to use HTTPS so that the username/password are not transferred over the network unencrypted. If not set then the value of the `ONE_URL` environment variable is used. |
| **api\_username** string | | Name of the user to login into the OpenNebula RPC server. If not set then the value of the `ONE_USERNAME` environment variable is used. |
| **enabled** boolean | **Choices:*** no
* yes
| Whether the image should be enabled or disabled. |
| **id** integer | | A `id` of the image you would like to manage. |
| **name** string | | A `name` of the image you would like to manage. |
| **new\_name** string | | A name that will be assigned to the existing or new image. In the case of cloning, by default `new_name` will take the name of the origin image with the prefix 'Copy of'. |
| **state** string | **Choices:*** **present** β
* absent
* cloned
* renamed
|
`present` - state that is used to manage the image
`absent` - delete the image
`cloned` - clone the image
`renamed` - rename the image to the `new_name`
|
Examples
--------
```
- name: Fetch the IMAGE by id
community.general.one_image:
id: 45
register: result
- name: Print the IMAGE properties
ansible.builtin.debug:
var: result
- name: Rename existing IMAGE
community.general.one_image:
id: 34
state: renamed
new_name: bar-image
- name: Disable the IMAGE by id
community.general.one_image:
id: 37
enabled: no
- name: Enable the IMAGE by name
community.general.one_image:
name: bar-image
enabled: yes
- name: Clone the IMAGE by name
community.general.one_image:
name: bar-image
state: cloned
new_name: bar-image-clone
register: result
- name: Delete the IMAGE by id
community.general.one_image:
id: '{{ result.id }}'
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **group\_id** integer | success | image's group id **Sample:** 1 |
| **group\_name** string | success | image's group name **Sample:** one-users |
| **id** integer | success | image id **Sample:** 153 |
| **name** string | success | image name **Sample:** app1 |
| **owner\_id** integer | success | image's owner id **Sample:** 143 |
| **owner\_name** string | success | image's owner name **Sample:** ansible-test |
| **running\_vms** integer | success | count of running vms that use this image **Sample:** 7 |
| **state** string | success | state of image instance **Sample:** READY |
| **used** boolean | success | is image in use **Sample:** True |
### Authors
* Milan Ilic (@ilicmilan)
ansible community.general.memset_server_info β Retrieve server information. community.general.memset\_server\_info β Retrieve server information.
=====================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.memset_server_info`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve server information.
* This module was called `memset_server_facts` before Ansible 2.9. The usage did not change.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string / required | | The API key obtained from the Memset control panel. |
| **name** string / required | | The server product name (i.e. `testyaa1`). |
Notes
-----
Note
* An API key generated via the Memset customer control panel is needed with the following minimum scope - *server.info*.
Examples
--------
```
- name: Get details for testyaa1
community.general.memset_server_info:
name: testyaa1
api_key: 5eb86c9896ab03919abcf03857163741
delegate_to: localhost
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **memset\_api** complex | always | Info from the Memset API |
| | **backups** boolean | always | Whether this server has a backup service. **Sample:** True |
| | **control\_panel** string | always | Whether the server has a control panel (i.e. cPanel). **Sample:** cpanel |
| | **data\_zone** string | always | The data zone the server is in. **Sample:** Memset Public Cloud |
| | **expiry\_date** string | always | Current expiry date of the server. **Sample:** 2018-08-10 |
| | **firewall\_rule\_group** dictionary | always | Details about the firewall group this server is in. **Sample:** {'default\_outbound\_policy': 'RETURN', 'name': 'testyaa-fw1', 'nickname': 'testyaa cPanel rules', 'notes': '', 'public': False, 'rules': {'51d7db54d39c3544ef7c48baa0b9944f': {'action': 'ACCEPT', 'comment': '', 'dest\_ip6s': 'any', 'dest\_ips': 'any', 'dest\_ports': 'any', 'direction': 'Inbound', 'ip\_version': 'any', 'ordering': 2, 'protocols': 'icmp', 'rule\_group\_name': 'testyaa-fw1', 'rule\_id': '51d7db54d39c3544ef7c48baa0b9944f', 'source\_ip6s': 'any', 'source\_ips': 'any', 'source\_ports': 'any'}}} |
| | **firewall\_type** string | always | The type of firewall the server has (i.e. self-managed, managed). **Sample:** managed |
| | **host\_name** string | always | The server's hostname. **Sample:** testyaa1.miniserver.com |
| | **ignore\_monitoring\_off** boolean | always | When true, Memset won't remind the customer that monitoring is disabled. **Sample:** True |
| | **ips** list / elements=string | always | List of dictionaries of all IP addresses assigned to the server. **Sample:** [{'address': '1.2.3.4', 'bytes\_in\_today': 1000.0, 'bytes\_in\_yesterday': 2000.0, 'bytes\_out\_today': 1000.0, 'bytes\_out\_yesterday': 2000.0}] |
| | **monitor** boolean | always | Whether the server has monitoring enabled. **Sample:** True |
| | **monitoring\_level** string | always | The server's monitoring level (i.e. basic). **Sample:** basic |
| | **name** string | always | Server name (same as the service name). **Sample:** testyaa1 |
| | **network\_zones** list / elements=string | always | The network zone(s) the server is in. **Sample:** ['reading'] |
| | **nickname** string | always | Customer-set nickname for the server. **Sample:** database server |
| | **no\_auto\_reboot** boolean | always | Whether or not to reboot the server if monitoring detects it down. **Sample:** True |
| | **no\_nrpe** boolean | always | Whether Memset should use NRPE to monitor this server. **Sample:** True |
| | **os** string | always | The server's Operating System. **Sample:** debian\_stretch\_64 |
| | **penetration\_patrol** string | always | Intrusion detection support level for this server. **Sample:** managed |
| | **penetration\_patrol\_alert\_level** integer | always | The alert level at which notifications are sent. **Sample:** 10 |
| | **primary\_ip** string | always | Server's primary IP. **Sample:** 1.2.3.4 |
| | **renewal\_price\_amount** string | always | Renewal cost for the server. **Sample:** 30.00 |
| | **renewal\_price\_currency** string | always | Currency for renewal payments. **Sample:** GBP |
| | **renewal\_price\_vat** string | always | VAT rate for renewal payments **Sample:** 20 |
| | **start\_date** string | always | Server's start date. **Sample:** 2013-04-10 |
| | **status** string | always | Current status of the server (i.e. live, onhold). **Sample:** LIVE |
| | **support\_level** string | always | Support level included with the server. **Sample:** managed |
| | **type** string | always | What this server is (i.e. dedicated) **Sample:** miniserver |
| | **vlans** dictionary | always | Dictionary of tagged and untagged VLANs this server is in. **Sample:** {'tagged': [], 'untagged': ['testyaa-vlan1', 'testyaa-vlan2']} |
| | **vulnscan** string | always | Vulnerability scanning level. **Sample:** basic |
### Authors
* Simon Weald (@glitchcrab)
ansible community.general.openwrt_init β Manage services on OpenWrt. community.general.openwrt\_init β Manage services on OpenWrt.
=============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.openwrt_init`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Controls OpenWrt services on remote hosts.
Requirements
------------
The below requirements are needed on the host that executes this module.
* An OpenWrt system (with python)
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **enabled** boolean | **Choices:*** no
* yes
| Whether the service should start on boot. **At least one of state and enabled are required.**
|
| **name** string / required | | Name of the service.
aliases: service |
| **pattern** string | | If the service does not respond to the 'running' command, name a substring to look for as would be found in the output of the *ps* command as a stand-in for a 'running' result. If the string is found, the service will be assumed to be running. |
| **state** string | **Choices:*** started
* stopped
* restarted
* reloaded
|
`started`/`stopped` are idempotent actions that will not run commands unless necessary. `restarted` will always bounce the service. `reloaded` will always reload. |
Notes
-----
Note
* One option other than name is required.
Examples
--------
```
- name: Start service httpd, if not running
community.general.openwrt_init:
state: started
name: httpd
- name: Stop service cron, if running
community.general.openwrt_init:
name: cron
state: stopped
- name: Reload service httpd, in all cases
community.general.openwrt_init:
name: httpd
state: reloaded
- name: Enable service httpd
community.general.openwrt_init:
name: httpd
enabled: yes
```
### Authors
* Andrew Gaffney (@agaffney)
ansible community.general.scaleway_security_group_rule β Scaleway Security Group Rule management module community.general.scaleway\_security\_group\_rule β Scaleway Security Group Rule management module
==================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.scaleway_security_group_rule`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module manages Security Group Rule on Scaleway account <https://developer.scaleway.com>
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string / required | **Choices:*** accept
* drop
| Rule action |
| **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds.
aliases: timeout |
| **api\_token** string / required | | Scaleway OAuth token.
aliases: oauth\_token |
| **api\_url** string | **Default:**"https://api.scaleway.com" | Scaleway API URL.
aliases: base\_url |
| **direction** string / required | **Choices:*** inbound
* outbound
| Rule direction |
| **ip\_range** string | **Default:**"0.0.0.0/0" | IPV4 CIDR notation to apply to the rule |
| **port** integer / required | | Port related to the rule, null value for all the ports |
| **protocol** string / required | **Choices:*** TCP
* UDP
* ICMP
| Network protocol to use |
| **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. |
| **region** string / required | **Choices:*** ams1
* EMEA-NL-EVS
* par1
* EMEA-FR-PAR1
* par2
* EMEA-FR-PAR2
* waw1
* EMEA-PL-WAW1
| Scaleway region to use (for example `par1`). |
| **security\_group** string / required | | Security Group unique identifier |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the Security Group Rule. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Scaleway API. |
Notes
-----
Note
* Also see the API documentation on <https://developer.scaleway.com/>
* If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`.
* If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable.
Examples
--------
```
- name: Create a Security Group Rule
community.general.scaleway_security_group_rule:
state: present
region: par1
protocol: TCP
port: 80
ip_range: 0.0.0.0/0
direction: inbound
action: accept
security_group: b57210ee-1281-4820-a6db-329f78596ecb
register: security_group_rule_creation_task
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | when `state=present` | This is only present when `state=present`
**Sample:** {'scaleway\_security\_group\_rule': {'action': 'accept', 'dest\_port\_from': 80, 'dest\_port\_to': None, 'direction': 'inbound', 'editable': None, 'id': '10cb0b9a-80f6-4830-abd7-a31cd828b5e9', 'ip\_range': '0.0.0.0/0', 'position': 2, 'protocol': 'TCP'}} |
### Authors
* Antoine Barbare (@abarbare)
| programming_docs |
ansible community.general.dimensiondata_vlan β Manage a VLAN in a Cloud Control network domain. community.general.dimensiondata\_vlan β Manage a VLAN in a Cloud Control network domain.
========================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.dimensiondata_vlan`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage VLANs in Cloud Control network domains.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_expand** boolean | **Choices:*** **no** β
* yes
| Permit expansion of the target VLAN's network if the module parameters specify a larger network than the VLAN currently possesses. If `False`, the module will fail under these conditions. This is intended to prevent accidental expansion of a VLAN's network (since this operation is not reversible). |
| **description** string | | A description of the VLAN. |
| **location** string / required | | The target datacenter. |
| **mcp\_password** string | | The password used to authenticate to the CloudControl API. If not specified, will fall back to `MCP_PASSWORD` from environment variable or `~/.dimensiondata`. Required if *mcp\_user* is specified. |
| **mcp\_user** string | | The username used to authenticate to the CloudControl API. If not specified, will fall back to `MCP_USER` from environment variable or `~/.dimensiondata`. |
| **name** string / required | | The name of the target VLAN. |
| **network\_domain** string / required | | The Id or name of the target network domain. |
| **private\_ipv4\_base\_address** string | | The base address for the VLAN's IPv4 network (e.g. 192.168.1.0). |
| **private\_ipv4\_prefix\_size** integer | | The size of the IPv4 address space, e.g 24. Required, if `private_ipv4_base_address` is specified. |
| **region** string | **Default:**"na" | The target region. Regions are defined in Apache libcloud project [libcloud/common/dimensiondata.py] They are also listed in <https://libcloud.readthedocs.io/en/latest/compute/drivers/dimensiondata.html>
Note that the default value "na" stands for "North America". The module prepends 'dd-' to the region choice. |
| **state** string | **Choices:*** **present** β
* absent
* readonly
| The desired state for the target VLAN.
`readonly` ensures that the state is only ever read, not modified (the module will fail if the resource does not exist). |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `false`, SSL certificates will not be validated. This should only be used on private instances of the CloudControl API that use self-signed certificates. |
| **wait** boolean | **Choices:*** **no** β
* yes
| Should we wait for the task to complete before moving onto the next. |
| **wait\_poll\_interval** integer | **Default:**2 | The amount of time (in seconds) to wait between checks for task completion. Only applicable if *wait=true*. |
| **wait\_time** integer | **Default:**600 | The maximum amount of time (in seconds) to wait for the task to complete. Only applicable if *wait=true*. |
Examples
--------
```
- name: Add or update VLAN
community.general.dimensiondata_vlan:
region: na
location: NA5
network_domain: test_network
name: my_vlan1
description: A test VLAN
private_ipv4_base_address: 192.168.23.0
private_ipv4_prefix_size: 24
state: present
wait: yes
- name: Read / get VLAN details
community.general.dimensiondata_vlan:
region: na
location: NA5
network_domain: test_network
name: my_vlan1
state: readonly
wait: yes
- name: Delete a VLAN
community.general.dimensiondata_vlan:
region: na
location: NA5
network_domain: test_network
name: my_vlan_1
state: absent
wait: yes
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vlan** complex | On success when *state* is 'present' | Dictionary describing the VLAN. |
| | **description** string | success | VLAN description. **Sample:** My VLAN description |
| | **id** string | success | VLAN ID. **Sample:** aaaaa000-a000-4050-a215-2808934ccccc |
| | **location** string | success | Datacenter location. **Sample:** NA3 |
| | **name** string | success | VLAN name. **Sample:** My VLAN |
| | **private\_ipv4\_base\_address** string | success | The base address for the VLAN's private IPV4 network. **Sample:** 192.168.23.0 |
| | **private\_ipv4\_gateway\_address** string | success | The gateway address for the VLAN's private IPV4 network. **Sample:** 192.168.23.1 |
| | **private\_ipv4\_prefix\_size** integer | success | The prefix size for the VLAN's private IPV4 network. **Sample:** 24 |
| | **private\_ipv6\_base\_address** string | success | The base address for the VLAN's IPV6 network. **Sample:** 2402:9900:111:1195:0:0:0:0 |
| | **private\_ipv6\_gateway\_address** string | success | The gateway address for the VLAN's IPV6 network. **Sample:** 2402:9900:111:1195:0:0:0:1 |
| | **private\_ipv6\_prefix\_size** integer | success | The prefix size for the VLAN's IPV6 network. **Sample:** 64 |
| | **status** string | success | VLAN status. **Sample:** NORMAL |
### Authors
* Adam Friedman (@tintoy)
ansible community.general.lmdb_kv β fetch data from LMDB community.general.lmdb\_kv β fetch data from LMDB
=================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.lmdb_kv`.
New in version 0.2.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This lookup returns a list of results from an LMDB DB corresponding to a list of items given to it
Requirements
------------
The below requirements are needed on the local controller node that executes this lookup.
* lmdb (python library <https://lmdb.readthedocs.io/en/release/>)
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_terms** string | | | list of keys to query |
| **db** string | **Default:**"ansible.mdb" | | path to LMDB database |
Examples
--------
```
- name: query LMDB for a list of country codes
ansible.builtin.debug:
msg: "{{ query('community.general.lmdb_kv', 'nl', 'be', 'lu', db='jp.mdb') }}"
- name: use list of values in a loop by key wildcard
ansible.builtin.debug:
msg: "Hello from {{ item.0 }} a.k.a. {{ item.1 }}"
vars:
- lmdb_kv_db: jp.mdb
with_community.general.lmdb_kv:
- "n*"
- name: get an item by key
ansible.builtin.assert:
that:
- item == 'Belgium'
vars:
- lmdb_kv_db: jp.mdb
with_community.general.lmdb_kv:
- be
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:
| Key | Returned | Description |
| --- | --- | --- |
| **\_raw** list / elements=any | success | value(s) stored in LMDB |
### Authors
* Jan-Piet Mens (@jpmens)
ansible community.general.nosh β Manage services with nosh community.general.nosh β Manage services with nosh
==================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.nosh`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Control running and enabled state for system-wide or user services.
* BSD and Linux systems are supported.
Requirements
------------
The below requirements are needed on the host that executes this module.
* A system with an active nosh service manager, see Notes for further information.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **enabled** boolean | **Choices:*** no
* yes
| Enable or disable the service, independently of `*.preset` file preference or running state. Mutually exclusive with *preset*. Will take effect prior to *state=reset*. |
| **name** string / required | | Name of the service to manage. |
| **preset** boolean | **Choices:*** no
* yes
| Enable or disable the service according to local preferences in \*.preset files. Mutually exclusive with *enabled*. Only has an effect if set to true. Will take effect prior to *state=reset*. |
| **state** string | **Choices:*** started
* stopped
* reset
* restarted
* reloaded
|
`started`/`stopped` are idempotent actions that will not run commands unless necessary. `restarted` will always bounce the service. `reloaded` will send a SIGHUP or start the service. `reset` will start or stop the service according to whether it is enabled or not. |
| **user** boolean | **Choices:*** **no** β
* yes
| Run system-control talking to the calling user's service manager, rather than the system-wide service manager. |
Notes
-----
Note
* Information on the nosh utilities suite may be found at <https://jdebp.eu/Softwares/nosh/>.
Examples
--------
```
- name: Start dnscache if not running
community.general.nosh: name=dnscache state=started
- name: Stop mpd, if running
community.general.nosh: name=mpd state=stopped
- name: Restart unbound or start it if not already running
community.general.nosh:
name: unbound
state: restarted
- name: Reload fail2ban or start it if not already running
community.general.nosh:
name: fail2ban
state: reloaded
- name: Disable nsd
community.general.nosh: name=nsd enabled=no
- name: For package installers, set nginx running state according to local enable settings, preset and reset
community.general.nosh: name=nginx preset=True state=reset
- name: Reboot the host if nosh is the system manager, would need a "wait_for*" task at least, not recommended as-is
community.general.nosh: name=reboot state=started
- name: Using conditionals with the module facts
tasks:
- name: Obtain information on tinydns service
community.general.nosh: name=tinydns
register: result
- name: Fail if service not loaded
ansible.builtin.fail: msg="The {{ result.name }} service is not loaded"
when: not result.status
- name: Fail if service is running
ansible.builtin.fail: msg="The {{ result.name }} service is running"
when: result.status and result.status['DaemontoolsEncoreState'] == "running"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **enabled** boolean | success | whether the service is enabled at system bootstrap **Sample:** True |
| **name** string | success | name used to find the service **Sample:** sshd |
| **preset** boolean | success | whether the enabled status reflects the one set in the relevant `*.preset` file **Sample:** False |
| **service\_path** string | success | resolved path for the service **Sample:** /var/sv/sshd |
| **state** string | if state option is used | service process run state, `None` if the service is not loaded and will not be started **Sample:** reloaded |
| **status** complex | success | a dictionary with the key=value pairs returned by `system-control show-json` or `None` if the service is not loaded |
| | **After** list / elements=string | success | **Sample:** ['/etc/service-bundles/targets/basic', '../sshdgenkeys', 'log'] |
| | **Before** list / elements=string | success | **Sample:** ['/etc/service-bundles/targets/shutdown'] |
| | **Conflicts** list / elements=string | success | **Sample:** [] |
| | **DaemontoolsEncoreState** string | success | **Sample:** running |
| | **DaemontoolsState** string | success | **Sample:** up |
| | **Enabled** boolean | success | **Sample:** True |
| | **LogService** string | success | **Sample:** ../cyclog@sshd |
| | **MainPID** integer | success | **Sample:** 661 |
| | **Paused** boolean | success | **Sample:** False |
| | **ReadyAfterRun** boolean | success | **Sample:** False |
| | **RemainAfterExit** boolean | success | **Sample:** False |
| | **Required-By** list / elements=string | success | **Sample:** [] |
| | **RestartExitStatusCode** integer | success | **Sample:** 0 |
| | **RestartExitStatusNumber** integer | success | **Sample:** 0 |
| | **RestartTimestamp** integer | success | **Sample:** 4611686019935648081 |
| | **RestartUTCTimestamp** integer | success | **Sample:** 1508260140 |
| | **RunExitStatusCode** integer | success | **Sample:** 0 |
| | **RunExitStatusNumber** integer | success | **Sample:** 0 |
| | **RunTimestamp** integer | success | **Sample:** 4611686019935648081 |
| | **RunUTCTimestamp** integer | success | **Sample:** 1508260140 |
| | **StartExitStatusCode** integer | success | **Sample:** 1 |
| | **StartExitStatusNumber** integer | success | **Sample:** 0 |
| | **StartTimestamp** integer | success | **Sample:** 4611686019935648081 |
| | **StartUTCTimestamp** integer | success | **Sample:** 1508260140 |
| | **StopExitStatusCode** integer | success | **Sample:** 0 |
| | **StopExitStatusNumber** integer | success | **Sample:** 0 |
| | **Stopped-By** list / elements=string | success | **Sample:** ['/etc/service-bundles/targets/shutdown'] |
| | **StopTimestamp** integer | success | **Sample:** 4611686019935648081 |
| | **StopUTCTimestamp** integer | success | **Sample:** 1508260140 |
| | **Timestamp** integer | success | **Sample:** 4611686019935648081 |
| | **UTCTimestamp** integer | success | **Sample:** 1508260140 |
| | **Want** string | success | **Sample:** nothing |
| | **Wanted-By** list / elements=string | success | **Sample:** ['/etc/service-bundles/targets/server', '/etc/service-bundles/targets/sockets'] |
| | **Wants** list / elements=string | success | **Sample:** ['/etc/service-bundles/targets/basic', '../sshdgenkeys'] |
| **user** boolean | success | whether the user-level service manager is called |
### Authors
* Thomas Caravia (@tacatac)
ansible community.general.homebrew_tap β Tap a Homebrew repository. community.general.homebrew\_tap β Tap a Homebrew repository.
============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.homebrew_tap`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Tap external Homebrew repositories.
Requirements
------------
The below requirements are needed on the host that executes this module.
* homebrew
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name** list / elements=string / required | | The GitHub user/organization repository to tap.
aliases: tap |
| **path** path added in 2.1.0 of community.general | **Default:**"/usr/local/bin:/opt/homebrew/bin" | A ':' separated list of paths to search for `brew` executable. |
| **state** string | **Choices:*** **present** β
* absent
| state of the repository. |
| **url** string | | The optional git URL of the repository to tap. The URL is not assumed to be on GitHub, and the protocol doesn't have to be HTTP. Any location and protocol that git can handle is fine.
*name* option may not be a list of multiple taps (but a single tap instead) when this option is provided. |
Examples
--------
```
- name: Tap a Homebrew repository, state present
community.general.homebrew_tap:
name: homebrew/dupes
- name: Tap a Homebrew repository, state absent
community.general.homebrew_tap:
name: homebrew/dupes
state: absent
- name: Tap a Homebrew repository, state present
community.general.homebrew_tap:
name: homebrew/dupes,homebrew/science
state: present
- name: Tap a Homebrew repository using url, state present
community.general.homebrew_tap:
name: telemachus/brew
url: 'https://bitbucket.org/telemachus/brew'
```
### Authors
* Indrajit Raychaudhuri (@indrajitr)
* Daniel Jaouen (@danieljaouen)
ansible community.general.zone β Run tasks in a zone instance community.general.zone β Run tasks in a zone instance
=====================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.zone`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
Synopsis
--------
* Run commands or put/fetch files to an existing zone
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **remote\_addr** string | **Default:**"inventory\_hostname" | var: ansible\_host var: ansible\_zone\_host | Zone identifier |
### Authors
* Ansible Core Team
ansible community.general.sysupgrade β Manage OpenBSD system upgrades community.general.sysupgrade β Manage OpenBSD system upgrades
=============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.sysupgrade`.
New in version 1.1.0: of community.general
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage OpenBSD system upgrades using sysupgrade.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **fetch\_only** boolean | **Choices:*** no
* **yes** β
| Fetch and verify files and create /bsd.upgrade but do not reboot. Set to `false` if you want sysupgrade to reboot. This will cause Ansible to error, as it expects the module to exit gracefully. See the examples. |
| **force** boolean | **Choices:*** **no** β
* yes
| Force upgrade (for snapshots only). |
| **installurl** string | | OpenBSD mirror top-level URL for fetching an upgrade. By default, the mirror URL is pulled from /etc/installurl. |
| **keep\_files** boolean | **Choices:*** **no** β
* yes
| Keep the files under /home/\_sysupgrade. By default, the files will be deleted after the upgrade. |
| **snapshot** boolean | **Choices:*** **no** β
* yes
| Apply the latest snapshot. Otherwise release will be applied. |
Examples
--------
```
- name: Upgrade to latest release
community.general.sysupgrade:
register: sysupgrade
- name: Upgrade to latest snapshot
community.general.sysupgrade:
snapshot: yes
installurl: https://cloudflare.cdn.openbsd.org/pub/OpenBSD
register: sysupgrade
- name: Reboot to apply upgrade if needed
ansible.builtin.reboot:
when: sysupgrade.changed
# Note: Ansible will error when running this way due to how
# the reboot is forcefully handled by sysupgrade:
- name: Have sysupgrade automatically reboot
community.general.sysupgrade:
fetch_only: no
ignore_errors: yes
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **rc** integer | always | The command return code (0 means success). |
| **stderr** string | always | Sysupgrade standard error. **Sample:** sysupgrade: need root privileges |
| **stdout** string | always | Sysupgrade standard output. |
### Authors
* Andrew Klaus (@precurse)
| programming_docs |
ansible community.general.cyberarkpassword β get secrets from CyberArk AIM community.general.cyberarkpassword β get secrets from CyberArk AIM
==================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.cyberarkpassword`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Get secrets from CyberArk AIM.
Requirements
------------
The below requirements are needed on the local controller node that executes this lookup.
* CyberArk AIM tool installed
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_command** string | **Default:**"/opt/CARKaim/sdk/clipasswordsdk" | env:AIM\_CLIPASSWORDSDK\_CMD | Cyberark CLI utility. |
| **\_extra** string | | | for extra\_params values please check parameters for clipasswordsdk in CyberArk's "Credential Provider and ASCP Implementation Guide" |
| **appid** string / required | | | Defines the unique ID of the application that is issuing the password request. |
| **output** string | **Default:**"password" | | Specifies the desired output fields separated by commas. They could be: Password, PassProps.<property>, PasswordChangeInProcess |
| **query** string / required | | | Describes the filter criteria for the password retrieval. |
Notes
-----
Note
* For Ansible on Windows, please change the -parameters (-p, -d, and -o) to /parameters (/p, /d, and /o) and change the location of CLIPasswordSDK.exe.
Examples
--------
```
- name: passing options to the lookup
ansible.builtin.debug:
msg: '{{ lookup("community.general.cyberarkpassword", cyquery) }}'
vars:
cyquery:
appid: "app_ansible"
query: "safe=CyberArk_Passwords;folder=root;object=AdminPass"
output: "Password,PassProps.UserName,PassProps.Address,PasswordChangeInProcess"
- name: used in a loop
ansible.builtin.debug:
msg: "{{item}}"
with_community.general.cyberarkpassword:
appid: 'app_ansible'
query: 'safe=CyberArk_Passwords;folder=root;object=AdminPass'
output: 'Password,PassProps.UserName,PassProps.Address,PasswordChangeInProcess'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:
| Key | Returned | Description |
| --- | --- | --- |
| **passprops** dictionary | success | properties assigned to the entry |
| **password** string | success | The actual value stored |
| **passwordchangeinprocess** string | success | did the password change? |
### Authors
* Unknown (!UNKNOWN)
ansible community.general.nictagadm β Manage nic tags on SmartOS systems community.general.nictagadm β Manage nic tags on SmartOS systems
================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.nictagadm`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create or delete nic tags on SmartOS systems.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **etherstub** boolean | **Choices:*** **no** β
* yes
| Specifies that the nic tag will be attached to a created *etherstub*. Parameter *etherstub* is mutually exclusive with both *mtu*, and *mac*. |
| **force** boolean | **Choices:*** **no** β
* yes
| When *state* is absent set this switch will use the `-f` parameter and delete the nic tag regardless of existing VMs. |
| **mac** string | | Specifies the *mac* address to attach the nic tag to when not creating an *etherstub*. Parameters *mac* and *etherstub* are mutually exclusive. |
| **mtu** integer | | Specifies the size of the *mtu* of the desired nic tag. Parameters *mtu* and *etherstub* are mutually exclusive. |
| **name** string / required | | Name of the nic tag. |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete a SmartOS nic tag. |
Examples
--------
```
- name: Create 'storage0' on '00:1b:21:a3:f5:4d'
community.general.nictagadm:
name: storage0
mac: 00:1b:21:a3:f5:4d
mtu: 9000
state: present
- name: Remove 'storage0' nic tag
community.general.nictagadm:
name: storage0
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **etherstub** boolean | always | specifies if the nic tag will create and attach to an etherstub. |
| **force** boolean | always | Shows if -f was used during the deletion of a nic tag |
| **mac** string | always | MAC Address that the nic tag was attached to. **Sample:** 00:1b:21:a3:f5:4d |
| **mtu** integer | always | specifies which MTU size was passed during the nictagadm add command. mtu and etherstub are mutually exclusive. **Sample:** 1500 |
| **name** string | always | nic tag name **Sample:** storage0 |
| **state** string | always | state of the target **Sample:** present |
### Authors
* Bruce Smith (@SmithX10)
ansible community.general.virtualbox β virtualbox inventory source community.general.virtualbox β virtualbox inventory source
==========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.virtualbox`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get inventory hosts from the local virtualbox installation.
* Uses a YAML configuration file that ends with virtualbox.(yml|yaml) or vbox.(yml|yaml).
* The inventory\_hostname is always the βNameβ of the virtualbox instance.
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **cache** boolean | **Choices:*** **no** β
* yes
| ini entries: [inventory]cache = no env:ANSIBLE\_INVENTORY\_CACHE | Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work. |
| **cache\_connection** string | | ini entries: [defaults]fact\_caching\_connection = None [inventory]cache\_connection = None env:ANSIBLE\_CACHE\_PLUGIN\_CONNECTION env:ANSIBLE\_INVENTORY\_CACHE\_CONNECTION | Cache connection data or path, read cache plugin documentation for specifics. |
| **cache\_plugin** string | **Default:**"memory" | ini entries: [defaults]fact\_caching = memory [inventory]cache\_plugin = memory env:ANSIBLE\_CACHE\_PLUGIN env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN | Cache plugin to use for the inventory's source data. |
| **cache\_prefix** string | **Default:**"ansible\_inventory\_" | ini entries: [default]fact\_caching\_prefix = ansible\_inventory\_ [inventory]cache\_prefix = ansible\_inventory\_ env:ANSIBLE\_CACHE\_PLUGIN\_PREFIX env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN\_PREFIX | Prefix to use for cache plugin files/tables |
| **cache\_timeout** integer | **Default:**3600 | ini entries: [defaults]fact\_caching\_timeout = 3600 [inventory]cache\_timeout = 3600 env:ANSIBLE\_CACHE\_PLUGIN\_TIMEOUT env:ANSIBLE\_INVENTORY\_CACHE\_TIMEOUT | Cache duration in seconds |
| **compose** dictionary | **Default:**{} | | Create vars from jinja2 expressions. |
| **groups** dictionary | **Default:**{} | | Add hosts to group based on Jinja2 conditionals. |
| **keyed\_groups** list / elements=string | **Default:**[] | | Add hosts to group based on the values of a variable. |
| **leading\_separator** boolean added in 2.11 of ansible.builtin | **Choices:*** no
* **yes** β
| | Use in conjunction with keyed\_groups. By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is "" and the default separator is "\_". Set this option to False to omit the leading underscore (or other separator) if no prefix is given. If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. |
| **network\_info\_path** string | **Default:**"/VirtualBox/GuestInfo/Net/0/V4/IP" | | property path to query for network information (ansible\_host) |
| **plugin** string / required | **Choices:*** virtualbox
* community.general.virtualbox
| | token that ensures this is a source file for the 'virtualbox' plugin |
| **query** dictionary | **Default:**{} | | create vars from virtualbox properties |
| **running\_only** boolean | **Choices:*** **no** β
* yes
| | toggles showing all vms vs only those currently running |
| **settings\_password\_file** string | | | provide a file containing the settings password (equivalent to --settingspwfile) |
| **strict** boolean | **Choices:*** **no** β
* yes
| | If `yes` make invalid entries a fatal error, otherwise skip and continue. Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. |
| **use\_extra\_vars** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [inventory\_plugins]use\_extra\_vars = no env:ANSIBLE\_INVENTORY\_USE\_EXTRA\_VARS | Merge extra vars into the available variables for composition (highest precedence). |
Examples
--------
```
# file must be named vbox.yaml or vbox.yml
simple_config_file:
plugin: community.general.virtualbox
settings_password_file: /etc/virtulbox/secrets
query:
logged_in_users: /VirtualBox/GuestInfo/OS/LoggedInUsersList
compose:
ansible_connection: ('indows' in vbox_Guest_OS)|ternary('winrm', 'ssh')
# add hosts (all match with minishift vm) to the group container if any of the vms are in ansible_inventory'
plugin: community.general.virtualbox
groups:
container: "'minis' in (inventory_hostname)"
```
### Authors
* Unknown (!UNKNOWN)
ansible community.general.rhn_register β Manage Red Hat Network registration using the rhnreg_ks command community.general.rhn\_register β Manage Red Hat Network registration using the rhnreg\_ks command
==================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.rhn_register`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage registration to the Red Hat Network.
Requirements
------------
The below requirements are needed on the host that executes this module.
* rhnreg\_ks
* either libxml2 or lxml
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **activationkey** string | | Supply an activation key for use with registration. |
| **ca\_cert** path | | Supply a custom ssl CA certificate file for use with registration.
aliases: sslcacert |
| **channels** list / elements=string | **Default:**[] | Optionally specify a list of channels to subscribe to upon successful registration. |
| **enable\_eus** boolean | **Choices:*** **no** β
* yes
| If `no`, extended update support will be requested. |
| **force** boolean added in 2.0.0 of community.general | **Choices:*** **no** β
* yes
| Force registration, even if system is already registered. |
| **nopackages** boolean | **Choices:*** **no** β
* yes
| If `yes`, the registered node will not upload its installed packages information to Satellite server. |
| **password** string | | Red Hat Network password. |
| **profilename** string | | Supply an profilename for use with registration. |
| **server\_url** string | | Specify an alternative Red Hat Network server URL. The default is the current value of *serverURL* from `/etc/sysconfig/rhn/up2date`. |
| **state** string | **Choices:*** absent
* **present** β
| Whether to register (`present`), or unregister (`absent`) a system. |
| **systemorgid** string | | Supply an organizational id for use with registration. |
| **username** string | | Red Hat Network username. |
Notes
-----
Note
* This is for older Red Hat products. You probably want the [community.general.redhat\_subscription](redhat_subscription_module#ansible-collections-community-general-redhat-subscription-module) module instead.
* In order to register a system, `rhnreg_ks` requires either a username and password, or an activationkey.
Examples
--------
```
- name: Unregister system from RHN
community.general.rhn_register:
state: absent
username: joe_user
password: somepass
- name: Register as user with password and auto-subscribe to available content
community.general.rhn_register:
state: present
username: joe_user
password: somepass
- name: Register with activationkey and enable extended update support
community.general.rhn_register:
state: present
activationkey: 1-222333444
enable_eus: yes
- name: Register with activationkey and set a profilename which may differ from the hostname
community.general.rhn_register:
state: present
activationkey: 1-222333444
profilename: host.example.com.custom
- name: Register as user with password against a satellite server
community.general.rhn_register:
state: present
username: joe_user
password: somepass
server_url: https://xmlrpc.my.satellite/XMLRPC
- name: Register as user with password and enable channels
community.general.rhn_register:
state: present
username: joe_user
password: somepass
channels: rhel-x86_64-server-6-foo-1,rhel-x86_64-server-6-bar-1
- name: Force-register as user with password to ensure registration is current on server
community.general.rhn_register:
state: present
username: joe_user
password: somepass
server_url: https://xmlrpc.my.satellite/XMLRPC
force: yes
```
### Authors
* James Laska (@jlaska)
ansible community.general.keycloak_identity_provider β Allows administration of Keycloak identity providers via Keycloak API community.general.keycloak\_identity\_provider β Allows administration of Keycloak identity providers via Keycloak API
======================================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.keycloak_identity_provider`.
New in version 3.6.0: of community.general
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module allows you to add, remove or modify Keycloak identity providers via the Keycloak REST API. It requires access to the REST API via OpenID Connect; the user connecting and the client being used must have the requisite access rights. In a default Keycloak installation, admin-cli and an admin user would work, as would a separate client definition with the scope tailored to your needs and a user having the expected roles.
* The names of module options are snake\_cased versions of the camelCase ones found in the Keycloak API and its documentation at <https://www.keycloak.org/docs-api/15.0/rest-api/index.html>.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **add\_read\_token\_role\_on\_create** boolean | **Choices:*** no
* yes
| Enable/disable whether new users can read any stored tokens. This assigns the `broker.read-token` role.
aliases: addReadTokenRoleOnCreate |
| **alias** string / required | | The alias uniquely identifies an identity provider and it is also used to build the redirect URI. |
| **auth\_client\_id** string | **Default:**"admin-cli" | OpenID Connect *client\_id* to authenticate to the API with. |
| **auth\_client\_secret** string | | Client Secret to use in conjunction with *auth\_client\_id* (if required). |
| **auth\_keycloak\_url** string / required | | URL to the Keycloak instance.
aliases: url |
| **auth\_password** string | | Password to authenticate for API access with.
aliases: password |
| **auth\_realm** string | | Keycloak realm name to authenticate to for API access. |
| **auth\_username** string | | Username to authenticate for API access with.
aliases: username |
| **authenticate\_by\_default** boolean | **Choices:*** no
* yes
| Specifies if this identity provider should be used by default for authentication even before displaying login screen.
aliases: authenticateByDefault |
| **config** dictionary | | Dict specifying the configuration options for the provider; the contents differ depending on the value of *providerId*. Examples are given below for `oidc` and `saml`. It is easiest to obtain valid config values by dumping an already-existing identity provider configuration through check-mode in the *existing* field. |
| | **authorizationUrl** string | | The Authorization URL. |
| | **backchannelSupported** string | | Does the external IDP support backchannel logout? |
| | **clientAuthMethod** string | | The client authentication method. |
| | **clientId** string | | The client or client identifier registered within the identity provider. |
| | **clientSecret** string | | The client or client secret registered within the identity provider. |
| | **defaultScope** string | | The scopes to be sent when asking for authorization. |
| | **entityId** string | | The Entity ID that will be used to uniquely identify this SAML Service Provider. |
| | **gui\_order** integer | | Number defining order of the provider in GUI (for example, on Login page).
aliases: guiOrder |
| | **hide\_on\_login\_page** boolean | **Choices:*** no
* yes
| If hidden, login with this provider is possible only if requested explicitly, for example using the `kc_idp_hint` parameter.
aliases: hideOnLoginPage |
| | **issuer** string | | The issuer identifier for the issuer of the response. If not provided, no validation will be performed. |
| | **jwksUrl** string | | URL where identity provider keys in JWK format are stored. See JWK specification for more details. |
| | **logoutUrl** string | | End session endpoint to use to logout user from external IDP. |
| | **nameIDPolicyFormat** string | | Specifies the URI reference corresponding to a name identifier format. |
| | **principalType** string | | Way to identify and track external users from the assertion. |
| | **singleLogoutServiceUrl** string | | The URL that must be used to send logout requests. |
| | **singleSignOnServiceUrl** string | | The URL that must be used to send authentication requests (SAML AuthnRequest). |
| | **sync\_mode** string | | Default sync mode for all mappers. The sync mode determines when user data will be synced using the mappers.
aliases: syncMode |
| | **tokenUrl** string | | The Token URL. |
| | **useJwksUrl** boolean | **Choices:*** no
* yes
| If the switch is on, identity provider public keys will be downloaded from given JWKS URL. |
| | **userInfoUrl** string | | The User Info URL. |
| | **validateSignature** boolean | **Choices:*** no
* yes
| Enable/disable signature validation of external IDP signatures. |
| **display\_name** string | | Friendly name for identity provider.
aliases: displayName |
| **enabled** boolean | **Choices:*** no
* yes
| Enable/disable this identity provider. |
| **first\_broker\_login\_flow\_alias** string | | Alias of authentication flow, which is triggered after first login with this identity provider.
aliases: firstBrokerLoginFlowAlias |
| **link\_only** boolean | **Choices:*** no
* yes
| If true, users cannot log in through this provider. They can only link to this provider. This is useful if you don't want to allow login from the provider, but want to integrate with a provider.
aliases: linkOnly |
| **mappers** list / elements=dictionary | | A list of dicts defining mappers associated with this Identity Provider. |
| | **config** dictionary | | Dict specifying the configuration options for the mapper; the contents differ depending on the value of *identityProviderMapper*. |
| | **id** string | | Unique ID of this mapper. |
| | **identityProviderAlias** string | | Alias of the identity provider for this mapper. |
| | **identityProviderMapper** string | | Type of mapper. |
| | **name** string | | Name of the mapper. |
| **post\_broker\_login\_flow\_alias** string | | Alias of authentication flow, which is triggered after each login with this identity provider.
aliases: postBrokerLoginFlowAlias |
| **provider\_id** string | | Protocol used by this provider (supported values are `oidc` or `saml`).
aliases: providerId |
| **realm** string | **Default:**"master" | The Keycloak realm under which this identity provider resides. |
| **state** string | **Choices:*** **present** β
* absent
| State of the identity provider. On `present`, the identity provider will be created if it does not yet exist, or updated with the parameters you provide. On `absent`, the identity provider will be removed if it exists. |
| **store\_token** boolean | **Choices:*** no
* yes
| Enable/disable whether tokens must be stored after authenticating users.
aliases: storeToken |
| **token** string added in 3.0.0 of community.general | | Authentication token for Keycloak API. |
| **trust\_email** boolean | **Choices:*** no
* yes
| If enabled, email provided by this provider is not verified even if verification is enabled for the realm.
aliases: trustEmail |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Verify TLS certificates (do not disable this in production). |
Examples
--------
```
- name: Create OIDC identity provider, authentication with credentials
community.general.keycloak_identity_provider:
state: present
auth_keycloak_url: https://auth.example.com/auth
auth_realm: master
auth_username: admin
auth_password: admin
realm: myrealm
alias: oidc-idp
display_name: OpenID Connect IdP
enabled: true
provider_id: oidc
config:
issuer: https://idp.example.com
authorizationUrl: https://idp.example.com/auth
tokenUrl: https://idp.example.com/token
userInfoUrl: https://idp.example.com/userinfo
clientAuthMethod: client_secret_post
clientId: my-client
clientSecret: secret
syncMode: FORCE
mappers:
- name: first_name
identityProviderMapper: oidc-user-attribute-idp-mapper
config:
claim: first_name
user.attribute: first_name
syncMode: INHERIT
- name: last_name
identityProviderMapper: oidc-user-attribute-idp-mapper
config:
claim: last_name
user.attribute: last_name
syncMode: INHERIT
- name: Create SAML identity provider, authentication with credentials
community.general.keycloak_identity_provider:
state: present
auth_keycloak_url: https://auth.example.com/auth
auth_realm: master
auth_username: admin
auth_password: admin
realm: myrealm
alias: saml-idp
display_name: SAML IdP
enabled: true
provider_id: saml
config:
entityId: https://auth.example.com/auth/realms/myrealm
singleSignOnServiceUrl: https://idp.example.com/login
wantAuthnRequestsSigned: true
wantAssertionsSigned: true
mappers:
- name: roles
identityProviderMapper: saml-user-attribute-idp-mapper
config:
user.attribute: roles
attribute.friendly.name: User Roles
attribute.name: roles
syncMode: INHERIT
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **end\_state** dictionary | always | Representation of identity provider after module execution **Sample:** {'addReadTokenRoleOnCreate': False, 'alias': 'my-idp', 'authenticateByDefault': False, 'config': {'authorizationUrl': 'https://idp.example.com/auth', 'clientAuthMethod': 'client\_secret\_post', 'clientId': 'my-client', 'clientSecret': '\*\*\*\*\*\*\*\*\*\*', 'issuer': 'https://idp.example.com', 'tokenUrl': 'https://idp.example.com/token', 'userInfoUrl': 'https://idp.example.com/userinfo'}, 'displayName': 'OpenID Connect IdP', 'enabled': True, 'firstBrokerLoginFlowAlias': 'first broker login', 'internalId': '4d28d7e3-1b80-45bb-8a30-5822bf55aa1c', 'linkOnly': False, 'providerId': 'oidc', 'storeToken': False, 'trustEmail': False} |
| **existing** dictionary | always | Representation of existing identity provider **Sample:** {'addReadTokenRoleOnCreate': False, 'alias': 'my-idp', 'authenticateByDefault': False, 'config': {'authorizationUrl': 'https://old.example.com/auth', 'clientAuthMethod': 'client\_secret\_post', 'clientId': 'my-client', 'clientSecret': '\*\*\*\*\*\*\*\*\*\*', 'issuer': 'https://old.example.com', 'syncMode': 'FORCE', 'tokenUrl': 'https://old.example.com/token', 'userInfoUrl': 'https://old.example.com/userinfo'}, 'displayName': 'OpenID Connect IdP', 'enabled': True, 'firstBrokerLoginFlowAlias': 'first broker login', 'internalId': '4d28d7e3-1b80-45bb-8a30-5822bf55aa1c', 'linkOnly': False, 'providerId': 'oidc', 'storeToken': False, 'trustEmail': False} |
| **msg** string | always | Message as to what action was taken **Sample:** Identity provider my-idp has been created |
| **proposed** dictionary | always | Representation of proposed changes to identity provider **Sample:** {'config': {'authorizationUrl': 'https://idp.example.com/auth', 'clientAuthMethod': 'client\_secret\_post', 'clientId': 'my-client', 'clientSecret': 'secret', 'issuer': 'https://idp.example.com', 'tokenUrl': 'https://idp.example.com/token', 'userInfoUrl': 'https://idp.example.com/userinfo'}, 'displayName': 'OpenID Connect IdP', 'providerId': 'oidc'} |
### Authors
* Laurent Paumier (@laurpaum)
| programming_docs |
ansible community.general.rax_network β create / delete an isolated network in Rackspace Public Cloud community.general.rax\_network β create / delete an isolated network in Rackspace Public Cloud
==============================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.rax_network`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* creates / deletes a Rackspace Public Cloud isolated network.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* pyrax
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string | | Rackspace API key, overrides *credentials*.
aliases: password |
| **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/>
|
| **cidr** string | | cidr of the network being created |
| **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided.
aliases: creds\_file |
| **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. |
| **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. |
| **label** string / required | | Label (name) to give the network |
| **region** string | | Region to create an instance in. |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the resource |
| **tenant\_id** string | | The tenant ID used for authentication. |
| **tenant\_name** string | | The tenant name used for authentication. |
| **username** string | | Rackspace username, overrides *credentials*. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether or not to require SSL validation of API endpoints.
aliases: verify\_ssl |
Notes
-----
Note
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
Examples
--------
```
- name: Build an Isolated Network
gather_facts: False
tasks:
- name: Network create request
local_action:
module: rax_network
credentials: ~/.raxpub
label: my-net
cidr: 192.168.3.0/24
state: present
```
### Authors
* Christopher H. Laco (@claco)
* Jesse Keating (@omgjlk)
ansible community.general.onepassword_info β Gather items from 1Password community.general.onepassword\_info β Gather items from 1Password
=================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.onepassword_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* [community.general.onepassword\_info](#ansible-collections-community-general-onepassword-info-module) wraps the `op` command line utility to fetch data about one or more 1Password items.
* A fatal error occurs if any of the items being searched for can not be found.
* Recommend using with the `no_log` option to avoid logging the values of the secrets being retrieved.
* This module was called `onepassword_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [community.general.onepassword\_info](#ansible-collections-community-general-onepassword-info-module) module no longer returns `ansible_facts`! You must now use the `register` option to use the facts in other tasks.
Requirements
------------
The below requirements are needed on the host that executes this module.
* `op` 1Password command line utility. See <https://support.1password.com/command-line/>
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_login** dictionary | **Default:**{} | A dictionary containing authentication details. If this is set, [community.general.onepassword\_info](onepassword_info_module) will attempt to sign in to 1Password automatically. Without this option, you must have already logged in via the 1Password CLI before running Ansible. It is **highly** recommended to store 1Password credentials in an Ansible Vault. Ensure that the key used to encrypt the Ansible Vault is equal to or greater in strength than the 1Password master password. |
| | **master\_password** string / required | | The master password for your subdomain. This is always required when specifying `auto_login`. |
| | **secret\_key** string | | The secret key for your subdomain. Only required for initial sign in. |
| | **subdomain** string | | 1Password subdomain name (<subdomain>.1password.com). If this is not specified, the most recent subdomain will be used. |
| | **username** string | | 1Password username. Only required for initial sign in. |
| **cli\_path** path | **Default:**"op" | Used to specify the exact path to the `op` command line interface |
| **search\_terms** list / elements=dictionary / required | | A list of one or more search terms. Each search term can either be a simple string or it can be a dictionary for more control. When passing a simple string, *field* is assumed to be `password`. When passing a dictionary, the following fields are available. |
| | **field** string | | The name of the field to search for within this item (optional, defaults to "password" (or "document" if the item has an attachment). |
| | **name** string | | The name of the 1Password item to search for (required). |
| | **section** string | | The name of a section within this item containing the specified field (optional, will search all sections if not specified). |
| | **vault** string | | The name of the particular 1Password vault to search, useful if your 1Password user has access to multiple vaults (optional). |
Notes
-----
Note
* Tested with `op` version 0.5.5
* Based on the `onepassword` lookup plugin by Scott Buchanan <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#addecfd8cec5ccc3ccc38b8e9e9a968b8e989f968b8e999596dfc48b8e999b96ddc3)>.
Examples
--------
```
# Gather secrets from 1Password, assuming there is a 'password' field:
- name: Get a password
community.general.onepassword_info:
search_terms: My 1Password item
delegate_to: localhost
register: my_1password_item
no_log: true # Don't want to log the secrets to the console!
# Gather secrets from 1Password, with more advanced search terms:
- name: Get a password
community.general.onepassword_info:
search_terms:
- name: My 1Password item
field: Custom field name # optional, defaults to 'password'
section: Custom section name # optional, defaults to 'None'
vault: Name of the vault # optional, only necessary if there is more than 1 Vault available
delegate_to: localhost
register: my_1password_item
no_log: True # Don't want to log the secrets to the console!
# Gather secrets combining simple and advanced search terms to retrieve two items, one of which we fetch two
# fields. In the first 'password' is fetched, as a field name is not specified (default behaviour) and in the
# second, 'Custom field name' is fetched, as that is specified explicitly.
- name: Get a password
community.general.onepassword_info:
search_terms:
- My 1Password item # 'name' is optional when passing a simple string...
- name: My Other 1Password item # ...but it can also be set for consistency
- name: My 1Password item
field: Custom field name # optional, defaults to 'password'
section: Custom section name # optional, defaults to 'None'
vault: Name of the vault # optional, only necessary if there is more than 1 Vault available
- name: A 1Password item with document attachment
delegate_to: localhost
register: my_1password_item
no_log: true # Don't want to log the secrets to the console!
- name: Debug a password (for example)
ansible.builtin.debug:
msg: "{{ my_1password_item['onepassword']['My 1Password item'] }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **onepassword** dictionary | success | Dictionary of each 1password item matching the given search terms, shows what would be returned from the third example above. **Sample:** {'A 1Password item with document attachment': {'document': 'the contents of the document attached to this item'}, 'My 1Password item': {'Custom field name': 'the value of this field', 'password': 'the value of this field'}, 'My Other 1Password item': {'password': 'the value of this field'}} |
### Authors
* Ryan Conway (@Rylon)
ansible community.general.counter_enabled β adds counters to the output items (tasks and hosts/task) community.general.counter\_enabled β adds counters to the output items (tasks and hosts/task)
=============================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.counter_enabled`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
Synopsis
--------
* Use this callback when you need a kind of progress bar on a large environments.
* You will know how many tasks has the playbook to run, and which one is actually running.
* You will know how many hosts may run a task, and which of them is actually running.
Requirements
------------
The below requirements are needed on the local controller node that executes this callback.
* set as stdout callback in ansible.cfg (stdout\_callback = counter\_enabled)
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **check\_mode\_markers** boolean added in 2.9 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [defaults]check\_mode\_markers = no env:ANSIBLE\_CHECK\_MODE\_MARKERS | Toggle to control displaying markers when running in check mode. The markers are `DRY RUN` at the beggining and ending of playbook execution (when calling `ansible-playbook --check`) and `CHECK MODE` as a suffix at every play and task that is run in check mode. |
| **display\_failed\_stderr** boolean added in 2.7 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [defaults]display\_failed\_stderr = no env:ANSIBLE\_DISPLAY\_FAILED\_STDERR | Toggle to control whether failed and unreachable tasks are displayed to STDERR (vs. STDOUT) |
| **display\_ok\_hosts** boolean added in 2.7 of ansible.builtin | **Choices:*** no
* **yes** β
| ini entries: [defaults]display\_ok\_hosts = yes env:ANSIBLE\_DISPLAY\_OK\_HOSTS | Toggle to control displaying 'ok' task/host results in a task |
| **display\_skipped\_hosts** boolean | **Choices:*** no
* **yes** β
| ini entries: [defaults]display\_skipped\_hosts = yes env:DISPLAY\_SKIPPED\_HOSTS Removed in: version 2.12 of ansible.builtin Why: environment variables without "ANSIBLE\_" prefix are deprecated Alternative: the "ANSIBLE\_DISPLAY\_SKIPPED\_HOSTS" environment variable env:ANSIBLE\_DISPLAY\_SKIPPED\_HOSTS | Toggle to control displaying skipped task/host results in a task |
| **show\_custom\_stats** boolean | **Choices:*** **no** β
* yes
| ini entries: [defaults]show\_custom\_stats = no env:ANSIBLE\_SHOW\_CUSTOM\_STATS | This adds the custom stats set via the set\_stats plugin to the play recap |
| **show\_per\_host\_start** boolean added in 2.9 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [defaults]show\_per\_host\_start = no env:ANSIBLE\_SHOW\_PER\_HOST\_START | This adds output that shows when a task is started to execute for each host |
| **show\_task\_path\_on\_failure** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [defaults]show\_task\_path\_on\_failure = no env:ANSIBLE\_SHOW\_TASK\_PATH\_ON\_FAILURE | When a task fails, display the path to the file containing the failed task and the line number. This information is displayed automatically for every task when running with `-vv` or greater verbosity. |
### Authors
* Unknown (!UNKNOWN)
ansible community.general.atomic_host β Manage the atomic host platform community.general.atomic\_host β Manage the atomic host platform
================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.atomic_host`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage the atomic host platform.
* Rebooting of Atomic host platform should be done outside this module.
Requirements
------------
The below requirements are needed on the host that executes this module.
* atomic
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **revision** string | **Default:**"latest" | The version number of the atomic host to be deployed. Providing `latest` will upgrade to the latest available version.
aliases: version |
Notes
-----
Note
* Host should be an atomic platform (verified by existence of β/run/ostree-bootedβ file).
Examples
--------
```
- name: Upgrade the atomic host platform to the latest version (atomic host upgrade)
community.general.atomic_host:
revision: latest
- name: Deploy a specific revision as the atomic host (atomic host deploy 23.130)
community.general.atomic_host:
revision: 23.130
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | always | The command standard output **Sample:** Already on latest |
### Authors
* Saravanan KR (@krsacme)
ansible community.general.scaleway_database_backup β Scaleway database backups management module community.general.scaleway\_database\_backup β Scaleway database backups management module
==========================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.scaleway_database_backup`.
New in version 1.2.0: of community.general
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module manages database backups on Scaleway account <https://developer.scaleway.com>.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds.
aliases: timeout |
| **api\_token** string / required | | Scaleway OAuth token.
aliases: oauth\_token |
| **api\_url** string | **Default:**"https://api.scaleway.com" | Scaleway API URL.
aliases: base\_url |
| **database\_name** string | | Name used to identify the database. Required for `present` and `restored` states. Ignored when `state=absent` or `state=exported`. |
| **expires\_at** string | | Expiration datetime of the database backup (ISO 8601 format). Ignored when `state=absent`, `state=exported` or `state=restored`. |
| **id** string | | UUID used to identify the database backup. Required for `absent`, `exported` and `restored` states. |
| **instance\_id** string | | UUID of the instance associated to the database backup. Required for `present` and `restored` states. Ignored when `state=absent` or `state=exported`. |
| **name** string | | Name used to identify the database backup. Required for `present` state. Ignored when `state=absent`, `state=exported` or `state=restored`. |
| **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. |
| **region** string / required | **Choices:*** fr-par
* nl-ams
* pl-waw
| Scaleway region to use (for example `fr-par`). |
| **state** string | **Choices:*** **present** β
* absent
* exported
* restored
| Indicate desired state of the database backup.
`present` creates a backup.
`absent` deletes the backup.
`exported` creates a download link for the backup.
`restored` restores the backup to a new database. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Scaleway API. |
| **wait** boolean | **Choices:*** **no** β
* yes
| Wait for the instance to reach its desired state before returning. |
| **wait\_sleep\_time** integer | **Default:**3 | Time to wait before every attempt to check the state of the backup. |
| **wait\_timeout** integer | **Default:**300 | Time to wait for the backup to reach the expected state. |
Notes
-----
Note
* Also see the API documentation on <https://developer.scaleway.com/>
* If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`.
* If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable.
Examples
--------
```
- name: Create a backup
community.general.scaleway_database_backup:
name: 'my_backup'
state: present
region: 'fr-par'
database_name: 'my-database'
instance_id: '50968a80-2909-4e5c-b1af-a2e19860dddb'
- name: Export a backup
community.general.scaleway_database_backup:
id: '6ef1125a-037e-494f-a911-6d9c49a51691'
state: exported
region: 'fr-par'
- name: Restore a backup
community.general.scaleway_database_backup:
id: '6ef1125a-037e-494f-a911-6d9c49a51691'
state: restored
region: 'fr-par'
database_name: 'my-new-database'
instance_id: '50968a80-2909-4e5c-b1af-a2e19860dddb'
- name: Remove a backup
community.general.scaleway_database_backup:
id: '6ef1125a-037e-494f-a911-6d9c49a51691'
state: absent
region: 'fr-par'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **metadata** dictionary | when `state=present`, `state=exported` or `state=restored` | Backup metadata. **Sample:** {'metadata': {'created\_at': '2020-08-06T12:42:05.631049Z', 'database\_name': 'my-database', 'download\_url': None, 'download\_url\_expires\_at': None, 'expires\_at': None, 'id': 'a15297bd-0c4a-4b4f-8fbb-b36a35b7eb07', 'instance\_id': '617be32e-6497-4ed7-b4c7-0ee5a81edf49', 'instance\_name': 'my-instance', 'name': 'backup\_name', 'region': 'fr-par', 'size': 600000, 'status': 'ready', 'updated\_at': '2020-08-06T12:42:10.581649Z'}} |
### Authors
* Guillaume Rodriguez (@guillaume\_ro\_fr)
| programming_docs |
ansible community.general.homebrew β Package manager for Homebrew community.general.homebrew β Package manager for Homebrew
=========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.homebrew`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages Homebrew packages
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* homebrew must already be installed on the target system
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **install\_options** list / elements=string | | options flags to install a package.
aliases: options |
| **name** list / elements=string | | A list of names of packages to install/remove.
aliases: formula, package, pkg |
| **path** path | **Default:**"/usr/local/bin:/opt/homebrew/bin" | A ':' separated list of paths to search for 'brew' executable. Since a package (*formula* in homebrew parlance) location is prefixed relative to the actual path of *brew* command, providing an alternative *brew* path enables managing different set of packages in an alternative location in the system. |
| **state** string | **Choices:*** absent
* head
* installed
* latest
* linked
* **present** β
* removed
* uninstalled
* unlinked
* upgraded
| state of the package. |
| **update\_homebrew** boolean | **Choices:*** **no** β
* yes
| update homebrew itself first. Alias `update-brew` has been deprecated and will be removed in community.general 5.0.0.
aliases: update-brew |
| **upgrade\_all** boolean | **Choices:*** **no** β
* yes
| upgrade all homebrew packages.
aliases: upgrade |
| **upgrade\_options** list / elements=string added in 0.2.0 of community.general | | Option flags to upgrade. |
Notes
-----
Note
* When used with a `loop:` each package will be processed individually, it is much more efficient to pass the list directly to the `name` option.
Examples
--------
```
# Install formula foo with 'brew' in default path
- community.general.homebrew:
name: foo
state: present
# Install formula foo with 'brew' in alternate path C(/my/other/location/bin)
- community.general.homebrew:
name: foo
path: /my/other/location/bin
state: present
# Update homebrew first and install formula foo with 'brew' in default path
- community.general.homebrew:
name: foo
state: present
update_homebrew: yes
# Update homebrew first and upgrade formula foo to latest available with 'brew' in default path
- community.general.homebrew:
name: foo
state: latest
update_homebrew: yes
# Update homebrew and upgrade all packages
- community.general.homebrew:
update_homebrew: yes
upgrade_all: yes
# Miscellaneous other examples
- community.general.homebrew:
name: foo
state: head
- community.general.homebrew:
name: foo
state: linked
- community.general.homebrew:
name: foo
state: absent
- community.general.homebrew:
name: foo,bar
state: absent
- community.general.homebrew:
name: foo
state: present
install_options: with-baz,enable-debug
- name: Install formula foo with 'brew' from cask
community.general.homebrew:
name: homebrew/cask/foo
state: present
- name: Use ignore-pinned option while upgrading all
community.general.homebrew:
upgrade_all: yes
upgrade_options: ignore-pinned
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed\_pkgs** list / elements=string added in 0.2.0 of community.general | success | List of package names which are changed after module run **Sample:** ['git', 'git-cola'] |
| **msg** string | always | if the cache was updated or not **Sample:** Changed: 0, Unchanged: 2 |
| **unchanged\_pkgs** list / elements=string added in 0.2.0 of community.general | success | List of package names which are unchanged after module run **Sample:** ['awscli', 'ag'] |
### Authors
* Indrajit Raychaudhuri (@indrajitr)
* Daniel Jaouen (@danieljaouen)
* Andrew Dunham (@andrew-d)
ansible community.general.scaleway_security_group β Scaleway Security Group management module community.general.scaleway\_security\_group β Scaleway Security Group management module
=======================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.scaleway_security_group`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module manages Security Group on Scaleway account <https://developer.scaleway.com>.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds.
aliases: timeout |
| **api\_token** string / required | | Scaleway OAuth token.
aliases: oauth\_token |
| **api\_url** string | **Default:**"https://api.scaleway.com" | Scaleway API URL.
aliases: base\_url |
| **description** string | | Description of the Security Group. |
| **inbound\_default\_policy** string | **Choices:*** accept
* drop
| Default policy for incoming traffic. |
| **name** string / required | | Name of the Security Group. |
| **organization** string / required | | Organization identifier. |
| **organization\_default** boolean | **Choices:*** no
* yes
| Create security group to be the default one. |
| **outbound\_default\_policy** string | **Choices:*** accept
* drop
| Default policy for outcoming traffic. |
| **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. |
| **region** string / required | **Choices:*** ams1
* EMEA-NL-EVS
* par1
* EMEA-FR-PAR1
* par2
* EMEA-FR-PAR2
* waw1
* EMEA-PL-WAW1
| Scaleway region to use (for example `par1`). |
| **state** string | **Choices:*** absent
* **present** β
| Indicate desired state of the Security Group. |
| **stateful** boolean / required | **Choices:*** no
* yes
| Create a stateful security group which allows established connections in and out. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Scaleway API. |
Notes
-----
Note
* Also see the API documentation on <https://developer.scaleway.com/>
* If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`.
* If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable.
Examples
--------
```
- name: Create a Security Group
community.general.scaleway_security_group:
state: present
region: par1
name: security_group
description: "my security group description"
organization: "43a3b6c8-916f-477b-b7ec-ff1898f5fdd9"
stateful: false
inbound_default_policy: accept
outbound_default_policy: accept
organization_default: false
register: security_group_creation_task
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | when `state=present` | This is only present when `state=present`
**Sample:** {'scaleway\_security\_group': {'description': 'my security group description', 'enable\_default\_security': True, 'id': '0168fb1f-cc46-4f69-b4be-c95d2a19bcae', 'inbound\_default\_policy': 'accept', 'name': 'security\_group', 'organization': '43a3b6c8-916f-477b-b7ec-ff1898f5fdd9', 'organization\_default': False, 'outbound\_default\_policy': 'accept', 'servers': [], 'stateful': False}} |
### Authors
* Antoine Barbare (@abarbare)
ansible community.general.proxmox_user_info β Retrieve information about one or more Proxmox VE users community.general.proxmox\_user\_info β Retrieve information about one or more Proxmox VE users
===============================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.proxmox_user_info`.
New in version 1.3.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more Proxmox VE users
Requirements
------------
The below requirements are needed on the host that executes this module.
* proxmoxer
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_host** string / required | | Specify the target host of the Proxmox VE cluster. |
| **api\_password** string | | Specify the password to authenticate with. You can use `PROXMOX_PASSWORD` environment variable. |
| **api\_token\_id** string added in 1.3.0 of community.general | | Specify the token ID. |
| **api\_token\_secret** string added in 1.3.0 of community.general | | Specify the token secret. |
| **api\_user** string / required | | Specify the user to authenticate with. |
| **domain** string | | Restrict results to a specific authentication realm.
aliases: realm |
| **user** string | | Restrict results to a specific user.
aliases: name |
| **userid** string | | Restrict results to a specific user ID, which is a concatenation of a user and domain parts. |
| **validate\_certs** boolean | **Choices:*** **no** β
* yes
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: List existing users
community.general.proxmox_user_info:
api_host: helldorado
api_user: root@pam
api_password: "{{ password | default(omit) }}"
api_token_id: "{{ token_id | default(omit) }}"
api_token_secret: "{{ token_secret | default(omit) }}"
register: proxmox_users
- name: List existing users in the pve authentication realm
community.general.proxmox_user_info:
api_host: helldorado
api_user: root@pam
api_password: "{{ password | default(omit) }}"
api_token_id: "{{ token_id | default(omit) }}"
api_token_secret: "{{ token_secret | default(omit) }}"
domain: pve
register: proxmox_users_pve
- name: Retrieve information about admin@pve
community.general.proxmox_user_info:
api_host: helldorado
api_user: root@pam
api_password: "{{ password | default(omit) }}"
api_token_id: "{{ token_id | default(omit) }}"
api_token_secret: "{{ token_secret | default(omit) }}"
userid: admin@pve
register: proxmox_user_admin
- name: Alternative way to retrieve information about admin@pve
community.general.proxmox_user_info:
api_host: helldorado
api_user: root@pam
api_password: "{{ password | default(omit) }}"
api_token_id: "{{ token_id | default(omit) }}"
api_token_secret: "{{ token_secret | default(omit) }}"
user: admin
domain: pve
register: proxmox_user_admin
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **proxmox\_users** list / elements=dictionary | always, but can be empty | List of users. |
| | **comment** string | on success | Short description of the user. |
| | **domain** string | on success | User's authentication realm, also the right part of the user ID. |
| | **email** string | on success | User's email address. |
| | **enabled** boolean | on success | User's account state. |
| | **expire** integer | on success | Expiration date in seconds since EPOCH. Zero means no expiration. |
| | **firstname** string | on success | User's first name. |
| | **groups** list / elements=string | on success | List of groups which the user is a member of. |
| | **keys** string | on success | User's two factor authentication keys. |
| | **lastname** string | on success | User's last name. |
| | **tokens** list / elements=dictionary | on success | List of API tokens associated to the user. |
| | | **comment** string | on success | Short description of the token. |
| | | **expire** integer | on success | Expiration date in seconds since EPOCH. Zero means no expiration. |
| | | **privsep** boolean | on success | Describe if the API token is further restricted with ACLs or is fully privileged. |
| | | **tokenid** string | on success | Token name. |
| | **user** string | on success | User's login name, also the left part of the user ID. |
| | **userid** string | on success | Proxmox user ID, represented as user@realm. |
### Authors
* Tristan Le Guern (@tleguern)
ansible community.general.xml β Manage bits and pieces of XML files or strings community.general.xml β Manage bits and pieces of XML files or strings
======================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.xml`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A CRUD-like interface to managing bits of XML files.
Requirements
------------
The below requirements are needed on the host that executes this module.
* lxml >= 2.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **add\_children** list / elements=raw | | Add additional child-element(s) to a selected element for a given `xpath`. Child elements must be given in a list and each item may be either a string (eg. `children=ansible` to add an empty `<ansible/>` child element), or a hash where the key is an element name and the value is the element value. This parameter requires `xpath` to be set. |
| **attribute** raw | | The attribute to select when using parameter `value`. This is a string, not prepended with `@`. |
| **backup** boolean | **Choices:*** **no** β
* yes
| Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. |
| **content** string | **Choices:*** attribute
* text
| Search for a given `xpath` and get content. This parameter requires `xpath` to be set. |
| **count** boolean | **Choices:*** **no** β
* yes
| Search for a given `xpath` and provide the count of any matches. This parameter requires `xpath` to be set. |
| **input\_type** string | **Choices:*** xml
* **yaml** β
| Type of input for `add_children` and `set_children`. |
| **insertafter** boolean | **Choices:*** **no** β
* yes
| Add additional child-element(s) after the last selected element for a given `xpath`. Child elements must be given in a list and each item may be either a string (eg. `children=ansible` to add an empty `<ansible/>` child element), or a hash where the key is an element name and the value is the element value. This parameter requires `xpath` to be set. |
| **insertbefore** boolean | **Choices:*** **no** β
* yes
| Add additional child-element(s) before the first selected element for a given `xpath`. Child elements must be given in a list and each item may be either a string (eg. `children=ansible` to add an empty `<ansible/>` child element), or a hash where the key is an element name and the value is the element value. This parameter requires `xpath` to be set. |
| **namespaces** dictionary | | The namespace `prefix:uri` mapping for the XPath expression. Needs to be a `dict`, not a `list` of items. |
| **path** path | | Path to the file to operate on. This file must exist ahead of time. This parameter is required, unless `xmlstring` is given.
aliases: dest, file |
| **pretty\_print** boolean | **Choices:*** **no** β
* yes
| Pretty print XML output. |
| **print\_match** boolean | **Choices:*** **no** β
* yes
| Search for a given `xpath` and print out any matches. This parameter requires `xpath` to be set. |
| **set\_children** list / elements=raw | | Set the child-element(s) of a selected element for a given `xpath`. Removes any existing children. Child elements must be specified as in `add_children`. This parameter requires `xpath` to be set. |
| **state** string | **Choices:*** absent
* **present** β
| Set or remove an xpath selection (node(s), attribute(s)).
aliases: ensure |
| **strip\_cdata\_tags** boolean | **Choices:*** **no** β
* yes
| Remove CDATA tags surrounding text values. Note that this might break your XML file if text values contain characters that could be interpreted as XML. |
| **value** raw | | Desired state of the selected attribute. Either a string, or to unset a value, the Python `None` keyword (YAML Equivalent, `null`). Elements default to no value (but present). Attributes default to an empty string. |
| **xmlstring** string | | A string containing XML on which to operate. This parameter is required, unless `path` is given. |
| **xpath** string | | A valid XPath expression describing the item(s) you want to manipulate. Operates on the document root, `/`, by default. |
Notes
-----
Note
* Use the `--check` and `--diff` options when testing your expressions.
* The diff output is automatically pretty-printed, so may not reflect the actual file content, only the file structure.
* This module does not handle complicated xpath expressions, so limit xpath selectors to simple expressions.
* Beware that in case your XML elements are namespaced, you need to use the `namespaces` parameter, see the examples.
* Namespaces prefix should be used for all children of an element where namespace is defined, unless another namespace is defined for them.
See Also
--------
See also
[Xml module development community wiki](https://github.com/ansible/community/wiki/Module:-xml)
More information related to the development of this xml module.
[Introduction to XPath](https://www.w3schools.com/xml/xpath_intro.asp)
A brief tutorial on XPath (w3schools.com).
[XPath Reference document](https://developer.mozilla.org/en-US/docs/Web/XPath)
The reference documentation on XSLT/XPath (developer.mozilla.org).
Examples
--------
```
# Consider the following XML file:
#
# <business type="bar">
# <name>Tasty Beverage Co.</name>
# <beers>
# <beer>Rochefort 10</beer>
# <beer>St. Bernardus Abbot 12</beer>
# <beer>Schlitz</beer>
# </beers>
# <rating subjective="true">10</rating>
# <website>
# <mobilefriendly/>
# <address>http://tastybeverageco.com</address>
# </website>
# </business>
- name: Remove the 'subjective' attribute of the 'rating' element
community.general.xml:
path: /foo/bar.xml
xpath: /business/rating/@subjective
state: absent
- name: Set the rating to '11'
community.general.xml:
path: /foo/bar.xml
xpath: /business/rating
value: 11
# Retrieve and display the number of nodes
- name: Get count of 'beers' nodes
community.general.xml:
path: /foo/bar.xml
xpath: /business/beers/beer
count: yes
register: hits
- ansible.builtin.debug:
var: hits.count
# Example where parent XML nodes are created automatically
- name: Add a 'phonenumber' element to the 'business' element
community.general.xml:
path: /foo/bar.xml
xpath: /business/phonenumber
value: 555-555-1234
- name: Add several more beers to the 'beers' element
community.general.xml:
path: /foo/bar.xml
xpath: /business/beers
add_children:
- beer: Old Rasputin
- beer: Old Motor Oil
- beer: Old Curmudgeon
- name: Add several more beers to the 'beers' element and add them before the 'Rochefort 10' element
community.general.xml:
path: /foo/bar.xml
xpath: '/business/beers/beer[text()="Rochefort 10"]'
insertbefore: yes
add_children:
- beer: Old Rasputin
- beer: Old Motor Oil
- beer: Old Curmudgeon
# NOTE: The 'state' defaults to 'present' and 'value' defaults to 'null' for elements
- name: Add a 'validxhtml' element to the 'website' element
community.general.xml:
path: /foo/bar.xml
xpath: /business/website/validxhtml
- name: Add an empty 'validatedon' attribute to the 'validxhtml' element
community.general.xml:
path: /foo/bar.xml
xpath: /business/website/validxhtml/@validatedon
- name: Add or modify an attribute, add element if needed
community.general.xml:
path: /foo/bar.xml
xpath: /business/website/validxhtml
attribute: validatedon
value: 1976-08-05
# How to read an attribute value and access it in Ansible
- name: Read an element's attribute values
community.general.xml:
path: /foo/bar.xml
xpath: /business/website/validxhtml
content: attribute
register: xmlresp
- name: Show an attribute value
ansible.builtin.debug:
var: xmlresp.matches[0].validxhtml.validatedon
- name: Remove all children from the 'website' element (option 1)
community.general.xml:
path: /foo/bar.xml
xpath: /business/website/*
state: absent
- name: Remove all children from the 'website' element (option 2)
community.general.xml:
path: /foo/bar.xml
xpath: /business/website
children: []
# In case of namespaces, like in below XML, they have to be explicitly stated.
#
# <foo xmlns="http://x.test" xmlns:attr="http://z.test">
# <bar>
# <baz xmlns="http://y.test" attr:my_namespaced_attribute="true" />
# </bar>
# </foo>
# NOTE: There is the prefix 'x' in front of the 'bar' element, too.
- name: Set namespaced '/x:foo/x:bar/y:baz/@z:my_namespaced_attribute' to 'false'
community.general.xml:
path: foo.xml
xpath: /x:foo/x:bar/y:baz
namespaces:
x: http://x.test
y: http://y.test
z: http://z.test
attribute: z:my_namespaced_attribute
value: 'false'
- name: Adding building nodes with floor subnodes from a YAML variable
community.general.xml:
path: /foo/bar.xml
xpath: /business
add_children:
- building:
# Attributes
name: Scumm bar
location: Monkey island
# Subnodes
_:
- floor: Pirate hall
- floor: Grog storage
- construction_date: "1990" # Only strings are valid
- building: Grog factory
# Consider this XML for following example -
#
# <config>
# <element name="test1">
# <text>part to remove</text>
# </element>
# <element name="test2">
# <text>part to keep</text>
# </element>
# </config>
- name: Delete element node based upon attribute
community.general.xml:
path: bar.xml
xpath: /config/element[@name='test1']
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **actions** dictionary | success | A dictionary with the original xpath, namespaces and state. **Sample:** {'namespaces': ['namespace1', 'namespace2'], 'state=present': None, 'xpath': 'xpath'} |
| **backup\_file** string | when backup=yes | The name of the backup file that was created **Sample:** /path/to/file.xml.1942.2017-08-24@14:16:01~ |
| **count** integer | when parameter 'count' is set | The count of xpath matches. **Sample:** 2 |
| **matches** list / elements=string | when parameter 'print\_match' is set | The xpath matches found. |
| **msg** string | always | A message related to the performed action(s). |
| **xmlstring** string | when parameter 'xmlstring' is set | An XML string of the resulting output. |
### Authors
* Tim Bielawa (@tbielawa)
* Magnus Hedemark (@magnus919)
* Dag Wieers (@dagwieers)
| programming_docs |
ansible community.general.nios_naptr_record β Configure Infoblox NIOS NAPTR records community.general.nios\_naptr\_record β Configure Infoblox NIOS NAPTR records
=============================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.nios_naptr_record`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Status](#status)
DEPRECATED
----------
Removed in
version 5.0.0
Why
Please install the infoblox.nios\_modules collection and use the corresponding module from it.
Alternative
infoblox.nios\_modules.nios\_naptr\_record
Synopsis
--------
* Adds and/or removes instances of NAPTR record objects from Infoblox NIOS servers. This module manages NIOS `record:naptr` objects using the Infoblox WAPI interface over REST.
Requirements
------------
The below requirements are needed on the host that executes this module.
* infoblox\_client
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **comment** string | | Configures a text string comment to be associated with the instance of this object. The provided text string will be configured on the object instance. |
| **extattrs** dictionary | | Allows for the configuration of Extensible Attributes on the instance of the object. This argument accepts a set of key / value pairs for configuration. |
| **flags** string | | Configures the flags field for this NAPTR record. These control the interpretation of the fields for an NAPTR record object. Supported values for the flags field are "U", "S", "P" and "A". |
| **name** string / required | | Specifies the fully qualified hostname to add or remove from the system |
| **order** integer | | Configures the order (0-65535) for this NAPTR record. This parameter specifies the order in which the NAPTR rules are applied when multiple rules are present. |
| **preference** integer | | Configures the preference (0-65535) for this NAPTR record. The preference field determines the order NAPTR records are processed when multiple records with the same order parameter are present. |
| **provider** dictionary | | A dict object containing connection details. |
| | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. |
| | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. |
| | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. |
| | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. |
| | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. |
| | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. |
| | **silent\_ssl\_warnings** boolean | **Choices:*** no
* **yes** β
| Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. |
| | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. |
| | **validate\_certs** boolean | **Choices:*** **no** β
* yes
| Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable.
aliases: ssl\_verify |
| | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 |
| **regexp** string | | Configures the regexp field for this NAPTR record. This is the regular expression-based rewriting rule of the NAPTR record. This should be a POSIX compliant regular expression, including the substitution rule and flags. Refer to RFC 2915 for the field syntax details. |
| **replacement** string | | Configures the replacement field for this NAPTR record. For nonterminal NAPTR records, this field specifies the next domain name to look up. |
| **services** string | | Configures the services field (128 characters maximum) for this NAPTR record. The services field contains protocol and service identifiers, such as "http+E2U" or "SIPS+D2T". |
| **state** string | **Choices:*** **present** β
* absent
| Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. |
| **ttl** integer | | Configures the TTL to be associated with this NAPTR record |
| **view** string | **Default:**"default" | Sets the DNS view to associate this a record with. The DNS view must already be configured on the system
aliases: dns\_view |
Notes
-----
Note
* This module must be run locally, which can be achieved by specifying `connection: local`.
* Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible.
Examples
--------
```
- name: Configure a NAPTR record
community.general.nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Add a comment to an existing NAPTR record
community.general.nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
comment: this is a test comment
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Remove a NAPTR record from the system
community.general.nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
state: absent
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
```
Status
------
* This module will be removed in version 5.0.0. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Blair Rampling (@brampling)
ansible community.general.flatpak β Manage flatpaks community.general.flatpak β Manage flatpaks
===========================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.flatpak`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Allows users to add or remove flatpaks.
* See the [community.general.flatpak\_remote](flatpak_remote_module#ansible-collections-community-general-flatpak-remote-module) module for managing flatpak remotes.
Requirements
------------
The below requirements are needed on the host that executes this module.
* flatpak
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **executable** path | **Default:**"flatpak" | The path to the `flatpak` executable to use. By default, this module looks for the `flatpak` executable on the path. |
| **method** string | **Choices:*** **system** β
* user
| The installation method to use. Defines if the *flatpak* is supposed to be installed globally for the whole `system` or only for the current `user`. |
| **name** list / elements=string / required | | The name of the flatpak to manage. To operate on several packages this can accept a list of packages. When used with *state=present*, *name* can be specified as a URL to a `flatpakref` file or the unique reverse DNS name that identifies a flatpak. Both `https://` and `http://` URLs are supported. When supplying a reverse DNS name, you can use the *remote* option to specify on what remote to look for the flatpak. An example for a reverse DNS name is `org.gnome.gedit`. When used with *state=absent*, it is recommended to specify the name in the reverse DNS format. When supplying a URL with *state=absent*, the module will try to match the installed flatpak based on the name of the flatpakref to remove it. However, there is no guarantee that the names of the flatpakref file and the reverse DNS name of the installed flatpak do match. |
| **no\_dependencies** boolean added in 3.2.0 of community.general | **Choices:*** **no** β
* yes
| If installing runtime dependencies should be omitted or not This parameter is primarily implemented for integration testing this module. There might however be some use cases where you would want to have this, like when you are packaging your own flatpaks. |
| **remote** string | **Default:**"flathub" | The flatpak remote (repository) to install the flatpak from. By default, `flathub` is assumed, but you do need to add the flathub flatpak\_remote before you can use this. See the [community.general.flatpak\_remote](flatpak_remote_module) module for managing flatpak remotes. |
| **state** string | **Choices:*** absent
* **present** β
| Indicates the desired package state. |
Examples
--------
```
- name: Install the spotify flatpak
community.general.flatpak:
name: https://s3.amazonaws.com/alexlarsson/spotify-repo/spotify.flatpakref
state: present
- name: Install the gedit flatpak package without dependencies (not recommended)
community.general.flatpak:
name: https://git.gnome.org/browse/gnome-apps-nightly/plain/gedit.flatpakref
state: present
no_dependencies: true
- name: Install the gedit package from flathub for current user
community.general.flatpak:
name: org.gnome.gedit
state: present
method: user
- name: Install the Gnome Calendar flatpak from the gnome remote system-wide
community.general.flatpak:
name: org.gnome.Calendar
state: present
remote: gnome
- name: Install multiple packages
community.general.flatpak:
name:
- org.gimp.GIMP
- org.inkscape.Inkscape
- org.mozilla.firefox
- name: Remove the gedit flatpak
community.general.flatpak:
name: org.gnome.gedit
state: absent
- name: Remove multiple packages
community.general.flatpak:
name:
- org.gimp.GIMP
- org.inkscape.Inkscape
- org.mozilla.firefox
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **command** string | When a flatpak command has been executed | The exact flatpak command that was executed **Sample:** /usr/bin/flatpak install --user --nontinteractive flathub org.gnome.Calculator |
| **msg** string | failure | Module error message **Sample:** Executable '/usr/local/bin/flatpak' was not found on the system. |
| **rc** integer | When a flatpak command has been executed | Return code from flatpak binary |
| **stderr** string | When a flatpak command has been executed | Error output from flatpak binary **Sample:** error: Error searching remote flathub: Can't find ref org.gnome.KDE |
| **stdout** string | When a flatpak command has been executed | Output from flatpak binary **Sample:** org.gnome.Calendar/x86\_64/stable current org.gnome.gitg/x86\_64/stable current |
### Authors
* John Kwiatkoski (@JayKayy)
* Alexander Bethke (@oolongbrothers)
ansible community.general.iocage β Run tasks in iocage jails community.general.iocage β Run tasks in iocage jails
====================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.iocage`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
Synopsis
--------
* Run commands or put/fetch files to an existing iocage jail
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **remote\_addr** string | | var: ansible\_host var: ansible\_iocage\_host | Path to the jail |
| **remote\_user** string | | var: ansible\_user var: ansible\_iocage\_user | User to execute as inside the jail |
### Authors
* Stephan Lohse (!UNKNOWN) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#533736257e343a273b2631757060646875706661687570676b68233f3c363875706765683c2134)>
ansible community.general.nomad_job β Launch a Nomad Job community.general.nomad\_job β Launch a Nomad Job
=================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.nomad_job`.
New in version 1.3.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
Synopsis
--------
* Launch a Nomad job.
* Stop a Nomad job.
* Force start a Nomad job
Requirements
------------
The below requirements are needed on the host that executes this module.
* python-nomad
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **client\_cert** path | | Path of certificate for TLS/SSL. |
| **client\_key** path | | Path of certificate's private key for TLS/SSL. |
| **content** string | | Content of Nomad job. Either this or *name* must be specified. |
| **content\_format** string | **Choices:*** **hcl** β
* json
| Type of content of Nomad job. |
| **force\_start** boolean | **Choices:*** **no** β
* yes
| Force job to started. |
| **host** string / required | | FQDN of Nomad server. |
| **name** string | | Name of job for delete, stop and start job without source. Name of job for delete, stop and start job without source. Either this or *content* must be specified. |
| **namespace** string | | Namespace for Nomad. |
| **state** string / required | **Choices:*** present
* absent
| Deploy or remove job. |
| **timeout** integer | **Default:**5 | Timeout (in seconds) for the request to Nomad. |
| **token** string | | ACL token for authentification. |
| **use\_ssl** boolean | **Choices:*** no
* **yes** β
| Use TLS/SSL connection. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Enable TLS/SSL certificate validation. |
Notes
-----
Note
* `check_mode` is supported.
See Also
--------
See also
[Nomad jobs documentation](https://www.nomadproject.io/api-docs/jobs/)
Complete documentation for Nomad API jobs.
Examples
--------
```
- name: Create job
community.general.nomad_job:
host: localhost
state: present
content: "{{ lookup('ansible.builtin.file', 'job.hcl') }}"
timeout: 120
- name: Stop job
community.general.nomad_job:
host: localhost
state: absent
name: api
- name: Force job to start
community.general.nomad_job:
host: localhost
state: present
name: api
timeout: 120
force_start: true
```
### Authors
* FERREIRA Christophe (@chris93111)
ansible community.general.jenkins_job_info β Get information about Jenkins jobs community.general.jenkins\_job\_info β Get information about Jenkins jobs
=========================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.jenkins_job_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to query information about which Jenkins jobs which already exists.
* This module was called `jenkins_job_info` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python-jenkins >= 0.4.12
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **color** string | | Only fetch jobs with the given status color. |
| **glob** string | | A shell glob of Jenkins job names to fetch information about. |
| **name** string | | Exact name of the Jenkins job to fetch information about. |
| **password** string | | Password to authenticate with the Jenkins server. This is mutually exclusive with *token*. |
| **token** string | | API token used to authenticate with the Jenkins server. This is mutually exclusive with *password*. |
| **url** string | **Default:**"http://localhost:8080" | URL where the Jenkins server is accessible. |
| **user** string | | User to authenticate with the Jenkins server. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `False`, the SSL certificates will not be validated. This should only set to `False` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
# Get all Jenkins jobs anonymously
- community.general.jenkins_job_info:
user: admin
register: my_jenkins_job_info
# Get all Jenkins jobs using basic auth
- community.general.jenkins_job_info:
user: admin
password: hunter2
register: my_jenkins_job_info
# Get all Jenkins jobs using the token
- community.general.jenkins_job_info:
user: admin
token: abcdefghijklmnop
register: my_jenkins_job_info
# Get info about a single job using basic auth
- community.general.jenkins_job_info:
name: some-job-name
user: admin
password: hunter2
register: my_jenkins_job_info
# Get info about a single job in a folder using basic auth
- community.general.jenkins_job_info:
name: some-folder-name/some-job-name
user: admin
password: hunter2
register: my_jenkins_job_info
# Get info about jobs matching a shell glob using basic auth
- community.general.jenkins_job_info:
glob: some-job-*
user: admin
password: hunter2
register: my_jenkins_job_info
# Get info about all failing jobs using basic auth
- community.general.jenkins_job_info:
color: red
user: admin
password: hunter2
register: my_jenkins_job_info
# Get info about passing jobs matching a shell glob using basic auth
- community.general.jenkins_job_info:
name: some-job-*
color: blue
user: admin
password: hunter2
register: my_jenkins_job_info
- name: Get the info from custom URL with token and validate_certs=False
community.general.jenkins_job_info:
user: admin
token: 126df5c60d66c66e3b75b11104a16a8a
url: https://jenkins.example.com
validate_certs: False
register: my_jenkins_job_info
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **jobs** list / elements=string | success | All jobs found matching the specified criteria **Sample:** [{'color': 'blue', 'fullname': 'test-folder/test-job', 'name': 'test-job', 'url': 'http://localhost:8080/job/test-job/'}] |
### Authors
* Chris St. Pierre (@stpierre)
| programming_docs |
ansible community.general.saltstack β Allow ansible to piggyback on salt minions community.general.saltstack β Allow ansible to piggyback on salt minions
========================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.saltstack`.
Synopsis
--------
* This allows you to use existing Saltstack infrastructure to connect to targets.
### Authors
* Michael Scherer (@mscherer) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#3a575349591c19090d011c190f08011c190e0201405b48581c190e0c0155485d)>
ansible community.general.webfaction_site β Add or remove a website on a Webfaction host community.general.webfaction\_site β Add or remove a website on a Webfaction host
=================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.webfaction_site`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Add or remove a website on a Webfaction host. Further documentation at <https://github.com/quentinsf/ansible-webfaction>.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **host** string / required | | The webfaction host on which the site should be created. |
| **https** boolean | **Choices:*** **no** β
* yes
| Whether or not to use HTTPS |
| **login\_name** string / required | | The webfaction account to use |
| **login\_password** string / required | | The webfaction password to use |
| **name** string / required | | The name of the website |
| **site\_apps** list / elements=list | **Default:**[] | A mapping of URLs to apps |
| **state** string | **Choices:*** **present** β
* absent
| Whether the website should exist |
| **subdomains** list / elements=string | **Default:**[] | A list of subdomains associated with this site. |
Notes
-----
Note
* Sadly, you *do* need to know your webfaction hostname for the `host` parameter. But at least, unlike the API, you donβt need to know the IP address. You can use a DNS name.
* If a site of the same name exists in the account but on a different host, the operation will exit.
* You can run playbooks that use this on a local machine, or on a Webfaction host, or elsewhere, since the scripts use the remote webfaction API. The location is not important. However, running them on multiple hosts *simultaneously* is best avoided. If you donβt specify *localhost* as your host, you may want to add `serial: 1` to the plays.
* See [the webfaction API](https://docs.webfaction.com/xmlrpc-api/) for more info.
Examples
--------
```
- name: Create website
community.general.webfaction_site:
name: testsite1
state: present
host: myhost.webfaction.com
subdomains:
- 'testsite1.my_domain.org'
site_apps:
- ['testapp1', '/']
https: no
login_name: "{{webfaction_user}}"
login_password: "{{webfaction_passwd}}"
```
### Authors
* Quentin Stafford-Fraser (@quentinsf)
ansible community.general.dependent β Composes a list with nested elements of other lists or dicts which can depend on previous loop variables community.general.dependent β Composes a list with nested elements of other lists or dicts which can depend on previous loop variables
======================================================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.dependent`.
New in version 3.1.0: of community.general
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Takes the input lists and returns a list with elements that are lists, dictionaries, or template expressions which evaluate to lists or dicts, composed of the elements of the input evaluated lists and dictionaries.
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_raw** list / elements=dictionary / required | | | A list where the elements are one-element dictionaries, mapping a name to a string, list, or dictionary. The name is the index that is used in the result object. The value is iterated over as described below. If the value is a list, it is simply iterated over. If the value is a dictionary, it is iterated over and returned as if they would be processed by the ansible.builtin.dict2items filter. If the value is a string, it is evaluated as Jinja2 expressions which can access the previously chosen elements with `item.<index_name>`. The result must be a list or a dictionary. |
Examples
--------
```
- name: Install/remove public keys for active admin users
ansible.posix.authorized_key:
user: "{{ item.admin.key }}"
key: "{{ lookup('file', item.key.public_key) }}"
state: "{{ 'present' if item.key.active else 'absent' }}"
when: item.admin.value.active
with_community.general.dependent:
- admin: admin_user_data
- key: admin_ssh_keys[item.admin.key]
loop_control:
# Makes the output readable, so that it doesn't contain the whole subdictionaries and lists
label: "{{ [item.admin.key, 'active' if item.key.active else 'inactive', item.key.public_key] }}"
vars:
admin_user_data:
admin1:
name: Alice
active: true
admin2:
name: Bob
active: true
admin_ssh_keys:
admin1:
- private_key: keys/private_key_admin1.pem
public_key: keys/private_key_admin1.pub
active: true
admin2:
- private_key: keys/private_key_admin2.pem
public_key: keys/private_key_admin2.pub
active: true
- private_key: keys/private_key_admin2-old.pem
public_key: keys/private_key_admin2-old.pub
active: false
- name: Update DNS records
community.aws.route53:
zone: "{{ item.zone.key }}"
record: "{{ item.prefix.key ~ '.' if item.prefix.key else '' }}{{ item.zone.key }}"
type: "{{ item.entry.key }}"
ttl: "{{ item.entry.value.ttl | default(3600) }}"
value: "{{ item.entry.value.value }}"
state: "{{ 'absent' if (item.entry.value.absent | default(False)) else 'present' }}"
overwrite: true
loop_control:
# Makes the output readable, so that it doesn't contain the whole subdictionaries and lists
label: |-
{{ [item.zone.key, item.prefix.key, item.entry.key,
item.entry.value.ttl | default(3600),
item.entry.value.absent | default(False), item.entry.value.value] }}
with_community.general.dependent:
- zone: dns_setup
- prefix: item.zone.value
- entry: item.prefix.value
vars:
dns_setup:
example.com:
'':
A:
value:
- 1.2.3.4
AAAA:
value:
- "2a01:1:2:3::1"
'test._domainkey':
TXT:
ttl: 300
value:
- '"k=rsa; t=s; p=MIGfMA..."'
example.org:
'www':
A:
value:
- 1.2.3.4
- 5.6.7.8
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:
| Key | Returned | Description |
| --- | --- | --- |
| **\_list** list / elements=dictionary | success | A list composed of dictionaries whose keys are the variable names from the input list. **Sample:** [{'key1': 'a', 'key2': 'test'}, {'key1': 'a', 'key2': 'foo'}, {'key1': 'b', 'key2': 'bar'}] |
### Authors
* Felix Fontein (@felixfontein)
ansible community.general.sesu β CA Privileged Access Manager community.general.sesu β CA Privileged Access Manager
=====================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.sesu`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
Synopsis
--------
* This become plugins allows your remote/login user to execute commands as another user via the sesu utility.
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **become\_exe** string | **Default:**"sesu" | ini entries: [privilege\_escalation]become\_exe = sesu [sesu\_become\_plugin]executable = sesu env:ANSIBLE\_BECOME\_EXE env:ANSIBLE\_SESU\_EXE var: ansible\_become\_exe var: ansible\_sesu\_exe | sesu executable |
| **become\_flags** string | **Default:**"-H -S -n" | ini entries: [privilege\_escalation]become\_flags = -H -S -n [sesu\_become\_plugin]flags = -H -S -n env:ANSIBLE\_BECOME\_FLAGS env:ANSIBLE\_SESU\_FLAGS var: ansible\_become\_flags var: ansible\_sesu\_flags | Options to pass to sesu |
| **become\_pass** string | | ini entries: [sesu\_become\_plugin]password = None env:ANSIBLE\_BECOME\_PASS env:ANSIBLE\_SESU\_PASS var: ansible\_become\_password var: ansible\_become\_pass var: ansible\_sesu\_pass | Password to pass to sesu |
| **become\_user** string | **Default:**"" | ini entries: [privilege\_escalation]become\_user = [sesu\_become\_plugin]user = env:ANSIBLE\_BECOME\_USER env:ANSIBLE\_SESU\_USER var: ansible\_become\_user var: ansible\_sesu\_user | User you 'become' to execute the task |
### Authors
* ansible (@nekonyuu)
ansible community.general.hwc_vpc_security_group β Creates a resource of Vpc/SecurityGroup in Huawei Cloud community.general.hwc\_vpc\_security\_group β Creates a resource of Vpc/SecurityGroup in Huawei Cloud
=====================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.hwc_vpc_security_group`.
New in version 0.2.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* vpc security group management.
Requirements
------------
The below requirements are needed on the host that executes this module.
* keystoneauth1 >= 3.6.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **domain** string / required | | The name of the Domain to scope to (Identity v3). (currently only domain names are supported, and not domain IDs). |
| **enterprise\_project\_id** string | **Default:**0 | Specifies the enterprise project ID. When creating a security group, associate the enterprise project ID with the security group.s |
| **id** string | | The id of resource to be managed. |
| **identity\_endpoint** string / required | | The Identity authentication URL. |
| **name** string / required | | Specifies the security group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores `_`, hyphens (-), and periods (.). |
| **password** string / required | | The password to login with. |
| **project** string / required | | The name of the Tenant (Identity v2) or Project (Identity v3). (currently only project names are supported, and not project IDs). |
| **region** string | | The region to which the project belongs. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in Huawei Cloud. |
| **user** string / required | | The user name to login with (currently only user names are supported, and not user IDs). |
| **vpc\_id** string | | Specifies the resource ID of the VPC to which the security group belongs. |
Notes
-----
Note
* If *id* option is provided, it takes precedence over *name*, *enterprise\_project\_id* and *vpc\_id* for security group selection.
* *name*, *enterprise\_project\_id* and *vpc\_id* are used for security group selection. If more than one security group with this options exists, execution is aborted.
* No parameter support updating. If one of option is changed, the module will create a new resource.
* For authentication, you can set identity\_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT` env variable.
* For authentication, you can set user using the `ANSIBLE_HWC_USER` env variable.
* For authentication, you can set password using the `ANSIBLE_HWC_PASSWORD` env variable.
* For authentication, you can set domain using the `ANSIBLE_HWC_DOMAIN` env variable.
* For authentication, you can set project using the `ANSIBLE_HWC_PROJECT` env variable.
* For authentication, you can set region using the `ANSIBLE_HWC_REGION` env variable.
* Environment variables values will only be used if the playbook values are not set.
Examples
--------
```
# create a security group
- name: Create a security group
community.general.hwc_vpc_security_group:
name: "ansible_network_security_group_test"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **enterprise\_project\_id** string | success | Specifies the enterprise project ID. When creating a security group, associate the enterprise project ID with the security group. |
| **name** string | success | Specifies the security group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores `_`, hyphens (-), and periods (.). |
| **rules** complex | success | Specifies the security group rule, which ensures that resources in the security group can communicate with one another. |
| | **description** string | success | Provides supplementary information about the security group rule. |
| | **direction** string | success | Specifies the direction of access control. The value can be egress or ingress. |
| | **ethertype** string | success | Specifies the IP protocol version. The value can be IPv4 or IPv6. |
| | **id** string | success | Specifies the security group rule ID. |
| | **port\_range\_max** integer | success | Specifies the end port number. The value ranges from 1 to 65535. If the protocol is not icmp, the value cannot be smaller than the port\_range\_min value. An empty value indicates all ports. |
| | **port\_range\_min** integer | success | Specifies the start port number. The value ranges from 1 to 65535. The value cannot be greater than the port\_range\_max value. An empty value indicates all ports. |
| | **protocol** string | success | Specifies the protocol type. The value can be icmp, tcp, udp, or others. If the parameter is left blank, the security group supports all protocols. |
| | **remote\_address\_group\_id** string | success | Specifies the ID of remote IP address group. |
| | **remote\_group\_id** string | success | Specifies the ID of the peer security group. |
| | **remote\_ip\_prefix** string | success | Specifies the remote IP address. If the access control direction is set to egress, the parameter specifies the source IP address. If the access control direction is set to ingress, the parameter specifies the destination IP address. |
| **vpc\_id** string | success | Specifies the resource ID of the VPC to which the security group belongs. |
### Authors
* Huawei Inc. (@huaweicloud)
ansible community.general.rax_facts β Gather facts for Rackspace Cloud Servers community.general.rax\_facts β Gather facts for Rackspace Cloud Servers
=======================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.rax_facts`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Gather facts for Rackspace Cloud Servers.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* pyrax
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string | | Server IP address to retrieve facts for, will match any IP assigned to the server |
| **api\_key** string | | Rackspace API key, overrides *credentials*.
aliases: password |
| **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/>
|
| **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided.
aliases: creds\_file |
| **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. |
| **id** string | | Server ID to retrieve facts for |
| **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. |
| **name** string | | Server name to retrieve facts for |
| **region** string | | Region to create an instance in. |
| **tenant\_id** string | | The tenant ID used for authentication. |
| **tenant\_name** string | | The tenant name used for authentication. |
| **username** string | | Rackspace username, overrides *credentials*. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether or not to require SSL validation of API endpoints.
aliases: verify\_ssl |
Notes
-----
Note
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
Examples
--------
```
- name: Gather info about servers
hosts: all
gather_facts: False
tasks:
- name: Get facts about servers
local_action:
module: rax_facts
credentials: ~/.raxpub
name: "{{ inventory_hostname }}"
region: DFW
- name: Map some facts
ansible.builtin.set_fact:
ansible_ssh_host: "{{ rax_accessipv4 }}"
```
### Authors
* Matt Martz (@sivel)
| programming_docs |
ansible community.general.omapi_host β Setup OMAPI hosts. community.general.omapi\_host β Setup OMAPI hosts.
==================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.omapi_host`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage OMAPI hosts into compatible DHCPd servers
Requirements
------------
The below requirements are needed on the host that executes this module.
* pypureomapi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **ddns** boolean | **Choices:*** **no** β
* yes
| Enable dynamic DNS updates for this host. |
| **host** string | **Default:**"localhost" | Sets OMAPI server host to interact with. |
| **hostname** string | | Sets the host lease hostname (mandatory if state=present).
aliases: name |
| **ip** string | | Sets the lease host IP address. |
| **key** string / required | | Sets the TSIG key content for authenticating against OMAPI server. |
| **key\_name** string / required | | Sets the TSIG key name for authenticating against OMAPI server. |
| **macaddr** string / required | | Sets the lease host MAC address. |
| **port** integer | **Default:**7911 | Sets the OMAPI server port to interact with. |
| **state** string / required | **Choices:*** absent
* present
| Create or remove OMAPI host. |
| **statements** list / elements=string | **Default:**[] | Attach a list of OMAPI DHCP statements with host lease (without ending semicolon). |
Examples
--------
```
- name: Add a host using OMAPI
community.general.omapi_host:
key_name: defomapi
key: +bFQtBCta6j2vWkjPkNFtgA==
host: 10.98.4.55
macaddr: 44:dd:ab:dd:11:44
name: server01
ip: 192.168.88.99
ddns: yes
statements:
- filename "pxelinux.0"
- next-server 1.1.1.1
state: present
- name: Remove a host using OMAPI
community.general.omapi_host:
key_name: defomapi
key: +bFQtBCta6j2vWkjPkNFtgA==
host: 10.1.1.1
macaddr: 00:66:ab:dd:11:44
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **lease** complex | success | dictionary containing host information |
| | **hardware-address** string | success | MAC address **Sample:** 00:11:22:33:44:55 |
| | **hardware-type** integer | success | hardware type, generally '1' **Sample:** 1 |
| | **ip-address** string | success | IP address, if there is. **Sample:** 192.168.1.5 |
| | **name** string | success | hostname **Sample:** mydesktop |
### Authors
* Loic Blot (@nerzhul)
ansible community.general.nomad_job_info β Get Nomad Jobs info community.general.nomad\_job\_info β Get Nomad Jobs info
========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.nomad_job_info`.
New in version 1.3.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Get info for one Nomad job.
* List Nomad jobs.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python-nomad
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **client\_cert** path | | Path of certificate for TLS/SSL. |
| **client\_key** path | | Path of certificate's private key for TLS/SSL. |
| **host** string / required | | FQDN of Nomad server. |
| **name** string | | Name of job for Get info. If not specified, lists all jobs. |
| **namespace** string | | Namespace for Nomad. |
| **timeout** integer | **Default:**5 | Timeout (in seconds) for the request to Nomad. |
| **token** string | | ACL token for authentification. |
| **use\_ssl** boolean | **Choices:*** no
* **yes** β
| Use TLS/SSL connection. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Enable TLS/SSL certificate validation. |
Notes
-----
Note
* `check_mode` is supported.
See Also
--------
See also
[Nomad jobs documentation](https://www.nomadproject.io/api-docs/jobs/)
Complete documentation for Nomad API jobs.
Examples
--------
```
- name: Get info for job awx
community.general.nomad_job_info:
host: localhost
name: awx
register: result
- name: List Nomad jobs
community.general.nomad_job_info:
host: localhost
register: result
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **result** list / elements=string | success | List with dictionary contains jobs info **Sample:** [{'Affinities': None, 'AllAtOnce': False, 'Constraints': None, 'ConsulToken': '', 'CreateIndex': 13, 'Datacenters': ['dc1'], 'Dispatched': False, 'ID': 'example', 'JobModifyIndex': 13, 'Meta': None, 'ModifyIndex': 13, 'Multiregion': None, 'Name': 'example', 'Namespace': 'default', 'NomadTokenID': '', 'ParameterizedJob': None, 'ParentID': '', 'Payload': None, 'Periodic': None, 'Priority': 50, 'Region': 'global', 'Spreads': None, 'Stable': False, 'Status': 'pending', 'StatusDescription': '', 'Stop': False, 'SubmitTime': 1602244370615307000, 'TaskGroups': [{'Affinities': None, 'Constraints': None, 'Count': 1, 'EphemeralDisk': {'Migrate': False, 'SizeMB': 300, 'Sticky': False}, 'Meta': None, 'Migrate': {'HealthCheck': 'checks', 'HealthyDeadline': 300000000000, 'MaxParallel': 1, 'MinHealthyTime': 10000000000}, 'Name': 'cache', 'Networks': None, 'ReschedulePolicy': {'Attempts': 0, 'Delay': 30000000000, 'DelayFunction': 'exponential', 'Interval': 0, 'MaxDelay': 3600000000000, 'Unlimited': True}, 'RestartPolicy': {'Attempts': 3, 'Delay': 15000000000, 'Interval': 1800000000000, 'Mode': 'fail'}, 'Scaling': None, 'Services': None, 'ShutdownDelay': None, 'Spreads': None, 'StopAfterClientDisconnect': None, 'Tasks': [{'Affinities': None, 'Artifacts': None, 'CSIPluginConfig': None, 'Config': {'image': 'redis:3.2', 'port\_map': [{'db': 6379.0}]}, 'Constraints': None, 'DispatchPayload': None, 'Driver': 'docker', 'Env': None, 'KillSignal': '', 'KillTimeout': 5000000000, 'Kind': '', 'Leader': False, 'Lifecycle': None, 'LogConfig': {'MaxFileSizeMB': 10, 'MaxFiles': 10}, 'Meta': None, 'Name': 'redis', 'Resources': {'CPU': 500, 'Devices': None, 'DiskMB': 0, 'IOPS': 0, 'MemoryMB': 256, 'Networks': [{'CIDR': '', 'DNS': None, 'Device': '', 'DynamicPorts': [{'HostNetwork': 'default', 'Label': 'db', 'To': 0, 'Value': 0}], 'IP': '', 'MBits': 10, 'Mode': '', 'ReservedPorts': None}]}, 'RestartPolicy': {'Attempts': 3, 'Delay': 15000000000, 'Interval': 1800000000000, 'Mode': 'fail'}, 'Services': [{'AddressMode': 'auto', 'CanaryMeta': None, 'CanaryTags': None, 'Checks': [{'AddressMode': '', 'Args': None, 'CheckRestart': None, 'Command': '', 'Expose': False, 'FailuresBeforeCritical': 0, 'GRPCService': '', 'GRPCUseTLS': False, 'Header': None, 'InitialStatus': '', 'Interval': 10000000000, 'Method': '', 'Name': 'alive', 'Path': '', 'PortLabel': '', 'Protocol': '', 'SuccessBeforePassing': 0, 'TLSSkipVerify': False, 'TaskName': '', 'Timeout': 2000000000, 'Type': 'tcp'}], 'Connect': None, 'EnableTagOverride': False, 'Meta': None, 'Name': 'redis-cache', 'PortLabel': 'db', 'Tags': ['global', 'cache'], 'TaskName': ''}], 'ShutdownDelay': 0, 'Templates': None, 'User': '', 'Vault': None, 'VolumeMounts': None}], 'Update': {'AutoPromote': False, 'AutoRevert': False, 'Canary': 0, 'HealthCheck': 'checks', 'HealthyDeadline': 180000000000, 'MaxParallel': 1, 'MinHealthyTime': 10000000000, 'ProgressDeadline': 600000000000, 'Stagger': 30000000000}, 'Volumes': None}], 'Type': 'service', 'Update': {'AutoPromote': False, 'AutoRevert': False, 'Canary': 0, 'HealthCheck': '', 'HealthyDeadline': 0, 'MaxParallel': 1, 'MinHealthyTime': 0, 'ProgressDeadline': 0, 'Stagger': 30000000000}, 'VaultNamespace': '', 'VaultToken': '', 'Version': 0}] |
### Authors
* FERREIRA Christophe (@chris93111)
ansible community.general.htpasswd β manage user files for basic authentication community.general.htpasswd β manage user files for basic authentication
=======================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.htpasswd`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Add and remove username/password entries in a password file using htpasswd.
* This is used by web servers such as Apache and Nginx for basic authentication.
Requirements
------------
The below requirements are needed on the host that executes this module.
* passlib>=1.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **attributes** string added in 2.3 of ansible.builtin | | The attributes the resulting file or directory should have. To get supported flags look at the man page for *chattr* on the target system. This string should contain the attributes in the same order as the one displayed by *lsattr*. The `=` operator is assumed as default, otherwise `+` or `-` operators need to be included in the string.
aliases: attr |
| **create** boolean | **Choices:*** no
* **yes** β
| Used with `state=present`. If specified, the file will be created if it does not already exist. If set to "no", will fail if the file does not exist |
| **crypt\_scheme** string | **Default:**"apr\_md5\_crypt" | Encryption scheme to be used. As well as the four choices listed here, you can also use any other hash supported by passlib, such as md5\_crypt and sha256\_crypt, which are linux passwd hashes. If you do so the password file will not be compatible with Apache or Nginx Some of the available choices might be: `apr_md5_crypt`, `des_crypt`, `ldap_sha1`, `plaintext`
|
| **group** string | | Name of the group that should own the file/directory, as would be fed to *chown*. |
| **mode** raw | | The permissions the resulting file or directory should have. For those used to */usr/bin/chmod* remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like `0644` or `01777`) or quote it (like `'644'` or `'1777'`) so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, `u+rwx` or `u=rw,g=r,o=r`). If `mode` is not specified and the destination file **does not** exist, the default `umask` on the system will be used when setting the mode for the newly created file. If `mode` is not specified and the destination file **does** exist, the mode of the existing file will be used. Specifying `mode` is the best way to ensure files are created with the correct permissions. See CVE-2020-1736 for further details. |
| **name** string / required | | User name to add or remove
aliases: username |
| **owner** string | | Name of the user that should own the file/directory, as would be fed to *chown*. |
| **password** string | | Password associated with user. Must be specified if user does not exist yet. |
| **path** path / required | | Path to the file that contains the usernames and passwords
aliases: dest, destfile |
| **selevel** string | | The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the `range`. When set to `_default`, it will use the `level` portion of the policy if available. |
| **serole** string | | The role part of the SELinux file context. When set to `_default`, it will use the `role` portion of the policy if available. |
| **setype** string | | The type part of the SELinux file context. When set to `_default`, it will use the `type` portion of the policy if available. |
| **seuser** string | | The user part of the SELinux file context. By default it uses the `system` policy, where applicable. When set to `_default`, it will use the `user` portion of the policy if available. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the user entry should be present or not |
| **unsafe\_writes** boolean added in 2.2 of ansible.builtin | **Choices:*** **no** β
* yes
| Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. |
Notes
-----
Note
* This module depends on the *passlib* Python library, which needs to be installed on all target systems.
* On Debian, Ubuntu, or Fedora: install *python-passlib*.
* On RHEL or CentOS: Enable EPEL, then install *python-passlib*.
Examples
--------
```
- name: Add a user to a password file and ensure permissions are set
community.general.htpasswd:
path: /etc/nginx/passwdfile
name: janedoe
password: '9s36?;fyNp'
owner: root
group: www-data
mode: 0640
- name: Remove a user from a password file
community.general.htpasswd:
path: /etc/apache2/passwdfile
name: foobar
state: absent
- name: Add a user to a password file suitable for use by libpam-pwdfile
community.general.htpasswd:
path: /etc/mail/passwords
name: alex
password: oedu2eGh
crypt_scheme: md5_crypt
```
### Authors
* Ansible Core Team
ansible community.general.rundeck_project β Manage Rundeck projects. community.general.rundeck\_project β Manage Rundeck projects.
=============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.rundeck_project`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and remove Rundeck projects through HTTP API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_version** integer | **Default:**14 | Sets the API version used by module. API version must be at least 14. |
| **client\_cert** path added in 0.2.0 of community.general | | PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, `client_key` is not required. |
| **client\_key** path added in 0.2.0 of community.general | | PEM formatted file that contains your private key to be used for SSL client authentication. If `client_cert` contains both the certificate and key, this option is not required. |
| **force** boolean added in 0.2.0 of community.general | **Choices:*** **no** β
* yes
| If `yes` do not get a cached copy. Alias `thirsty` has been deprecated and will be removed in 2.13.
aliases: thirsty |
| **force\_basic\_auth** boolean added in 0.2.0 of community.general | **Choices:*** **no** β
* yes
| Credentials specified with *url\_username* and *url\_password* should be passed in HTTP Header. |
| **http\_agent** string added in 0.2.0 of community.general | **Default:**"ansible-httpget" | Header to identify as, generally appears in web server logs. |
| **name** string / required | | Sets the project name. |
| **state** string | **Choices:*** **present** β
* absent
| Create or remove Rundeck project. |
| **token** string / required | | Sets the token to authenticate against Rundeck API. |
| **url** string / required | | Sets the rundeck instance URL. |
| **url\_password** string added in 0.2.0 of community.general | | The password for use in HTTP basic authentication. If the *url\_username* parameter is not specified, the *url\_password* parameter will not be used. |
| **url\_username** string added in 0.2.0 of community.general | | The username for use in HTTP basic authentication. This parameter can be used without *url\_password* for sites that allow empty passwords |
| **use\_gssapi** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication. Requires the Python library [gssapi](https://github.com/pythongssapi/python-gssapi) to be installed. Credentials for GSSAPI can be specified with *url\_username*/*url\_password* or with the GSSAPI env var `KRB5CCNAME` that specified a custom Kerberos credential cache. NTLM authentication is `not` supported even if the GSSAPI mech for NTLM has been installed. |
| **use\_proxy** boolean added in 0.2.0 of community.general | **Choices:*** no
* **yes** β
| If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. |
| **validate\_certs** boolean added in 0.2.0 of community.general | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Create a rundeck project
community.general.rundeck_project:
name: "Project_01"
api_version: 18
url: "https://rundeck.example.org"
token: "mytoken"
state: present
- name: Remove a rundeck project
community.general.rundeck_project:
name: "Project_02"
url: "https://rundeck.example.org"
token: "mytoken"
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **after** dictionary | success | dictionary containing project information after modification |
| **before** dictionary | success | dictionary containing project information before modification |
| **rundeck\_response** string | failed | Rundeck response when a failure occurs |
### Authors
* Loic Blot (@nerzhul)
| programming_docs |
ansible community.general.dnstxt β query a domain(s)βs DNS txt fields community.general.dnstxt β query a domain(s)βs DNS txt fields
=============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.dnstxt`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Uses a python library to return the DNS TXT record for a domain.
Requirements
------------
The below requirements are needed on the local controller node that executes this lookup.
* dns/dns.resolver (python library)
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_terms** list / elements=string / required | | | domain or list of domains to query TXT records from |
Examples
--------
```
- name: show txt entry
ansible.builtin.debug:
msg: "{{lookup('community.general.dnstxt', ['test.example.com'])}}"
- name: iterate over txt entries
ansible.builtin.debug:
msg: "{{item}}"
with_community.general.dnstxt:
- 'test.example.com'
- 'other.example.com'
- 'last.example.com'
- name: iterate of a comma delimited DNS TXT entry
ansible.builtin.debug:
msg: "{{item}}"
with_community.general.dnstxt: "{{lookup('community.general.dnstxt', ['test.example.com']).split(',')}}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:
| Key | Returned | Description |
| --- | --- | --- |
| **\_list** list / elements=string | success | values returned by the DNS TXT record. |
### Authors
* Jan-Piet Mens (@jpmens) <jpmens(at)gmail.com>
ansible community.general.ip_netns β Manage network namespaces community.general.ip\_netns β Manage network namespaces
=======================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ip_netns`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Create or delete network namespaces using the ip command.
Requirements
------------
The below requirements are needed on the host that executes this module.
* ip
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name** string | | Name of the namespace |
| **state** string | **Choices:*** **present** β
* absent
| Whether the namespace should exist |
Examples
--------
```
- name: Create a namespace named mario
community.general.ip_netns:
name: mario
state: present
- name: Delete a namespace named luigi
community.general.ip_netns:
name: luigi
state: absent
```
### Authors
* Arie Bregman (@bregman-arie)
ansible community.general.dig β query DNS using the dnspython library community.general.dig β query DNS using the dnspython library
=============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.dig`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* The dig lookup runs queries against DNS servers to retrieve DNS records for a specific name (FQDN - fully qualified domain name). It is possible to lookup any DNS record in this manner.
* There is a couple of different syntaxes that can be used to specify what record should be retrieved, and for which name. It is also possible to explicitly specify the DNS server(s) to use for lookups.
* In its simplest form, the dig lookup plugin can be used to retrieve an IPv4 address (DNS A record) associated with FQDN
* In addition to (default) A record, it is also possible to specify a different record type that should be queried. This can be done by either passing-in additional parameter of format qtype=TYPE to the dig lookup, or by appending /TYPE to the FQDN being queried.
* If multiple values are associated with the requested record, the results will be returned as a comma-separated list. In such cases you may want to pass option wantlist=True to the plugin, which will result in the record values being returned as a list over which you can iterate later on.
* By default, the lookup will rely on system-wide configured DNS servers for performing the query. It is also possible to explicitly specify DNS servers to query using the @DNS\_SERVER\_1,DNS\_SERVER\_2,β¦,DNS\_SERVER\_N notation. This needs to be passed-in as an additional parameter to the lookup
Requirements
------------
The below requirements are needed on the local controller node that executes this lookup.
* dnspython (python library, <http://www.dnspython.org/>)
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_terms** string | | | domain(s) to query |
| **flat** string | **Default:**1 | | If 0 each record is returned as a dictionary, otherwise a string |
| **qtype** string | **Choices:*** **A** β
* ALL
* AAAA
* CNAME
* DNAME
* DLV
* DNSKEY
* DS
* HINFO
* LOC
* MX
* NAPTR
* NS
* NSEC3PARAM
* PTR
* RP
* RRSIG
* SOA
* SPF
* SRV
* SSHFP
* TLSA
* TXT
| | record type to query |
| **retry\_servfail** boolean added in 3.6.0 of community.general | **Choices:*** **no** β
* yes
| | Retry a nameserver if it returns SERVFAIL. |
Notes
-----
Note
* ALL is not a record per-se, merely the listed fields are available for any record results you retrieve in the form of a dictionary.
* While the βdigβ lookup plugin supports anything which dnspython supports out of the box, only a subset can be converted into a dictionary.
* If you need to obtain the AAAA record (IPv6 address), you must specify the record type explicitly. Syntax for specifying the record type is shown in the examples below.
* The trailing dot in most of the examples listed is purely optional, but is specified for completeness/correctness sake.
Examples
--------
```
- name: Simple A record (IPV4 address) lookup for example.com
ansible.builtin.debug:
msg: "{{ lookup('community.general.dig', 'example.com.')}}"
- name: "The TXT record for example.org."
ansible.builtin.debug:
msg: "{{ lookup('community.general.dig', 'example.org.', 'qtype=TXT') }}"
- name: "The TXT record for example.org, alternative syntax."
ansible.builtin.debug:
msg: "{{ lookup('community.general.dig', 'example.org./TXT') }}"
- name: use in a loop
ansible.builtin.debug:
msg: "MX record for gmail.com {{ item }}"
with_items: "{{ lookup('community.general.dig', 'gmail.com./MX', wantlist=True) }}"
- ansible.builtin.debug:
msg: "Reverse DNS for 192.0.2.5 is {{ lookup('community.general.dig', '192.0.2.5/PTR') }}"
- ansible.builtin.debug:
msg: "Reverse DNS for 192.0.2.5 is {{ lookup('community.general.dig', '5.2.0.192.in-addr.arpa./PTR') }}"
- ansible.builtin.debug:
msg: "Reverse DNS for 192.0.2.5 is {{ lookup('community.general.dig', '5.2.0.192.in-addr.arpa.', 'qtype=PTR') }}"
- ansible.builtin.debug:
msg: "Querying 198.51.100.23 for IPv4 address for example.com. produces {{ lookup('dig', 'example.com', '@198.51.100.23') }}"
- ansible.builtin.debug:
msg: "XMPP service for gmail.com. is available at {{ item.target }} on port {{ item.port }}"
with_items: "{{ lookup('community.general.dig', '_xmpp-server._tcp.gmail.com./SRV', 'flat=0', wantlist=True) }}"
- name: Retry nameservers that return SERVFAIL
ansible.builtin.debug:
msg: "{{ lookup('community.general.dig', 'example.org./A', 'retry_servfail=True') }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:
| Key | Returned | Description |
| --- | --- | --- |
| **\_list** list / elements=any | success | List of composed strings or dictionaries with key and value If a dictionary, fields shows the keys returned depending on query type |
| | **A** string | success | address |
| | **AAAA** string | success | address |
| | **ALL** string | success | owner, ttl, type |
| | **CNAME** string | success | target |
| | **DLV** string | success | algorithm, digest\_type, key\_tag, digest |
| | **DNAME** string | success | target |
| | **DNSKEY** string | success | flags, algorithm, protocol, key |
| | **DS** string | success | algorithm, digest\_type, key\_tag, digest |
| | **HINFO** string | success | cpu, os |
| | **LOC** string | success | latitude, longitude, altitude, size, horizontal\_precision, vertical\_precision |
| | **MX** string | success | preference, exchange |
| | **NAPTR** string | success | order, preference, flags, service, regexp, replacement |
| | **NS** string | success | target |
| | **NSEC3PARAM** string | success | algorithm, flags, iterations, salt |
| | **PTR** string | success | target |
| | **RP** string | success | mbox, txt |
| | **SOA** string | success | mname, rname, serial, refresh, retry, expire, minimum |
| | **SPF** string | success | strings |
| | **SRV** string | success | priority, weight, port, target |
| | **SSHFP** string | success | algorithm, fp\_type, fingerprint |
| | **TLSA** string | success | usage, selector, mtype, cert |
| | **TXT** string | success | strings |
### Authors
* Jan-Piet Mens (@jpmens) <jpmens(at)gmail.com>
ansible community.general.memset_memstore_info β Retrieve Memstore product usage information. community.general.memset\_memstore\_info β Retrieve Memstore product usage information.
=======================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.memset_memstore_info`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve Memstore product usage information.
* This module was called `memset_memstore_facts` before Ansible 2.9. The usage did not change.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string / required | | The API key obtained from the Memset control panel. |
| **name** string / required | | The Memstore product name (i.e. `mstestyaa1`). |
Notes
-----
Note
* An API key generated via the Memset customer control panel is needed with the following minimum scope - *memstore.usage*.
Examples
--------
```
- name: Get usage for mstestyaa1
community.general.memset_memstore_info:
name: mstestyaa1
api_key: 5eb86c9896ab03919abcf03857163741
delegate_to: localhost
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **memset\_api** complex | always | Info from the Memset API |
| | **bandwidth** complex | always | Dictionary of CDN bandwidth facts |
| | | **bytes\_in** integer | always | Inbound bandwidth for the last 24 hours in bytes **Sample:** 1000 |
| | | **bytes\_out** integer | always | Outbound bandwidth for the last 24 hours in bytes **Sample:** 1000 |
| | | **requests** integer | always | Number of requests in the last 24 hours **Sample:** 10 |
| | **bytes** integer | always | Space used in bytes **Sample:** 3860997965 |
| | **cdn\_bandwidth** complex | always | Dictionary of CDN bandwidth facts |
| | | **bytes\_in** integer | always | Inbound CDN bandwidth for the last 24 hours in bytes **Sample:** 1000 |
| | | **bytes\_out** integer | always | Outbound CDN bandwidth for the last 24 hours in bytes **Sample:** 1000 |
| | | **requests** integer | always | Number of requests in the last 24 hours **Sample:** 10 |
| | **containers** integer | always | Number of containers **Sample:** 10 |
| | **objs** integer | always | Number of objects **Sample:** 1000 |
### Authors
* Simon Weald (@glitchcrab)
ansible community.general.oneandone_public_ip β Configure 1&1 public IPs. community.general.oneandone\_public\_ip β Configure 1&1 public IPs.
===================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.oneandone_public_ip`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update, and remove public IPs. This module has a dependency on 1and1 >= 1.0
Requirements
------------
The below requirements are needed on the host that executes this module.
* 1and1
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_url** string | | Custom API URL. Overrides the ONEANDONE\_API\_URL environment variable. |
| **auth\_token** string | | Authenticating API token provided by 1&1. |
| **datacenter** string | **Choices:*** **US** β
* ES
* DE
* GB
| ID of the datacenter where the IP will be created (only for unassigned IPs). |
| **public\_ip\_id** string | | The ID of the public IP used with update and delete states. |
| **reverse\_dns** string | | Reverse DNS name. maxLength=256 |
| **state** string | **Choices:*** **present** β
* absent
* update
| Define a public ip state to create, remove, or update. |
| **type** string | **Choices:*** **IPV4** β
* IPV6
| Type of IP. Currently, only IPV4 is available. |
| **wait** boolean | **Choices:*** no
* **yes** β
| wait for the instance to be in state 'running' before returning |
| **wait\_interval** integer | **Default:**5 | Defines the number of seconds to wait when using the \_wait\_for methods |
| **wait\_timeout** integer | **Default:**600 | how long before wait gives up, in seconds |
Examples
--------
```
- name: Create a public IP
community.general.oneandone_public_ip:
auth_token: oneandone_private_api_key
reverse_dns: example.com
datacenter: US
type: IPV4
- name: Update a public IP
community.general.oneandone_public_ip:
auth_token: oneandone_private_api_key
public_ip_id: public ip id
reverse_dns: secondexample.com
state: update
- name: Delete a public IP
community.general.oneandone_public_ip:
auth_token: oneandone_private_api_key
public_ip_id: public ip id
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **public\_ip** dictionary | always | Information about the public ip that was processed **Sample:** {"id": "F77CC589EBC120905B4F4719217BFF6D", "ip": "10.5.132.106"} |
### Authors
* Amel Ajdinovic (@aajdinov)
* Ethan Devenport (@edevenport)
ansible community.general.rax_clb_ssl β Manage SSL termination for a Rackspace Cloud Load Balancer. community.general.rax\_clb\_ssl β Manage SSL termination for a Rackspace Cloud Load Balancer.
=============================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.rax_clb_ssl`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Set up, reconfigure, or remove SSL termination for an existing load balancer.
Requirements
------------
The below requirements are needed on the host that executes this module.
* pyrax
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string | | Rackspace API key, overrides *credentials*.
aliases: password |
| **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/>
|
| **certificate** string | | The public SSL certificates as a string in PEM format. |
| **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided.
aliases: creds\_file |
| **enabled** boolean | **Choices:*** no
* **yes** β
| If set to "false", temporarily disable SSL termination without discarding existing credentials. |
| **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. |
| **https\_redirect** boolean | **Choices:*** no
* yes
| If "true", the load balancer will redirect HTTP traffic to HTTPS. Requires "secure\_traffic\_only" to be true. Incurs an implicit wait if SSL termination is also applied or removed. |
| **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. |
| **intermediate\_certificate** string | | One or more intermediate certificate authorities as a string in PEM format, concatenated into a single string. |
| **loadbalancer** string / required | | Name or ID of the load balancer on which to manage SSL termination. |
| **private\_key** string | | The private SSL key as a string in PEM format. |
| **region** string | | Region to create an instance in. |
| **secure\_port** integer | **Default:**443 | The port to listen for secure traffic. |
| **secure\_traffic\_only** boolean | **Choices:*** **no** β
* yes
| If "true", the load balancer will \*only\* accept secure traffic. |
| **state** string | **Choices:*** **present** β
* absent
| If set to "present", SSL termination will be added to this load balancer. If "absent", SSL termination will be removed instead. |
| **tenant\_id** string | | The tenant ID used for authentication. |
| **tenant\_name** string | | The tenant name used for authentication. |
| **username** string | | Rackspace username, overrides *credentials*. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether or not to require SSL validation of API endpoints.
aliases: verify\_ssl |
| **wait** boolean | **Choices:*** **no** β
* yes
| Wait for the balancer to be in state "running" before turning. |
| **wait\_timeout** integer | **Default:**300 | How long before "wait" gives up, in seconds. |
Notes
-----
Note
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
Examples
--------
```
- name: Enable SSL termination on a load balancer
community.general.rax_clb_ssl:
loadbalancer: the_loadbalancer
state: present
private_key: "{{ lookup('file', 'credentials/server.key' ) }}"
certificate: "{{ lookup('file', 'credentials/server.crt' ) }}"
intermediate_certificate: "{{ lookup('file', 'credentials/trust-chain.crt') }}"
secure_traffic_only: true
wait: true
- name: Disable SSL termination
community.general.rax_clb_ssl:
loadbalancer: "{{ registered_lb.balancer.id }}"
state: absent
wait: true
```
### Authors
* Ash Wilson (@smashwilson)
| programming_docs |
ansible community.general.manageiq_policies β Management of resource policy_profiles in ManageIQ. community.general.manageiq\_policies β Management of resource policy\_profiles in ManageIQ.
===========================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.manageiq_policies`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* The manageiq\_policies module supports adding and deleting policy\_profiles in ManageIQ.
Requirements
------------
The below requirements are needed on the host that executes this module.
* manageiq-client <https://github.com/ManageIQ/manageiq-api-client-python/>
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **manageiq\_connection** dictionary | | ManageIQ connection configuration information. |
| | **ca\_cert** string | | The path to a CA bundle file or directory with certificates. defaults to None.
aliases: ca\_bundle\_path |
| | **password** string | | ManageIQ password. `MIQ_PASSWORD` env var if set. otherwise, required if no token is passed in. |
| | **token** string | | ManageIQ token. `MIQ_TOKEN` env var if set. otherwise, required if no username or password is passed in. |
| | **url** string | | ManageIQ environment url. `MIQ_URL` env var if set. otherwise, it is required to pass it. |
| | **username** string | | ManageIQ username. `MIQ_USERNAME` env var if set. otherwise, required if no token is passed in. |
| | **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Whether SSL certificates should be verified for HTTPS requests. defaults to True.
aliases: verify\_ssl |
| **policy\_profiles** list / elements=dictionary | | list of dictionaries, each includes the policy\_profile 'name' key. required if state is present or absent. |
| **resource\_id** integer added in 2.2.0 of community.general | | The ID of the resource to which the profile should be [un]assigned. Must be specified if *resource\_name* is not set. Both options are mutually exclusive. |
| **resource\_name** string | | The name of the resource to which the profile should be [un]assigned. Must be specified if *resource\_id* is not set. Both options are mutually exclusive. |
| **resource\_type** string / required | **Choices:*** provider
* host
* vm
* blueprint
* category
* cluster
* data store
* group
* resource pool
* service
* service template
* template
* tenant
* user
| The type of the resource to which the profile should be [un]assigned. |
| **state** string | **Choices:*** absent
* **present** β
* list
| absent - policy\_profiles should not exist, present - policy\_profiles should exist, list - list current policy\_profiles and policies. |
Examples
--------
```
- name: Assign new policy_profile for a provider in ManageIQ
community.general.manageiq_policies:
resource_name: 'EngLab'
resource_type: 'provider'
policy_profiles:
- name: openscap profile
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
validate_certs: False
- name: Unassign a policy_profile for a provider in ManageIQ
community.general.manageiq_policies:
state: absent
resource_name: 'EngLab'
resource_type: 'provider'
policy_profiles:
- name: openscap profile
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
validate_certs: False
- name: List current policy_profile and policies for a provider in ManageIQ
community.general.manageiq_policies:
state: list
resource_name: 'EngLab'
resource_type: 'provider'
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
validate_certs: False
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **manageiq\_policies** dictionary | always | List current policy\_profile and policies for a provider in ManageIQ **Sample:** { "changed": false, "profiles": [ { "policies": [ { "active": true, "description": "OpenSCAP", "name": "openscap policy" }, { "active": true, "description": "Analyse incoming container images", "name": "analyse incoming container images" }, { "active": true, "description": "Schedule compliance after smart state analysis", "name": "schedule compliance after smart state analysis" } ], "profile\_description": "OpenSCAP profile", "profile\_name": "openscap profile" } ] } |
### Authors
* Daniel Korn (@dkorn)
ansible community.general.nagios β Perform common tasks in Nagios related to downtime and notifications. community.general.nagios β Perform common tasks in Nagios related to downtime and notifications.
================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.nagios`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* The `nagios` module has two basic functions: scheduling downtime and toggling alerts for services or hosts.
* The `nagios` module is not idempotent.
* All actions require the *host* parameter to be given explicitly. In playbooks you can use the `{{inventory_hostname}}` variable to refer to the host the playbook is currently running on.
* You can specify multiple services at once by separating them with commas, .e.g., `services=httpd,nfs,puppet`.
* When specifying what service to handle there is a special service value, *host*, which will handle alerts/downtime/acknowledge for the *host itself*, e.g., `service=host`. This keyword may not be given with other services at the same time. *Setting alerts/downtime/acknowledge for a host does not affect alerts/downtime/acknowledge for any of the services running on it.* To schedule downtime for all services on particular host use keyword βallβ, e.g., `service=all`.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string / required | **Choices:*** downtime
* delete\_downtime
* enable\_alerts
* disable\_alerts
* silence
* unsilence
* silence\_nagios
* unsilence\_nagios
* command
* servicegroup\_service\_downtime
* servicegroup\_host\_downtime
* acknowledge
* forced\_check
| Action to take. servicegroup options were added in 2.0. delete\_downtime options were added in 2.2. The `acknowledge` and `forced_check` actions were added in community.general 1.2.0. |
| **author** string | **Default:**"Ansible" | Author to leave downtime comments as. Only usable with the `downtime` and `acknowledge` action. |
| **cmdfile** string | | Path to the nagios *command file* (FIFO pipe). Only required if auto-detection fails. |
| **command** string | | The raw command to send to nagios, which should not include the submitted time header or the line-feed **Required** option when using the `command` action. |
| **comment** string | **Default:**"Scheduling downtime" | Comment for `downtime` and `acknowledge`action. |
| **host** string | | Host to operate on in Nagios. |
| **minutes** integer | **Default:**30 | Minutes to schedule downtime for. Only usable with the `downtime` action. |
| **servicegroup** string | | The Servicegroup we want to set downtimes/alerts for. **Required** option when using the `servicegroup_service_downtime` amd `servicegroup_host_downtime`. |
| **services** string | | What to manage downtime/alerts for. Separate multiple services with commas. `service` is an alias for `services`. **Required** option when using the `downtime`, `acknowledge`, `forced_check`, `enable_alerts`, and `disable_alerts` actions.
aliases: service |
| **start** string added in 0.2.0 of community.general | | When downtime should start, in time\_t format (epoch seconds). |
Examples
--------
```
- name: Set 30 minutes of apache downtime
community.general.nagios:
action: downtime
minutes: 30
service: httpd
host: '{{ inventory_hostname }}'
- name: Schedule an hour of HOST downtime
community.general.nagios:
action: downtime
minutes: 60
service: host
host: '{{ inventory_hostname }}'
- name: Schedule an hour of HOST downtime starting at 2019-04-23T02:00:00+00:00
community.general.nagios:
action: downtime
start: 1555984800
minutes: 60
service: host
host: '{{ inventory_hostname }}'
- name: Schedule an hour of HOST downtime, with a comment describing the reason
community.general.nagios:
action: downtime
minutes: 60
service: host
host: '{{ inventory_hostname }}'
comment: Rebuilding machine
- name: Schedule downtime for ALL services on HOST
community.general.nagios:
action: downtime
minutes: 45
service: all
host: '{{ inventory_hostname }}'
- name: Schedule downtime for a few services
community.general.nagios:
action: downtime
services: frob,foobar,qeuz
host: '{{ inventory_hostname }}'
- name: Set 30 minutes downtime for all services in servicegroup foo
community.general.nagios:
action: servicegroup_service_downtime
minutes: 30
servicegroup: foo
host: '{{ inventory_hostname }}'
- name: Set 30 minutes downtime for all host in servicegroup foo
community.general.nagios:
action: servicegroup_host_downtime
minutes: 30
servicegroup: foo
host: '{{ inventory_hostname }}'
- name: Delete all downtime for a given host
community.general.nagios:
action: delete_downtime
host: '{{ inventory_hostname }}'
service: all
- name: Delete all downtime for HOST with a particular comment
community.general.nagios:
action: delete_downtime
host: '{{ inventory_hostname }}'
service: host
comment: Planned maintenance
- name: Acknowledge an HOST with a particular comment
community.general.nagios:
action: acknowledge
service: host
host: '{{ inventory_hostname }}'
comment: 'power outage - see casenr 12345'
- name: Acknowledge an active service problem for the httpd service with a particular comment
community.general.nagios:
action: acknowledge
service: httpd
host: '{{ inventory_hostname }}'
comment: 'service crashed - see casenr 12345'
- name: Reset a passive service check for snmp trap
community.general.nagios:
action: forced_check
service: snmp
host: '{{ inventory_hostname }}'
- name: Force an active service check for the httpd service
community.general.nagios:
action: forced_check
service: httpd
host: '{{ inventory_hostname }}'
- name: Force an active service check for all services of a particular host
community.general.nagios:
action: forced_check
service: all
host: '{{ inventory_hostname }}'
- name: Force an active service check for a particular host
community.general.nagios:
action: forced_check
service: host
host: '{{ inventory_hostname }}'
- name: Enable SMART disk alerts
community.general.nagios:
action: enable_alerts
service: smart
host: '{{ inventory_hostname }}'
- name: Disable httpd and nfs alerts
community.general.nagios:
action: disable_alerts
service: httpd,nfs
host: '{{ inventory_hostname }}'
- name: Disable HOST alerts
community.general.nagios:
action: disable_alerts
service: host
host: '{{ inventory_hostname }}'
- name: Silence ALL alerts
community.general.nagios:
action: silence
host: '{{ inventory_hostname }}'
- name: Unsilence all alerts
community.general.nagios:
action: unsilence
host: '{{ inventory_hostname }}'
- name: Shut up nagios
community.general.nagios:
action: silence_nagios
- name: Annoy me negios
community.general.nagios:
action: unsilence_nagios
- name: Command something
community.general.nagios:
action: command
command: DISABLE_FAILURE_PREDICTION
```
### Authors
* Tim Bielawa (@tbielawa)
ansible community.general.sensu_client β Manages Sensu client configuration community.general.sensu\_client β Manages Sensu client configuration
====================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.sensu_client`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages Sensu client configuration.
* For more information, refer to the Sensu documentation: <https://sensuapp.org/docs/latest/reference/clients.html>
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string | | An address to help identify and reach the client. This is only informational, usually an IP address or hostname. If not specified it defaults to non-loopback IPv4 address as determined by Ruby Socket.ip\_address\_list (provided by Sensu). |
| **chef** dictionary | | The chef definition scope, used to configure the Sensu Enterprise Chef integration (Sensu Enterprise users only). |
| **deregister** boolean | **Choices:*** no
* yes
| If a deregistration event should be created upon Sensu client process stop. Default is `false`. |
| **deregistration** dictionary | | The deregistration definition scope, used to configure automated Sensu client de-registration. |
| **ec2** dictionary | | The ec2 definition scope, used to configure the Sensu Enterprise AWS EC2 integration (Sensu Enterprise users only). |
| **keepalive** dictionary | | The keepalive definition scope, used to configure Sensu client keepalives behavior (e.g. keepalive thresholds, etc). |
| **keepalives** boolean | **Choices:*** no
* **yes** β
| If Sensu should monitor keepalives for this client. |
| **name** string | | A unique name for the client. The name cannot contain special characters or spaces. If not specified, it defaults to the system hostname as determined by Ruby Socket.gethostname (provided by Sensu). |
| **puppet** dictionary | | The puppet definition scope, used to configure the Sensu Enterprise Puppet integration (Sensu Enterprise users only). |
| **redact** list / elements=string | | Client definition attributes to redact (values) when logging and sending client keepalives. |
| **registration** dictionary | | The registration definition scope, used to configure Sensu registration event handlers. |
| **safe\_mode** boolean | **Choices:*** **no** β
* yes
| If safe mode is enabled for the client. Safe mode requires local check definitions in order to accept a check request and execute the check. |
| **servicenow** dictionary | | The servicenow definition scope, used to configure the Sensu Enterprise ServiceNow integration (Sensu Enterprise users only). |
| **socket** dictionary | | The socket definition scope, used to configure the Sensu client socket. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the client should be present or not |
| **subscriptions** list / elements=string | | An array of client subscriptions, a list of roles and/or responsibilities assigned to the system (e.g. webserver). These subscriptions determine which monitoring checks are executed by the client, as check requests are sent to subscriptions. The subscriptions array items must be strings. |
Notes
-----
Note
* Check mode is supported
Examples
--------
```
# Minimum possible configuration
- name: Configure Sensu client
community.general.sensu_client:
subscriptions:
- default
# With customization
- name: Configure Sensu client
community.general.sensu_client:
name: "{{ ansible_fqdn }}"
address: "{{ ansible_default_ipv4['address'] }}"
subscriptions:
- default
- webserver
redact:
- password
socket:
bind: 127.0.0.1
port: 3030
keepalive:
thresholds:
warning: 180
critical: 300
handlers:
- email
custom:
- broadcast: irc
occurrences: 3
register: client
notify:
- Restart sensu-client
- name: Secure Sensu client configuration file
ansible.builtin.file:
path: "{{ client['file'] }}"
owner: "sensu"
group: "sensu"
mode: "0600"
- name: Delete the Sensu client configuration
community.general.sensu_client:
state: "absent"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **config** dictionary | success | Effective client configuration, when state is present **Sample:** {'name': 'client', 'subscriptions': ['default']} |
| **file** string | success | Path to the client configuration file **Sample:** /etc/sensu/conf.d/client.json |
### Authors
* David Moreau Simard (@dmsimard)
ansible community.general.rocketchat β Send notifications to Rocket Chat community.general.rocketchat β Send notifications to Rocket Chat
================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.rocketchat`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* The `rocketchat` module sends notifications to Rocket Chat via the Incoming WebHook integration
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **attachments** list / elements=dictionary | | Define a list of attachments. |
| **channel** string | | Channel to send the message to. If absent, the message goes to the channel selected for the *token* specified during the creation of webhook. |
| **color** string | **Choices:*** **normal** β
* good
* warning
* danger
| Allow text to use default colors - use the default of 'normal' to not send a custom color bar at the start of the message |
| **domain** string / required | | The domain for your environment without protocol. (i.e. `example.com` or `chat.example.com`) |
| **icon\_emoji** string | | Emoji for the message sender. The representation for the available emojis can be got from Rocket Chat. (for example :thumbsup:) (if *icon\_emoji* is set, *icon\_url* will not be used) |
| **icon\_url** string | **Default:**"https://www.ansible.com/favicon.ico" | URL for the message sender's icon. |
| **link\_names** integer | **Choices:*** 1
* 0
**Default:**1 | Automatically create links for channels and usernames in *msg*. |
| **msg** string | | Message to be sent. |
| **protocol** string | **Choices:*** http
* **https** β
| Specify the protocol used to send notification messages before the webhook url. (i.e. http or https) |
| **token** string / required | | Rocket Chat Incoming Webhook integration token. This provides authentication to Rocket Chat's Incoming webhook for posting messages. |
| **username** string | **Default:**"Ansible" | This is the sender of the message. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Send notification message via Rocket Chat
community.general.rocketchat:
token: thetoken/generatedby/rocketchat
domain: chat.example.com
msg: '{{ inventory_hostname }} completed'
delegate_to: localhost
- name: Send notification message via Rocket Chat all options
community.general.rocketchat:
domain: chat.example.com
token: thetoken/generatedby/rocketchat
msg: '{{ inventory_hostname }} completed'
channel: #ansible
username: 'Ansible on {{ inventory_hostname }}'
icon_url: http://www.example.com/some-image-file.png
link_names: 0
delegate_to: localhost
- name: Insert a color bar in front of the message for visibility purposes and use the default webhook icon and name configured in rocketchat
community.general.rocketchat:
token: thetoken/generatedby/rocketchat
domain: chat.example.com
msg: '{{ inventory_hostname }} is alive!'
color: good
username: ''
icon_url: ''
delegate_to: localhost
- name: Use the attachments API
community.general.rocketchat:
token: thetoken/generatedby/rocketchat
domain: chat.example.com
attachments:
- text: Display my system load on host A and B
color: #ff00dd
title: System load
fields:
- title: System A
value: 'load average: 0,74, 0,66, 0,63'
short: True
- title: System B
value: 'load average: 5,16, 4,64, 2,43'
short: True
delegate_to: localhost
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | success | A flag indicating if any change was made or not. |
### Authors
* Ramon de la Fuente (@ramondelafuente)
| programming_docs |
ansible community.general.lldp β get details reported by lldp community.general.lldp β get details reported by lldp
=====================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.lldp`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Reads data out of lldpctl
Requirements
------------
The below requirements are needed on the host that executes this module.
* lldpctl
Notes
-----
Note
* Requires lldpd running and lldp enabled on switches
Examples
--------
```
# Retrieve switch/port information
- name: Gather information from lldp
community.general.lldp:
- name: Print each switch/port
ansible.builtin.debug:
msg: "{{ lldp[item]['chassis']['name'] }} / {{ lldp[item]['port']['ifname'] }}"
with_items: "{{ lldp.keys() }}"
# TASK: [Print each switch/port] ***********************************************************
# ok: [10.13.0.22] => (item=eth2) => {"item": "eth2", "msg": "switch1.example.com / Gi0/24"}
# ok: [10.13.0.22] => (item=eth1) => {"item": "eth1", "msg": "switch2.example.com / Gi0/3"}
# ok: [10.13.0.22] => (item=eth0) => {"item": "eth0", "msg": "switch3.example.com / Gi0/3"}
```
### Authors
* Andy Hill (@andyhky)
ansible community.general.mail β Sends failure events via email community.general.mail β Sends failure events via email
=======================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.mail`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
Synopsis
--------
* This callback will report failures via email
Requirements
------------
The below requirements are needed on the local controller node that executes this callback.
* whitelisting in configuration
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **bcc** string | | ini entries: [callback\_mail]bcc = None | BCC'd recipient |
| **cc** string | | ini entries: [callback\_mail]cc = None | CC'd recipient |
| **mta** string | **Default:**"localhost" | ini entries: [callback\_mail]smtphost = localhost env:SMTPHOST | Mail Transfer Agent, server that accepts SMTP |
| **mtaport** string | **Default:**25 | ini entries: [callback\_mail]smtpport = 25 | Mail Transfer Agent Port, port at which server SMTP |
| **sender** string | | ini entries: [callback\_mail]sender = None | Mail sender |
| **to** string | **Default:**"root" | ini entries: [callback\_mail]to = root | Mail recipient |
Notes
-----
Note
* TODO: expand configuration options now that plugins can leverage Ansibleβs configuration
### Authors
* Dag Wieers (@dagwieers)
ansible community.general.profitbricks_volume_attachments β Attach or detach a volume. community.general.profitbricks\_volume\_attachments β Attach or detach a volume.
================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.profitbricks_volume_attachments`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Allows you to attach or detach a volume from a ProfitBricks server. This module has a dependency on profitbricks >= 1.0.0
Requirements
------------
The below requirements are needed on the host that executes this module.
* profitbricks
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **datacenter** string | | The datacenter in which to operate. |
| **server** string | | The name of the server you wish to detach or attach the volume. |
| **state** string | **Default:**"present" | Indicate desired state of the resource The available choices are: `present`, `absent`. |
| **subscription\_password** string | | THe ProfitBricks password. Overrides the PB\_PASSWORD environment variable. |
| **subscription\_user** string | | The ProfitBricks username. Overrides the PB\_SUBSCRIPTION\_ID environment variable. |
| **volume** string | | The volume name or ID. |
| **wait** boolean | **Choices:*** no
* **yes** β
| wait for the operation to complete before returning |
| **wait\_timeout** integer | **Default:**600 | how long before wait gives up, in seconds |
Examples
--------
```
- name: Attach a volume
community.general.profitbricks_volume_attachments:
datacenter: Tardis One
server: node002
volume: vol01
wait_timeout: 500
state: present
- name: Detach a volume
community.general.profitbricks_volume_attachments:
datacenter: Tardis One
server: node002
volume: vol01
wait_timeout: 500
state: absent
```
### Authors
* Matt Baldwin (@baldwinSPC) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#3456555850435d5a121707030f121701060f1217000c0f474055575f445b5d5a4057585b4150121700020f575b59)>
ansible community.general.ipa_pwpolicy β Manage FreeIPA password policies community.general.ipa\_pwpolicy β Manage FreeIPA password policies
==================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ipa_pwpolicy`.
New in version 2.0.0: of community.general
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add, modify, or delete a password policy using the IPA API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **failinterval** string | | Period (in seconds) after which the number of failed login attempts is reset. |
| **group** string | | Name of the group that the policy applies to. If omitted, the global policy is used.
aliases: name |
| **historylength** string | | Number of previous passwords that are remembered. Users cannot reuse remembered passwords. |
| **ipa\_host** string | **Default:**"ipa.example.com" | IP or hostname of IPA server. If the value is not specified in the task, the value of environment variable `IPA_HOST` will be used instead. If both the environment variable `IPA_HOST` and the value are not specified in the task, then DNS will be used to try to discover the FreeIPA server. The relevant entry needed in FreeIPA is the 'ipa-ca' entry. If neither the DNS entry, nor the environment `IPA_HOST`, nor the value are available in the task, then the default value will be used. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_pass** string | | Password of administrative user. If the value is not specified in the task, the value of environment variable `IPA_PASS` will be used instead. Note that if the 'urllib\_gssapi' library is available, it is possible to use GSSAPI to authenticate to FreeIPA. If the environment variable `KRB5CCNAME` is available, the module will use this kerberos credentials cache to authenticate to the FreeIPA server. If the environment variable `KRB5_CLIENT_KTNAME` is available, and `KRB5CCNAME` is not; the module will use this kerberos keytab to authenticate. If GSSAPI is not available, the usage of 'ipa\_pass' is required. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_port** integer | **Default:**443 | Port of FreeIPA / IPA server. If the value is not specified in the task, the value of environment variable `IPA_PORT` will be used instead. If both the environment variable `IPA_PORT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_prot** string | **Choices:*** http
* **https** β
| Protocol used by IPA server. If the value is not specified in the task, the value of environment variable `IPA_PROT` will be used instead. If both the environment variable `IPA_PROT` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. |
| **ipa\_timeout** integer | **Default:**10 | Specifies idle timeout (in seconds) for the connection. For bulk operations, you may want to increase this in order to avoid timeout from IPA server. If the value is not specified in the task, the value of environment variable `IPA_TIMEOUT` will be used instead. If both the environment variable `IPA_TIMEOUT` and the value are not specified in the task, then default value is set. |
| **ipa\_user** string | **Default:**"admin" | Administrative account used on IPA server. If the value is not specified in the task, the value of environment variable `IPA_USER` will be used instead. If both the environment variable `IPA_USER` and the value are not specified in the task, then default value is set. Environment variable fallback mechanism is added in Ansible 2.5. |
| **lockouttime** string | | Period (in seconds) for which users are locked out. |
| **maxfailcount** string | | Maximum number of consecutive failures before lockout. |
| **maxpwdlife** string | | Maximum password lifetime (in days). |
| **minclasses** string | | Minimum number of character classes. |
| **minlength** string | | Minimum password length. |
| **minpwdlife** string | | Minimum password lifetime (in hours). |
| **priority** string | | Priority of the policy. High number means lower priority. Required when `cn` is not the global policy. |
| **state** string | **Choices:*** absent
* **present** β
| State to ensure. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| This only applies if `ipa_prot` is *https*. If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* Supports `check_mode`.
Examples
--------
```
- name: Modify the global password policy
community.general.ipa_pwpolicy:
maxpwdlife: '90'
minpwdlife: '1'
historylength: '8'
minclasses: '3'
minlength: '16'
maxfailcount: '6'
failinterval: '60'
lockouttime: '600'
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
- name: Ensure the password policy for the group admins is present
community.general.ipa_pwpolicy:
group: admins
state: present
maxpwdlife: '60'
minpwdlife: '24'
historylength: '16'
minclasses: '4'
priority: '10'
maxfailcount: '4'
failinterval: '600'
lockouttime: '1200'
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
- name: Ensure that the group sysops does not have a unique password policy
community.general.ipa_pwpolicy:
group: sysops
state: absent
ipa_host: ipa.example.com
ipa_user: admin
ipa_pass: topsecret
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **pwpolicy** dictionary | always | Password policy as returned by IPA API. **Sample:** {'cn': ['admins'], 'cospriority': ['10'], 'dn': 'cn=admins,cn=EXAMPLE.COM,cn=kerberos,dc=example,dc=com', 'krbmaxpwdlife': ['60'], 'krbminpwdlife': ['24'], 'krbpwdfailurecountinterval': ['600'], 'krbpwdhistorylength': ['16'], 'krbpwdlockoutduration': ['1200'], 'krbpwdmaxfailure': ['4'], 'krbpwdmindiffchars': ['4'], 'objectclass': ['top', 'nscontainer', 'krbpwdpolicy']} |
### Authors
* Adralioh (@adralioh)
ansible community.general.flowdock β Send a message to a flowdock community.general.flowdock β Send a message to a flowdock
=========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.flowdock`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Send a message to a flowdock team inbox or chat using the push API (see <https://www.flowdock.com/api/team-inbox> and <https://www.flowdock.com/api/chat>)
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **external\_user\_name** string | | (chat only - required) Name of the "user" sending the message |
| **from\_address** string | | (inbox only - required) Email address of the message sender |
| **from\_name** string | | (inbox only) Name of the message sender |
| **link** string | | (inbox only) Link associated with the message. This will be used to link the message subject in Team Inbox. |
| **msg** string / required | | Content of the message |
| **project** string | | (inbox only) Human readable identifier for more detailed message categorization |
| **reply\_to** string | | (inbox only) Email address for replies |
| **source** string | | (inbox only - required) Human readable identifier of the application that uses the Flowdock API |
| **subject** string | | (inbox only - required) Subject line of the message |
| **tags** string | | tags of the message, separated by commas |
| **token** string / required | | API token. |
| **type** string / required | **Choices:*** inbox
* chat
| Whether to post to 'inbox' or 'chat' |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Send a message to a flowdock
community.general.flowdock:
type: inbox
token: AAAAAA
from_address: [email protected]
source: my cool app
msg: test from ansible
subject: test subject
- name: Send a message to a flowdock
community.general.flowdock:
type: chat
token: AAAAAA
external_user_name: testuser
msg: test from ansible
tags: tag1,tag2,tag3
```
### Authors
* Matt Coddington (@mcodd)
ansible community.general.gitlab_group β Creates/updates/deletes GitLab Groups community.general.gitlab\_group β Creates/updates/deletes GitLab Groups
=======================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.gitlab_group`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* When the group does not exist in GitLab, it will be created.
* When the group does exist and state=absent, the group will be deleted.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* python-gitlab python module
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_password** string | | The password to use for authentication against the API |
| **api\_token** string | | GitLab token for logging in. |
| **api\_url** string | | The resolvable endpoint for the API |
| **api\_username** string | | The username to use for authentication against the API |
| **auto\_devops\_enabled** boolean added in 3.7.0 of community.general | **Choices:*** no
* yes
| Default to Auto DevOps pipeline for all projects within this group. |
| **description** string | | A description for the group. |
| **name** string / required | | Name of the group you want to create. |
| **parent** string | | Allow to create subgroups Id or Full path of parent group in the form of group/name |
| **path** string | | The path of the group you want to create, this will be api\_url/group\_path If not supplied, the group\_name will be used. |
| **project\_creation\_level** string added in 3.7.0 of community.general | **Choices:*** developer
* maintainer
* noone
| Determine if developers can create projects in the group. |
| **require\_two\_factor\_authentication** boolean added in 3.7.0 of community.general | **Choices:*** no
* yes
| Require all users in this group to setup two-factor authentication. |
| **state** string | **Choices:*** **present** β
* absent
| create or delete group. Possible values are present and absent. |
| **subgroup\_creation\_level** string added in 3.7.0 of community.general | **Choices:*** maintainer
* owner
| Allowed to create subgroups. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Whether or not to validate SSL certs when supplying a https endpoint. |
| **visibility** string | **Choices:*** **private** β
* internal
* public
| Default visibility of the group |
Examples
--------
```
- name: "Delete GitLab Group"
community.general.gitlab_group:
api_url: https://gitlab.example.com/
api_token: "{{ access_token }}"
validate_certs: False
name: my_first_group
state: absent
- name: "Create GitLab Group"
community.general.gitlab_group:
api_url: https://gitlab.example.com/
validate_certs: True
api_username: dj-wasabi
api_password: "MySecretPassword"
name: my_first_group
path: my_first_group
state: present
# The group will by created at https://gitlab.dj-wasabi.local/super_parent/parent/my_first_group
- name: "Create GitLab SubGroup"
community.general.gitlab_group:
api_url: https://gitlab.example.com/
validate_certs: True
api_username: dj-wasabi
api_password: "MySecretPassword"
name: my_first_group
path: my_first_group
state: present
parent: "super_parent/parent"
# Other group which only allows sub-groups - no projects
- name: "Create GitLab Group for SubGroups only"
community.general.gitlab_group:
api_url: https://gitlab.example.com/
validate_certs: True
api_username: dj-wasabi
api_password: "MySecretPassword"
name: my_main_group
path: my_main_group
state: present
project_creation_level: noone
auto_devops_enabled: false
subgroup_creation_level: maintainer
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **error** string | failed | the error message returned by the GitLab API **Sample:** 400: path is already in use |
| **group** dictionary | always | API object |
| **msg** string | always | Success or failure message **Sample:** Success |
| **result** dictionary | always | json parsed response from the server |
### Authors
* Werner Dijkerman (@dj-wasabi)
* Guillaume Martinez (@Lunik)
| programming_docs |
ansible community.general.mksysb β Generates AIX mksysb rootvg backups. community.general.mksysb β Generates AIX mksysb rootvg backups.
===============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.mksysb`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module manages a basic AIX mksysb (image) of rootvg.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **backup\_crypt\_files** boolean | **Choices:*** no
* **yes** β
| Backup encrypted files. |
| **backup\_dmapi\_fs** boolean | **Choices:*** no
* **yes** β
| Back up DMAPI filesystem files. |
| **create\_map\_files** boolean | **Choices:*** **no** β
* yes
| Creates a new MAP files. |
| **exclude\_files** boolean | **Choices:*** **no** β
* yes
| Excludes files using `/etc/rootvg.exclude`. |
| **exclude\_wpar\_files** boolean | **Choices:*** **no** β
* yes
| Excludes WPAR files. |
| **extended\_attrs** boolean | **Choices:*** no
* **yes** β
| Backup extended attributes. |
| **name** string / required | | Backup name |
| **new\_image\_data** boolean | **Choices:*** no
* **yes** β
| Creates a new file data. |
| **software\_packing** boolean | **Choices:*** **no** β
* yes
| Exclude files from packing option listed in `/etc/exclude_packing.rootvg`. |
| **storage\_path** string / required | | Storage path where the mksysb will stored. |
| **use\_snapshot** boolean | **Choices:*** **no** β
* yes
| Creates backup using snapshots. |
Examples
--------
```
- name: Running a backup image mksysb
community.general.mksysb:
name: myserver
storage_path: /repository/images
exclude_files: yes
exclude_wpar_files: yes
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | Return changed for mksysb actions as true or false. |
| **msg** string | always | Return message regarding the action. |
### Authors
* Kairo Araujo (@kairoaraujo)
ansible community.general.linode β Ansible dynamic inventory plugin for Linode. community.general.linode β Ansible dynamic inventory plugin for Linode.
=======================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.linode`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Reads inventories from the Linode API v4.
* Uses a YAML configuration file that ends with linode.(yml|yaml).
* Linode labels are used by default as the hostnames.
* The default inventory groups are built from groups (deprecated by Linode) and not tags.
Requirements
------------
The below requirements are needed on the local controller node that executes this inventory.
* python >= 2.7
* linode\_api4 >= 2.0.0
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **access\_token** string / required | | env:LINODE\_ACCESS\_TOKEN | The Linode account personal access token. |
| **compose** dictionary added in 2.0.0 of community.general | **Default:**{} | | Create vars from jinja2 expressions. |
| **groups** dictionary added in 2.0.0 of community.general | **Default:**{} | | Add hosts to group based on Jinja2 conditionals. |
| **ip\_style** string added in 3.6.0 of community.general | **Choices:*** **plain** β
* api
| | Populate hostvars with all information available from the Linode APIv4. |
| **keyed\_groups** list / elements=string added in 2.0.0 of community.general | **Default:**[] | | Add hosts to group based on the values of a variable. |
| **leading\_separator** boolean added in 2.11 of ansible.builtin | **Choices:*** no
* **yes** β
| | Use in conjunction with keyed\_groups. By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is "" and the default separator is "\_". Set this option to False to omit the leading underscore (or other separator) if no prefix is given. If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. |
| **plugin** string / required | **Choices:*** linode
* community.general.linode
| | Marks this as an instance of the 'linode' plugin. |
| **regions** list / elements=string | **Default:**[] | | Populate inventory with instances in this region. |
| **strict** boolean added in 2.0.0 of community.general | **Choices:*** **no** β
* yes
| | If `yes` make invalid entries a fatal error, otherwise skip and continue. Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. |
| **tags** list / elements=string added in 2.0.0 of community.general | **Default:**[] | | Populate inventory only with instances which have at least one of the tags listed here. |
| **types** list / elements=string | **Default:**[] | | Populate inventory with instances with this type. |
| **use\_extra\_vars** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [inventory\_plugins]use\_extra\_vars = no env:ANSIBLE\_INVENTORY\_USE\_EXTRA\_VARS | Merge extra vars into the available variables for composition (highest precedence). |
Examples
--------
```
# Minimal example. `LINODE_ACCESS_TOKEN` is exposed in environment.
plugin: community.general.linode
# Example with regions, types, groups and access token
plugin: community.general.linode
access_token: foobar
regions:
- eu-west
types:
- g5-standard-2
# Example with keyed_groups, groups, and compose
plugin: community.general.linode
access_token: foobar
keyed_groups:
- key: tags
separator: ''
- key: region
prefix: region
groups:
webservers: "'web' in (tags|list)"
mailservers: "'mail' in (tags|list)"
compose:
# By default, Ansible tries to connect to the label of the instance.
# Since that might not be a valid name to connect to, you can
# replace it with the first IPv4 address of the linode as follows:
ansible_ssh_host: ipv4[0]
ansible_port: 2222
# Example where control traffic limited to internal network
plugin: community.general.linode
access_token: foobar
ip_style: api
compose:
ansible_host: "ipv4 | community.general.json_query('[?public==`false`].address') | first"
```
### Authors
* Luke Murphy (@decentral1se)
ansible community.general.rax_scaling_policy β Manipulate Rackspace Cloud Autoscale Scaling Policy community.general.rax\_scaling\_policy β Manipulate Rackspace Cloud Autoscale Scaling Policy
============================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.rax_scaling_policy`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manipulate Rackspace Cloud Autoscale Scaling Policy
Requirements
------------
The below requirements are needed on the host that executes this module.
* pyrax
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string | | Rackspace API key, overrides *credentials*.
aliases: password |
| **at** string | | The UTC time when this policy will be executed. The time must be formatted according to `yyyy-MM-dd'T'HH:mm:ss.SSS` such as `2013-05-19T08:07:08Z`
|
| **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/>
|
| **change** integer | | The change, either as a number of servers or as a percentage, to make in the scaling group. If this is a percentage, you must set *is\_percent* to `true` also. |
| **cooldown** integer | **Default:**300 | The period of time, in seconds, that must pass before any scaling can occur after the previous scaling. Must be an integer between 0 and 86400 (24 hrs). |
| **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided.
aliases: creds\_file |
| **cron** string | | The time when the policy will be executed, as a cron entry. For example, if this is parameter is set to `1 0 * * *`
|
| **desired\_capacity** integer | | The desired server capacity of the scaling the group; that is, how many servers should be in the scaling group. |
| **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. |
| **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. |
| **is\_percent** boolean | **Choices:*** **no** β
* yes
| Whether the value in *change* is a percent value |
| **name** string / required | | Name to give the policy |
| **policy\_type** string / required | **Choices:*** webhook
* schedule
| The type of policy that will be executed for the current release. |
| **region** string | | Region to create an instance in. |
| **scaling\_group** string / required | | Name of the scaling group that this policy will be added to |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the resource |
| **tenant\_id** string | | The tenant ID used for authentication. |
| **tenant\_name** string | | The tenant name used for authentication. |
| **username** string | | Rackspace username, overrides *credentials*. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether or not to require SSL validation of API endpoints.
aliases: verify\_ssl |
Notes
-----
Note
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
Examples
--------
```
---
- hosts: localhost
gather_facts: false
connection: local
tasks:
- community.general.rax_scaling_policy:
credentials: ~/.raxpub
region: ORD
at: '2013-05-19T08:07:08Z'
change: 25
cooldown: 300
is_percent: true
name: ASG Test Policy - at
policy_type: schedule
scaling_group: ASG Test
register: asps_at
- community.general.rax_scaling_policy:
credentials: ~/.raxpub
region: ORD
cron: '1 0 * * *'
change: 25
cooldown: 300
is_percent: true
name: ASG Test Policy - cron
policy_type: schedule
scaling_group: ASG Test
register: asp_cron
- community.general.rax_scaling_policy:
credentials: ~/.raxpub
region: ORD
cooldown: 300
desired_capacity: 5
name: ASG Test Policy - webhook
policy_type: webhook
scaling_group: ASG Test
register: asp_webhook
```
### Authors
* Matt Martz (@sivel)
ansible community.general.dnsmadeeasy β Interface with dnsmadeeasy.com (a DNS hosting service). community.general.dnsmadeeasy β Interface with dnsmadeeasy.com (a DNS hosting service).
=======================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.dnsmadeeasy`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manages DNS records via the v2 REST API of the DNS Made Easy service. It handles records only; there is no manipulation of domains or monitor/account support yet. See: <https://www.dnsmadeeasy.com/integration/restapi/>
Requirements
------------
The below requirements are needed on the host that executes this module.
* hashlib
* hmac
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account\_key** string / required | | Account API Key. |
| **account\_secret** string / required | | Account Secret Key. |
| **autoFailover** boolean | **Choices:*** **no** β
* yes
| If true, fallback to the primary IP address is manual after a failover. If false, fallback to the primary IP address is automatic after a failover. |
| **contactList** string | **Default:**"" | Name or id of the contact list that the monitor will notify. The default `''` means the Account Owner. |
| **domain** string / required | | Domain to work with. Can be the domain name (e.g. "mydomain.com") or the numeric ID of the domain in DNS Made Easy (e.g. "839989") for faster resolution |
| **failover** boolean | **Choices:*** **no** β
* yes
| If `yes`, add or change the failover. This is applicable only for A records. |
| **httpFile** string | | The file at the Fqdn that the monitor queries for HTTP or HTTPS. |
| **httpFqdn** string | | The fully qualified domain name used by the monitor. |
| **httpQueryString** string | | The string in the httpFile that the monitor queries for HTTP or HTTPS. |
| **ip1** string | | Primary IP address for the failover. Required if adding or changing the monitor or failover. |
| **ip2** string | | Secondary IP address for the failover. Required if adding or changing the failover. |
| **ip3** string | | Tertiary IP address for the failover. |
| **ip4** string | | Quaternary IP address for the failover. |
| **ip5** string | | Quinary IP address for the failover. |
| **maxEmails** integer | **Default:**1 | Number of emails sent to the contact list by the monitor. |
| **monitor** boolean | **Choices:*** **no** β
* yes
| If `yes`, add or change the monitor. This is applicable only for A records. |
| **port** integer | **Default:**80 | Port used by the monitor. |
| **protocol** string | **Choices:*** TCP
* UDP
* **HTTP** β
* DNS
* SMTP
* HTTPS
| Protocol used by the monitor. |
| **record\_name** string | | Record name to get/create/delete/update. If record\_name is not specified; all records for the domain will be returned in "result" regardless of the state argument. |
| **record\_ttl** integer | **Default:**1800 | record's "Time to live". Number of seconds the record remains cached in DNS servers. |
| **record\_type** string | **Choices:*** A
* AAAA
* CNAME
* ANAME
* HTTPRED
* MX
* NS
* PTR
* SRV
* TXT
| Record type. |
| **record\_value** string | | Record value. HTTPRED: <redirection URL>, MX: <priority> <target name>, NS: <name server>, PTR: <target name>, SRV: <priority> <weight> <port> <target name>, TXT: <text value>" If record\_value is not specified; no changes will be made and the record will be returned in 'result' (in other words, this module can be used to fetch a record's current id, type, and ttl) |
| **sandbox** boolean | **Choices:*** **no** β
* yes
| Decides if the sandbox API should be used. Otherwise (default) the production API of DNS Made Easy is used. |
| **sensitivity** string | **Choices:*** Low
* **Medium** β
* High
| Number of checks the monitor performs before a failover occurs where Low = 8, Medium = 5,and High = 3. |
| **state** string / required | **Choices:*** present
* absent
| whether the record should exist or not |
| **systemDescription** string | **Default:**"" | Description used by the monitor. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* The DNS Made Easy service requires that machines interacting with the API have the proper time and timezone set. Be sure you are within a few seconds of actual time by using NTP.
* This module returns record(s) and monitor(s) in the βresultβ element when βstateβ is set to βpresentβ. These values can be be registered and used in your playbooks.
* Only A records can have a monitor or failover.
* To add failover, the βfailoverβ, βautoFailoverβ, βportβ, βprotocolβ, βip1β, and βip2β options are required.
* To add monitor, the βmonitorβ, βportβ, βprotocolβ, βmaxEmailsβ, βsystemDescriptionβ, and βip1β options are required.
* The monitor and the failover will share βportβ, βprotocolβ, and βip1β options.
Examples
--------
```
- name: Fetch my.com domain records
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
register: response
- name: Create a record
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
- name: Update the previously created record
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_value: 192.0.2.23
- name: Fetch a specific record
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
register: response
- name: Delete a record
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
record_type: A
state: absent
record_name: test
- name: Add a failover
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
failover: True
ip1: 127.0.0.2
ip2: 127.0.0.3
- name: Add a failover
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
failover: True
ip1: 127.0.0.2
ip2: 127.0.0.3
ip3: 127.0.0.4
ip4: 127.0.0.5
ip5: 127.0.0.6
- name: Add a monitor
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
monitor: yes
ip1: 127.0.0.2
protocol: HTTP # default
port: 80 # default
maxEmails: 1
systemDescription: Monitor Test A record
contactList: my contact list
- name: Add a monitor with http options
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
monitor: yes
ip1: 127.0.0.2
protocol: HTTP # default
port: 80 # default
maxEmails: 1
systemDescription: Monitor Test A record
contactList: 1174 # contact list id
httpFqdn: http://my.com
httpFile: example
httpQueryString: some string
- name: Add a monitor and a failover
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
failover: True
ip1: 127.0.0.2
ip2: 127.0.0.3
monitor: yes
protocol: HTTPS
port: 443
maxEmails: 1
systemDescription: monitoring my.com status
contactList: emergencycontacts
- name: Remove a failover
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
failover: no
- name: Remove a monitor
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
monitor: no
```
### Authors
* Brice Burgess (@briceburg)
| programming_docs |
ansible community.general.log_plays β write playbook output to log file community.general.log\_plays β write playbook output to log file
================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.log_plays`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
Synopsis
--------
* This callback writes playbook output to a file per host in the `/var/log/ansible/hosts` directory
Requirements
------------
The below requirements are needed on the local controller node that executes this callback.
* Whitelist in configuration
* A writeable /var/log/ansible/hosts directory by the user executing Ansible on the controller
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **log\_folder** string | **Default:**"/var/log/ansible/hosts" | ini entries: [callback\_log\_plays]log\_folder = /var/log/ansible/hosts env:ANSIBLE\_LOG\_FOLDER | The folder where log files will be created. |
### Authors
* Unknown (!UNKNOWN)
ansible community.general.utm_proxy_location_info β create, update or destroy reverse_proxy location entry in Sophos UTM community.general.utm\_proxy\_location\_info β create, update or destroy reverse\_proxy location entry in Sophos UTM
====================================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.utm_proxy_location_info`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or destroy a reverse\_proxy location entry in SOPHOS UTM.
* This module needs to have the REST Ability of the UTM to be activated.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **headers** dictionary | | A dictionary of additional headers to be sent to POST and PUT requests. Is needed for some modules |
| **name** string / required | | The name of the object. Will be used to identify the entry |
| **state** string | **Choices:*** absent
* **present** β
| The desired state of the object.
`present` will create or update an object
`absent` will delete an object if it was present |
| **utm\_host** string / required | | The REST Endpoint of the Sophos UTM. |
| **utm\_port** integer | **Default:**4444 | The port of the REST interface. |
| **utm\_protocol** string | **Choices:*** http
* **https** β
| The protocol of the REST Endpoint. |
| **utm\_token** string / required | | The token used to identify at the REST-API. See <https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en>, Chapter 2.4.2. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Whether the REST interface's ssl certificate should be verified or not. |
Examples
--------
```
- name: Remove UTM proxy_location
community.general.utm_proxy_location_info:
utm_host: sophos.host.name
utm_token: abcdefghijklmno1234
name: TestLocationEntry
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **result** complex | success | The utm object that was created |
| | **\_locked** boolean | success | Whether or not the object is currently locked |
| | **\_ref** string | success | The reference name of the object |
| | **\_type** string | success | The type of the object |
| | **access\_control** string | success | Whether to use access control state |
| | **allowed\_networks** list / elements=string | success | List of allowed network reference names |
| | **auth\_profile** string | success | The auth profile reference name |
| | **backend** string | success | The backend reference name |
| | **be\_path** string | success | The backend path |
| | **comment** string | success | The comment string |
| | **denied\_networks** list / elements=string | success | The list of the denied network names |
| | **hot\_standby** boolean | success | Use hot standy |
| | **name** string | success | The name of the object |
| | **path** string | success | Path name |
| | **status** boolean | success | Whether the object is active or not |
| | **stickysession\_id** string | success | The identifier of the stickysession |
| | **stickysession\_status** boolean | success | Whether to use stickysession or not |
| | **websocket\_passthrough** boolean | success | Whether websocket passthrough will be used or not |
### Authors
* Johannes Brunswicker (@MatrixCrawler)
ansible community.general.one_image_info β Gather information on OpenNebula images community.general.one\_image\_info β Gather information on OpenNebula images
============================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.one_image_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather information on OpenNebula images.
* This module was called `one_image_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* pyone
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_password** string | | Password of the user to login into OpenNebula RPC server. If not set then the value of the `ONE_PASSWORD` environment variable is used. |
| **api\_url** string | | URL of the OpenNebula RPC server. It is recommended to use HTTPS so that the username/password are not transferred over the network unencrypted. If not set then the value of the `ONE_URL` environment variable is used. |
| **api\_username** string | | Name of the user to login into the OpenNebula RPC server. If not set then the value of the `ONE_USERNAME` environment variable is used. |
| **ids** list / elements=string | | A list of images ids whose facts you want to gather.
aliases: id |
| **name** string | | A `name` of the image whose facts will be gathered. If the `name` begins with '~' the `name` will be used as regex pattern which restricts the list of images (whose facts will be returned) whose names match specified regex. Also, if the `name` begins with '~\*' case-insensitive matching will be performed. See examples for more details. |
Examples
--------
```
- name: Gather facts about all images
community.general.one_image_info:
register: result
- name: Print all images facts
ansible.builtin.debug:
msg: result
- name: Gather facts about an image using ID
community.general.one_image_info:
ids:
- 123
- name: Gather facts about an image using the name
community.general.one_image_info:
name: 'foo-image'
register: foo_image
- name: Gather facts about all IMAGEs whose name matches regex 'app-image-.*'
community.general.one_image_info:
name: '~app-image-.*'
register: app_images
- name: Gather facts about all IMAGEs whose name matches regex 'foo-image-.*' ignoring cases
community.general.one_image_info:
name: '~*foo-image-.*'
register: foo_images
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **images** complex | success | A list of images info |
| | **group\_id** integer | success | image's group id **Sample:** 1 |
| | **group\_name** string | success | image's group name **Sample:** one-users |
| | **id** integer | success | image id **Sample:** 153 |
| | **name** string | success | image name **Sample:** app1 |
| | **owner\_id** integer | success | image's owner id **Sample:** 143 |
| | **owner\_name** string | success | image's owner name **Sample:** ansible-test |
| | **running\_vms** integer | success | count of running vms that use this image **Sample:** 7 |
| | **state** string | success | state of image instance **Sample:** READY |
| | **used** boolean | success | is image in use **Sample:** True |
### Authors
* Milan Ilic (@ilicmilan)
* Jan Meerkamp (@meerkampdvv)
ansible community.general.bitbucket_access_key β Manages Bitbucket repository access keys community.general.bitbucket\_access\_key β Manages Bitbucket repository access keys
===================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.bitbucket_access_key`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manages Bitbucket repository access keys (also called deploy keys).
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **client\_id** string | | The OAuth consumer key. If not set the environment variable `BITBUCKET_CLIENT_ID` will be used. |
| **client\_secret** string | | The OAuth consumer secret. If not set the environment variable `BITBUCKET_CLIENT_SECRET` will be used. |
| **key** string | | The SSH public key. |
| **label** string / required | | The key label. |
| **repository** string / required | | The repository name. |
| **state** string / required | **Choices:*** absent
* present
| Indicates desired state of the access key. |
| **username** string / required | | The repository owner. |
Notes
-----
Note
* Bitbucket OAuth consumer key and secret can be obtained from Bitbucket profile -> Settings -> Access Management -> OAuth.
* Bitbucket OAuth consumer should have permissions to read and administrate account repositories.
* Check mode is supported.
Examples
--------
```
- name: Create access key
community.general.bitbucket_access_key:
repository: 'bitbucket-repo'
username: bitbucket_username
key: '{{lookup("file", "bitbucket.pub") }}'
label: 'Bitbucket'
state: present
- name: Delete access key
community.general.bitbucket_access_key:
repository: bitbucket-repo
username: bitbucket_username
label: Bitbucket
state: absent
```
### Authors
* Evgeniy Krysanov (@catcombo)
ansible community.general.telegram β module for sending notifications via telegram community.general.telegram β module for sending notifications via telegram
==========================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.telegram`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Send notifications via telegram bot, to a verified group or user.
* Also, the user may try to use any other telegram bot API method, if you specify *api\_method* argument.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_args** dictionary added in 2.0.0 of community.general | | Any parameters for the method. For reference to default method, `SendMessage`, see <https://core.telegram.org/bots/api#sendmessage>. |
| **api\_method** string added in 2.0.0 of community.general | **Default:**"SendMessage" | Bot API method. For reference, see <https://core.telegram.org/bots/api>. |
| **chat\_id** string | | (Deprecated) Telegram group or user chat\_id. |
| **msg** string | | (Deprecated) What message you wish to send. |
| **msg\_format** string | **Choices:*** **plain** β
* markdown
* MarkdownV2
* html
| (Deprecated) Message format. Formatting options `markdown`, `MarkdownV2`, and `html` described in Telegram API docs (https://core.telegram.org/bots/api#formatting-options). If option `plain` set, message will not be formatted. |
| **token** string / required | | Token identifying your telegram bot. |
Notes
-----
Note
* You will require a telegram account and create telegram bot to use this module.
* The options *msg*, *msg\_format* and *chat\_id* have been deprecated and will be removed in community.general 4.0.0. Use the corresponding variables in *api\_args* instead. See the examples for how that works.
Examples
--------
```
- name: Send notify to Telegram
community.general.telegram:
token: '9999999:XXXXXXXXXXXXXXXXXXXXXXX'
api_args:
chat_id: 000000
parse_mode: "markdown"
text: "Your precious application has been deployed: https://example.com"
disable_web_page_preview: True
disable_notification: True
- name: Forward message to someone
community.general.telegram:
token: '9999999:XXXXXXXXXXXXXXXXXXXXXXX'
api_method: forwardMessage
api_args:
chat_id: 000000
from_chat_id: 111111
disable_notification: True
message_id: '{{ saved_msg_id }}'
- name: Send a message to chat in playbook (deprecated old style)
community.general.telegram:
token: '9999999:XXXXXXXXXXXXXXXXXXXXXXX'
chat_id: 000000
msg: Ansible task finished
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | success | The message you attempted to send **Sample:** Ansible task finished |
| **telegram\_error** string | failure | Error message gotten from Telegram API **Sample:** Bad Request: message text is empty |
### Authors
* Artem Feofanov (@tyouxa)
* Nikolai Lomov (@lomserman)
ansible community.general.utm_proxy_auth_profile β create, update or destroy reverse_proxy auth_profile entry in Sophos UTM community.general.utm\_proxy\_auth\_profile β create, update or destroy reverse\_proxy auth\_profile entry in Sophos UTM
========================================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.utm_proxy_auth_profile`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or destroy a reverse\_proxy auth\_profile entry in SOPHOS UTM.
* This module needs to have the REST Ability of the UTM to be activated.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aaa** list / elements=string / required | | List of references to utm\_aaa objects (allowed users or groups) |
| **backend\_mode** string | **Choices:*** Basic
* **None** β
| Specifies if the backend server needs authentication ([Basic|None]) |
| **backend\_strip\_basic\_auth** boolean | **Choices:*** no
* **yes** β
| Should the login data be stripped when proxying the request to the backend host |
| **backend\_user\_prefix** string | **Default:**"" | Prefix string to prepend to the username for backend authentication |
| **backend\_user\_suffix** string | **Default:**"" | Suffix string to append to the username for backend authentication |
| **basic\_prompt** string / required | | The message in the basic authentication prompt |
| **comment** string | **Default:**"" | Optional comment string |
| **frontend\_cookie** string | | Frontend cookie name |
| **frontend\_cookie\_secret** string | | Frontend cookie secret |
| **frontend\_form** string | | Frontend authentication form name |
| **frontend\_form\_template** string | **Default:**"" | Frontend authentication form template |
| **frontend\_login** string | | Frontend login name |
| **frontend\_logout** string | | Frontend logout name |
| **frontend\_mode** string | **Choices:*** **Basic** β
* Form
| Frontend authentication mode (Form|Basic) |
| **frontend\_realm** string | | Frontend authentication realm |
| **frontend\_session\_allow\_persistency** boolean | **Choices:*** **no** β
* yes
| Allow session persistency |
| **frontend\_session\_lifetime** integer / required | | session lifetime |
| **frontend\_session\_lifetime\_limited** boolean | **Choices:*** no
* **yes** β
| Specifies if limitation of session lifetime is active |
| **frontend\_session\_lifetime\_scope** string | **Choices:*** days
* **hours** β
* minutes
| scope for frontend\_session\_lifetime (days|hours|minutes) |
| **frontend\_session\_timeout** integer / required | | session timeout |
| **frontend\_session\_timeout\_enabled** boolean | **Choices:*** no
* **yes** β
| Specifies if session timeout is active |
| **frontend\_session\_timeout\_scope** string | **Choices:*** days
* hours
* **minutes** β
| scope for frontend\_session\_timeout (days|hours|minutes) |
| **headers** dictionary | | A dictionary of additional headers to be sent to POST and PUT requests. Is needed for some modules |
| **logout\_delegation\_urls** list / elements=string | **Default:**[] | List of logout URLs that logouts are delegated to |
| **logout\_mode** string | **Choices:*** **None** β
* Delegation
| Mode of logout (None|Delegation) |
| **name** string / required | | The name of the object. Will be used to identify the entry |
| **redirect\_to\_requested\_url** boolean | **Choices:*** **no** β
* yes
| Should a redirect to the requested URL be made |
| **state** string | **Choices:*** absent
* **present** β
| The desired state of the object.
`present` will create or update an object
`absent` will delete an object if it was present |
| **utm\_host** string / required | | The REST Endpoint of the Sophos UTM. |
| **utm\_port** integer | **Default:**4444 | The port of the REST interface. |
| **utm\_protocol** string | **Choices:*** http
* **https** β
| The protocol of the REST Endpoint. |
| **utm\_token** string / required | | The token used to identify at the REST-API. See <https://www.sophos.com/en-us/medialibrary/PDFs/documentation/UTMonAWS/Sophos-UTM-RESTful-API.pdf?la=en>, Chapter 2.4.2. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Whether the REST interface's ssl certificate should be verified or not. |
Examples
--------
```
- name: Create UTM proxy_auth_profile
community.general.utm_proxy_auth_profile:
utm_host: sophos.host.name
utm_token: abcdefghijklmno1234
name: TestAuthProfileEntry
aaa: [REF_OBJECT_STRING,REF_ANOTHEROBJECT_STRING]
basic_prompt: "Authentication required: Please login"
frontend_session_lifetime: 1
frontend_session_timeout: 1
state: present
- name: Remove UTM proxy_auth_profile
community.general.utm_proxy_auth_profile:
utm_host: sophos.host.name
utm_token: abcdefghijklmno1234
name: TestAuthProfileEntry
state: absent
- name: Read UTM proxy_auth_profile
community.general.utm_proxy_auth_profile:
utm_host: sophos.host.name
utm_token: abcdefghijklmno1234
name: TestAuthProfileEntry
state: info
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **result** complex | success | The utm object that was created |
| | **\_locked** boolean | success | Whether or not the object is currently locked |
| | **\_ref** string | success | The reference name of the object |
| | **\_type** string | success | The type of the object |
| | **aaa** list / elements=string | success | List of references to utm\_aaa objects (allowed users or groups) |
| | **backend\_mode** string | success | Specifies if the backend server needs authentication ([Basic|None]) |
| | **backend\_strip\_basic\_auth** boolean | success | Should the login data be stripped when proxying the request to the backend host |
| | **backend\_user\_prefix** string | success | Prefix string to prepend to the username for backend authentication |
| | **backend\_user\_suffix** string | success | Suffix string to append to the username for backend authentication |
| | **basic\_prompt** string | success | The message in the basic authentication prompt |
| | **comment** string | success | Optional comment string |
| | **frontend\_cookie** string | success | Frontend cookie name |
| | **frontend\_form** string | success | Frontend authentication form name |
| | **frontend\_form\_template** string | success | Frontend authentication form template |
| | **frontend\_login** string | success | Frontend login name |
| | **frontend\_logout** string | success | Frontend logout name |
| | **frontend\_mode** string | success | Frontend authentication mode (Form|Basic) |
| | **frontend\_realm** string | success | Frontend authentication realm |
| | **frontend\_session\_allow\_persistency** boolean | success | Allow session persistency |
| | **frontend\_session\_lifetime** integer | success | session lifetime |
| | **frontend\_session\_lifetime\_limited** boolean | success | Specifies if limitation of session lifetime is active |
| | **frontend\_session\_lifetime\_scope** string | success | scope for frontend\_session\_lifetime (days|hours|minutes) |
| | **frontend\_session\_timeout** integer | success | session timeout |
| | **frontend\_session\_timeout\_enabled** boolean | success | Specifies if session timeout is active |
| | **frontend\_session\_timeout\_scope** string | success | scope for frontend\_session\_timeout (days|hours|minutes) |
| | **logout\_delegation\_urls** list / elements=string | success | List of logout URLs that logouts are delegated to |
| | **logout\_mode** string | success | Mode of logout (None|Delegation) |
| | **name** string | success | The name of the object |
| | **redirect\_to\_requested\_url** boolean | success | Should a redirect to the requested URL be made |
### Authors
* Stephan Schwarz (@stearz)
| programming_docs |
ansible community.general.ipinfoio_facts β Retrieve IP geolocation facts of a hostβs IP address community.general.ipinfoio\_facts β Retrieve IP geolocation facts of a hostβs IP address
========================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ipinfoio_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Returned Facts](#returned-facts)
Synopsis
--------
* Gather IP geolocation facts of a hostβs IP address using ipinfo.io API
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **http\_agent** string | **Default:**"ansible-ipinfoio-module/0.0.1" | Set http user agent |
| **timeout** integer | **Default:**10 | HTTP connection timeout in seconds |
Notes
-----
Note
* Check <http://ipinfo.io/> for more information
Examples
--------
```
# Retrieve geolocation data of a host's IP address
- name: Get IP geolocation data
community.general.ipinfoio_facts:
```
Returned Facts
--------------
Facts returned by this module are added/updated in the `hostvars` host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.
| Fact | Returned | Description |
| --- | --- | --- |
| **city** string / elements=string | success | City name **Sample:** Mountain View |
| **country** string / elements=string | success | ISO 3166-1 alpha-2 country code **Sample:** US |
| **hostname** string / elements=string | success | Domain name **Sample:** google-public-dns-a.google.com |
| **ip** string / elements=string | success | Public IP address of a host **Sample:** 8.8.8.8 |
| **loc** string / elements=string | success | Latitude and Longitude of the location **Sample:** 37.3860,-122.0838 |
| **org** string / elements=string | success | organization's name **Sample:** AS3356 Level 3 Communications, Inc. |
| **postal** string / elements=string | success | Postal code **Sample:** 94035 |
| **region** string / elements=string | success | State or province name **Sample:** California |
### Authors
* Aleksei Kostiuk (@akostyuk)
ansible community.general.ipify_facts β Retrieve the public IP of your internet gateway community.general.ipify\_facts β Retrieve the public IP of your internet gateway
================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ipify_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* If behind NAT and need to know the public IP of your internet gateway.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_url** string | **Default:**"https://api.ipify.org/" | URL of the ipify.org API service.
`?format=json` will be appended per default. |
| **timeout** integer | **Default:**10 | HTTP connection timeout in seconds. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| When set to `NO`, SSL certificates will not be validated. |
Notes
-----
Note
* Visit <https://www.ipify.org> to get more information.
Examples
--------
```
# Gather IP facts from ipify.org
- name: Get my public IP
community.general.ipify_facts:
# Gather IP facts from your own ipify service endpoint with a custom timeout
- name: Get my public IP
community.general.ipify_facts:
api_url: http://api.example.com/ipify
timeout: 20
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ipify\_public\_ip** string | success | Public IP of the internet gateway. **Sample:** 1.2.3.4 |
### Authors
* RenΓ© Moser (@resmo)
ansible community.general.circonus_annotation β create an annotation in circonus community.general.circonus\_annotation β create an annotation in circonus
=========================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.circonus_annotation`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create an annotation event with a given category, title and description. Optionally start, end or durations can be provided
Requirements
------------
The below requirements are needed on the host that executes this module.
* requests (either >= 2.0.0 for Python 3, or >= 1.0.0 for Python 2)
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string / required | | Circonus API key |
| **category** string / required | | Annotation Category |
| **description** string / required | | Description of annotation |
| **duration** integer | **Default:**0 | Duration in seconds of annotation |
| **start** integer | | Unix timestamp of event start If not specified, it defaults to *now*. |
| **stop** integer | | Unix timestamp of event end If not specified, it defaults to *now* + *duration*. |
| **title** string / required | | Title of annotation |
Notes
-----
Note
* Check mode isnβt supported.
Examples
--------
```
- name: Create a simple annotation event with a source, defaults to start and end time of now
community.general.circonus_annotation:
api_key: XXXXXXXXXXXXXXXXX
title: App Config Change
description: This is a detailed description of the config change
category: This category groups like annotations
- name: Create an annotation with a duration of 5 minutes and a default start time of now
community.general.circonus_annotation:
api_key: XXXXXXXXXXXXXXXXX
title: App Config Change
description: This is a detailed description of the config change
category: This category groups like annotations
duration: 300
- name: Create an annotation with a start_time and end_time
community.general.circonus_annotation:
api_key: XXXXXXXXXXXXXXXXX
title: App Config Change
description: This is a detailed description of the config change
category: This category groups like annotations
start_time: 1395940006
end_time: 1395954407
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **annotation** complex | success | details about the created annotation |
| | **\_cid** string | success | annotation identifier **Sample:** /annotation/100000 |
| | **\_created** integer | success | creation timestamp **Sample:** 1502236928 |
| | **\_last\_modified** integer | success | last modification timestamp **Sample:** 1502236928 |
| | **\_last\_modified\_by** string | success | last modified by **Sample:** /user/1000 |
| | **category** string | success | category of the created annotation **Sample:** alerts |
| | **description** string | success | description of the created annotation **Sample:** Host is down. |
| | **rel\_metrics** list / elements=string | success | Array of metrics related to this annotation, each metrics is a string. **Sample:** ['54321\_kbps'] |
| | **start** integer | success | timestamp, since annotation applies **Sample:** Host is down. |
| | **stop** string | success | timestamp, since annotation ends **Sample:** Host is down. |
| | **title** string | success | title of the created annotation **Sample:** WARNING |
### Authors
* Nick Harring (@NickatEpic)
ansible community.general.scaleway_sshkey β Scaleway SSH keys management module community.general.scaleway\_sshkey β Scaleway SSH keys management module
========================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.scaleway_sshkey`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module manages SSH keys on Scaleway account <https://developer.scaleway.com>
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds.
aliases: timeout |
| **api\_token** string / required | | Scaleway OAuth token.
aliases: oauth\_token |
| **api\_url** string | **Default:**"https://account.scaleway.com" | Scaleway API URL
aliases: base\_url |
| **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. |
| **ssh\_pub\_key** string / required | | The public SSH key as a string to add. |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the SSH key. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Scaleway API. |
Notes
-----
Note
* Also see the API documentation on <https://developer.scaleway.com/>
* If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`.
* If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable.
Examples
--------
```
- name: "Add SSH key"
community.general.scaleway_sshkey:
ssh_pub_key: "ssh-rsa AAAA..."
state: "present"
- name: "Delete SSH key"
community.general.scaleway_sshkey:
ssh_pub_key: "ssh-rsa AAAA..."
state: "absent"
- name: "Add SSH key with explicit token"
community.general.scaleway_sshkey:
ssh_pub_key: "ssh-rsa AAAA..."
state: "present"
oauth_token: "6ecd2c9b-6f4f-44d4-a187-61a92078d08c"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | when `state=present` | This is only present when `state=present`
**Sample:** {'ssh\_public\_keys': [{'key': 'ssh-rsa AAAA....'}]} |
### Authors
* Remy Leone (@sieben)
ansible community.general.riak β This module handles some common Riak operations community.general.riak β This module handles some common Riak operations
========================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.riak`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* This module can be used to join nodes to a cluster, check the status of the cluster.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **command** string | **Choices:*** ping
* kv\_test
* join
* plan
* commit
| The command you would like to perform against the cluster. |
| **config\_dir** path | **Default:**"/etc/riak" | The path to the riak configuration directory |
| **http\_conn** string | **Default:**"127.0.0.1:8098" | The ip address and port that is listening for Riak HTTP queries |
| **target\_node** string | **Default:**"[email protected]" | The target node for certain operations (join, ping) |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
| **wait\_for\_handoffs** integer | **Default:**0 | Number of seconds to wait for handoffs to complete. |
| **wait\_for\_ring** integer | **Default:**0 | Number of seconds to wait for all nodes to agree on the ring. |
| **wait\_for\_service** string | **Choices:*** kv
| Waits for a riak service to come online before continuing. |
Examples
--------
```
- name: "Join's a Riak node to another node"
community.general.riak:
command: join
target_node: [email protected]
- name: Wait for handoffs to finish. Use with async and poll.
community.general.riak:
wait_for_handoffs: yes
- name: Wait for riak_kv service to startup
community.general.riak:
wait_for_service: kv
```
### Authors
* James Martin (@jsmartin)
* Drew Kerrigan (@drewkerrigan)
ansible community.general.scaleway_volume β Scaleway volumes management module community.general.scaleway\_volume β Scaleway volumes management module
=======================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.scaleway_volume`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module manages volumes on Scaleway account <https://developer.scaleway.com>
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds.
aliases: timeout |
| **api\_token** string / required | | Scaleway OAuth token.
aliases: oauth\_token |
| **api\_url** string | **Default:**"https://api.scaleway.com" | Scaleway API URL.
aliases: base\_url |
| **name** string / required | | Name used to identify the volume. |
| **organization** string | | ScaleWay organization ID to which volume belongs. |
| **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. |
| **region** string / required | **Choices:*** ams1
* EMEA-NL-EVS
* par1
* EMEA-FR-PAR1
* par2
* EMEA-FR-PAR2
* waw1
* EMEA-PL-WAW1
| Scaleway region to use (for example par1). |
| **size** integer | | Size of the volume in bytes. |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the volume. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Scaleway API. |
| **volume\_type** string | | Type of the volume (for example 'l\_ssd'). |
Notes
-----
Note
* Also see the API documentation on <https://developer.scaleway.com/>
* If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`.
* If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable.
Examples
--------
```
- name: Create 10GB volume
community.general.scaleway_volume:
name: my-volume
state: present
region: par1
organization: "{{ scw_org }}"
"size": 10000000000
volume_type: l_ssd
register: server_creation_check_task
- name: Make sure volume deleted
community.general.scaleway_volume:
name: my-volume
state: absent
region: par1
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | when `state=present` | This is only present when `state=present`
**Sample:** {'volume': {'export\_uri': None, 'id': 'c675f420-cfeb-48ff-ba2a-9d2a4dbe3fcd', 'name': 'volume-0-3', 'organization': '000a115d-2852-4b0a-9ce8-47f1134ba95a', 'server': None, 'size': 10000000000, 'volume\_type': 'l\_ssd'}} |
### Authors
* Henryk Konsek (@hekonsek)
ansible community.general.keycloak_user_federation β Allows administration of Keycloak user federations via Keycloak API community.general.keycloak\_user\_federation β Allows administration of Keycloak user federations via Keycloak API
==================================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.keycloak_user_federation`.
New in version 3.7.0: of community.general
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module allows you to add, remove or modify Keycloak user federations via the Keycloak REST API. It requires access to the REST API via OpenID Connect; the user connecting and the client being used must have the requisite access rights. In a default Keycloak installation, admin-cli and an admin user would work, as would a separate client definition with the scope tailored to your needs and a user having the expected roles.
* The names of module options are snake\_cased versions of the camelCase ones found in the Keycloak API and its documentation at <https://www.keycloak.org/docs-api/15.0/rest-api/index.html>.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_client\_id** string | **Default:**"admin-cli" | OpenID Connect *client\_id* to authenticate to the API with. |
| **auth\_client\_secret** string | | Client Secret to use in conjunction with *auth\_client\_id* (if required). |
| **auth\_keycloak\_url** string / required | | URL to the Keycloak instance.
aliases: url |
| **auth\_password** string | | Password to authenticate for API access with.
aliases: password |
| **auth\_realm** string | | Keycloak realm name to authenticate to for API access. |
| **auth\_username** string | | Username to authenticate for API access with.
aliases: username |
| **config** dictionary | | Dict specifying the configuration options for the provider; the contents differ depending on the value of *provider\_id*. Examples are given below for `ldap` and `kerberos`. It is easiest to obtain valid config values by dumping an already-existing user federation configuration through check-mode in the *existing* field. |
| | **allowKerberosAuthentication** boolean | **Choices:*** **no** β
* yes
| Enable/disable HTTP authentication of users with SPNEGO/Kerberos tokens. The data about authenticated users will be provisioned from this LDAP server. |
| | **allowPasswordAuthentication** boolean | **Choices:*** no
* yes
| Enable/disable possibility of username/password authentication against Kerberos database. |
| | **authType** string | **Choices:*** **none** β
* simple
| Type of the Authentication method used during LDAP Bind operation. It is used in most of the requests sent to the LDAP server. |
| | **batchSizeForSync** integer | **Default:**1000 | Count of LDAP users to be imported from LDAP to Keycloak within a single transaction. |
| | **bindCredential** string | | Password of LDAP admin. |
| | **bindDn** string | | DN of LDAP user which will be used by Keycloak to access LDAP server. |
| | **cachePolicy** string | **Choices:*** **DEFAULT** β
* EVICT\_DAILY
* EVICT\_WEEKLY
* MAX\_LIFESPAN
* NO\_CACHE
| Cache Policy for this storage provider. |
| | **changedSyncPeriod** integer | **Default:**-1 | Period for synchronization of changed or newly created LDAP users in seconds. |
| | **connectionPooling** boolean | **Choices:*** no
* **yes** β
| Determines if Keycloak should use connection pooling for accessing LDAP server. |
| | **connectionPoolingAuthentication** string | **Choices:*** none
* simple
* DIGEST-MD5
| A list of space-separated authentication types of connections that may be pooled. |
| | **connectionPoolingDebug** string | | A string that indicates the level of debug output to produce. Example valid values are `fine` (trace connection creation and removal) and `all` (all debugging information). |
| | **connectionPoolingInitSize** integer | | The number of connections per connection identity to create when initially creating a connection for the identity. |
| | **connectionPoolingMaxSize** integer | | The maximum number of connections per connection identity that can be maintained concurrently. |
| | **connectionPoolingPrefSize** integer | | The preferred number of connections per connection identity that should be maintained concurrently. |
| | **connectionPoolingProtocol** string | | A list of space-separated protocol types of connections that may be pooled. Valid types are `plain` and `ssl`. |
| | **connectionPoolingTimeout** integer | | The number of milliseconds that an idle connection may remain in the pool without being closed and removed from the pool. |
| | **connectionTimeout** integer | | LDAP Connection Timeout in milliseconds. |
| | **connectionUrl** string | | Connection URL to your LDAP server. |
| | **customUserSearchFilter** string | | Additional LDAP Filter for filtering searched users. Leave this empty if you don't need additional filter. |
| | **debug** boolean | **Choices:*** no
* yes
| Enable/disable debug logging to standard output for Krb5LoginModule. |
| | **editMode** string | **Choices:*** READ\_ONLY
* WRITABLE
* UNSYNCED
|
`READ_ONLY` is a read-only LDAP store. `WRITABLE` means data will be synced back to LDAP on demand. `UNSYNCED` means user data will be imported, but not synced back to LDAP. |
| | **enabled** boolean | **Choices:*** no
* **yes** β
| Enable/disable this user federation. |
| | **evictionDay** string | | Day of the week the entry will become invalid on. |
| | **evictionHour** string | | Hour of day the entry will become invalid on. |
| | **evictionMinute** string | | Minute of day the entry will become invalid on. |
| | **fullSyncPeriod** integer | **Default:**-1 | Period for full synchronization in seconds. |
| | **importEnabled** boolean | **Choices:*** no
* **yes** β
| If `true`, LDAP users will be imported into Keycloak DB and synced by the configured sync policies. |
| | **kerberosRealm** string | | Name of kerberos realm. |
| | **keyTab** string | | Location of Kerberos KeyTab file containing the credentials of server principal. For example `/etc/krb5.keytab`. |
| | **maxLifespan** integer | | Max lifespan of cache entry in milliseconds. |
| | **pagination** boolean | **Choices:*** no
* **yes** β
| Does the LDAP server support pagination. |
| | **priority** integer | **Default:**0 | Priority of provider when doing a user lookup. Lowest first. |
| | **rdnLDAPAttribute** string | | Name of LDAP attribute, which is used as RDN (top attribute) of typical user DN. Usually it's the same as Username LDAP attribute, however it is not required. For example for Active directory, it is common to use `cn` as RDN attribute when username attribute might be `sAMAccountName`. |
| | **readTimeout** integer | | LDAP Read Timeout in milliseconds. This timeout applies for LDAP read operations. |
| | **searchScope** string | **Choices:*** **1** β
* 2
| For one level, the search applies only for users in the DNs specified by User DNs. For subtree, the search applies to the whole subtree. See LDAP documentation for more details |
| | **serverPrincipal** string | | Full name of server principal for HTTP service including server and domain name. For example `HTTP/[email protected]`. Use `*` to accept any service principal in the KeyTab file. |
| | **startTls** boolean | **Choices:*** **no** β
* yes
| Encrypts the connection to LDAP using STARTTLS, which will disable connection pooling. |
| | **syncRegistrations** boolean | **Choices:*** **no** β
* yes
| Should newly created users be created within LDAP store? Priority effects which provider is chosen to sync the new user. |
| | **trustEmail** boolean | **Choices:*** **no** β
* yes
| If enabled, email provided by this provider is not verified even if verification is enabled for the realm. |
| | **updateProfileFirstLogin** boolean | **Choices:*** no
* yes
| Update profile on first login. |
| | **useKerberosForPasswordAuthentication** boolean | **Choices:*** **no** β
* yes
| Use Kerberos login module for authenticate username/password against Kerberos server instead of authenticating against LDAP server with Directory Service API. |
| | **usePasswordModifyExtendedOp** boolean | **Choices:*** **no** β
* yes
| Use the LDAPv3 Password Modify Extended Operation (RFC-3062). The password modify extended operation usually requires that LDAP user already has password in the LDAP server. So when this is used with 'Sync Registrations', it can be good to add also 'Hardcoded LDAP attribute mapper' with randomly generated initial password. |
| | **usernameLDAPAttribute** string | | Name of LDAP attribute, which is mapped as Keycloak username. For many LDAP server vendors it can be `uid`. For Active directory it can be `sAMAccountName` or `cn`. The attribute should be filled for all LDAP user records you want to import from LDAP to Keycloak. |
| | **userObjectClasses** string | | All values of LDAP objectClass attribute for users in LDAP divided by comma. For example `inetOrgPerson, organizationalPerson`. Newly created Keycloak users will be written to LDAP with all those object classes and existing LDAP user records are found just if they contain all those object classes. |
| | **usersDn** string | | Full DN of LDAP tree where your users are. This DN is the parent of LDAP users. |
| | **useTruststoreSpi** string | **Choices:*** always
* **ldapsOnly** β
* never
| Specifies whether LDAP connection will use the truststore SPI with the truststore configured in standalone.xml/domain.xml. `Always` means that it will always use it. `Never` means that it will not use it. `Only for ldaps` means that it will use if your connection URL use ldaps. Note even if standalone.xml/domain.xml is not configured, the default Java cacerts or certificate specified by `javax.net.ssl.trustStore` property will be used. |
| | **uuidLDAPAttribute** string | | Name of LDAP attribute, which is used as unique object identifier (UUID) for objects in LDAP. For many LDAP server vendors, it is `entryUUID`; however some are different. For example for Active directory it should be `objectGUID`. If your LDAP server does not support the notion of UUID, you can use any other attribute that is supposed to be unique among LDAP users in tree. |
| | **validatePasswordPolicy** boolean | **Choices:*** **no** β
* yes
| Determines if Keycloak should validate the password with the realm password policy before updating it. |
| | **vendor** string | | LDAP vendor (provider). |
| **id** string | | The unique ID for this user federation. If left empty, the user federation will be searched by its *name*. |
| **mappers** list / elements=dictionary | | A list of dicts defining mappers associated with this Identity Provider. |
| | **config** dictionary | | Dict specifying the configuration options for the mapper; the contents differ depending on the value of *identityProviderMapper*. |
| | **id** string | | Unique ID of this mapper. |
| | **name** string | | Name of the mapper. If no ID is given, the mapper will be searched by name. |
| | **parentId** string | | Unique ID for the parent of this mapper. ID of the user federation will automatically be used if left blank. |
| | **providerId** string | | The mapper type for this mapper (for instance `user-attribute-ldap-mapper`). |
| | **providerType** string | | Component type for this mapper (only supported value is `org.keycloak.storage.ldap.mappers.LDAPStorageMapper`). |
| **name** string | | Display name of provider when linked in admin console. |
| **parent\_id** string | | Unique ID for the parent of this user federation. Realm ID will be automatically used if left blank.
aliases: parentId |
| **provider\_id** string | **Choices:*** ldap
* kerberos
| Provider for this user federation.
aliases: providerId |
| **provider\_type** string | **Default:**"org.keycloak.storage.UserStorageProvider" | Component type for user federation (only supported value is `org.keycloak.storage.UserStorageProvider`).
aliases: providerType |
| **realm** string | **Default:**"master" | The Keycloak realm under which this user federation resides. |
| **state** string | **Choices:*** **present** β
* absent
| State of the user federation. On `present`, the user federation will be created if it does not yet exist, or updated with the parameters you provide. On `absent`, the user federation will be removed if it exists. |
| **token** string added in 3.0.0 of community.general | | Authentication token for Keycloak API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Verify TLS certificates (do not disable this in production). |
Examples
--------
```
- name: Create LDAP user federation
community.general.keycloak_user_federation:
auth_keycloak_url: https://keycloak.example.com/auth
auth_realm: master
auth_username: admin
auth_password: password
realm: my-realm
name: my-ldap
state: present
provider_id: ldap
provider_type: org.keycloak.storage.UserStorageProvider
config:
priority: 0
enabled: true
cachePolicy: DEFAULT
batchSizeForSync: 1000
editMode: READ_ONLY
importEnabled: true
syncRegistrations: false
vendor: other
usernameLDAPAttribute: uid
rdnLDAPAttribute: uid
uuidLDAPAttribute: entryUUID
userObjectClasses: inetOrgPerson, organizationalPerson
connectionUrl: ldaps://ldap.example.com:636
usersDn: ou=Users,dc=example,dc=com
authType: simple
bindDn: cn=directory reader
bindCredential: password
searchScope: 1
validatePasswordPolicy: false
trustEmail: false
useTruststoreSpi: ldapsOnly
connectionPooling: true
pagination: true
allowKerberosAuthentication: false
debug: false
useKerberosForPasswordAuthentication: false
mappers:
- name: "full name"
providerId: "full-name-ldap-mapper"
providerType: "org.keycloak.storage.ldap.mappers.LDAPStorageMapper"
config:
ldap.full.name.attribute: cn
read.only: true
write.only: false
- name: Create Kerberos user federation
community.general.keycloak_user_federation:
auth_keycloak_url: https://keycloak.example.com/auth
auth_realm: master
auth_username: admin
auth_password: password
realm: my-realm
name: my-kerberos
state: present
provider_id: kerberos
provider_type: org.keycloak.storage.UserStorageProvider
config:
priority: 0
enabled: true
cachePolicy: DEFAULT
kerberosRealm: EXAMPLE.COM
serverPrincipal: HTTP/[email protected]
keyTab: keytab
allowPasswordAuthentication: false
updateProfileFirstLogin: false
- name: Delete user federation
community.general.keycloak_user_federation:
auth_keycloak_url: https://keycloak.example.com/auth
auth_realm: master
auth_username: admin
auth_password: password
realm: my-realm
name: my-federation
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **end\_state** dictionary | always | Representation of user federation after module execution. **Sample:** {'config': {'allowPasswordAuthentication': 'false', 'cachePolicy': 'DEFAULT', 'enabled': 'true', 'kerberosRealm': 'EXAMPLE.COM', 'keyTab': '/etc/krb5.keytab', 'priority': '0', 'serverPrincipal': 'HTTP/[email protected]', 'updateProfileFirstLogin': 'false'}, 'id': 'cf52ae4f-4471-4435-a0cf-bb620cadc122', 'mappers': [], 'name': 'kerberos', 'parentId': 'myrealm', 'providerId': 'kerberos', 'providerType': 'org.keycloak.storage.UserStorageProvider'} |
| **existing** dictionary | always | Representation of existing user federation. **Sample:** {'config': {'allowKerberosAuthentication': 'false', 'authType': 'simple', 'batchSizeForSync': '1000', 'bindCredential': '\*\*\*\*\*\*\*\*\*\*', 'bindDn': 'cn=directory reader', 'cachePolicy': 'DEFAULT', 'changedSyncPeriod': '-1', 'connectionPooling': 'true', 'connectionUrl': 'ldaps://ldap.example.com:636', 'debug': 'false', 'editMode': 'READ\_ONLY', 'enabled': 'true', 'fullSyncPeriod': '-1', 'importEnabled': 'true', 'pagination': 'true', 'priority': '0', 'rdnLDAPAttribute': 'uid', 'searchScope': '1', 'syncRegistrations': 'false', 'trustEmail': 'false', 'useKerberosForPasswordAuthentication': 'false', 'useTruststoreSpi': 'ldapsOnly', 'userObjectClasses': 'inetOrgPerson, organizationalPerson', 'usernameLDAPAttribute': 'uid', 'usersDn': 'ou=Users,dc=example,dc=com', 'uuidLDAPAttribute': 'entryUUID', 'validatePasswordPolicy': 'false', 'vendor': 'other'}, 'id': '01122837-9047-4ae4-8ca0-6e2e891a765f', 'mappers': [{'config': {'always.read.value.from.ldap': 'false', 'is.mandatory.in.ldap': 'false', 'ldap.attribute': 'mail', 'read.only': 'true', 'user.model.attribute': 'email'}, 'id': '17d60ce2-2d44-4c2c-8b1f-1fba601b9a9f', 'name': 'email', 'parentId': '01122837-9047-4ae4-8ca0-6e2e891a765f', 'providerId': 'user-attribute-ldap-mapper', 'providerType': 'org.keycloak.storage.ldap.mappers.LDAPStorageMapper'}], 'name': 'myfed', 'parentId': 'myrealm', 'providerId': 'ldap', 'providerType': 'org.keycloak.storage.UserStorageProvider'} |
| **msg** string | always | Message as to what action was taken. **Sample:** No changes required to user federation 164bb483-c613-482e-80fe-7f1431308799. |
| **proposed** dictionary | always | Representation of proposed changes to user federation. **Sample:** {'config': {'allowKerberosAuthentication': 'false', 'authType': 'simple', 'batchSizeForSync': '1000', 'bindCredential': '\*\*\*\*\*\*\*\*\*\*', 'bindDn': 'cn=directory reader', 'cachePolicy': 'DEFAULT', 'connectionPooling': 'true', 'connectionUrl': 'ldaps://ldap.example.com:636', 'debug': 'false', 'editMode': 'READ\_ONLY', 'enabled': 'true', 'importEnabled': 'true', 'pagination': 'true', 'priority': '0', 'rdnLDAPAttribute': 'uid', 'searchScope': '1', 'syncRegistrations': 'false', 'trustEmail': 'false', 'useKerberosForPasswordAuthentication': 'false', 'useTruststoreSpi': 'ldapsOnly', 'userObjectClasses': 'inetOrgPerson, organizationalPerson', 'usernameLDAPAttribute': 'uid', 'usersDn': 'ou=Users,dc=example,dc=com', 'uuidLDAPAttribute': 'entryUUID', 'validatePasswordPolicy': 'false', 'vendor': 'other'}, 'name': 'ldap', 'providerId': 'ldap', 'providerType': 'org.keycloak.storage.UserStorageProvider'} |
### Authors
* Laurent Paumier (@laurpaum)
| programming_docs |
ansible community.general.pushover β Send notifications via https://pushover.net community.general.pushover β Send notifications via https://pushover.net
========================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.pushover`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Send notifications via pushover, to subscriber list of devices, and email addresses. Requires pushover app on devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **app\_token** string / required | | Pushover issued token identifying your pushover app. |
| **device** string added in 1.2.0 of community.general | | A device the message should be sent to. Multiple devices can be specified, separated by a comma. |
| **msg** string / required | | What message you wish to send. |
| **pri** string | **Choices:*** -2
* -1
* **0** β
* 1
* 2
| Message priority (see <https://pushover.net> for details). |
| **title** string | | Message title. |
| **user\_key** string / required | | Pushover issued authentication key for your user. |
Notes
-----
Note
* You will require a pushover.net account to use this module. But no account is required to receive messages.
Examples
--------
```
- name: Send notifications via pushover.net
community.general.pushover:
msg: '{{ inventory_hostname }} is acting strange ...'
app_token: wxfdksl
user_key: baa5fe97f2c5ab3ca8f0bb59
delegate_to: localhost
- name: Send notifications via pushover.net
community.general.pushover:
title: 'Alert!'
msg: '{{ inventory_hostname }} has exploded in flames, It is now time to panic'
pri: 1
app_token: wxfdksl
user_key: baa5fe97f2c5ab3ca8f0bb59
delegate_to: localhost
- name: Send notifications via pushover.net to a specific device
community.general.pushover:
msg: '{{ inventory_hostname }} has been lost somewhere'
app_token: wxfdksl
user_key: baa5fe97f2c5ab3ca8f0bb59
device: admins-iPhone
delegate_to: localhost
```
### Authors
* Jim Richardson (@weaselkeeper)
* Bernd Arnold (@wopfel)
ansible community.general.slack β Sends play events to a Slack channel community.general.slack β Sends play events to a Slack channel
==============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.slack`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
Synopsis
--------
* This is an ansible callback plugin that sends status updates to a Slack channel during playbook execution.
* Before 2.4 only environment variables were available for configuring this plugin
Requirements
------------
The below requirements are needed on the local controller node that executes this callback.
* whitelist in configuration
* prettytable (python library)
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **channel** string | **Default:**"#ansible" | ini entries: [callback\_slack]channel = #ansible env:SLACK\_CHANNEL | Slack room to post in. |
| **username** string | **Default:**"ansible" | ini entries: [callback\_slack]username = ansible env:SLACK\_USERNAME | Username to post as. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| ini entries: [callback\_slack]validate\_certs = yes env:SLACK\_VALIDATE\_CERTS | validate the SSL certificate of the Slack server. (For HTTPS URLs) |
| **webhook\_url** string / required | | ini entries: [callback\_slack]webhook\_url = None env:SLACK\_WEBHOOK\_URL | Slack Webhook URL |
### Authors
* Unknown (!UNKNOWN)
ansible community.general.influxdb_write β Write data points into InfluxDB community.general.influxdb\_write β Write data points into InfluxDB
===================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.influxdb_write`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Write data points into InfluxDB.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* influxdb >= 0.9
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **data\_points** list / elements=dictionary / required | | Data points as dict to write into the database. |
| **database\_name** string / required | | Name of the database. |
| **hostname** string | **Default:**"localhost" | The hostname or IP address on which InfluxDB server is listening. Since Ansible 2.5, defaulted to localhost. |
| **password** string | **Default:**"root" | Password that will be used to authenticate against InfluxDB server. Alias `login_password` added in Ansible 2.5.
aliases: login\_password |
| **path** string added in 0.2.0 of community.general | | The path on which InfluxDB server is accessible Only available when using python-influxdb >= 5.1.0 |
| **port** integer | **Default:**8086 | The port on which InfluxDB server is listening |
| **proxies** dictionary | | HTTP(S) proxy to use for Requests to connect to InfluxDB server. |
| **retries** integer | **Default:**3 | Number of retries client will try before aborting.
`0` indicates try until success. Only available when using python-influxdb >= 4.1.0 |
| **ssl** boolean | **Choices:*** **no** β
* yes
| Use https instead of http to connect to InfluxDB server. |
| **timeout** integer | | Number of seconds Requests will wait for client to establish a connection. |
| **udp\_port** integer | **Default:**4444 | UDP port to connect to InfluxDB server. |
| **use\_udp** boolean | **Choices:*** **no** β
* yes
| Use UDP to connect to InfluxDB server. |
| **username** string | **Default:**"root" | Username that will be used to authenticate against InfluxDB server. Alias `login_username` added in Ansible 2.5.
aliases: login\_username |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Write points into database
community.general.influxdb_write:
hostname: "{{influxdb_ip_address}}"
database_name: "{{influxdb_database_name}}"
data_points:
- measurement: connections
tags:
host: server01
region: us-west
time: "{{ ansible_date_time.iso8601 }}"
fields:
value: 2000
- measurement: connections
tags:
host: server02
region: us-east
time: "{{ ansible_date_time.iso8601 }}"
fields:
value: 3000
```
### Authors
* RenΓ© Moser (@resmo)
ansible community.general.nmap β Uses nmap to find hosts to target community.general.nmap β Uses nmap to find hosts to target
==========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.nmap`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Uses a YAML configuration file with a valid YAML extension.
Requirements
------------
The below requirements are needed on the local controller node that executes this inventory.
* nmap CLI installed
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **address** string / required | | | Network IP or range of IPs to scan, you can use a simple range (10.2.2.15-25) or CIDR notation. |
| **cache** boolean | **Choices:*** **no** β
* yes
| ini entries: [inventory]cache = no env:ANSIBLE\_INVENTORY\_CACHE | Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work. |
| **cache\_connection** string | | ini entries: [defaults]fact\_caching\_connection = None [inventory]cache\_connection = None env:ANSIBLE\_CACHE\_PLUGIN\_CONNECTION env:ANSIBLE\_INVENTORY\_CACHE\_CONNECTION | Cache connection data or path, read cache plugin documentation for specifics. |
| **cache\_plugin** string | **Default:**"memory" | ini entries: [defaults]fact\_caching = memory [inventory]cache\_plugin = memory env:ANSIBLE\_CACHE\_PLUGIN env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN | Cache plugin to use for the inventory's source data. |
| **cache\_prefix** string | **Default:**"ansible\_inventory\_" | ini entries: [default]fact\_caching\_prefix = ansible\_inventory\_ [inventory]cache\_prefix = ansible\_inventory\_ env:ANSIBLE\_CACHE\_PLUGIN\_PREFIX env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN\_PREFIX | Prefix to use for cache plugin files/tables |
| **cache\_timeout** integer | **Default:**3600 | ini entries: [defaults]fact\_caching\_timeout = 3600 [inventory]cache\_timeout = 3600 env:ANSIBLE\_CACHE\_PLUGIN\_TIMEOUT env:ANSIBLE\_INVENTORY\_CACHE\_TIMEOUT | Cache duration in seconds |
| **compose** dictionary | **Default:**{} | | Create vars from jinja2 expressions. |
| **exclude** list / elements=string | | | list of addresses to exclude |
| **groups** dictionary | **Default:**{} | | Add hosts to group based on Jinja2 conditionals. |
| **ipv4** boolean | **Choices:*** no
* **yes** β
| | use IPv4 type addresses |
| **ipv6** boolean | **Choices:*** no
* **yes** β
| | use IPv6 type addresses |
| **keyed\_groups** list / elements=string | **Default:**[] | | Add hosts to group based on the values of a variable. |
| **leading\_separator** boolean added in 2.11 of ansible.builtin | **Choices:*** no
* **yes** β
| | Use in conjunction with keyed\_groups. By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is "" and the default separator is "\_". Set this option to False to omit the leading underscore (or other separator) if no prefix is given. If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. |
| **plugin** string / required | **Choices:*** nmap
* community.general.nmap
| | token that ensures this is a source file for the 'nmap' plugin. |
| **ports** boolean | **Choices:*** no
* **yes** β
| | Enable/disable scanning for open ports |
| **strict** boolean | **Choices:*** **no** β
* yes
| | If `yes` make invalid entries a fatal error, otherwise skip and continue. Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. |
| **use\_extra\_vars** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [inventory\_plugins]use\_extra\_vars = no env:ANSIBLE\_INVENTORY\_USE\_EXTRA\_VARS | Merge extra vars into the available variables for composition (highest precedence). |
Notes
-----
Note
* At least one of ipv4 or ipv6 is required to be True, both can be True, but they cannot both be False.
* TODO: add OS fingerprinting
Examples
--------
```
# inventory.config file in YAML format
plugin: community.general.nmap
strict: False
address: 192.168.0.0/24
```
### Authors
* Unknown (!UNKNOWN)
ansible community.general.mattermost β Send Mattermost notifications community.general.mattermost β Send Mattermost notifications
============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.mattermost`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Sends notifications to <http://your.mattermost.url> via the Incoming WebHook integration.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string / required | | Mattermost webhook api key. Log into your mattermost site, go to Menu -> Integration -> Incoming Webhook -> Add Incoming Webhook. This will give you full URL. api\_key is the last part. http://mattermost.example.com/hooks/`API_KEY`
|
| **channel** string | | Channel to send the message to. If absent, the message goes to the channel selected for the *api\_key*. |
| **icon\_url** string | **Default:**"https://www.ansible.com/favicon.ico" | Url for the message sender's icon. |
| **text** string / required | | Text to send. Note that the module does not handle escaping characters. |
| **url** string / required | | Mattermost url (i.e. http://mattermost.yourcompany.com). |
| **username** string | **Default:**"Ansible" | This is the sender of the message (Username Override need to be enabled by mattermost admin, see mattermost doc. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Send notification message via Mattermost
community.general.mattermost:
url: http://mattermost.example.com
api_key: my_api_key
text: '{{ inventory_hostname }} completed'
- name: Send notification message via Mattermost all options
community.general.mattermost:
url: http://mattermost.example.com
api_key: my_api_key
text: '{{ inventory_hostname }} completed'
channel: notifications
username: 'Ansible on {{ inventory_hostname }}'
icon_url: http://www.example.com/some-image-file.png
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **payload** string | success | Mattermost payload |
| **webhook\_url** string | success | URL the webhook is sent to |
### Authors
* Benjamin Jolivot (@bjolivot)
ansible community.general.sefcontext β Manages SELinux file context mapping definitions community.general.sefcontext β Manages SELinux file context mapping definitions
===============================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.sefcontext`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manages SELinux file context mapping definitions.
* Similar to the `semanage fcontext` command.
Requirements
------------
The below requirements are needed on the host that executes this module.
* libselinux-python
* policycoreutils-python
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **ftype** string | **Choices:*** **a** β
* b
* c
* d
* f
* l
* p
* s
| The file type that should have SELinux contexts applied. The following file type options are available:
`a` for all files,
`b` for block devices,
`c` for character devices,
`d` for directories,
`f` for regular files,
`l` for symbolic links,
`p` for named pipes,
`s` for socket files. |
| **ignore\_selinux\_state** boolean | **Choices:*** **no** β
* yes
| Useful for scenarios (chrooted environment) that you can't get the real SELinux state. |
| **reload** boolean | **Choices:*** no
* **yes** β
| Reload SELinux policy after commit. Note that this does not apply SELinux file contexts to existing files. |
| **selevel** string | | SELinux range for the specified target.
aliases: serange |
| **setype** string / required | | SELinux type for the specified target. |
| **seuser** string | | SELinux user for the specified target. |
| **state** string | **Choices:*** absent
* **present** β
| Whether the SELinux file context must be `absent` or `present`. |
| **target** string / required | | Target path (expression).
aliases: path |
Notes
-----
Note
* The changes are persistent across reboots.
* The [community.general.sefcontext](#ansible-collections-community-general-sefcontext-module) module does not modify existing files to the new SELinux context(s), so it is advisable to first create the SELinux file contexts before creating files, or run `restorecon` manually for the existing files that require the new SELinux file contexts.
* Not applying SELinux fcontexts to existing files is a deliberate decision as it would be unclear what reported changes would entail to, and thereβs no guarantee that applying SELinux fcontext does not pick up other unrelated prior changes.
Examples
--------
```
- name: Allow apache to modify files in /srv/git_repos
community.general.sefcontext:
target: '/srv/git_repos(/.*)?'
setype: httpd_git_rw_content_t
state: present
- name: Apply new SELinux file context to filesystem
ansible.builtin.command: restorecon -irv /srv/git_repos
```
### Authors
* Dag Wieers (@dagwieers)
ansible community.general.nios_mx_record β Configure Infoblox NIOS MX records community.general.nios\_mx\_record β Configure Infoblox NIOS MX records
=======================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.nios_mx_record`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Status](#status)
DEPRECATED
----------
Removed in
version 5.0.0
Why
Please install the infoblox.nios\_modules collection and use the corresponding module from it.
Alternative
infoblox.nios\_modules.nios\_mx\_record
Synopsis
--------
* Adds and/or removes instances of MX record objects from Infoblox NIOS servers. This module manages NIOS `record:mx` objects using the Infoblox WAPI interface over REST.
Requirements
------------
The below requirements are needed on the host that executes this module.
* infoblox-client
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **comment** string | | Configures a text string comment to be associated with the instance of this object. The provided text string will be configured on the object instance. |
| **extattrs** dictionary | | Allows for the configuration of Extensible Attributes on the instance of the object. This argument accepts a set of key / value pairs for configuration. |
| **mail\_exchanger** string | | Configures the mail exchanger FQDN for this MX record.
aliases: mx |
| **name** string / required | | Specifies the fully qualified hostname to add or remove from the system |
| **preference** integer | | Configures the preference (0-65535) for this MX record. |
| **provider** dictionary | | A dict object containing connection details. |
| | **host** string | | Specifies the DNS host name or address for connecting to the remote instance of NIOS WAPI over REST Value can also be specified using `INFOBLOX_HOST` environment variable. |
| | **http\_pool\_connections** integer | **Default:**10 | Number of pools to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. |
| | **http\_pool\_maxsize** integer | **Default:**10 | Maximum number of connections per pool to be used by the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. |
| | **http\_request\_timeout** integer | **Default:**10 | The amount of time before to wait before receiving a response Value can also be specified using `INFOBLOX_HTTP_REQUEST_TIMEOUT` environment variable. |
| | **max\_results** integer | **Default:**1000 | Specifies the maximum number of objects to be returned, if set to a negative number the appliance will return an error when the number of returned objects would exceed the setting. Value can also be specified using `INFOBLOX_MAX_RESULTS` environment variable. |
| | **max\_retries** integer | **Default:**3 | Configures the number of attempted retries before the connection is declared usable Value can also be specified using `INFOBLOX_MAX_RETRIES` environment variable. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_PASSWORD` environment variable. |
| | **silent\_ssl\_warnings** boolean | **Choices:*** no
* **yes** β
| Disable `urllib3` SSL warnings in the `infoblox_client.Connector` object. This is passed as-is to the underlying `requests.adapters.HTTPAdapter` class. |
| | **username** string | | Configures the username to use to authenticate the connection to the remote instance of NIOS. Value can also be specified using `INFOBLOX_USERNAME` environment variable. |
| | **validate\_certs** boolean | **Choices:*** **no** β
* yes
| Boolean value to enable or disable verifying SSL certificates Value can also be specified using `INFOBLOX_SSL_VERIFY` environment variable.
aliases: ssl\_verify |
| | **wapi\_version** string | **Default:**"2.1" | Specifies the version of WAPI to use Value can also be specified using `INFOBLOX_WAP_VERSION` environment variable. Until ansible 2.8 the default WAPI was 1.4 |
| **state** string | **Choices:*** **present** β
* absent
| Configures the intended state of the instance of the object on the NIOS server. When this value is set to `present`, the object is configured on the device and when this value is set to `absent` the value is removed (if necessary) from the device. |
| **ttl** integer | | Configures the TTL to be associated with this host record |
| **view** string | **Default:**"default" | Sets the DNS view to associate this a record with. The DNS view must already be configured on the system
aliases: dns\_view |
Notes
-----
Note
* This module must be run locally, which can be achieved by specifying `connection: local`.
* Please read the [Infoblox Guide](../../../scenario_guides/guide_infoblox#nios-guide) for more detailed information on how to use Infoblox with Ansible.
Examples
--------
```
- name: Configure an MX record
community.general.nios_mx_record:
name: ansible.com
mx: mailhost.ansible.com
preference: 0
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Add a comment to an existing MX record
community.general.nios_mx_record:
name: ansible.com
mx: mailhost.ansible.com
preference: 0
comment: this is a test comment
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Remove an MX record from the system
community.general.nios_mx_record:
name: ansible.com
mx: mailhost.ansible.com
preference: 0
state: absent
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
```
Status
------
* This module will be removed in version 5.0.0. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Blair Rampling (@brampling)
| programming_docs |
ansible community.general.rax_files β Manipulate Rackspace Cloud Files Containers community.general.rax\_files β Manipulate Rackspace Cloud Files Containers
==========================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.rax_files`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manipulate Rackspace Cloud Files Containers
Requirements
------------
The below requirements are needed on the host that executes this module.
* pyrax
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string | | Rackspace API key, overrides *credentials*.
aliases: password |
| **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/>
|
| **clear\_meta** boolean | **Choices:*** **no** β
* yes
| Optionally clear existing metadata when applying metadata to existing containers. Selecting this option is only appropriate when setting type=meta |
| **container** string | | The container to use for container or metadata operations. |
| **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided.
aliases: creds\_file |
| **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. |
| **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. |
| **meta** dictionary | | A hash of items to set as metadata values on a container |
| **private** boolean | **Choices:*** **no** β
* yes
| Used to set a container as private, removing it from the CDN. **Warning!** Private containers, if previously made public, can have live objects available until the TTL on cached objects expires |
| **public** boolean | **Choices:*** **no** β
* yes
| Used to set a container as public, available via the Cloud Files CDN |
| **region** string | | Region to create an instance in |
| **state** string | **Choices:*** **present** β
* absent
* list
| Indicate desired state of the resource |
| **tenant\_id** string | | The tenant ID used for authentication. |
| **tenant\_name** string | | The tenant name used for authentication. |
| **ttl** integer | | In seconds, set a container-wide TTL for all objects cached on CDN edge nodes. Setting a TTL is only appropriate for containers that are public |
| **type** string | **Choices:*** **container** β
* meta
| Type of object to do work on, i.e. metadata object or a container object |
| **username** string | | Rackspace username, overrides *credentials*. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether or not to require SSL validation of API endpoints.
aliases: verify\_ssl |
| **web\_error** string | | Sets an object to be presented as the HTTP error page when accessed by the CDN URL |
| **web\_index** string | | Sets an object to be presented as the HTTP index page when accessed by the CDN URL |
Notes
-----
Note
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
Examples
--------
```
- name: "Test Cloud Files Containers"
hosts: local
gather_facts: no
tasks:
- name: "List all containers"
community.general.rax_files:
state: list
- name: "Create container called 'mycontainer'"
community.general.rax_files:
container: mycontainer
- name: "Create container 'mycontainer2' with metadata"
community.general.rax_files:
container: mycontainer2
meta:
key: value
file_for: [email protected]
- name: "Set a container's web index page"
community.general.rax_files:
container: mycontainer
web_index: index.html
- name: "Set a container's web error page"
community.general.rax_files:
container: mycontainer
web_error: error.html
- name: "Make container public"
community.general.rax_files:
container: mycontainer
public: yes
- name: "Make container public with a 24 hour TTL"
community.general.rax_files:
container: mycontainer
public: yes
ttl: 86400
- name: "Make container private"
community.general.rax_files:
container: mycontainer
private: yes
- name: "Test Cloud Files Containers Metadata Storage"
hosts: local
gather_facts: no
tasks:
- name: "Get mycontainer2 metadata"
community.general.rax_files:
container: mycontainer2
type: meta
- name: "Set mycontainer2 metadata"
community.general.rax_files:
container: mycontainer2
type: meta
meta:
uploaded_by: [email protected]
- name: "Remove mycontainer2 metadata"
community.general.rax_files:
container: "mycontainer2"
type: meta
state: absent
meta:
key: ""
file_for: ""
```
### Authors
* Paul Durivage (@angstwad)
ansible community.general.pkgutil β OpenCSW package management on Solaris community.general.pkgutil β OpenCSW package management on Solaris
=================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.pkgutil`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module installs, updates and removes packages from the OpenCSW project for Solaris.
* Unlike the [community.general.svr4pkg](svr4pkg_module#ansible-collections-community-general-svr4pkg-module) module, it will resolve and download dependencies.
* See <https://www.opencsw.org/> for more information about the project.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **force** boolean added in 1.2.0 of community.general | **Choices:*** **no** β
* yes
| To allow the update process to downgrade packages to match what is present in the repository, set this to `yes`. This is useful for rolling back to stable from testing, or similar operations. |
| **name** list / elements=string / required | | The name of the package. When using `state=latest`, this can be `'*'`, which updates all installed packages managed by pkgutil.
aliases: pkg |
| **site** string | | The repository path to install the package from. Its global definition is in `/etc/opt/csw/pkgutil.conf`. |
| **state** string / required | **Choices:*** absent
* installed
* latest
* present
* removed
| Whether to install (`present`/`installed`), or remove (`absent`/`removed`) packages. The upgrade (`latest`) operation will update/install the packages to the latest version available. |
| **update\_catalog** boolean | **Choices:*** **no** β
* yes
| If you always want to refresh your catalog from the mirror, even when it's not stale, set this to `yes`. |
Notes
-----
Note
* In order to check the availability of packages, the catalog cache under `/var/opt/csw/pkgutil` may be refreshed even in check mode.
Examples
--------
```
- name: Install a package
community.general.pkgutil:
name: CSWcommon
state: present
- name: Install a package from a specific repository
community.general.pkgutil:
name: CSWnrpe
site: ftp://myinternal.repo/opencsw/kiel
state: latest
- name: Remove a package
community.general.pkgutil:
name: CSWtop
state: absent
- name: Install several packages
community.general.pkgutil:
name:
- CSWsudo
- CSWtop
state: present
- name: Update all packages
community.general.pkgutil:
name: '*'
state: latest
- name: Update all packages and force versions to match latest in catalog
community.general.pkgutil:
name: '*'
state: latest
force: yes
```
### Authors
* Alexander Winkler (@dermute)
* David Ponessa (@scathatheworm)
ansible community.general.proxmox β Proxmox inventory source community.general.proxmox β Proxmox inventory source
====================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.proxmox`.
New in version 1.2.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get inventory hosts from a Proxmox PVE cluster.
* Uses a configuration file as an inventory source, it must end in `.proxmox.yml` or `.proxmox.yaml`
* Will retrieve the first network interface with an IP for Proxmox nodes.
* Can retrieve LXC/QEMU configuration as facts.
Requirements
------------
The below requirements are needed on the local controller node that executes this inventory.
* requests >= 1.1
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **cache** boolean | **Choices:*** **no** β
* yes
| ini entries: [inventory]cache = no env:ANSIBLE\_INVENTORY\_CACHE | Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work. |
| **cache\_connection** string | | ini entries: [defaults]fact\_caching\_connection = None [inventory]cache\_connection = None env:ANSIBLE\_CACHE\_PLUGIN\_CONNECTION env:ANSIBLE\_INVENTORY\_CACHE\_CONNECTION | Cache connection data or path, read cache plugin documentation for specifics. |
| **cache\_plugin** string | **Default:**"memory" | ini entries: [defaults]fact\_caching = memory [inventory]cache\_plugin = memory env:ANSIBLE\_CACHE\_PLUGIN env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN | Cache plugin to use for the inventory's source data. |
| **cache\_prefix** string | **Default:**"ansible\_inventory\_" | ini entries: [default]fact\_caching\_prefix = ansible\_inventory\_ [inventory]cache\_prefix = ansible\_inventory\_ env:ANSIBLE\_CACHE\_PLUGIN\_PREFIX env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN\_PREFIX | Prefix to use for cache plugin files/tables |
| **cache\_timeout** integer | **Default:**3600 | ini entries: [defaults]fact\_caching\_timeout = 3600 [inventory]cache\_timeout = 3600 env:ANSIBLE\_CACHE\_PLUGIN\_TIMEOUT env:ANSIBLE\_INVENTORY\_CACHE\_TIMEOUT | Cache duration in seconds |
| **compose** dictionary added in 2.5.0 of community.general | **Default:**{} | | Create vars from jinja2 expressions. |
| **facts\_prefix** string | **Default:**"proxmox\_" | | Prefix to apply to LXC/QEMU config facts. |
| **group\_prefix** string | **Default:**"proxmox\_" | | Prefix to apply to Proxmox groups. |
| **groups** dictionary added in 2.5.0 of community.general | **Default:**{} | | Add hosts to group based on Jinja2 conditionals. |
| **keyed\_groups** list / elements=string added in 2.5.0 of community.general | **Default:**[] | | Add hosts to group based on the values of a variable. |
| **leading\_separator** boolean added in 2.11 of ansible.builtin | **Choices:*** no
* **yes** β
| | Use in conjunction with keyed\_groups. By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is "" and the default separator is "\_". Set this option to False to omit the leading underscore (or other separator) if no prefix is given. If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. |
| **password** string / required | | env:PROXMOX\_PASSWORD added in 2.0.0 of community.general | Proxmox authentication password. If the value is not specified in the inventory configuration, the value of environment variable `PROXMOX_PASSWORD` will be used instead. |
| **plugin** string / required | **Choices:*** community.general.proxmox
| | The name of this plugin, it should always be set to `community.general.proxmox` for this plugin to recognize it as it's own. |
| **strict** boolean added in 2.5.0 of community.general | **Choices:*** **no** β
* yes
| | If `yes` make invalid entries a fatal error, otherwise skip and continue. Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. |
| **url** string | **Default:**"http://localhost:8006" | env:PROXMOX\_URL added in 2.0.0 of community.general | URL to Proxmox cluster. If the value is not specified in the inventory configuration, the value of environment variable `PROXMOX_URL` will be used instead. |
| **use\_extra\_vars** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [inventory\_plugins]use\_extra\_vars = no env:ANSIBLE\_INVENTORY\_USE\_EXTRA\_VARS | Merge extra vars into the available variables for composition (highest precedence). |
| **user** string / required | | env:PROXMOX\_USER added in 2.0.0 of community.general | Proxmox authentication user. If the value is not specified in the inventory configuration, the value of environment variable `PROXMOX_USER` will be used instead. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| | Verify SSL certificate if using HTTPS. |
| **want\_facts** boolean | **Choices:*** **no** β
* yes
| | Gather LXC/QEMU configuration facts. |
| **want\_proxmox\_nodes\_ansible\_host** boolean added in 3.0.0 of community.general | **Choices:*** no
* **yes** β
| | Whether to set `ansbile_host` for proxmox nodes. When set to `true` (default), will use the first available interface. This can be different from what you expect. |
Examples
--------
```
# Minimal example which will not gather additional facts for QEMU/LXC guests
# By not specifying a URL the plugin will attempt to connect to the controller host on port 8006
# my.proxmox.yml
plugin: community.general.proxmox
user: ansible@pve
password: secure
# More complete example demonstrating the use of 'want_facts' and the constructed options
# Note that using facts returned by 'want_facts' in constructed options requires 'want_facts=true'
# my.proxmox.yml
plugin: community.general.proxmox
url: http://pve.domain.com:8006
user: ansible@pve
password: secure
validate_certs: false
want_facts: true
keyed_groups:
# proxmox_tags_parsed is an example of a fact only returned when 'want_facts=true'
- key: proxmox_tags_parsed
separator: ""
prefix: group
groups:
webservers: "'web' in (proxmox_tags_parsed|list)"
mailservers: "'mail' in (proxmox_tags_parsed|list)"
compose:
ansible_port: 2222
```
### Authors
* Jeffrey van Pelt (@Thulium-Drake) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#7a101f1c1c5c59494d415c594f48415c594e42410c1b140a1f160e5c594e4c4115141f)>
ansible community.general.one_host β Manages OpenNebula Hosts community.general.one\_host β Manages OpenNebula Hosts
======================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.one_host`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Manages OpenNebula Hosts
Requirements
------------
The below requirements are needed on the host that executes this module.
* pyone
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_password** string | | The password or token for XMLRPC authentication. If not specified then the value of the ONE\_PASSWORD environment variable, if any, is used.
aliases: api\_token |
| **api\_url** string | | The ENDPOINT URL of the XMLRPC server. If not specified then the value of the ONE\_URL environment variable, if any, is used.
aliases: api\_endpoint |
| **api\_username** string | | The name of the user for XMLRPC authentication. If not specified then the value of the ONE\_USERNAME environment variable, if any, is used. |
| **cluster\_id** integer | **Default:**0 | The cluster ID. |
| **cluster\_name** string | | The cluster specified by name. |
| **im\_mad\_name** string | **Default:**"kvm" | The name of the information manager, this values are taken from the oned.conf with the tag name IM\_MAD (name) |
| **labels** list / elements=string | | The labels for this host. |
| **name** string / required | | Hostname of the machine to manage. |
| **state** string | **Choices:*** absent
* **present** β
* enabled
* disabled
* offline
| Takes the host to the desired lifecycle state. If `absent` the host will be deleted from the cluster. If `present` the host will be created in the cluster (includes `enabled`, `disabled` and `offline` states). If `enabled` the host is fully operational.
`disabled`, e.g. to perform maintenance operations.
`offline`, host is totally offline. |
| **template** dictionary | | The template or attribute changes to merge into the host template.
aliases: attributes |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Whether to validate the SSL certificates or not. This parameter is ignored if PYTHONHTTPSVERIFY environment variable is used. |
| **vmm\_mad\_name** string | **Default:**"kvm" | The name of the virtual machine manager mad name, this values are taken from the oned.conf with the tag name VM\_MAD (name) |
| **wait\_timeout** integer | **Default:**300 | Time to wait for the desired state to be reached before timeout, in seconds. |
Examples
--------
```
- name: Create a new host in OpenNebula
community.general.one_host:
name: host1
cluster_id: 1
api_url: http://127.0.0.1:2633/RPC2
- name: Create a host and adjust its template
community.general.one_host:
name: host2
cluster_name: default
template:
LABELS:
- gold
- ssd
RESERVED_CPU: -100
```
### Authors
* Rafael del Valle (@rvalle)
| programming_docs |
ansible community.general.zpool_facts β Gather facts about ZFS pools. community.general.zpool\_facts β Gather facts about ZFS pools.
==============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.zpool_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Returned Facts](#returned-facts)
* [Return Values](#return-values)
Synopsis
--------
* Gather facts from ZFS pool properties.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name** string | | ZFS pool name.
aliases: pool, zpool |
| **parsable** boolean | **Choices:*** **no** β
* yes
| Specifies if property values should be displayed in machine friendly format. |
| **properties** string | **Default:**"all" | Specifies which dataset properties should be queried in comma-separated format. For more information about dataset properties, check zpool(1M) man page. |
Examples
--------
```
- name: Gather facts about ZFS pool rpool
community.general.zpool_facts: pool=rpool
- name: Gather space usage about all imported ZFS pools
community.general.zpool_facts: properties='free,size'
- name: Print gathered information
ansible.builtin.debug:
msg: 'ZFS pool {{ item.name }} has {{ item.free }} free space out of {{ item.size }}.'
with_items: '{{ ansible_zfs_pools }}'
```
Returned Facts
--------------
Facts returned by this module are added/updated in the `hostvars` host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.
| Fact | Returned | Description |
| --- | --- | --- |
| **ansible\_zfs\_pools** string / elements=string | always | ZFS pool facts **Sample:** {'allocated': '3.46G', 'altroot': '-', 'autoexpand': 'off', 'autoreplace': 'off', 'bootfs': 'rpool/ROOT/openindiana', 'cachefile': '-', 'capacity': '6%', 'comment': '-', 'dedupditto': '0', 'dedupratio': '1.00x', 'delegation': 'on', 'expandsize': '-', 'failmode': 'wait', 'feature@async\_destroy': 'enabled', 'feature@bookmarks': 'enabled', 'feature@edonr': 'enabled', 'feature@embedded\_data': 'active', 'feature@empty\_bpobj': 'active', 'feature@enabled\_txg': 'active', 'feature@extensible\_dataset': 'enabled', 'feature@filesystem\_limits': 'enabled', 'feature@hole\_birth': 'active', 'feature@large\_blocks': 'enabled', 'feature@lz4\_compress': 'active', 'feature@multi\_vdev\_crash\_dump': 'enabled', 'feature@sha512': 'enabled', 'feature@skein': 'enabled', 'feature@spacemap\_histogram': 'active', 'fragmentation': '3%', 'free': '46.3G', 'freeing': '0', 'guid': '15729052870819522408', 'health': 'ONLINE', 'leaked': '0', 'listsnapshots': 'off', 'name': 'rpool', 'readonly': 'off', 'size': '49.8G', 'version': '-'} |
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **name** string | always | ZFS pool name **Sample:** rpool |
| **parsable** boolean | if 'parsable' is set to True | if parsable output should be provided in machine friendly format. **Sample:** True |
### Authors
* Adam Ε tevko (@xen0l)
ansible community.general.unixy β condensed Ansible output community.general.unixy β condensed Ansible output
==================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.unixy`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
Synopsis
--------
* Consolidated Ansible output in the style of LINUX/UNIX startup logs.
Requirements
------------
The below requirements are needed on the local controller node that executes this callback.
* set as stdout in configuration
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **check\_mode\_markers** boolean added in 2.9 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [defaults]check\_mode\_markers = no env:ANSIBLE\_CHECK\_MODE\_MARKERS | Toggle to control displaying markers when running in check mode. The markers are `DRY RUN` at the beggining and ending of playbook execution (when calling `ansible-playbook --check`) and `CHECK MODE` as a suffix at every play and task that is run in check mode. |
| **display\_failed\_stderr** boolean added in 2.7 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [defaults]display\_failed\_stderr = no env:ANSIBLE\_DISPLAY\_FAILED\_STDERR | Toggle to control whether failed and unreachable tasks are displayed to STDERR (vs. STDOUT) |
| **display\_ok\_hosts** boolean added in 2.7 of ansible.builtin | **Choices:*** no
* **yes** β
| ini entries: [defaults]display\_ok\_hosts = yes env:ANSIBLE\_DISPLAY\_OK\_HOSTS | Toggle to control displaying 'ok' task/host results in a task |
| **display\_skipped\_hosts** boolean | **Choices:*** no
* **yes** β
| ini entries: [defaults]display\_skipped\_hosts = yes env:DISPLAY\_SKIPPED\_HOSTS Removed in: version 2.12 of ansible.builtin Why: environment variables without "ANSIBLE\_" prefix are deprecated Alternative: the "ANSIBLE\_DISPLAY\_SKIPPED\_HOSTS" environment variable env:ANSIBLE\_DISPLAY\_SKIPPED\_HOSTS | Toggle to control displaying skipped task/host results in a task |
| **show\_custom\_stats** boolean | **Choices:*** **no** β
* yes
| ini entries: [defaults]show\_custom\_stats = no env:ANSIBLE\_SHOW\_CUSTOM\_STATS | This adds the custom stats set via the set\_stats plugin to the play recap |
| **show\_per\_host\_start** boolean added in 2.9 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [defaults]show\_per\_host\_start = no env:ANSIBLE\_SHOW\_PER\_HOST\_START | This adds output that shows when a task is started to execute for each host |
| **show\_task\_path\_on\_failure** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [defaults]show\_task\_path\_on\_failure = no env:ANSIBLE\_SHOW\_TASK\_PATH\_ON\_FAILURE | When a task fails, display the path to the file containing the failed task and the line number. This information is displayed automatically for every task when running with `-vv` or greater verbosity. |
### Authors
* Allyson Bowles (@akatch)
ansible community.general.syslogger β Log messages in the syslog community.general.syslogger β Log messages in the syslog
========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.syslogger`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Uses syslog to add log entries to the host.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **facility** string | **Choices:*** kern
* user
* mail
* **daemon** β
* auth
* lpr
* news
* uucp
* cron
* syslog
* local0
* local1
* local2
* local3
* local4
* local5
* local6
* local7
| Set the log facility. |
| **ident** string added in 0.2.0 of community.general | **Default:**"ansible\_syslogger" | Specify the name of application name which is sending the log to syslog. |
| **log\_pid** boolean | **Choices:*** **no** β
* yes
| Log the PID in brackets. |
| **msg** string / required | | This is the message to place in syslog. |
| **priority** string | **Choices:*** emerg
* alert
* crit
* err
* warning
* notice
* **info** β
* debug
| Set the log priority. |
Examples
--------
```
- name: Simple Usage
community.general.syslogger:
msg: "I will end up as daemon.info"
- name: Send a log message with err priority and user facility with log_pid
community.general.syslogger:
msg: "Hello from Ansible"
priority: "err"
facility: "user"
log_pid: true
- name: Specify the name of application which is sending log message
community.general.syslogger:
ident: "MyApp"
msg: "I want to believe"
priority: "alert"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **facility** string | always | Syslog facility **Sample:** info |
| **ident** string added in 0.2.0 of community.general | always | Name of application sending the message to log **Sample:** ansible\_syslogger |
| **log\_pid** boolean | always | Log PID status **Sample:** True |
| **msg** string | always | Message sent to syslog **Sample:** Hello from Ansible |
| **priority** string | always | Priority level **Sample:** daemon |
### Authors
* Tim Rightnour (@garbled1)
ansible community.general.jabber β Send a message to jabber user or chat room community.general.jabber β Send a message to jabber user or chat room
=====================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.jabber`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Send a message to jabber
Requirements
------------
The below requirements are needed on the host that executes this module.
* python xmpp (xmpppy)
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **encoding** string | | message encoding |
| **host** string | | host to connect, overrides user info |
| **msg** string / required | | The message body. |
| **password** string / required | | password for user to connect |
| **port** integer | **Default:**5222 | port to connect to, overrides default |
| **to** string / required | | user ID or name of the room, when using room use a slash to indicate your nick. |
| **user** string / required | | User as which to connect |
Examples
--------
```
- name: Send a message to a user
community.general.jabber:
user: [email protected]
password: secret
to: [email protected]
msg: Ansible task finished
- name: Send a message to a room
community.general.jabber:
user: [email protected]
password: secret
to: [email protected]/ansiblebot
msg: Ansible task finished
- name: Send a message, specifying the host and port
community.general.jabber:
user: [email protected]
host: talk.example.net
port: 5223
password: secret
to: [email protected]
msg: Ansible task finished
```
### Authors
* Brian Coca (@bcoca)
ansible community.general.scaleway_snapshot_info β Gather information about the Scaleway snapshots available. community.general.scaleway\_snapshot\_info β Gather information about the Scaleway snapshots available.
=======================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.scaleway_snapshot_info`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather information about the Scaleway snapshot available.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds.
aliases: timeout |
| **api\_token** string / required | | Scaleway OAuth token.
aliases: oauth\_token |
| **api\_url** string | **Default:**"https://api.scaleway.com" | Scaleway API URL.
aliases: base\_url |
| **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. |
| **region** string / required | **Choices:*** ams1
* EMEA-NL-EVS
* par1
* EMEA-FR-PAR1
* par2
* EMEA-FR-PAR2
* waw1
* EMEA-PL-WAW1
| Scaleway region to use (for example `par1`). |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Scaleway API. |
Notes
-----
Note
* Also see the API documentation on <https://developer.scaleway.com/>
* If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`.
* If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable.
Examples
--------
```
- name: Gather Scaleway snapshots information
community.general.scaleway_snapshot_info:
region: par1
register: result
- ansible.builtin.debug:
msg: "{{ result.scaleway_snapshot_info }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **scaleway\_snapshot\_info** list / elements=dictionary | success | Response from Scaleway API. For more details please refer to: <https://developers.scaleway.com/en/products/instance/api/>. **Sample:** {'scaleway\_snapshot\_info': [{'base\_volume': {'id': '68386fae-4f55-4fbf-aabb-953036a85872', 'name': 'snapshot-87fc282d-f252-4262-adad-86979d9074cf-2018-04-26\_12:42'}, 'creation\_date': '2018-08-14T22:34:35.299461+00:00', 'id': 'b61b4b03-a2e9-4da5-b5ea-e462ac0662d2', 'modification\_date': '2018-08-14T22:34:54.520560+00:00', 'name': 'snapshot-87fc282d-f252-4262-adad-86979d9074cf-2018-04-26\_12:42 snapshot', 'organization': '3f709602-5e6c-4619-b80c-e841c89734af', 'size': 25000000000, 'state': 'available', 'volume\_type': 'l\_ssd'}]} |
### Authors
* Yanis Guenane (@Spredzy)
* Remy Leone (@sieben)
ansible community.general.rax_keypair β Create a keypair for use with Rackspace Cloud Servers community.general.rax\_keypair β Create a keypair for use with Rackspace Cloud Servers
======================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.rax_keypair`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create a keypair for use with Rackspace Cloud Servers
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* pyrax
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string | | Rackspace API key, overrides *credentials*.
aliases: password |
| **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/>
|
| **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided.
aliases: creds\_file |
| **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. |
| **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. |
| **name** string / required | | Name of keypair |
| **public\_key** string | | Public Key string to upload. Can be a file path or string |
| **region** string | | Region to create an instance in. |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the resource |
| **tenant\_id** string | | The tenant ID used for authentication. |
| **tenant\_name** string | | The tenant name used for authentication. |
| **username** string | | Rackspace username, overrides *credentials*. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether or not to require SSL validation of API endpoints.
aliases: verify\_ssl |
Notes
-----
Note
* Keypairs cannot be manipulated, only created and deleted. To βupdateβ a keypair you must first delete and then recreate.
* The ability to specify a file path for the public key was added in 1.7
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
Examples
--------
```
- name: Create a keypair
hosts: localhost
gather_facts: False
tasks:
- name: Keypair request
local_action:
module: rax_keypair
credentials: ~/.raxpub
name: my_keypair
region: DFW
register: keypair
- name: Create local public key
local_action:
module: copy
content: "{{ keypair.keypair.public_key }}"
dest: "{{ inventory_dir }}/{{ keypair.keypair.name }}.pub"
- name: Create local private key
local_action:
module: copy
content: "{{ keypair.keypair.private_key }}"
dest: "{{ inventory_dir }}/{{ keypair.keypair.name }}"
- name: Create a keypair
hosts: localhost
gather_facts: False
tasks:
- name: Keypair request
local_action:
module: rax_keypair
credentials: ~/.raxpub
name: my_keypair
public_key: "{{ lookup('file', 'authorized_keys/id_rsa.pub') }}"
region: DFW
register: keypair
```
### Authors
* Matt Martz (@sivel)
| programming_docs |
ansible community.general.pritunl_org_info β List Pritunl Organizations using the Pritunl API community.general.pritunl\_org\_info β List Pritunl Organizations using the Pritunl API
=======================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.pritunl_org_info`.
New in version 2.5.0: of community.general
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A module to list Pritunl organizations using the Pritunl API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **organization** string | | Name of the Pritunl organization to search for. If none provided, the module will return all Pritunl organizations.
aliases: org |
| **pritunl\_api\_secret** string / required | | API Secret found in Administrators > USERNAME > API Secret. |
| **pritunl\_api\_token** string / required | | API Token of a Pritunl admin user. It needs to be enabled in Administrators > USERNAME > Enable Token Authentication. |
| **pritunl\_url** string / required | | URL and port of the Pritunl server on which the API is enabled. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If certificates should be validated or not. This should never be set to `false`, except if you are very sure that your connection to the server can not be subject to a Man In The Middle attack. |
Examples
--------
```
- name: List all existing Pritunl organizations
community.general.pritunl_org_info:
- name: Search for an organization named MyOrg
community.general.pritunl_user_info:
organization: MyOrg
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **organizations** list / elements=dictionary | success | List of Pritunl organizations. **Sample:** [{'auth\_api': False, 'auth\_secret': 'None', 'auth\_token': 'None', 'id': 'csftwlu6uhralzi2dpmhekz3', 'name': 'FooOrg', 'user\_count': 0}, {'auth\_api': False, 'auth\_secret': 'None', 'auth\_token': 'None', 'id': '58070daee63f3b2e6e472c36', 'name': 'MyOrg', 'user\_count': 3}, {'auth\_api': False, 'auth\_secret': 'None', 'auth\_token': 'None', 'id': 'v1sncsxxybnsylc8gpqg85pg', 'name': 'BarOrg', 'user\_count': 0}] |
### Authors
* Florian Dambrine (@Lowess)
ansible community.general.yum_versionlock β Locks / unlocks a installed package(s) from being updated by yum package manager community.general.yum\_versionlock β Locks / unlocks a installed package(s) from being updated by yum package manager
=====================================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.yum_versionlock`.
New in version 2.0.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module adds installed packages to yum versionlock to prevent the package(s) from being updated.
Requirements
------------
The below requirements are needed on the host that executes this module.
* yum
* yum-versionlock
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name** list / elements=string / required | | Package name or a list of packages. |
| **state** string | **Choices:*** absent
* **present** β
| If state is `present`, package(s) will be added to yum versionlock list. If state is `absent`, package(s) will be removed from yum versionlock list. |
Notes
-----
Note
* Requires yum-plugin-versionlock package on the remote node.
* Supports `check_mode`.
Examples
--------
```
- name: Prevent Apache / httpd from being updated
community.general.yum_versionlock:
state: present
name: httpd
- name: Prevent multiple packages from being updated
community.general.yum_versionlock:
state: present
name:
- httpd
- nginx
- haproxy
- curl
- name: Remove lock from Apache / httpd to be updated again
community.general.yum_versionlock:
state: absent
package: httpd
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **packages** list / elements=string | success | A list of package(s) in versionlock list. **Sample:** ['httpd'] |
| **state** string | success | State of package(s). **Sample:** present |
### Authors
* Florian Paul Hoberg (@florianpaulhoberg)
* Amin Vakil (@aminvakil)
ansible community.general.rax_clb β create / delete a load balancer in Rackspace Public Cloud community.general.rax\_clb β create / delete a load balancer in Rackspace Public Cloud
======================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.rax_clb`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* creates / deletes a Rackspace Public Cloud load balancer.
Requirements
------------
The below requirements are needed on the host that executes this module.
* pyrax
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **algorithm** string | **Choices:*** RANDOM
* **LEAST\_CONNECTIONS** β
* ROUND\_ROBIN
* WEIGHTED\_LEAST\_CONNECTIONS
* WEIGHTED\_ROUND\_ROBIN
| algorithm for the balancer being created |
| **api\_key** string | | Rackspace API key, overrides *credentials*.
aliases: password |
| **auth\_endpoint** string | | The URI of the authentication service. If not specified will be set to <https://identity.api.rackspacecloud.com/v2.0/>
|
| **credentials** path | | File to find the Rackspace credentials in. Ignored if *api\_key* and *username* are provided.
aliases: creds\_file |
| **env** string | | Environment as configured in *~/.pyrax.cfg*, see <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration>. |
| **identity\_type** string | **Default:**"rackspace" | Authentication mechanism to use, such as rackspace or keystone. |
| **meta** dictionary | | A hash of metadata to associate with the instance |
| **name** string / required | | Name to give the load balancer |
| **port** integer | **Default:**80 | Port for the balancer being created |
| **protocol** string | **Choices:*** DNS\_TCP
* DNS\_UDP
* FTP
* **HTTP** β
* HTTPS
* IMAPS
* IMAPv4
* LDAP
* LDAPS
* MYSQL
* POP3
* POP3S
* SMTP
* TCP
* TCP\_CLIENT\_FIRST
* UDP
* UDP\_STREAM
* SFTP
| Protocol for the balancer being created |
| **region** string | | Region to create an instance in. |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the resource |
| **tenant\_id** string | | The tenant ID used for authentication. |
| **tenant\_name** string | | The tenant name used for authentication. |
| **timeout** integer | **Default:**30 | timeout for communication between the balancer and the node |
| **type** string | **Choices:*** **PUBLIC** β
* SERVICENET
| type of interface for the balancer being created |
| **username** string | | Rackspace username, overrides *credentials*. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether or not to require SSL validation of API endpoints.
aliases: verify\_ssl |
| **vip\_id** string | | Virtual IP ID to use when creating the load balancer for purposes of sharing an IP with another load balancer of another protocol |
| **wait** boolean | **Choices:*** **no** β
* yes
| wait for the balancer to be in state 'running' before returning |
| **wait\_timeout** integer | **Default:**300 | how long before wait gives up, in seconds |
Notes
-----
Note
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
* The following environment variables can be used, `RAX_USERNAME`, `RAX_API_KEY`, `RAX_CREDS_FILE`, `RAX_CREDENTIALS`, `RAX_REGION`.
* `RAX_CREDENTIALS` and `RAX_CREDS_FILE` points to a credentials file appropriate for pyrax. See <https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating>
* `RAX_USERNAME` and `RAX_API_KEY` obviate the use of a credentials file
* `RAX_REGION` defines a Rackspace Public Cloud region (DFW, ORD, LON, β¦)
Examples
--------
```
- name: Build a Load Balancer
gather_facts: False
hosts: local
connection: local
tasks:
- name: Load Balancer create request
local_action:
module: rax_clb
credentials: ~/.raxpub
name: my-lb
port: 8080
protocol: HTTP
type: SERVICENET
timeout: 30
region: DFW
wait: yes
state: present
meta:
app: my-cool-app
register: my_lb
```
### Authors
* Christopher H. Laco (@claco)
* Matt Martz (@sivel)
ansible community.general.imc_rest β Manage Cisco IMC hardware through its REST API community.general.imc\_rest β Manage Cisco IMC hardware through its REST API
============================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.imc_rest`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Provides direct access to the Cisco IMC REST API.
* Perform any configuration changes and actions that the Cisco IMC supports.
* More information about the IMC REST API is available from <http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/c/sw/api/3_0/b_Cisco_IMC_api_301.html>
Requirements
------------
The below requirements are needed on the host that executes this module.
* lxml
* xmljson >= 0.1.8
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **content** string | | When used instead of `path`, sets the content of the API requests directly. This may be convenient to template simple requests, for anything complex use the [ansible.builtin.template](../../ansible/builtin/template_module) module. You can collate multiple IMC XML fragments and they will be processed sequentially in a single stream, the Cisco IMC output is subsequently merged. Parameter `content` is mutual exclusive with parameter `path`. |
| **hostname** string / required | | IP Address or hostname of Cisco IMC, resolvable by Ansible control host.
aliases: host, ip |
| **password** string | **Default:**"password" | The password to use for authentication. |
| **path** path | | Name of the absolute path of the filename that includes the body of the http request being sent to the Cisco IMC REST API. Parameter `path` is mutual exclusive with parameter `content`.
aliases: src, config\_file |
| **protocol** string | **Choices:*** http
* **https** β
| Connection protocol to use. |
| **timeout** integer | **Default:**60 | The socket level timeout in seconds. This is the time that every single connection (every fragment) can spend. If this `timeout` is reached, the module will fail with a `Connection failure` indicating that `The read operation timed out`. |
| **username** string | **Default:**"admin" | Username used to login to the switch.
aliases: user |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* The XML fragments donβt need an authentication cookie, this is injected by the module automatically.
* The Cisco IMC XML output is being translated to JSON using the Cobra convention.
* Any configConfMo change requested has a return status of βmodifiedβ, even if there was no actual change from the previous configuration. As a result, this module will always report a change on subsequent runs. In case this behaviour is fixed in a future update to Cisco IMC, this module will automatically adapt.
* If you get a `Connection failure` related to `The read operation timed out` increase the `timeout` parameter. Some XML fragments can take longer than the default timeout.
* More information about the IMC REST API is available from <http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/c/sw/api/3_0/b_Cisco_IMC_api_301.html>
Examples
--------
```
- name: Power down server
community.general.imc_rest:
hostname: '{{ imc_hostname }}'
username: '{{ imc_username }}'
password: '{{ imc_password }}'
validate_certs: no
content: |
<configConfMo><inConfig>
<computeRackUnit dn="sys/rack-unit-1" adminPower="down"/>
</inConfig></configConfMo>
delegate_to: localhost
- name: Configure IMC using multiple XML fragments
community.general.imc_rest:
hostname: '{{ imc_hostname }}'
username: '{{ imc_username }}'
password: '{{ imc_password }}'
validate_certs: no
timeout: 120
content: |
<!-- Configure Serial-on-LAN -->
<configConfMo><inConfig>
<solIf dn="sys/rack-unit-1/sol-if" adminState="enable" speed=="115200" comport="com0"/>
</inConfig></configConfMo>
<!-- Configure Console Redirection -->
<configConfMo><inConfig>
<biosVfConsoleRedirection dn="sys/rack-unit-1/bios/bios-settings/Console-redirection"
vpBaudRate="115200"
vpConsoleRedirection="com-0"
vpFlowControl="none"
vpTerminalType="vt100"
vpPuttyKeyPad="LINUX"
vpRedirectionAfterPOST="Always Enable"/>
</inConfig></configConfMo>
delegate_to: localhost
- name: Enable PXE boot and power-cycle server
community.general.imc_rest:
hostname: '{{ imc_hostname }}'
username: '{{ imc_username }}'
password: '{{ imc_password }}'
validate_certs: no
content: |
<!-- Configure PXE boot -->
<configConfMo><inConfig>
<lsbootLan dn="sys/rack-unit-1/boot-policy/lan-read-only" access="read-only" order="1" prot="pxe" type="lan"/>
</inConfig></configConfMo>
<!-- Power cycle server -->
<configConfMo><inConfig>
<computeRackUnit dn="sys/rack-unit-1" adminPower="cycle-immediate"/>
</inConfig></configConfMo>
delegate_to: localhost
- name: Reconfigure IMC to boot from storage
community.general.imc_rest:
hostname: '{{ imc_host }}'
username: '{{ imc_username }}'
password: '{{ imc_password }}'
validate_certs: no
content: |
<configConfMo><inConfig>
<lsbootStorage dn="sys/rack-unit-1/boot-policy/storage-read-write" access="read-write" order="1" type="storage"/>
</inConfig></configConfMo>
delegate_to: localhost
- name: Add customer description to server
community.general.imc_rest:
hostname: '{{ imc_host }}'
username: '{{ imc_username }}'
password: '{{ imc_password }}'
validate_certs: no
content: |
<configConfMo><inConfig>
<computeRackUnit dn="sys/rack-unit-1" usrLbl="Customer Lab - POD{{ pod_id }} - {{ inventory_hostname_short }}"/>
</inConfig></configConfMo>
delegate_to: localhost
- name: Disable HTTP and increase session timeout to max value 10800 secs
community.general.imc_rest:
hostname: '{{ imc_host }}'
username: '{{ imc_username }}'
password: '{{ imc_password }}'
validate_certs: no
timeout: 120
content: |
<configConfMo><inConfig>
<commHttp dn="sys/svc-ext/http-svc" adminState="disabled"/>
</inConfig></configConfMo>
<configConfMo><inConfig>
<commHttps dn="sys/svc-ext/https-svc" adminState="enabled" sessionTimeout="10800"/>
</inConfig></configConfMo>
delegate_to: localhost
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **aaLogin** dictionary | success | Cisco IMC XML output for the login, translated to JSON using Cobra convention **Sample:** "attributes": { "cookie": "", "outCookie": "1498902428/9de6dc36-417c-157c-106c-139efe2dc02a", "outPriv": "admin", "outRefreshPeriod": "600", "outSessionId": "114", "outVersion": "2.0(13e)", "response": "yes" } |
| **configConfMo** dictionary | success | Cisco IMC XML output for any configConfMo XML fragments, translated to JSON using Cobra convention |
| **elapsed** integer | always | Elapsed time in seconds **Sample:** 31 |
| **error** dictionary | failed | Cisco IMC XML error output for last request, translated to JSON using Cobra convention **Sample:** "attributes": { "cookie": "", "errorCode": "ERR-xml-parse-error", "errorDescr": "XML PARSING ERROR: Element 'computeRackUnit', attribute 'admin\_Power': The attribute 'admin\_Power' is not allowed. ", "invocationResult": "594", "response": "yes" } |
| **error\_code** string | failed | Cisco IMC error code **Sample:** ERR-xml-parse-error |
| **error\_text** string | failed | Cisco IMC error message **Sample:** XML PARSING ERROR: Element 'computeRackUnit', attribute 'admin\_Power': The attribute 'admin\_Power' is not allowed. |
| **input** string | failed | RAW XML input sent to the Cisco IMC, causing the error **Sample:** <configConfMo><inConfig><computeRackUnit dn="sys/rack-unit-1" admin\_Power="down"/></inConfig></configConfMo> |
| **output** string | failed | RAW XML output received from the Cisco IMC, with error details **Sample:** <error cookie="" response="yes" errorCode="ERR-xml-parse-error" invocationResult="594" errorDescr="XML PARSING ERROR: Element 'computeRackUnit', attribute 'admin\_Power': The attribute 'admin\_Power' is not allowed.\n"/> |
| **response** string | always | HTTP response message, including content length **Sample:** OK (729 bytes) |
| **status** dictionary | always | The HTTP response status code **Sample:** 200 |
### Authors
* Dag Wieers (@dagwieers)
| programming_docs |
ansible community.general.beadm β Manage ZFS boot environments on FreeBSD/Solaris/illumos systems. community.general.beadm β Manage ZFS boot environments on FreeBSD/Solaris/illumos systems.
==========================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.beadm`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, delete or activate ZFS boot environments.
* Mount and unmount ZFS boot environments.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **description** string | | Associate a description with a new boot environment. This option is available only on Solarish platforms. |
| **force** boolean | **Choices:*** **no** β
* yes
| Specifies if the unmount should be forced. |
| **mountpoint** path | | Path where to mount the ZFS boot environment. |
| **name** string / required | | ZFS boot environment name.
aliases: be |
| **options** string | | Create the datasets for new BE with specific ZFS properties. Multiple options can be specified. This option is available only on Solarish platforms. |
| **snapshot** string | | If specified, the new boot environment will be cloned from the given snapshot or inactive boot environment. |
| **state** string | **Choices:*** absent
* activated
* mounted
* **present** β
* unmounted
| Create or delete ZFS boot environment. |
Examples
--------
```
- name: Create ZFS boot environment
community.general.beadm:
name: upgrade-be
state: present
- name: Create ZFS boot environment from existing inactive boot environment
community.general.beadm:
name: upgrade-be
snapshot: be@old
state: present
- name: Create ZFS boot environment with compression enabled and description "upgrade"
community.general.beadm:
name: upgrade-be
options: "compression=on"
description: upgrade
state: present
- name: Delete ZFS boot environment
community.general.beadm:
name: old-be
state: absent
- name: Mount ZFS boot environment on /tmp/be
community.general.beadm:
name: BE
mountpoint: /tmp/be
state: mounted
- name: Unmount ZFS boot environment
community.general.beadm:
name: BE
state: unmounted
- name: Activate ZFS boot environment
community.general.beadm:
name: upgrade-be
state: activated
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **description** string | always | BE description **Sample:** Upgrade from 9.0 to 10.0 |
| **force** boolean | always | If forced action is wanted |
| **mountpoint** string | always | BE mountpoint **Sample:** /mnt/be |
| **name** string | always | BE name **Sample:** pre-upgrade |
| **options** string | always | BE additional options **Sample:** compression=on |
| **snapshot** string | always | ZFS snapshot to create BE from **Sample:** rpool/ROOT/oi-hipster@fresh |
| **state** string | always | state of the target **Sample:** present |
### Authors
* Adam Ε tevko (@xen0l)
ansible community.general.lbu β Local Backup Utility for Alpine Linux community.general.lbu β Local Backup Utility for Alpine Linux
=============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.lbu`.
New in version 0.2.0: of community.general
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage Local Backup Utility of Alpine Linux in run-from-RAM mode
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **commit** boolean | **Choices:*** no
* yes
| Control whether to commit changed files. |
| **exclude** list / elements=string | | List of paths to exclude. |
| **include** list / elements=string | | List of paths to include. |
Examples
--------
```
# Commit changed files (if any)
- name: Commit
community.general.lbu:
commit: true
# Exclude path and commit
- name: Exclude directory
community.general.lbu:
commit: true
exclude:
- /etc/opt
# Include paths without committing
- name: Include file and directory
community.general.lbu:
include:
- /root/.ssh/authorized_keys
- /var/lib/misc
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | on failure | Error message |
### Authors
* Kaarle Ritvanen (@kunkku)
ansible community.general.dimensiondata_network β Create, update, and delete MCP 1.0 & 2.0 networks community.general.dimensiondata\_network β Create, update, and delete MCP 1.0 & 2.0 networks
============================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.dimensiondata_network`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update, and delete MCP 1.0 & 2.0 networks
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **description** string | | Additional description of the network domain. |
| **location** string / required | | The target datacenter. |
| **mcp\_password** string | | The password used to authenticate to the CloudControl API. If not specified, will fall back to `MCP_PASSWORD` from environment variable or `~/.dimensiondata`. Required if *mcp\_user* is specified. |
| **mcp\_user** string | | The username used to authenticate to the CloudControl API. If not specified, will fall back to `MCP_USER` from environment variable or `~/.dimensiondata`. |
| **name** string / required | | The name of the network domain to create. |
| **region** string | **Default:**"na" | The target region. Regions are defined in Apache libcloud project [libcloud/common/dimensiondata.py] They are also listed in <https://libcloud.readthedocs.io/en/latest/compute/drivers/dimensiondata.html>
Note that the default value "na" stands for "North America". The module prepends 'dd-' to the region choice. |
| **service\_plan** string | **Choices:*** **ESSENTIALS** β
* ADVANCED
| The service plan, either "ESSENTIALS" or "ADVANCED". MCP 2.0 Only. |
| **state** string | **Choices:*** **present** β
* absent
| Should the resource be present or absent. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `false`, SSL certificates will not be validated. This should only be used on private instances of the CloudControl API that use self-signed certificates. |
| **wait** boolean | **Choices:*** **no** β
* yes
| Should we wait for the task to complete before moving onto the next. |
| **wait\_poll\_interval** integer | **Default:**2 | The amount of time (in seconds) to wait between checks for task completion. Only applicable if *wait=true*. |
| **wait\_time** integer | **Default:**600 | The maximum amount of time (in seconds) to wait for the task to complete. Only applicable if *wait=true*. |
Examples
--------
```
- name: Create an MCP 1.0 network
community.general.dimensiondata_network:
region: na
location: NA5
name: mynet
- name: Create an MCP 2.0 network
community.general.dimensiondata_network:
region: na
mcp_user: my_user
mcp_password: my_password
location: NA9
name: mynet
service_plan: ADVANCED
- name: Delete a network
community.general.dimensiondata_network:
region: na
location: NA1
name: mynet
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **network** complex | On success when *state=present*. | Dictionary describing the network. |
| | **description** string | success | Network description. **Sample:** My network description |
| | **id** string | success | Network ID. **Sample:** 8c787000-a000-4050-a215-280893411a7d |
| | **location** string | success | Datacenter location. **Sample:** NA3 |
| | **multicast** boolean | success | Multicast enabled? (MCP 1.0 only) |
| | **name** string | success | Network name. **Sample:** My network |
| | **private\_net** string | success | Private network subnet. (MCP 1.0 only) **Sample:** 10.2.3.0 |
| | **status** string | success | Network status. (MCP 2.0 only) **Sample:** NORMAL |
### Authors
* Aimon Bustardo (@aimonb)
ansible community.general.sysrc β Manage FreeBSD using sysrc community.general.sysrc β Manage FreeBSD using sysrc
====================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.sysrc`.
New in version 2.0.0: of community.general
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages `/etc/rc.conf` for FreeBSD.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **delim** string | **Default:**" " | Delimiter to be used instead of . Only used when *state=value\_present* or *state=value\_absent*. |
| **jail** string | | Name or ID of the jail to operate on. |
| **name** string / required | | Name of variable in `/etc/rc.conf` to manage. |
| **path** string | **Default:**"/etc/rc.conf" | Path to file to use instead of `/etc/rc.conf`. |
| **state** string | **Choices:*** absent
* **present** β
* value\_present
* value\_absent
| Use *present* to add the variable. Use *absent* to remove the variable. Use *value\_present* to add the value to the existing variable. Use *value\_absent* to remove the value from the existing variable. |
| **value** string | | The value to set when *state=present*. The value to add when *state=value\_present*. The value to remove when *state=value\_absent*. |
Notes
-----
Note
* The `name` cannot contain periods as sysrc does not support OID style names.
Examples
--------
```
---
# enable mysql in the /etc/rc.conf
- name: Configure mysql pid file
community.general.sysrc:
name: mysql_pidfile
value: "/var/run/mysqld/mysqld.pid"
# enable accf_http kld in the boot loader
- name: Enable accf_http kld
community.general.sysrc:
name: accf_http_load
state: present
value: "YES"
path: /boot/loader.conf
# add gif0 to cloned_interfaces
- name: Add gif0 interface
community.general.sysrc:
name: cloned_interfaces
state: value_present
value: "gif0"
# enable nginx on a jail
- name: Enable nginx in test jail
community.general.sysrc:
name: nginx_enable
value: "YES"
jail: testjail
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | Return changed for sysrc actions. **Sample:** True |
### Authors
* David Lundgren (@dlundgren)
ansible community.general.github_webhook β Manage GitHub webhooks community.general.github\_webhook β Manage GitHub webhooks
==========================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.github_webhook`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and delete GitHub webhooks
Requirements
------------
The below requirements are needed on the host that executes this module.
* PyGithub >= 1.3.5
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **active** boolean | **Choices:*** no
* **yes** β
| Whether or not the hook is active |
| **content\_type** string | **Choices:*** **form** β
* json
| The media type used to serialize the payloads |
| **events** list / elements=string | | A list of GitHub events the hook is triggered for. Events are listed at <https://developer.github.com/v3/activity/events/types/>. Required unless `state` is `absent`
|
| **github\_url** string | **Default:**"https://api.github.com" | Base URL of the GitHub API |
| **insecure\_ssl** boolean | **Choices:*** **no** β
* yes
| Flag to indicate that GitHub should skip SSL verification when calling the hook. |
| **password** string | | Password to authenticate to GitHub with |
| **repository** string / required | | Full name of the repository to configure a hook for
aliases: repo |
| **secret** string | | The shared secret between GitHub and the payload URL. |
| **state** string | **Choices:*** absent
* **present** β
| Whether the hook should be present or absent |
| **token** string | | Token to authenticate to GitHub with |
| **url** string / required | | URL to which payloads will be delivered |
| **user** string / required | | User to authenticate to GitHub as |
Examples
--------
```
- name: Create a new webhook that triggers on push (password auth)
community.general.github_webhook:
repository: ansible/ansible
url: https://www.example.com/hooks/
events:
- push
user: "{{ github_user }}"
password: "{{ github_password }}"
- name: Create a new webhook in a github enterprise installation with multiple event triggers (token auth)
community.general.github_webhook:
repository: myorg/myrepo
url: https://jenkins.example.com/ghprbhook/
content_type: json
secret: "{{ github_shared_secret }}"
insecure_ssl: True
events:
- issue_comment
- pull_request
user: "{{ github_user }}"
token: "{{ github_user_api_token }}"
github_url: https://github.example.com
- name: Delete a webhook (password auth)
community.general.github_webhook:
repository: ansible/ansible
url: https://www.example.com/hooks/
state: absent
user: "{{ github_user }}"
password: "{{ github_password }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **hook\_id** integer | when state is 'present' | The GitHub ID of the hook created/updated **Sample:** 6206 |
### Authors
* Chris St. Pierre (@stpierre)
ansible community.general.zypper β Manage packages on SUSE and openSUSE community.general.zypper β Manage packages on SUSE and openSUSE
===============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.zypper`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage packages on SUSE and openSUSE using the zypper and rpm tools.
* Also supports transactional updates, by running zypper inside `/sbin/transactional-update --continue --drop-if-no-change --quiet run`.
Requirements
------------
The below requirements are needed on the host that executes this module.
* zypper >= 1.0 # included in openSUSE >= 11.1 or SUSE Linux Enterprise Server/Desktop >= 11.0
* python-xml
* rpm
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_vendor\_change** boolean added in 0.2.0 of community.general | **Choices:*** **no** β
* yes
| Adds `--allow_vendor_change` option to *zypper* dist-upgrade command. |
| **disable\_gpg\_check** boolean | **Choices:*** **no** β
* yes
| Whether to disable to GPG signature checking of the package signature being installed. Has an effect only if state is *present* or *latest*. |
| **disable\_recommends** boolean | **Choices:*** no
* **yes** β
| Corresponds to the `--no-recommends` option for *zypper*. Default behavior (`yes`) modifies zypper's default behavior; `no` does install recommended packages. |
| **extra\_args** string | | Add additional options to `zypper` command. Options should be supplied in a single line as if given in the command line. |
| **extra\_args\_precommand** string | | Add additional global target options to `zypper`. Options should be supplied in a single line as if given in the command line. |
| **force** boolean | **Choices:*** **no** β
* yes
| Adds `--force` option to *zypper*. Allows to downgrade packages and change vendor or architecture. |
| **force\_resolution** boolean added in 0.2.0 of community.general | **Choices:*** **no** β
* yes
| Adds `--force-resolution` option to *zypper*. Allows to (un)install packages with conflicting requirements (resolver will choose a solution). |
| **name** list / elements=string / required | | Package name `name` or package specifier or a list of either. Can include a version like `name=1.0`, `name>3.4` or `name<=2.7`. If a version is given, `oldpackage` is implied and zypper is allowed to update the package within the version range given. You can also pass a url or a local path to a rpm file. When using state=latest, this can be '\*', which updates all installed packages.
aliases: pkg |
| **oldpackage** boolean | **Choices:*** **no** β
* yes
| Adds `--oldpackage` option to *zypper*. Allows to downgrade packages with less side-effects than force. This is implied as soon as a version is specified as part of the package name. |
| **replacefiles** boolean added in 0.2.0 of community.general | **Choices:*** **no** β
* yes
| Adds `--replacefiles` option to *zypper* install/update command. |
| **state** string | **Choices:*** **present** β
* latest
* absent
* dist-upgrade
* installed
* removed
|
`present` will make sure the package is installed. `latest` will make sure the latest version of the package is installed. `absent` will make sure the specified package is not installed. `dist-upgrade` will make sure the latest version of all installed packages from all enabled repositories is installed. When using `dist-upgrade`, *name* should be `'*'`. |
| **type** string | **Choices:*** **package** β
* patch
* pattern
* product
* srcpackage
* application
| The type of package to be operated on. |
| **update\_cache** boolean | **Choices:*** **no** β
* yes
| Run the equivalent of `zypper refresh` before the operation. Disabled in check mode.
aliases: refresh |
Notes
-----
Note
* When used with a `loop:` each package will be processed individually, it is much more efficient to pass the list directly to the `name` option.
Examples
--------
```
- name: Install nmap
community.general.zypper:
name: nmap
state: present
- name: Install apache2 with recommended packages
community.general.zypper:
name: apache2
state: present
disable_recommends: no
- name: Apply a given patch
community.general.zypper:
name: openSUSE-2016-128
state: present
type: patch
- name: Remove the nmap package
community.general.zypper:
name: nmap
state: absent
- name: Install the nginx rpm from a remote repo
community.general.zypper:
name: 'http://nginx.org/packages/sles/12/x86_64/RPMS/nginx-1.8.0-1.sles12.ngx.x86_64.rpm'
state: present
- name: Install local rpm file
community.general.zypper:
name: /tmp/fancy-software.rpm
state: present
- name: Update all packages
community.general.zypper:
name: '*'
state: latest
- name: Apply all available patches
community.general.zypper:
name: '*'
state: latest
type: patch
- name: Perform a dist-upgrade with additional arguments
community.general.zypper:
name: '*'
state: dist-upgrade
allow_vendor_change: true
extra_args: '--allow-arch-change'
- name: Perform a installaion of nmap with the install option replacefiles
community.general.zypper:
name: 'nmap'
state: latest
replacefiles: true
- name: Refresh repositories and update package openssl
community.general.zypper:
name: openssl
state: present
update_cache: yes
- name: "Install specific version (possible comparisons: <, >, <=, >=, =)"
community.general.zypper:
name: 'docker>=1.10'
state: present
- name: Wait 20 seconds to acquire the lock before failing
community.general.zypper:
name: mosh
state: present
environment:
ZYPP_LOCK_TIMEOUT: 20
```
### Authors
* Patrick Callahan (@dirtyharrycallahan)
* Alexander Gubin (@alxgu)
* Thomas OβDonnell (@andytom)
* Robin Roth (@robinro)
* Andrii Radyk (@AnderEnder)
| programming_docs |
ansible community.general.vertica_schema β Adds or removes Vertica database schema and roles. community.general.vertica\_schema β Adds or removes Vertica database schema and roles.
======================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.vertica_schema`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Adds or removes Vertica database schema and, optionally, roles with schema access privileges.
* A schema will not be removed until all the objects have been dropped.
* In such a situation, if the module tries to remove the schema it will fail and only remove roles created for the schema if they have no dependencies.
Requirements
------------
The below requirements are needed on the host that executes this module.
* unixODBC
* pyodbc
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster** string | **Default:**"localhost" | Name of the Vertica cluster. |
| **create\_roles** string | | Comma separated list of roles to create and grant usage and create access to the schema.
aliases: create\_role |
| **db** string | | Name of the Vertica database. |
| **login\_password** string | | The password used to authenticate with. |
| **login\_user** string | **Default:**"dbadmin" | The username used to authenticate with. |
| **owner** string | | Name of the user to set as owner of the schema. |
| **port** string | **Default:**5433 | Vertica cluster port to connect to. |
| **schema** string / required | | Name of the schema to add or remove.
aliases: name |
| **state** string | **Choices:*** **present** β
* absent
| Whether to create `present`, or drop `absent` a schema. |
| **usage\_roles** string | | Comma separated list of roles to create and grant usage access to the schema.
aliases: usage\_role |
Notes
-----
Note
* The default authentication assumes that you are either logging in as or sudoβing to the `dbadmin` account on the host.
* This module uses `pyodbc`, a Python ODBC database adapter. You must ensure that `unixODBC` and `pyodbc` is installed on the host and properly configured.
* Configuring `unixODBC` for Vertica requires `Driver = /opt/vertica/lib64/libverticaodbc.so` to be added to the `Vertica` section of either `/etc/odbcinst.ini` or `$HOME/.odbcinst.ini` and both `ErrorMessagesPath = /opt/vertica/lib64` and `DriverManagerEncoding = UTF-16` to be added to the `Driver` section of either `/etc/vertica.ini` or `$HOME/.vertica.ini`.
Examples
--------
```
- name: Creating a new vertica schema
community.general.vertica_schema: name=schema_name db=db_name state=present
- name: Creating a new schema with specific schema owner
community.general.vertica_schema: name=schema_name owner=dbowner db=db_name state=present
- name: Creating a new schema with roles
community.general.vertica_schema:
name=schema_name
create_roles=schema_name_all
usage_roles=schema_name_ro,schema_name_rw
db=db_name
state=present
```
### Authors
* Dariusz Owczarek (@dareko)
ansible community.general.linode β Manage instances on the Linode Public Cloud community.general.linode β Manage instances on the Linode Public Cloud
======================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.linode`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage Linode Public Cloud instances and optionally wait for it to be βrunningβ.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* linode-python
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **additional\_disks** list / elements=dictionary | | List of dictionaries for creating additional disks that are added to the Linode configuration settings. Dictionary takes Size, Label, Type. Size is in MB. |
| **alert\_bwin\_enabled** boolean | **Choices:*** no
* yes
| Set status of bandwidth in alerts. |
| **alert\_bwin\_threshold** integer | | Set threshold in MB of bandwidth in alerts. |
| **alert\_bwout\_enabled** boolean | **Choices:*** no
* yes
| Set status of bandwidth out alerts. |
| **alert\_bwout\_threshold** integer | | Set threshold in MB of bandwidth out alerts. |
| **alert\_bwquota\_enabled** boolean | **Choices:*** no
* yes
| Set status of bandwidth quota alerts as percentage of network transfer quota. |
| **alert\_bwquota\_threshold** integer | | Set threshold in MB of bandwidth quota alerts. |
| **alert\_cpu\_enabled** boolean | **Choices:*** no
* yes
| Set status of receiving CPU usage alerts. |
| **alert\_cpu\_threshold** integer | | Set percentage threshold for receiving CPU usage alerts. Each CPU core adds 100% to total. |
| **alert\_diskio\_enabled** boolean | **Choices:*** no
* yes
| Set status of receiving disk IO alerts. |
| **alert\_diskio\_threshold** integer | | Set threshold for average IO ops/sec over 2 hour period. |
| **api\_key** string / required | | Linode API key.
`LINODE_API_KEY` env variable can be used instead. |
| **backupsenabled** integer | | Deprecated parameter, it will be removed in community.general `5.0.0`. To enable backups pass values to either *backupweeklyday* or *backupwindow*. |
| **backupweeklyday** integer | | Day of the week to take backups. |
| **backupwindow** integer | | The time window in which backups will be taken. |
| **datacenter** integer | | datacenter to create an instance in (Linode Datacenter) |
| **displaygroup** string | | Add the instance to a Display Group in Linode Manager. |
| **distribution** integer | | distribution to use for the instance (Linode Distribution) |
| **kernel\_id** integer | | kernel to use for the instance (Linode Kernel) |
| **linode\_id** integer | | Unique ID of a linode server. This value is read-only in the sense that if you specify it on creation of a Linode it will not be used. The Linode API generates these IDs and we can those generated value here to reference a Linode more specifically. This is useful for idempotence.
aliases: lid |
| **name** string / required | | Name to give the instance (alphanumeric, dashes, underscore). To keep sanity on the Linode Web Console, name is prepended with `LinodeID-`. |
| **password** string | | root password to apply to a new server (auto generated if missing) |
| **payment\_term** integer | **Choices:*** 1
* 12
* 24
**Default:**1 | payment term to use for the instance (payment term in months) |
| **plan** integer | | plan to use for the instance (Linode plan) |
| **private\_ip** boolean | **Choices:*** no
* yes
| Add private IPv4 address when Linode is created. Default is `false`. |
| **ssh\_pub\_key** string | | SSH public key applied to root user |
| **state** string | **Choices:*** absent
* active
* deleted
* **present** β
* restarted
* started
* stopped
| Indicate desired state of the resource |
| **swap** integer | **Default:**512 | swap size in MB |
| **wait** boolean | **Choices:*** no
* **yes** β
| wait for the instance to be in state `running` before returning |
| **wait\_timeout** integer | **Default:**300 | how long before wait gives up, in seconds |
| **watchdog** boolean | **Choices:*** no
* yes
**Default:**"True" | Set status of Lassie watchdog. |
Notes
-----
Note
* Please note, linode-python does not have python 3 support.
* This module uses the now deprecated v3 of the Linode API.
* Please review <https://www.linode.com/api/linode> for determining the required parameters.
Examples
--------
```
- name: Create a new Linode
community.general.linode:
name: linode-test1
plan: 1
datacenter: 7
distribution: 129
state: present
register: linode_creation
- name: Create a server with a private IP Address
community.general.linode:
module: linode
api_key: 'longStringFromLinodeApi'
name: linode-test1
plan: 1
datacenter: 2
distribution: 99
password: 'superSecureRootPassword'
private_ip: yes
ssh_pub_key: 'ssh-rsa qwerty'
swap: 768
wait: yes
wait_timeout: 600
state: present
delegate_to: localhost
register: linode_creation
- name: Fully configure new server
community.general.linode:
api_key: 'longStringFromLinodeApi'
name: linode-test1
plan: 4
datacenter: 2
distribution: 99
kernel_id: 138
password: 'superSecureRootPassword'
private_ip: yes
ssh_pub_key: 'ssh-rsa qwerty'
swap: 768
wait: yes
wait_timeout: 600
state: present
alert_bwquota_enabled: True
alert_bwquota_threshold: 80
alert_bwin_enabled: True
alert_bwin_threshold: 10
alert_cpu_enabled: True
alert_cpu_threshold: 210
alert_bwout_enabled: True
alert_bwout_threshold: 10
alert_diskio_enabled: True
alert_diskio_threshold: 10000
backupweeklyday: 1
backupwindow: 2
displaygroup: 'test'
additional_disks:
- {Label: 'disk1', Size: 2500, Type: 'raw'}
- {Label: 'newdisk', Size: 2000}
watchdog: True
delegate_to: localhost
register: linode_creation
- name: Ensure a running server (create if missing)
community.general.linode:
api_key: 'longStringFromLinodeApi'
name: linode-test1
plan: 1
datacenter: 2
distribution: 99
password: 'superSecureRootPassword'
ssh_pub_key: 'ssh-rsa qwerty'
swap: 768
wait: yes
wait_timeout: 600
state: present
delegate_to: localhost
register: linode_creation
- name: Delete a server
community.general.linode:
api_key: 'longStringFromLinodeApi'
name: linode-test1
linode_id: "{{ linode_creation.instance.id }}"
state: absent
delegate_to: localhost
- name: Stop a server
community.general.linode:
api_key: 'longStringFromLinodeApi'
name: linode-test1
linode_id: "{{ linode_creation.instance.id }}"
state: stopped
delegate_to: localhost
- name: Reboot a server
community.general.linode:
api_key: 'longStringFromLinodeApi'
name: linode-test1
linode_id: "{{ linode_creation.instance.id }}"
state: restarted
delegate_to: localhost
```
### Authors
* Vincent Viallet (@zbal)
ansible community.general.zfs_delegate_admin β Manage ZFS delegated administration (user admin privileges) community.general.zfs\_delegate\_admin β Manage ZFS delegated administration (user admin privileges)
====================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.zfs_delegate_admin`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Manages ZFS file system delegated administration permissions, which allow unprivileged users to perform ZFS operations normally restricted to the superuser.
* See the `zfs allow` section of `zfs(1M`) for detailed explanations of options.
* This module attempts to adhere to the behavior of the command line tool as much as possible.
Requirements
------------
The below requirements are needed on the host that executes this module.
* A ZFS/OpenZFS implementation that supports delegation with `zfs allow`, including: Solaris >= 10, illumos (all versions), FreeBSD >= 8.0R, ZFS on Linux >= 0.7.0.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **descendents** boolean | **Choices:*** no
* yes
| Apply permissions to `name`'s descendents (`zfs allow -d`). |
| **everyone** boolean | **Choices:*** **no** β
* yes
| Apply permissions to everyone. |
| **groups** list / elements=string | | List of groups to whom permission(s) should be granted. |
| **local** boolean | **Choices:*** no
* yes
| Apply permissions to `name` locally (`zfs allow -l`). |
| **name** string / required | | File system or volume name e.g. `rpool/myfs`. |
| **permissions** list / elements=string | | The list of permission(s) to delegate (required if `state` is `present`). Supported permissions depend on the ZFS version in use. See for example <https://openzfs.github.io/openzfs-docs/man/8/zfs-allow.8.html> for OpenZFS. |
| **recursive** boolean | **Choices:*** **no** β
* yes
| Unallow permissions recursively (ignored when `state` is `present`). |
| **state** string | **Choices:*** absent
* **present** β
| Whether to allow (`present`), or unallow (`absent`) a permission. When set to `present`, at least one "entity" param of *users*, *groups*, or *everyone* are required. When set to `absent`, removes permissions from the specified entities, or removes all permissions if no entity params are specified. |
| **users** list / elements=string | | List of users to whom permission(s) should be granted. |
Examples
--------
```
- name: Grant `zfs allow` and `unallow` permission to the `adm` user with the default local+descendents scope
community.general.zfs_delegate_admin:
name: rpool/myfs
users: adm
permissions: allow,unallow
- name: Grant `zfs send` to everyone, plus the group `backup`
community.general.zfs_delegate_admin:
name: rpool/myvol
groups: backup
everyone: yes
permissions: send
- name: Grant `zfs send,receive` to users `foo` and `bar` with local scope only
community.general.zfs_delegate_admin:
name: rpool/myfs
users: foo,bar
permissions: send,receive
local: yes
- name: Revoke all permissions from everyone (permissions specifically assigned to users and groups remain)
community.general.zfs_delegate_admin:
name: rpool/myfs
everyone: yes
state: absent
```
### Authors
* Nate Coraor (@natefoo)
ansible community.general.lxc β Run tasks in lxc containers via lxc python library community.general.lxc β Run tasks in lxc containers via lxc python library
==========================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.lxc`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
Synopsis
--------
* Run commands or put/fetch files to an existing lxc container using lxc python library
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **executable** string | **Default:**"/bin/sh" | var: ansible\_executable var: ansible\_lxc\_executable | Shell executable |
| **remote\_addr** string | **Default:**"inventory\_hostname" | var: ansible\_host var: ansible\_lxc\_host | Container identifier |
### Authors
* Joerg Thalheim (!UNKNOWN) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#0862676d7a6f2e2b3b3f332e2b3d3a332e2b3c303360616f6f7b6a677b67662e2b3c3e337c63)>
ansible community.general.manageiq_alerts β Configuration of alerts in ManageIQ community.general.manageiq\_alerts β Configuration of alerts in ManageIQ
========================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.manageiq_alerts`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* The manageiq\_alerts module supports adding, updating and deleting alerts in ManageIQ.
Requirements
------------
The below requirements are needed on the host that executes this module.
* manageiq-client <https://github.com/ManageIQ/manageiq-api-client-python/>
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **description** string | | The unique alert description in ManageIQ. Required when state is "absent" or "present". |
| **enabled** boolean | **Choices:*** no
* yes
| Enable or disable the alert. Required if state is "present". |
| **expression** dictionary | | The alert expression for ManageIQ. Can either be in the "Miq Expression" format or the "Hash Expression format". Required if state is "present". |
| **expression\_type** string | **Choices:*** **hash** β
* miq
| Expression type. |
| **manageiq\_connection** dictionary | | ManageIQ connection configuration information. |
| | **ca\_cert** string | | The path to a CA bundle file or directory with certificates. defaults to None.
aliases: ca\_bundle\_path |
| | **password** string | | ManageIQ password. `MIQ_PASSWORD` env var if set. otherwise, required if no token is passed in. |
| | **token** string | | ManageIQ token. `MIQ_TOKEN` env var if set. otherwise, required if no username or password is passed in. |
| | **url** string | | ManageIQ environment url. `MIQ_URL` env var if set. otherwise, it is required to pass it. |
| | **username** string | | ManageIQ username. `MIQ_USERNAME` env var if set. otherwise, required if no token is passed in. |
| | **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Whether SSL certificates should be verified for HTTPS requests. defaults to True.
aliases: verify\_ssl |
| **options** dictionary | | Additional alert options, such as notification type and frequency |
| **resource\_type** string | **Choices:*** Vm
* ContainerNode
* MiqServer
* Host
* Storage
* EmsCluster
* ExtManagementSystem
* MiddlewareServer
| The entity type for the alert in ManageIQ. Required when state is "present". |
| **state** string | **Choices:*** absent
* **present** β
| absent - alert should not exist, present - alert should exist, |
Examples
--------
```
- name: Add an alert with a "hash expression" to ManageIQ
community.general.manageiq_alerts:
state: present
description: Test Alert 01
options:
notifications:
email:
to: ["[email protected]"]
from: "[email protected]"
resource_type: ContainerNode
expression:
eval_method: hostd_log_threshold
mode: internal
options: {}
enabled: true
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
validate_certs: False
- name: Add an alert with a "miq expression" to ManageIQ
community.general.manageiq_alerts:
state: present
description: Test Alert 02
options:
notifications:
email:
to: ["[email protected]"]
from: "[email protected]"
resource_type: Vm
expression_type: miq
expression:
and:
- CONTAINS:
tag: Vm.managed-environment
value: prod
- not:
CONTAINS:
tag: Vm.host.managed-environment
value: prod
enabled: true
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
validate_certs: False
- name: Delete an alert from ManageIQ
community.general.manageiq_alerts:
state: absent
description: Test Alert 01
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
validate_certs: False
```
### Authors
* Elad Alfassa (@elad661) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#b9dcd8d5dfd8cacad89f9a8a8e829f9a8c8b829f9a8d8182cbdcddd1d8cd9f9a8d8f82dad6d4)
| programming_docs |
ansible community.general.xenserver_guest β Manages virtual machines running on Citrix Hypervisor/XenServer host or pool community.general.xenserver\_guest β Manages virtual machines running on Citrix Hypervisor/XenServer host or pool
=================================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.xenserver_guest`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to create new virtual machines from templates or other virtual machines, modify various virtual machine components like network and disk, rename a virtual machine and remove a virtual machine with associated components.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* XenAPI
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cdrom** dictionary | | A CD-ROM configuration for the VM. All parameters are case sensitive. |
| | **iso\_name** string | | The file name of an ISO image from one of the XenServer ISO Libraries (implies *type*: `iso`). Required if *type* is set to `iso`. |
| | **type** string | **Choices:*** none
* iso
| The type of CD-ROM. With `none` the CD-ROM device will be present but empty. |
| **custom\_params** list / elements=dictionary | | Define a list of custom VM params to set on VM. Useful for advanced users familiar with managing VM params trough xe CLI. A custom value object takes two fields *key* and *value* (see example below). |
| | **key** string / required | | VM param name. |
| | **value** raw / required | | VM param value. |
| **disks** list / elements=dictionary | | A list of disks to add to VM. All parameters are case sensitive. Removing or detaching existing disks of VM is not supported. New disks are required to have either a *size* or one of *size\_[tb,gb,mb,kb,b]* parameters specified. VM needs to be shut down to reconfigure disk size.
aliases: disk |
| | **name** string | | Disk name.
aliases: name\_label |
| | **name\_desc** string | | Disk description. |
| | **size** string | | Disk size with unit. Unit must be: `b`, `kb`, `mb`, `gb`, `tb`. VM needs to be shut down to reconfigure this parameter. If no unit is specified, size is assumed to be in bytes. |
| | **size\_b** string | | Disk size in bytes. |
| | **size\_gb** string | | Disk size in gigabytes. |
| | **size\_kb** string | | Disk size in kilobytes. |
| | **size\_mb** string | | Disk size in megabytes. |
| | **size\_tb** string | | Disk size in terabytes. |
| | **sr** string | | Storage Repository to create disk on. If not specified, will use default SR. Cannot be used for moving disk to other SR. |
| | **sr\_uuid** string | | UUID of a SR to create disk on. Use if SR name is not unique. |
| **folder** string | | Destination folder for VM. This parameter is case sensitive. Example: folder: /folder1/folder2 |
| **force** boolean | **Choices:*** **no** β
* yes
| Ignore warnings and complete the actions. This parameter is useful for removing VM in running state or reconfiguring VM params that require VM to be shut down. |
| **hardware** dictionary | | Manage VM's hardware parameters. VM needs to be shut down to reconfigure these parameters. |
| | **memory\_mb** integer | | Amount of memory in MB. |
| | **num\_cpu\_cores\_per\_socket** integer | | Number of Cores Per Socket. *num\_cpus* has to be a multiple of *num\_cpu\_cores\_per\_socket*. |
| | **num\_cpus** integer | | Number of CPUs. |
| **home\_server** string | | Name of a XenServer host that will be a Home Server for the VM. This parameter is case sensitive. |
| **hostname** string | **Default:**"localhost" | The hostname or IP address of the XenServer host or XenServer pool master. If the value is not specified in the task, the value of environment variable `XENSERVER_HOST` will be used instead.
aliases: host, pool |
| **is\_template** boolean | **Choices:*** **no** β
* yes
| Convert VM to template. |
| **linked\_clone** boolean | **Choices:*** **no** β
* yes
| Whether to create a Linked Clone from the template, existing VM or snapshot. If no, will create a full copy. This is equivalent to `Use storage-level fast disk clone` option in XenCenter. |
| **name** string | | Name of the VM to work with. VMs running on XenServer do not necessarily have unique names. The module will fail if multiple VMs with same name are found. In case of multiple VMs with same name, use *uuid* to uniquely specify VM to manage. This parameter is case sensitive.
aliases: name\_label |
| **name\_desc** string | | VM description. |
| **networks** list / elements=dictionary | | A list of networks (in the order of the NICs). All parameters are case sensitive. Name is required for new NICs. Other parameters are optional in all cases.
aliases: network |
| | **gateway** string | | Static IPv4 gateway. |
| | **gateway6** string | | Static IPv6 gateway. |
| | **ip** string | | Static IPv4 address (implies *type*: `static`). Can include prefix in format `<IPv4 address>/<prefix>` instead of using `netmask`. |
| | **ip6** string | | Static IPv6 address (implies *type6*: `static`) with prefix in format `<IPv6 address>/<prefix>`. |
| | **mac** string | | Customize MAC address of the interface. |
| | **name** string | | Name of a XenServer network to attach the network interface to.
aliases: name\_label |
| | **netmask** string | | Static IPv4 netmask required for *ip* if prefix is not specified. |
| | **type** string | **Choices:*** none
* dhcp
* static
| Type of IPv4 assignment. Value `none` means whatever is default for OS. On some operating systems it could be DHCP configured (e.g. Windows) or unconfigured interface (e.g. Linux). |
| | **type6** string | **Choices:*** none
* dhcp
* static
| Type of IPv6 assignment. Value `none` means whatever is default for OS. |
| **password** string | | The password to use for connecting to XenServer. If the value is not specified in the task, the value of environment variable `XENSERVER_PASSWORD` will be used instead.
aliases: pass, pwd |
| **state** string | **Choices:*** **present** β
* absent
* poweredon
| Specify the state VM should be in. If *state* is set to `present` and VM exists, ensure the VM configuration conforms to given parameters. If *state* is set to `present` and VM does not exist, then VM is deployed with given parameters. If *state* is set to `absent` and VM exists, then VM is removed with its associated components. If *state* is set to `poweredon` and VM does not exist, then VM is deployed with given parameters and powered on automatically. |
| **state\_change\_timeout** integer | **Default:**0 | By default, module will wait indefinitely for VM to accquire an IP address if *wait\_for\_ip\_address*: `yes`. If this parameter is set to positive value, the module will instead wait specified number of seconds for the state change. In case of timeout, module will generate an error message. |
| **template** string | | Name of a template, an existing VM (must be shut down) or a snapshot that should be used to create VM. Templates/VMs/snapshots on XenServer do not necessarily have unique names. The module will fail if multiple templates with same name are found. In case of multiple templates/VMs/snapshots with same name, use *template\_uuid* to uniquely specify source template. If VM already exists, this setting will be ignored. This parameter is case sensitive.
aliases: template\_src |
| **template\_uuid** string | | UUID of a template, an existing VM or a snapshot that should be used to create VM. It is required if template name is not unique. |
| **username** string | **Default:**"root" | The username to use for connecting to XenServer. If the value is not specified in the task, the value of environment variable `XENSERVER_USER` will be used instead.
aliases: admin, user |
| **uuid** string | | UUID of the VM to manage if known. This is XenServer's unique identifier. It is required if name is not unique. Please note that a supplied UUID will be ignored on VM creation, as XenServer creates the UUID internally. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Allows connection when SSL certificates are not valid. Set to `false` when certificates are not trusted. If the value is not specified in the task, the value of environment variable `XENSERVER_VALIDATE_CERTS` will be used instead. |
| **wait\_for\_ip\_address** boolean | **Choices:*** **no** β
* yes
| Wait until XenServer detects an IP address for the VM. If *state* is set to `absent`, this parameter is ignored. This requires XenServer Tools to be preinstalled on the VM to work properly. |
Notes
-----
Note
* Minimal supported version of XenServer is 5.6.
* Module was tested with XenServer 6.5, 7.1, 7.2, 7.6, Citrix Hypervisor 8.0, XCP-ng 7.6 and 8.0.
* To acquire XenAPI Python library, just run `pip install XenAPI` on your Ansible Control Node. The library can also be found inside Citrix Hypervisor/XenServer SDK (downloadable from Citrix website). Copy the XenAPI.py file from the SDK to your Python site-packages on your Ansible Control Node to use it. Latest version of the library can also be acquired from GitHub: <https://raw.githubusercontent.com/xapi-project/xen-api/master/scripts/examples/python/XenAPI/XenAPI.py>
* If no scheme is specified in *hostname*, module defaults to `http://` because `https://` is problematic in most setups. Make sure you are accessing XenServer host in trusted environment or use `https://` scheme explicitly.
* To use `https://` scheme for *hostname* you have to either import host certificate to your OS certificate store or use *validate\_certs*: `no` which requires XenAPI library from XenServer 7.2 SDK or newer and Python 2.7.9 or newer.
* Network configuration inside a guest OS, by using *networks.type*, *networks.ip*, *networks.gateway* etc. parameters, is supported on XenServer 7.0 or newer for Windows guests by using official XenServer Guest agent support for network configuration. The module will try to detect if such support is available and utilize it, else it will use a custom method of configuration via xenstore. Since XenServer Guest agent only support None and Static types of network configuration, where None means DHCP configured interface, *networks.type* and *networks.type6* values `none` and `dhcp` have same effect. More info here: <https://www.citrix.com/community/citrix-developer/citrix-hypervisor-developer/citrix-hypervisor-developing-products/citrix-hypervisor-staticip.html>
* On platforms without official support for network configuration inside a guest OS, network parameters will be written to xenstore `vm-data/networks/<vif_device>` key. Parameters can be inspected by using `xenstore ls` and `xenstore read` tools on \*nix guests or trough WMI interface on Windows guests. They can also be found in VM facts `instance.xenstore_data` key as returned by the module. It is up to the user to implement a boot time scripts or custom agent that will read the parameters from xenstore and configure network with given parameters. Take note that for xenstore data to become available inside a guest, a VM restart is needed hence module will require VM restart if any parameter is changed. This is a limitation of XenAPI and xenstore. Considering these limitations, network configuration trough xenstore is most useful for bootstraping newly deployed VMs, much less for reconfiguring existing ones. More info here: <https://support.citrix.com/article/CTX226713>
Examples
--------
```
- name: Create a VM from a template
community.general.xenserver_guest:
hostname: "{{ xenserver_hostname }}"
username: "{{ xenserver_username }}"
password: "{{ xenserver_password }}"
validate_certs: no
folder: /testvms
name: testvm_2
state: poweredon
template: CentOS 7
disks:
- size_gb: 10
sr: my_sr
hardware:
num_cpus: 6
num_cpu_cores_per_socket: 3
memory_mb: 512
cdrom:
type: iso
iso_name: guest-tools.iso
networks:
- name: VM Network
mac: aa:bb:dd:aa:00:14
wait_for_ip_address: yes
delegate_to: localhost
register: deploy
- name: Create a VM template
community.general.xenserver_guest:
hostname: "{{ xenserver_hostname }}"
username: "{{ xenserver_username }}"
password: "{{ xenserver_password }}"
validate_certs: no
folder: /testvms
name: testvm_6
is_template: yes
disk:
- size_gb: 10
sr: my_sr
hardware:
memory_mb: 512
num_cpus: 1
delegate_to: localhost
register: deploy
- name: Rename a VM (requires the VM's UUID)
community.general.xenserver_guest:
hostname: "{{ xenserver_hostname }}"
username: "{{ xenserver_username }}"
password: "{{ xenserver_password }}"
uuid: 421e4592-c069-924d-ce20-7e7533fab926
name: new_name
state: present
delegate_to: localhost
- name: Remove a VM by UUID
community.general.xenserver_guest:
hostname: "{{ xenserver_hostname }}"
username: "{{ xenserver_username }}"
password: "{{ xenserver_password }}"
uuid: 421e4592-c069-924d-ce20-7e7533fab926
state: absent
delegate_to: localhost
- name: Modify custom params (boot order)
community.general.xenserver_guest:
hostname: "{{ xenserver_hostname }}"
username: "{{ xenserver_username }}"
password: "{{ xenserver_password }}"
name: testvm_8
state: present
custom_params:
- key: HVM_boot_params
value: { "order": "ndc" }
delegate_to: localhost
- name: Customize network parameters
community.general.xenserver_guest:
hostname: "{{ xenserver_hostname }}"
username: "{{ xenserver_username }}"
password: "{{ xenserver_password }}"
name: testvm_10
networks:
- name: VM Network
ip: 192.168.1.100/24
gateway: 192.168.1.1
- type: dhcp
delegate_to: localhost
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changes** list / elements=string | always | Detected or made changes to VM **Sample:** [{'hardware': ['num\_cpus']}, {'disks\_changed': [[], ['size']]}, {'disks\_new': [{'name': 'new-disk', 'name\_desc': '', 'position': 2, 'size\_gb': '4', 'vbd\_userdevice': '2'}]}, {'cdrom': ['type', 'iso\_name']}, {'networks\_changed': [['mac']]}, {'networks\_new': [{'name': 'Pool-wide network associated with eth2', 'position': 1, 'vif\_device': '1'}]}, 'need\_poweredoff'] |
| **instance** dictionary | always | Metadata about the VM **Sample:** {'cdrom': {'type': 'none'}, 'customization\_agent': 'native', 'disks': [{'name': 'testvm\_11-0', 'name\_desc': '', 'os\_device': 'xvda', 'size': 42949672960, 'sr': 'Local storage', 'sr\_uuid': '0af1245e-bdb0-ba33-1446-57a962ec4075', 'vbd\_userdevice': '0'}, {'name': 'testvm\_11-1', 'name\_desc': '', 'os\_device': 'xvdb', 'size': 42949672960, 'sr': 'Local storage', 'sr\_uuid': '0af1245e-bdb0-ba33-1446-57a962ec4075', 'vbd\_userdevice': '1'}], 'domid': '56', 'folder': '', 'hardware': {'memory\_mb': 8192, 'num\_cpu\_cores\_per\_socket': 2, 'num\_cpus': 4}, 'home\_server': '', 'is\_template': False, 'name': 'testvm\_11', 'name\_desc': '', 'networks': [{'gateway': '192.168.0.254', 'gateway6': 'fc00::fffe', 'ip': '192.168.0.200', 'ip6': ['fe80:0000:0000:0000:e9cb:625a:32c5:c291', 'fc00:0000:0000:0000:0000:0000:0000:0001'], 'mac': 'ba:91:3a:48:20:76', 'mtu': '1500', 'name': 'Pool-wide network associated with eth1', 'netmask': '255.255.255.128', 'prefix': '25', 'prefix6': '64', 'vif\_device': '0'}], 'other\_config': {'base\_template\_name': 'Windows Server 2016 (64-bit)', 'import\_task': 'OpaqueRef:e43eb71c-45d6-5351-09ff-96e4fb7d0fa5', 'install-methods': 'cdrom', 'instant': 'true', 'mac\_seed': 'f83e8d8a-cfdc-b105-b054-ef5cb416b77e'}, 'platform': {'acpi': '1', 'apic': 'true', 'cores-per-socket': '2', 'device\_id': '0002', 'hpet': 'true', 'nx': 'true', 'pae': 'true', 'timeoffset': '-25200', 'vga': 'std', 'videoram': '8', 'viridian': 'true', 'viridian\_reference\_tsc': 'true', 'viridian\_time\_ref\_count': 'true'}, 'state': 'poweredon', 'uuid': 'e3c0b2d5-5f05-424e-479c-d3df8b3e7cda', 'xenstore\_data': {'vm-data': ''}} |
### Authors
* Bojan Vitnik (@bvitnik) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#e684908f92888f8dc0c5d5d1ddc0c5d3d4ddc0c5d2dedd8b878f8895929483878bc0c5d2d0dd9495)>
ansible community.general.pulp_repo β Add or remove Pulp repos from a remote host. community.general.pulp\_repo β Add or remove Pulp repos from a remote host.
===========================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.pulp_repo`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add or remove Pulp repos from a remote host.
* Note, this is for Pulp 2 only.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **add\_export\_distributor** boolean | **Choices:*** **no** β
* yes
| Whether or not to add the export distributor to new `rpm` repositories. |
| **client\_cert** path | | PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, `client_key` is not required. |
| **client\_key** path | | PEM formatted file that contains your private key to be used for SSL client authentication. If `client_cert` contains both the certificate and key, this option is not required. |
| **feed** string | | Upstream feed URL to receive updates from. |
| **feed\_ca\_cert** string | | CA certificate string used to validate the feed source SSL certificate. This can be the file content or the path to the file.
aliases: importer\_ssl\_ca\_cert |
| **feed\_client\_cert** string | | Certificate used as the client certificate when synchronizing the repository. This is used to communicate authentication information to the feed source. The value to this option must be the full path to the certificate. The specified file may be the certificate itself or a single file containing both the certificate and private key. This can be the file content or the path to the file.
aliases: importer\_ssl\_client\_cert |
| **feed\_client\_key** string | | Private key to the certificate specified in *importer\_ssl\_client\_cert*, assuming it is not included in the certificate file itself. This can be the file content or the path to the file.
aliases: importer\_ssl\_client\_key |
| **force** boolean | **Choices:*** **no** β
* yes
| If `yes` do not get a cached copy. Alias `thirsty` has been deprecated and will be removed in 2.13.
aliases: thirsty |
| **force\_basic\_auth** boolean | **Choices:*** **no** β
* yes
| httplib2, the library used by the [ansible.builtin.uri](../../ansible/builtin/uri_module) module only sends authentication information when a webservice responds to an initial request with a 401 status. Since some basic auth services do not properly send a 401, logins will fail. This option forces the sending of the Basic authentication header upon initial request. |
| **generate\_sqlite** boolean | **Choices:*** **no** β
* yes
| Boolean flag to indicate whether sqlite files should be generated during a repository publish. |
| **http\_agent** string | **Default:**"ansible-httpget" | Header to identify as, generally appears in web server logs. |
| **name** string / required | | Name of the repo to add or remove. This correlates to repo-id in Pulp.
aliases: repo |
| **proxy\_host** string | | Proxy url setting for the pulp repository importer. This is in the format scheme://host. |
| **proxy\_password** string | | Proxy password for the pulp repository importer. |
| **proxy\_port** string | | Proxy port setting for the pulp repository importer. |
| **proxy\_username** string | | Proxy username for the pulp repository importer. |
| **publish\_distributor** string | | Distributor to use when state is `publish`. The default is to publish all distributors. |
| **pulp\_host** string | **Default:**"https://127.0.0.1" | URL of the pulp server to connect to. |
| **relative\_url** string | | Relative URL for the local repository. It's required when state=present. |
| **repo\_type** string | **Default:**"rpm" | Repo plugin type to use (i.e. `rpm`, `docker`). |
| **repoview** boolean | **Choices:*** **no** β
* yes
| Whether to generate repoview files for a published repository. Setting this to "yes" automatically activates `generate\_sqlite`. |
| **serve\_http** boolean | **Choices:*** **no** β
* yes
| Make the repo available over HTTP. |
| **serve\_https** boolean | **Choices:*** no
* **yes** β
| Make the repo available over HTTPS. |
| **state** string | **Choices:*** **present** β
* absent
* sync
* publish
| The repo state. A state of `sync` will queue a sync of the repo. This is asynchronous but not delayed like a scheduled sync. A state of `publish` will use the repository's distributor to publish the content. |
| **url** string | | HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path |
| **url\_password** string | | The password for use in HTTP basic authentication to the pulp API. If the *url\_username* parameter is not specified, the *url\_password* parameter will not be used. |
| **url\_username** string | | The username for use in HTTP basic authentication to the pulp API. |
| **use\_gssapi** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication. Requires the Python library [gssapi](https://github.com/pythongssapi/python-gssapi) to be installed. Credentials for GSSAPI can be specified with *url\_username*/*url\_password* or with the GSSAPI env var `KRB5CCNAME` that specified a custom Kerberos credential cache. NTLM authentication is `not` supported even if the GSSAPI mech for NTLM has been installed. |
| **use\_proxy** boolean | **Choices:*** no
* **yes** β
| If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
| **wait\_for\_completion** boolean | **Choices:*** **no** β
* yes
| Wait for asynchronous tasks to complete before returning. |
Notes
-----
Note
* This module can currently only create distributors and importers on rpm repositories. Contributions to support other repo types are welcome.
Examples
--------
```
- name: Create a new repo with name 'my_repo'
community.general.pulp_repo:
name: my_repo
relative_url: my/repo
state: present
- name: Create a repo with a feed and a relative URL
community.general.pulp_repo:
name: my_centos_updates
repo_type: rpm
feed: http://mirror.centos.org/centos/6/updates/x86_64/
relative_url: centos/6/updates
url_username: admin
url_password: admin
force_basic_auth: yes
state: present
- name: Remove a repo from the pulp server
community.general.pulp_repo:
name: my_old_repo
repo_type: rpm
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **repo** string | success | Name of the repo that the action was performed on. **Sample:** my\_repo |
### Authors
* Joe Adams (@sysadmind)
| programming_docs |
ansible community.general.scaleway_ip β Scaleway IP management module community.general.scaleway\_ip β Scaleway IP management module
==============================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.scaleway_ip`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module manages IP on Scaleway account <https://developer.scaleway.com>
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_timeout** integer | **Default:**30 | HTTP timeout to Scaleway API in seconds.
aliases: timeout |
| **api\_token** string / required | | Scaleway OAuth token.
aliases: oauth\_token |
| **api\_url** string | **Default:**"https://api.scaleway.com" | Scaleway API URL.
aliases: base\_url |
| **id** string | | id of the Scaleway IP (UUID) |
| **organization** string / required | | Scaleway organization identifier |
| **query\_parameters** dictionary | **Default:**{} | List of parameters passed to the query string. |
| **region** string / required | **Choices:*** ams1
* EMEA-NL-EVS
* par1
* EMEA-FR-PAR1
* par2
* EMEA-FR-PAR2
* waw1
* EMEA-PL-WAW1
| Scaleway region to use (for example par1). |
| **reverse** string | | Reverse to assign to the IP |
| **server** string | | id of the server you want to attach an IP to. To unattach an IP don't specify this option |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the IP. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Scaleway API. |
Notes
-----
Note
* Also see the API documentation on <https://developer.scaleway.com/>
* If `api_token` is not set within the module, the following environment variables can be used in decreasing order of precedence `SCW_TOKEN`, `SCW_API_KEY`, `SCW_OAUTH_TOKEN` or `SCW_API_TOKEN`.
* If one wants to use a different `api_url` one can also set the `SCW_API_URL` environment variable.
Examples
--------
```
- name: Create an IP
community.general.scaleway_ip:
organization: '{{ scw_org }}'
state: present
region: par1
register: ip_creation_task
- name: Make sure IP deleted
community.general.scaleway_ip:
id: '{{ ip_creation_task.scaleway_ip.id }}'
state: absent
region: par1
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | when `state=present` | This is only present when `state=present`
**Sample:** {'ips': [{'address': '212.47.232.136', 'id': 'dd9e8df6-6775-4863-b517-e0b0ee3d7477', 'organization': '951df375-e094-4d26-97c1-ba548eeb9c42', 'reverse': None, 'server': {'id': '3f1568ca-b1a2-4e98-b6f7-31a0588157f1', 'name': 'ansible\_tuto-1'}}]} |
### Authors
* Remy Leone (@sieben)
ansible community.general.cobbler β Cobbler inventory source community.general.cobbler β Cobbler inventory source
====================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.cobbler`.
New in version 1.0.0: of community.general
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get inventory hosts from the cobbler service.
* Uses a configuration file as an inventory source, it must end in `.cobbler.yml` or `.cobbler.yaml` and has a `plugin: cobbler` entry.
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **cache** boolean | **Choices:*** **no** β
* yes
| ini entries: [inventory]cache = no env:ANSIBLE\_INVENTORY\_CACHE | Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work. |
| **cache\_connection** string | | ini entries: [defaults]fact\_caching\_connection = None [inventory]cache\_connection = None env:ANSIBLE\_CACHE\_PLUGIN\_CONNECTION env:ANSIBLE\_INVENTORY\_CACHE\_CONNECTION | Cache connection data or path, read cache plugin documentation for specifics. |
| **cache\_fallback** boolean | **Choices:*** **no** β
* yes
| | Fallback to cached results if connection to cobbler fails |
| **cache\_plugin** string | **Default:**"memory" | ini entries: [defaults]fact\_caching = memory [inventory]cache\_plugin = memory env:ANSIBLE\_CACHE\_PLUGIN env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN | Cache plugin to use for the inventory's source data. |
| **cache\_prefix** string | **Default:**"ansible\_inventory\_" | ini entries: [default]fact\_caching\_prefix = ansible\_inventory\_ [inventory]cache\_prefix = ansible\_inventory\_ env:ANSIBLE\_CACHE\_PLUGIN\_PREFIX env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN\_PREFIX | Prefix to use for cache plugin files/tables |
| **cache\_timeout** integer | **Default:**3600 | ini entries: [defaults]fact\_caching\_timeout = 3600 [inventory]cache\_timeout = 3600 env:ANSIBLE\_CACHE\_PLUGIN\_TIMEOUT env:ANSIBLE\_INVENTORY\_CACHE\_TIMEOUT | Cache duration in seconds |
| **exclude\_profiles** list / elements=string | **Default:**[] | | Profiles to exclude from inventory |
| **group** string | **Default:**"cobbler" | | Group to place all hosts into |
| **group\_by** list / elements=string | **Default:**["mgmt\_classes", "owners", "status"] | | Keys to group hosts by |
| **group\_prefix** string | **Default:**"cobbler\_" | | Prefix to apply to cobbler groups |
| **password** string | | env:COBBLER\_PASSWORD | Cobbler authentication password |
| **plugin** string / required | **Choices:*** cobbler
* community.general.cobbler
| | The name of this plugin, it should always be set to `community.general.cobbler` for this plugin to recognize it as it's own. |
| **url** string | **Default:**"http://cobbler/cobbler\_api" | env:COBBLER\_SERVER | URL to cobbler. |
| **user** string | | env:COBBLER\_USER | Cobbler authentication user. |
| **want\_facts** boolean | **Choices:*** no
* **yes** β
| | Toggle, if `true` the plugin will retrieve host facts from the server |
Examples
--------
```
# my.cobbler.yml
plugin: community.general.cobbler
url: http://cobbler/cobbler_api
user: ansible-tester
password: secure
```
### Authors
* Orion Poplawski (@opoplawski)
ansible community.general.wakeonlan β Send a magic Wake-on-LAN (WoL) broadcast packet community.general.wakeonlan β Send a magic Wake-on-LAN (WoL) broadcast packet
=============================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.wakeonlan`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
Synopsis
--------
* The `wakeonlan` module sends magic Wake-on-LAN (WoL) broadcast packets.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **broadcast** string | **Default:**"255.255.255.255" | Network broadcast address to use for broadcasting magic Wake-on-LAN packet. |
| **mac** string / required | | MAC address to send Wake-on-LAN broadcast packet for. |
| **port** integer | **Default:**7 | UDP port to use for magic Wake-on-LAN packet. |
Notes
-----
Note
* This module sends a magic packet, without knowing whether it worked
* Only works if the target system was properly configured for Wake-on-LAN (in the BIOS and/or the OS)
* Some BIOSes have a different (configurable) Wake-on-LAN boot order (i.e. PXE first).
See Also
--------
See also
[community.windows.win\_wakeonlan](../windows/win_wakeonlan_module#ansible-collections-community-windows-win-wakeonlan-module)
The official documentation on the **community.windows.win\_wakeonlan** module.
Examples
--------
```
- name: Send a magic Wake-on-LAN packet to 00:00:5E:00:53:66
community.general.wakeonlan:
mac: '00:00:5E:00:53:66'
broadcast: 192.0.2.23
delegate_to: localhost
- community.general.wakeonlan:
mac: 00:00:5E:00:53:66
port: 9
delegate_to: localhost
```
### Authors
* Dag Wieers (@dagwieers)
ansible community.general.dsv β Get secrets from Thycotic DevOps Secrets Vault community.general.dsv β Get secrets from Thycotic DevOps Secrets Vault
======================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.dsv`.
New in version 1.0.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Uses the Thycotic DevOps Secrets Vault Python SDK to get Secrets from a DSV *tenant* using a *client\_id* and *client\_secret*.
Requirements
------------
The below requirements are needed on the local controller node that executes this lookup.
* python-dsv-sdk - <https://pypi.org/project/python-dsv-sdk/>
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_terms** string / required | | | The path to the secret, e.g. `/staging/servers/web1`. |
| **client\_id** string / required | | ini entries: [dsv\_lookup]client\_id = None env:DSV\_CLIENT\_ID | The client\_id with which to request the Access Grant. |
| **client\_secret** string / required | | ini entries: [dsv\_lookup]client\_secret = None env:DSV\_CLIENT\_SECRET | The client secret associated with the specific *client\_id*. |
| **tenant** string / required | | ini entries: [dsv\_lookup]tenant = None env:DSV\_TENANT | The first format parameter in the default *url\_template*. |
| **tld** string | **Default:**"com" | ini entries: [dsv\_lookup]tld = com env:DSV\_TLD | The top-level domain of the tenant; the second format parameter in the default *url\_template*. |
| **url\_template** string | **Default:**"https://{}.secretsvaultcloud.{}/v1" | ini entries: [dsv\_lookup]url\_template = https://{}.secretsvaultcloud.{}/v1 env:DSV\_URL\_TEMPLATE | The path to prepend to the base URL to form a valid REST API request. |
Examples
--------
```
- hosts: localhost
vars:
secret: "{{ lookup('community.general.dsv', '/test/secret') }}"
tasks:
- ansible.builtin.debug:
msg: 'the password is {{ secret["data"]["password"] }}'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:
| Key | Returned | Description |
| --- | --- | --- |
| **\_list** list / elements=dictionary | success | One or more JSON responses to `GET /secrets/{path}`. See <https://dsv.thycotic.com/api/index.html#operation/getSecret>. |
### Authors
* Adam Migus (@amigus) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#3455505559121707030f121701060f1217000c0f595d534147121700020f5b4653)>
ansible community.general.ovh_monthly_billing β Manage OVH monthly billing community.general.ovh\_monthly\_billing β Manage OVH monthly billing
====================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ovh_monthly_billing`.
New in version 0.2.0: of community.general
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Enable monthly billing on OVH cloud intances (be aware OVH does not allow to disable it).
Requirements
------------
The below requirements are needed on the host that executes this module.
* ovh
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **application\_key** string | | The applicationKey to use |
| **application\_secret** string | | The application secret to use |
| **consumer\_key** string | | The consumer key to use |
| **endpoint** string | | The endpoint to use (for instance ovh-eu) |
| **instance\_id** string / required | | ID of the instance, get it with [https://api.ovh.com/console/#/cloud/project/%7BserviceName%7D/instance#GET](#)
|
| **project\_id** string / required | | ID of the project, get it with [https://api.ovh.com/console/#/cloud/project#GET](#)
|
Examples
--------
```
- name: Basic usage, using auth from /etc/ovh.conf
community.general.ovh_monthly_billing:
project_id: 0c727a20aa144485b70c44dee9123b46
instance_id: 8fa89ad2-8f08-4220-9fa4-9695ea23e948
# Get openstack cloud ID and instance ID, OVH use them in its API
- name: Get openstack cloud ID and instance ID
os_server_info:
cloud: myProjectName
region_name: myRegionName
server: myServerName
register: openstack_servers
- name: Use IDs
community.general.ovh_monthly_billing:
project_id: "{{ openstack_servers.0.tenant_id }}"
instance_id: "{{ openstack_servers.0.id }}"
application_key: yourkey
application_secret: yoursecret
consumer_key: yourconsumerkey
```
### Authors
* Francois Lallart (@fraff)
ansible community.general.ovh_ip_loadbalancing_backend β Manage OVH IP LoadBalancing backends community.general.ovh\_ip\_loadbalancing\_backend β Manage OVH IP LoadBalancing backends
========================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ovh_ip_loadbalancing_backend`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage OVH (French European hosting provider) LoadBalancing IP backends
Requirements
------------
The below requirements are needed on the host that executes this module.
* ovh > 0.3.5
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **application\_key** string / required | | The applicationKey to use |
| **application\_secret** string / required | | The application secret to use |
| **backend** string / required | | The IP address of the backend to update / modify / delete |
| **consumer\_key** string / required | | The consumer key to use |
| **endpoint** string / required | | The endpoint to use ( for instance ovh-eu) |
| **name** string / required | | Name of the LoadBalancing internal name (ip-X.X.X.X) |
| **probe** string | **Choices:*** **none** β
* http
* icmp
* oco
| Determines the type of probe to use for this backend |
| **state** string | **Choices:*** **present** β
* absent
| Determines whether the backend is to be created/modified or deleted |
| **timeout** integer | **Default:**120 | The timeout in seconds used to wait for a task to be completed. |
| **weight** integer | **Default:**8 | Determines the weight for this backend |
Notes
-----
Note
* Uses the python OVH Api <https://github.com/ovh/python-ovh>. You have to create an application (a key and secret) with a consumer key as described into <https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/>
Examples
--------
```
- name: Adds or modify the backend '212.1.1.1' to a loadbalancing 'ip-1.1.1.1'
ovh_ip_loadbalancing:
name: ip-1.1.1.1
backend: 212.1.1.1
state: present
probe: none
weight: 8
endpoint: ovh-eu
application_key: yourkey
application_secret: yoursecret
consumer_key: yourconsumerkey
- name: Removes a backend '212.1.1.1' from a loadbalancing 'ip-1.1.1.1'
ovh_ip_loadbalancing:
name: ip-1.1.1.1
backend: 212.1.1.1
state: absent
endpoint: ovh-eu
application_key: yourkey
application_secret: yoursecret
consumer_key: yourconsumerkey
```
### Authors
* Pascal Heraud (@pascalheraud)
ansible community.general.ibm_sa_domain β Manages domains on IBM Spectrum Accelerate Family storage systems community.general.ibm\_sa\_domain β Manages domains on IBM Spectrum Accelerate Family storage systems
=====================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.ibm_sa_domain`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to add domains to or removes them from IBM Spectrum Accelerate Family storage systems.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* pyxcli
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **domain** string / required | | Name of the domain to be managed. |
| **endpoints** string / required | | The hostname or management IP of Spectrum Accelerate storage system. |
| **hard\_capacity** string | | Hard capacity of the domain. |
| **ldap\_id** string | | ldap id to add to the domain. |
| **max\_cgs** string | | Number of max cgs. |
| **max\_dms** string | | Number of max dms. |
| **max\_mirrors** string | | Number of max\_mirrors. |
| **max\_pools** string | | Number of max\_pools. |
| **max\_volumes** string | | Number of max\_volumes. |
| **password** string / required | | Password for username on the spectrum accelerate storage system. |
| **perf\_class** string | | Add the domain to a performance class. |
| **size** string | | Size of the domain. |
| **soft\_capacity** string | | Soft capacity of the domain. |
| **state** string | **Choices:*** **present** β
* absent
| The desired state of the domain. |
| **username** string / required | | Management user on the spectrum accelerate storage system. |
Notes
-----
Note
* This module requires pyxcli python library. Use βpip install pyxcliβ in order to get pyxcli.
Examples
--------
```
- name: Define new domain.
community.general.ibm_sa_domain:
domain: domain_name
size: domain_size
state: present
username: admin
password: secret
endpoints: hostdev-system
- name: Delete domain.
community.general.ibm_sa_domain:
domain: domain_name
state: absent
username: admin
password: secret
endpoints: hostdev-system
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | as needed | module return status. **Sample:** domain 'domain\_name' created successfully. |
### Authors
* Tzur Eliyahu (@tzure)
| programming_docs |
ansible community.general.profitbricks β Create, destroy, start, stop, and reboot a ProfitBricks virtual machine. community.general.profitbricks β Create, destroy, start, stop, and reboot a ProfitBricks virtual machine.
=========================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.profitbricks`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Create, destroy, update, start, stop, and reboot a ProfitBricks virtual machine. When the virtual machine is created it can optionally wait for it to be βrunningβ before returning. This module has a dependency on profitbricks >= 1.0.0
Requirements
------------
The below requirements are needed on the host that executes this module.
* profitbricks
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **assign\_public\_ip** boolean | **Choices:*** **no** β
* yes
| This will assign the machine to the public LAN. If no LAN exists with public Internet access it is created. |
| **auto\_increment** boolean | **Choices:*** no
* **yes** β
| Whether or not to increment a single number in the name for created virtual machines. |
| **bus** string | **Choices:*** IDE
* **VIRTIO** β
| The bus type for the volume. |
| **cores** integer | **Default:**2 | The number of CPU cores to allocate to the virtual machine. |
| **count** integer | **Default:**1 | The number of virtual machines to create. |
| **cpu\_family** string | **Choices:*** **AMD\_OPTERON** β
* INTEL\_XEON
| The CPU family type to allocate to the virtual machine. |
| **datacenter** string | | The datacenter to provision this virtual machine. |
| **disk\_type** string | **Choices:*** SSD
* **HDD** β
| the type of disk to be allocated. |
| **image** string | | The system image ID for creating the virtual machine, e.g. a3eae284-a2fe-11e4-b187-5f1f641608c8. |
| **image\_password** string | | Password set for the administrative user. |
| **instance\_ids** list / elements=string | | list of instance ids, currently only used when state='absent' to remove instances. |
| **lan** integer | **Default:**1 | The ID of the LAN you wish to add the servers to. |
| **location** string | **Choices:*** **us/las** β
* de/fra
* de/fkb
| The datacenter location. Use only if you want to create the Datacenter or else this value is ignored. |
| **name** string | | The name of the virtual machine. |
| **ram** integer | **Default:**2048 | The amount of memory to allocate to the virtual machine. |
| **remove\_boot\_volume** boolean | **Choices:*** no
* **yes** β
| remove the bootVolume of the virtual machine you're destroying. |
| **ssh\_keys** list / elements=string | | Public SSH keys allowing access to the virtual machine. |
| **state** string | **Default:**"present" | create or terminate instances The choices available are: `running`, `stopped`, `absent`, `present`. |
| **subscription\_password** string | | THe ProfitBricks password. Overrides the PB\_PASSWORD environment variable. |
| **subscription\_user** string | | The ProfitBricks username. Overrides the PB\_SUBSCRIPTION\_ID environment variable. |
| **volume\_size** integer | **Default:**10 | The size in GB of the boot volume. |
| **wait** boolean | **Choices:*** no
* **yes** β
| wait for the instance to be in state 'running' before returning |
| **wait\_timeout** integer | **Default:**600 | how long before wait gives up, in seconds |
Examples
--------
```
# Note: These examples do not set authentication details, see the AWS Guide for details.
# Provisioning example
- name: Create three servers and enumerate their names
community.general.profitbricks:
datacenter: Tardis One
name: web%02d.stackpointcloud.com
cores: 4
ram: 2048
volume_size: 50
cpu_family: INTEL_XEON
image: a3eae284-a2fe-11e4-b187-5f1f641608c8
location: us/las
count: 3
assign_public_ip: true
- name: Remove virtual machines
community.general.profitbricks:
datacenter: Tardis One
instance_ids:
- 'web001.stackpointcloud.com'
- 'web002.stackpointcloud.com'
- 'web003.stackpointcloud.com'
wait_timeout: 500
state: absent
- name: Start virtual machines
community.general.profitbricks:
datacenter: Tardis One
instance_ids:
- 'web001.stackpointcloud.com'
- 'web002.stackpointcloud.com'
- 'web003.stackpointcloud.com'
wait_timeout: 500
state: running
- name: Stop virtual machines
community.general.profitbricks:
datacenter: Tardis One
instance_ids:
- 'web001.stackpointcloud.com'
- 'web002.stackpointcloud.com'
- 'web003.stackpointcloud.com'
wait_timeout: 500
state: stopped
```
### Authors
* Matt Baldwin (@baldwinSPC) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#1a787b767e6d73743c39292d213c392f28213c392e2221696e7b79716a7573746e7976756f7e3c392e2c21797577)>
ansible community.general.oneview_datacenter_info β Retrieve information about the OneView Data Centers community.general.oneview\_datacenter\_info β Retrieve information about the OneView Data Centers
=================================================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.oneview_datacenter_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about the OneView Data Centers.
* This module was called `oneview_datacenter_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [community.general.oneview\_datacenter\_info](#ansible-collections-community-general-oneview-datacenter-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* hpOneView >= 2.0.1
* python >= 2.7.9
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_version** integer | | OneView API Version. |
| **config** path | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration will be loaded from environment variables. For links to example configuration files or how to use the environment variables verify the notes section. |
| **hostname** string | | IP address or hostname for the appliance. |
| **image\_streamer\_hostname** string | | IP address or hostname for the HPE Image Streamer REST API. |
| **name** string | | Data Center name. |
| **options** list / elements=string | | Retrieve additional information. Options available: 'visualContent'. |
| **params** dictionary | | List of params to delimit, filter and sort the list of resources. params allowed: - `start`: The first item to return, using 0-based indexing. - `count`: The number of resources to return. - `filter`: A general filter/query string to narrow the list of items returned. - `sort`: The sort order of the returned data set. |
| **password** string | | Password for API authentication. |
| **username** string | | Username for API authentication. |
Notes
-----
Note
* A sample configuration file for the config parameter can be found at: <https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json>
* Check how to use environment variables for configuration at: <https://github.com/HewlettPackard/oneview-ansible#environment-variables>
* Additional Playbooks for the HPE OneView Ansible modules can be found at: <https://github.com/HewlettPackard/oneview-ansible/tree/master/examples>
* The OneView API version used will directly affect returned and expected fields in resources. Information on setting the desired API version and can be found at: <https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version>
Examples
--------
```
- name: Gather information about all Data Centers
community.general.oneview_datacenter_info:
hostname: 172.16.101.48
username: administrator
password: my_password
api_version: 500
delegate_to: localhost
register: result
- name: Print fetched information about Data Centers
ansible.builtin.debug:
msg: "{{ result.datacenters }}"
- name: Gather paginated, filtered and sorted information about Data Centers
community.general.oneview_datacenter_info:
hostname: 172.16.101.48
username: administrator
password: my_password
api_version: 500
params:
start: 0
count: 3
sort: 'name:descending'
filter: 'state=Unmanaged'
register: result
- name: Print fetched information about paginated, filtered and sorted list of Data Centers
ansible.builtin.debug:
msg: "{{ result.datacenters }}"
- name: Gather information about a Data Center by name
community.general.oneview_datacenter_info:
hostname: 172.16.101.48
username: administrator
password: my_password
api_version: 500
name: "My Data Center"
delegate_to: localhost
register: result
- name: Print fetched information about Data Center found by name
ansible.builtin.debug:
msg: "{{ result.datacenters }}"
- name: Gather information about the Data Center Visual Content
community.general.oneview_datacenter_info:
hostname: 172.16.101.48
username: administrator
password: my_password
api_version: 500
name: "My Data Center"
options:
- visualContent
delegate_to: localhost
register: result
- name: Print fetched information about Data Center found by name
ansible.builtin.debug:
msg: "{{ result.datacenters }}"
- name: Print fetched information about Data Center Visual Content
ansible.builtin.debug:
msg: "{{ result.datacenter_visual_content }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **datacenter\_visual\_content** dictionary | When requested, but can be null. | Has information about the Data Center Visual Content. |
| **datacenters** dictionary | Always, but can be null. | Has all the OneView information about the Data Centers. |
### Authors
* Alex Monteiro (@aalexmonteiro)
* Madhav Bharadwaj (@madhav-bharadwaj)
* Priyanka Sood (@soodpr)
* Ricardo Galeno (@ricardogpsf)
ansible community.general.java_keystore β Create a Java keystore in JKS format community.general.java\_keystore β Create a Java keystore in JKS format
=======================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.java_keystore`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Bundle a x509 certificate and its private key into a Java Keystore in JKS format.
Requirements
------------
The below requirements are needed on the host that executes this module.
* openssl in PATH (when *ssl\_backend=openssl*)
* keytool in PATH
* cryptography >= 3.0 (when *ssl\_backend=cryptography*)
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **attributes** string added in 2.3 of ansible.builtin | | The attributes the resulting file or directory should have. To get supported flags look at the man page for *chattr* on the target system. This string should contain the attributes in the same order as the one displayed by *lsattr*. The `=` operator is assumed as default, otherwise `+` or `-` operators need to be included in the string.
aliases: attr |
| **certificate** string | | Content of the certificate used to create the keystore. If the fingerprint of the provided certificate does not match the fingerprint of the certificate bundled in the keystore, the keystore is regenerated with the provided certificate. Exactly one of *certificate* or *certificate\_path* is required. |
| **certificate\_path** path added in 3.0.0 of community.general | | Location of the certificate used to create the keystore. If the fingerprint of the provided certificate does not match the fingerprint of the certificate bundled in the keystore, the keystore is regenerated with the provided certificate. Exactly one of *certificate* or *certificate\_path* is required. |
| **dest** path / required | | Absolute path of the generated keystore. |
| **force** boolean | **Choices:*** **no** β
* yes
| Keystore is created even if it already exists. |
| **group** string | | Name of the group that should own jks file. |
| **keystore\_type** string added in 3.3.0 of community.general | **Choices:*** jks
* pkcs12
| Type of the Java keystore. When this option is omitted and the keystore doesn't already exist, the behavior follows `keytool`'s default store type which depends on Java version; `pkcs12` since Java 9 and `jks` prior (may also be `pkcs12` if new default has been backported to this version). When this option is omitted and the keystore already exists, the current type is left untouched, unless another option leads to overwrite the keystore (in that case, this option behaves like for keystore creation). When *keystore\_type* is set, the keystore is created with this type if it doesn't already exist, or is overwritten to match the given type in case of mismatch. |
| **mode** raw | | Mode the file should be. |
| **name** string / required | | Name of the certificate in the keystore. If the provided name does not exist in the keystore, the module will re-create the keystore. This behavior changed in community.general 3.0.0, before that the module would fail when the name did not match. |
| **owner** string | | Name of the user that should own jks file. |
| **password** string / required | | Password that should be used to secure the keystore. If the provided password fails to unlock the keystore, the module will re-create the keystore with the new passphrase. This behavior changed in community.general 3.0.0, before that the module would fail when the password did not match. |
| **private\_key** string | | Content of the private key used to create the keystore. Exactly one of *private\_key* or *private\_key\_path* is required. |
| **private\_key\_passphrase** string added in 0.2.0 of community.general | | Passphrase used to read the private key, if required. |
| **private\_key\_path** path added in 3.0.0 of community.general | | Location of the private key used to create the keystore. Exactly one of *private\_key* or *private\_key\_path* is required. |
| **selevel** string | | The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the `range`. When set to `_default`, it will use the `level` portion of the policy if available. |
| **serole** string | | The role part of the SELinux file context. When set to `_default`, it will use the `role` portion of the policy if available. |
| **setype** string | | The type part of the SELinux file context. When set to `_default`, it will use the `type` portion of the policy if available. |
| **seuser** string | | The user part of the SELinux file context. By default it uses the `system` policy, where applicable. When set to `_default`, it will use the `user` portion of the policy if available. |
| **ssl\_backend** string added in 3.1.0 of community.general | **Choices:*** **openssl** β
* cryptography
| Backend for loading private keys and certificates. |
| **unsafe\_writes** boolean added in 2.2 of ansible.builtin | **Choices:*** **no** β
* yes
| Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. |
Notes
-----
Note
* *certificate* and *private\_key* require that their contents are available on the controller (either inline in a playbook, or with the `file` lookup), while *certificate\_path* and *private\_key\_path* require that the files are available on the target host.
* By design, any change of a value of options *keystore\_type*, *name* or *password*, as well as changes of key or certificate materials will cause the existing *dest* to be overwritten.
See Also
--------
See also
[community.crypto.openssl\_pkcs12](../crypto/openssl_pkcs12_module#ansible-collections-community-crypto-openssl-pkcs12-module)
The official documentation on the **community.crypto.openssl\_pkcs12** module.
[community.general.java\_cert](java_cert_module#ansible-collections-community-general-java-cert-module)
The official documentation on the **community.general.java\_cert** module.
Examples
--------
```
- name: Create a keystore for the given certificate/private key pair (inline)
community.general.java_keystore:
name: example
certificate: |
-----BEGIN CERTIFICATE-----
h19dUZ2co2fI/ibYiwxWk4aeNE6KWvCaTQOMQ8t6Uo2XKhpL/xnjoAgh1uCQN/69
MG+34+RhUWzCfdZH7T8/qDxJw2kEPKluaYh7KnMsba+5jHjmtzix5QIDAQABo4IB
-----END CERTIFICATE-----
private_key: |
-----BEGIN RSA PRIVATE KEY-----
DBVFTEVDVFJJQ0lURSBERSBGUkFOQ0UxFzAVBgNVBAsMDjAwMDIgNTUyMDgxMzE3
GLlDNMw/uHyME7gHFsqJA7O11VY6O5WQ4IDP3m/s5ZV6s+Nn6Lerz17VZ99
-----END RSA PRIVATE KEY-----
password: changeit
dest: /etc/security/keystore.jks
- name: Create a keystore for the given certificate/private key pair (with files on controller)
community.general.java_keystore:
name: example
certificate: "{{ lookup('file', '/path/to/certificate.crt') }}"
private_key: "{{ lookup('file', '/path/to/private.key') }}"
password: changeit
dest: /etc/security/keystore.jks
- name: Create a keystore for the given certificate/private key pair (with files on target host)
community.general.java_keystore:
name: snakeoil
certificate_path: /etc/ssl/certs/ssl-cert-snakeoil.pem
private_key_path: /etc/ssl/private/ssl-cert-snakeoil.key
password: changeit
dest: /etc/security/keystore.jks
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cmd** string | changed and failure | Executed command to get action done **Sample:** /usr/bin/openssl x509 -noout -in /tmp/user/1000/tmp8jd\_lh23 -fingerprint -sha256 |
| **err** string | failure | Output from stderr of keytool/openssl command after error of given command. **Sample:** Keystore password is too short - must be at least 6 characters |
| **msg** string | changed and failure | Output from stdout of keytool/openssl command after execution of given command or an error. **Sample:** Unable to find the current certificate fingerprint in ... |
| **rc** integer | changed and failure | keytool/openssl command execution return value **Sample:** 0 |
### Authors
* Guillaume Grossetie (@Mogztter)
* quidame (@quidame)
| programming_docs |
ansible community.general.airbrake_deployment β Notify airbrake about app deployments community.general.airbrake\_deployment β Notify airbrake about app deployments
==============================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.airbrake_deployment`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Notify airbrake about app deployments (see <https://airbrake.io/docs/api/#deploys-v4>).
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **environment** string / required | | The airbrake environment name, typically 'production', 'staging', etc. |
| **project\_id** string / required added in 0.2.0 of community.general | | Airbrake PROJECT\_ID |
| **project\_key** string / required added in 0.2.0 of community.general | | Airbrake PROJECT\_KEY. |
| **repo** string | | URL of the project repository |
| **revision** string | | A hash, number, tag, or other identifier showing what revision from version control was deployed |
| **url** string | **Default:**"https://api.airbrake.io/api/v4/projects/" | Optional URL to submit the notification to. Use to send notifications to Airbrake-compliant tools like Errbit. |
| **user** string | | The username of the person doing the deployment |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates for the target url will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
| **version** string added in 1.0.0 of community.general | | A string identifying what version was deployed |
Examples
--------
```
- name: Notify airbrake about an app deployment
community.general.airbrake_deployment:
project_id: '12345'
project_key: 'AAAAAA'
environment: staging
user: ansible
revision: '4.2'
- name: Notify airbrake about an app deployment, using git hash as revision
community.general.airbrake_deployment:
project_id: '12345'
project_key: 'AAAAAA'
environment: staging
user: ansible
revision: 'e54dd3a01f2c421b558ef33b5f79db936e2dcf15'
version: '0.2.0'
```
### Authors
* Bruce Pennypacker (@bpennypacker)
* Patrick Humpal (@phumpal)
ansible community.general.hponcfg β Configure HP iLO interface using hponcfg community.general.hponcfg β Configure HP iLO interface using hponcfg
====================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.hponcfg`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This modules configures the HP iLO interface using hponcfg.
Requirements
------------
The below requirements are needed on the host that executes this module.
* hponcfg tool
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **executable** string | **Default:**"hponcfg" | Path to the hponcfg executable (`hponcfg` which uses $PATH). |
| **minfw** string | | The minimum firmware level needed. |
| **path** string / required | | The XML file as accepted by hponcfg.
aliases: src |
| **verbose** boolean | **Choices:*** **no** β
* yes
| Run hponcfg in verbose mode (-v). |
Notes
-----
Note
* You need a working hponcfg on the target system.
Examples
--------
```
- name: Example hponcfg configuration XML
ansible.builtin.copy:
content: |
<ribcl VERSION="2.0">
<login USER_LOGIN="user" PASSWORD="password">
<rib_info MODE="WRITE">
<mod_global_settings>
<session_timeout value="0"/>
<ssh_status value="Y"/>
<ssh_port value="22"/>
<serial_cli_status value="3"/>
<serial_cli_speed value="5"/>
</mod_global_settings>
</rib_info>
</login>
</ribcl>
dest: /tmp/enable-ssh.xml
- name: Configure HP iLO using enable-ssh.xml
community.general.hponcfg:
src: /tmp/enable-ssh.xml
- name: Configure HP iLO on VMware ESXi hypervisor
community.general.hponcfg:
src: /tmp/enable-ssh.xml
executable: /opt/hp/tools/hponcfg
```
### Authors
* Dag Wieers (@dagwieers)
ansible community.general.imgadm β Manage SmartOS images community.general.imgadm β Manage SmartOS images
================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.imgadm`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage SmartOS virtual machine images through imgadm(1M)
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **force** boolean | **Choices:*** no
* yes
| Force a given operation (where supported by imgadm(1M)). |
| **pool** string | **Default:**"zones" | zpool to import to or delete images from. |
| **source** string | | URI for the image source. |
| **state** string / required | **Choices:*** present
* absent
* deleted
* imported
* updated
* vacuumed
| State the object operated on should be in. `imported` is an alias for for `present` and `deleted` for `absent`. When set to `vacuumed` and `uuid` to `*`, it will remove all unused images. |
| **type** string | **Choices:*** **imgapi** β
* docker
* dsapi
| Type for image sources. |
| **uuid** string | | Image UUID. Can either be a full UUID or `*` for all images. |
Examples
--------
```
- name: Import an image
community.general.imgadm:
uuid: '70e3ae72-96b6-11e6-9056-9737fd4d0764'
state: imported
- name: Delete an image
community.general.imgadm:
uuid: '70e3ae72-96b6-11e6-9056-9737fd4d0764'
state: deleted
- name: Update all images
community.general.imgadm:
uuid: '*'
state: updated
- name: Update a single image
community.general.imgadm:
uuid: '70e3ae72-96b6-11e6-9056-9737fd4d0764'
state: updated
- name: Add a source
community.general.imgadm:
source: 'https://datasets.project-fifo.net'
state: present
- name: Add a Docker source
community.general.imgadm:
source: 'https://docker.io'
type: docker
state: present
- name: Remove a source
community.general.imgadm:
source: 'https://docker.io'
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **source** string | When not managing an image. | Source that is managed. **Sample:** https://datasets.project-fifo.net |
| **state** string | success | State of the target, after execution. **Sample:** present |
| **uuid** string | When not managing an image source. | UUID for an image operated on. **Sample:** 70e3ae72-96b6-11e6-9056-9737fd4d0764 |
### Authors
* Jasper Lievisse Adriaanse (@jasperla)
ansible community.general.memset_zone β Creates and deletes Memset DNS zones. community.general.memset\_zone β Creates and deletes Memset DNS zones.
======================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.memset_zone`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage DNS zones in a Memset account.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string / required | | The API key obtained from the Memset control panel. |
| **force** boolean | **Choices:*** **no** β
* yes
| Forces deletion of a zone and all zone domains/zone records it contains. |
| **name** string / required | | The zone nickname; usually the same as the main domain. Ensure this value has at most 250 characters.
aliases: nickname |
| **state** string / required | **Choices:*** absent
* present
| Indicates desired state of resource. |
| **ttl** integer | **Choices:*** 0
* 300
* 600
* 900
* 1800
* 3600
* 7200
* 10800
* 21600
* 43200
* 86400
| The default TTL for all records created in the zone. This must be a valid int from <https://www.memset.com/apidocs/methods_dns.html#dns.zone_create>. |
Notes
-----
Note
* Zones can be thought of as a logical group of domains, all of which share the same DNS records (i.e. they point to the same IP). An API key generated via the Memset customer control panel is needed with the following minimum scope - *dns.zone\_create*, *dns.zone\_delete*, *dns.zone\_list*.
Examples
--------
```
# Create the zone 'test'
- name: Create zone
community.general.memset_zone:
name: test
state: present
api_key: 5eb86c9196ab03919abcf03857163741
ttl: 300
delegate_to: localhost
# Force zone deletion
- name: Force delete zone
community.general.memset_zone:
name: test
state: absent
api_key: 5eb86c9196ab03919abcf03857163741
force: true
delegate_to: localhost
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **memset\_api** complex | when state == present | Zone info from the Memset API |
| | **domains** list / elements=string | always | List of domains in this zone |
| | **id** string | always | Zone id **Sample:** b0bb1ce851aeea6feeb2dc32fe83bf9c |
| | **nickname** string | always | Zone name **Sample:** example.com |
| | **records** list / elements=string | always | List of DNS records for domains in this zone |
| | **ttl** integer | always | Default TTL for domains in this zone **Sample:** 300 |
### Authors
* Simon Weald (@glitchcrab)
ansible community.general.slackpkg β Package manager for Slackware >= 12.2 community.general.slackpkg β Package manager for Slackware >= 12.2
==================================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.slackpkg`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Manage binary packages for Slackware using βslackpkgβ which is available in versions after 12.2.
Requirements
------------
The below requirements are needed on the host that executes this module.
* Slackware >= 12.2
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name** list / elements=string / required | | name of package to install/remove
aliases: pkg |
| **state** string | **Choices:*** **present** β
* absent
* latest
* installed
* removed
| state of the package, you can use "installed" as an alias for `present` and removed as one for `absent`. |
| **update\_cache** boolean | **Choices:*** **no** β
* yes
| update the package database first Alias `update-cache` has been deprecated and will be removed in community.general 5.0.0.
aliases: update-cache |
Examples
--------
```
- name: Install package foo
community.general.slackpkg:
name: foo
state: present
- name: Remove packages foo and bar
community.general.slackpkg:
name: foo,bar
state: absent
- name: Make sure that it is the most updated package
community.general.slackpkg:
name: foo
state: latest
```
### Authors
* Kim NΓΈrgaard (@KimNorgaard)
ansible community.general.lxd_profile β Manage LXD profiles community.general.lxd\_profile β Manage LXD profiles
====================================================
Note
This plugin is part of the [community.general collection](https://galaxy.ansible.com/community/general) (version 3.8.1).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.general`.
To use it in a playbook, specify: `community.general.lxd_profile`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Management of LXD profiles
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **client\_cert** path | | The client certificate file path. If not specified, it defaults to `$HOME/.config/lxc/client.crt`.
aliases: cert\_file |
| **client\_key** path | | The client certificate key file path. If not specified, it defaults to `$HOME/.config/lxc/client.key`.
aliases: key\_file |
| **config** dictionary | | The config for the container (e.g. {"limits.memory": "4GB"}). See <https://github.com/lxc/lxd/blob/master/doc/rest-api.md#patch-3>
If the profile already exists and its "config" value in metadata obtained from GET /1.0/profiles/<name> <https://github.com/lxc/lxd/blob/master/doc/rest-api.md#get-19> are different, they this module tries to apply the configurations. Not all config values are supported to apply the existing profile. Maybe you need to delete and recreate a profile. |
| **description** string | | Description of the profile. |
| **devices** dictionary | | The devices for the profile (e.g. {"rootfs": {"path": "/dev/kvm", "type": "unix-char"}). See <https://github.com/lxc/lxd/blob/master/doc/rest-api.md#patch-3>
|
| **merge\_profile** boolean added in 2.1.0 of community.general | **Choices:*** **no** β
* yes
| Merge the configuration of the present profile with the new desired configuration, instead of replacing it. |
| **name** string / required | | Name of a profile. |
| **new\_name** string | | A new name of a profile. If this parameter is specified a profile will be renamed to this name. See <https://github.com/lxc/lxd/blob/master/doc/rest-api.md#post-11>
|
| **snap\_url** string | **Default:**"unix:/var/snap/lxd/common/lxd/unix.socket" | The unix domain socket path when LXD is installed by snap package manager. |
| **state** string | **Choices:*** **present** β
* absent
| Define the state of a profile. |
| **trust\_password** string | | The client trusted password. You need to set this password on the LXD server before running this module using the following command. lxc config set core.trust\_password <some random password> See <https://www.stgraber.org/2016/04/18/lxd-api-direct-interaction/>
If trust\_password is set, this module send a request for authentication before sending any requests. |
| **url** string | **Default:**"unix:/var/lib/lxd/unix.socket" | The unix domain socket path or the https URL for the LXD server. |
Notes
-----
Note
* Profiles must have a unique name. If you attempt to create a profile with a name that already existed in the users namespace the module will simply return as βunchangedβ.
Examples
--------
```
# An example for creating a profile
- hosts: localhost
connection: local
tasks:
- name: Create a profile
community.general.lxd_profile:
name: macvlan
state: present
config: {}
description: my macvlan profile
devices:
eth0:
nictype: macvlan
parent: br0
type: nic
# An example for creating a profile via http connection
- hosts: localhost
connection: local
tasks:
- name: Create macvlan profile
community.general.lxd_profile:
url: https://127.0.0.1:8443
# These client_cert and client_key values are equal to the default values.
#client_cert: "{{ lookup('env', 'HOME') }}/.config/lxc/client.crt"
#client_key: "{{ lookup('env', 'HOME') }}/.config/lxc/client.key"
trust_password: mypassword
name: macvlan
state: present
config: {}
description: my macvlan profile
devices:
eth0:
nictype: macvlan
parent: br0
type: nic
# An example for modify/merge a profile
- hosts: localhost
connection: local
tasks:
- name: Merge a profile
community.general.lxd_profile:
merge_profile: true
name: macvlan
state: present
config: {}
description: my macvlan profile
devices:
eth0:
nictype: macvlan
parent: br0
type: nic
# An example for deleting a profile
- hosts: localhost
connection: local
tasks:
- name: Delete a profile
community.general.lxd_profile:
name: macvlan
state: absent
# An example for renaming a profile
- hosts: localhost
connection: local
tasks:
- name: Rename a profile
community.general.lxd_profile:
name: macvlan
new_name: macvlan2
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **actions** list / elements=string | success | List of actions performed for the profile. **Sample:** ["create"] |
| **logs** list / elements=string | when ansible-playbook is invoked with -vvvv. | The logs of requests and responses. **Sample:** (too long to be placed here) |
| **old\_state** string | success | The old state of the profile **Sample:** absent |
### Authors
* Hiroaki Nakamura (@hnakamur)
ansible community.google.gce_net β create/destroy GCE networks and firewall rules community.google.gce\_net β create/destroy GCE networks and firewall rules
==========================================================================
Note
This plugin is part of the [community.google collection](https://galaxy.ansible.com/community/google) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.google`.
To use it in a playbook, specify: `community.google.gce_net`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can create and destroy Google Compute Engine networks and firewall rules <https://cloud.google.com/compute/docs/networking>. The *name* parameter is reserved for referencing a network while the *fwname* parameter is used to reference firewall rules. IPv4 Address ranges must be specified using the CIDR <http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing> format. Full install/configuration instructions for the gce\* modules can be found in the comments of ansible/test/gce\_tests.py.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* apache-libcloud >= 0.13.3, >= 0.17.0 if using JSON credentials
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allowed** string | | the protocol:ports to allow (*tcp:80* or *tcp:80,443* or *tcp:80-800;udp:1-25*) this parameter is mandatory when creating or updating a firewall rule |
| **credentials\_file** path | | path to the JSON file associated with the service account email |
| **fwname** string | | name of the firewall rule |
| **ipv4\_range** string | | the IPv4 address range in CIDR notation for the network this parameter is not mandatory when you specified existing network in name parameter, but when you create new network, this parameter is mandatory |
| **mode** string | **Choices:*** **legacy** β
* auto
* custom
| network mode for Google Cloud `legacy` indicates a network with an IP address range; `auto` automatically generates subnetworks in different regions; `custom` uses networks to group subnets of user specified IP address ranges https://cloud.google.com/compute/docs/networking#network\_types |
| **name** string | | name of the network |
| **pem\_file** path | | path to the pem file associated with the service account email This option is deprecated. Use `credentials_file`. |
| **project\_id** string | | your GCE project ID |
| **service\_account\_email** string | | service account email |
| **src\_range** list / elements=string | **Default:**[] | the source IPv4 address range in CIDR notation |
| **src\_tags** list / elements=string | **Default:**[] | the source instance tags for creating a firewall rule |
| **state** string | **Default:**"present" | desired state of the network or firewall Available choices are: `active`, `present`, `absent`, `deleted`. |
| **subnet\_desc** string | | description of subnet to create |
| **subnet\_name** string | | name of subnet to create |
| **subnet\_region** string | | region of subnet to create |
| **target\_tags** list / elements=string | **Default:**[] | the target instance tags for creating a firewall rule |
Examples
--------
```
# Create a 'legacy' Network
- name: Create Legacy Network
community.google.gce_net:
name: legacynet
ipv4_range: '10.24.17.0/24'
mode: legacy
state: present
# Create an 'auto' Network
- name: Create Auto Network
community.google.gce_net:
name: autonet
mode: auto
state: present
# Create a 'custom' Network
- name: Create Custom Network
community.google.gce_net:
name: customnet
mode: custom
subnet_name: "customsubnet"
subnet_region: us-east1
ipv4_range: '10.240.16.0/24'
state: "present"
# Create Firewall Rule with Source Tags
- name: Create Firewall Rule w/Source Tags
community.google.gce_net:
name: default
fwname: "my-firewall-rule"
allowed: tcp:80
state: "present"
src_tags: "foo,bar"
# Create Firewall Rule with Source Range
- name: Create Firewall Rule w/Source Range
community.google.gce_net:
name: default
fwname: "my-firewall-rule"
allowed: tcp:80
state: "present"
src_range: ['10.1.1.1/32']
# Create Custom Subnetwork
- name: Create Custom Subnetwork
community.google.gce_net:
name: privatenet
mode: custom
subnet_name: subnet_example
subnet_region: us-central1
ipv4_range: '10.0.0.0/16'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **allowed** string | When specified | Rules (ports and protocols) specified by this firewall rule. **Sample:** tcp:80;icmp |
| **fwname** string | When specified | Name of the firewall rule. **Sample:** my-fwname |
| **ipv4\_range** string | when specified or when a subnetwork is created | IPv4 range of the specified network or subnetwork. **Sample:** 10.0.0.0/16 |
| **name** string | always | Name of the network. **Sample:** my-network |
| **src\_range** list / elements=string | when specified | IP address blocks a firewall rule applies to. **Sample:** ['10.1.1.12/8'] |
| **src\_tags** list / elements=string | when specified while creating a firewall rule | Instance Tags firewall rule applies to. **Sample:** ['foo', 'bar'] |
| **state** string | always | State of the item operated on. **Sample:** present |
| **subnet\_name** string | when specified or when a subnetwork is created | Name of the subnetwork. **Sample:** my-subnetwork |
| **subnet\_region** string | when specified or when a subnetwork is created | Region of the specified subnet. **Sample:** us-east1 |
| **target\_tags** list / elements=string | when specified while creating a firewall rule | Instance Tags with these tags receive traffic allowed by firewall rule. **Sample:** ['foo', 'bar'] |
### Authors
* Eric Johnson (@erjohnso) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#a1c4d3cbcec9cfd2ce878292969a878294939a878295999ac6cecec6cdc4878295979ac2cecc)>, Tom Melendez (@supertom) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#88fbfdf8edfafce7e5aeabbbbfb3aeabbdbab3aeabbcb0b3efe7e7efe4edaeabbcbeb3ebe7e5)>
| programming_docs |
ansible Community.Google Community.Google
================
Collection version 1.0.0
Plugin Index
------------
These are the plugins in the community.google collection
### Lookup Plugins
* [gcp\_storage\_file](gcp_storage_file_lookup#ansible-collections-community-google-gcp-storage-file-lookup) β Return GC Storage content
### Modules
* [gc\_storage](gc_storage_module#ansible-collections-community-google-gc-storage-module) β This module manages objects/buckets in Google Cloud Storage.
* [gce\_eip](gce_eip_module#ansible-collections-community-google-gce-eip-module) β Create or Destroy Global or Regional External IP addresses.
* [gce\_img](gce_img_module#ansible-collections-community-google-gce-img-module) β utilize GCE image resources
* [gce\_instance\_template](gce_instance_template_module#ansible-collections-community-google-gce-instance-template-module) β create or destroy instance templates of Compute Engine of GCP.
* [gce\_labels](gce_labels_module#ansible-collections-community-google-gce-labels-module) β Create, Update or Destroy GCE Labels.
* [gce\_lb](gce_lb_module#ansible-collections-community-google-gce-lb-module) β create/destroy GCE load-balancer resources
* [gce\_mig](gce_mig_module#ansible-collections-community-google-gce-mig-module) β Create, Update or Destroy a Managed Instance Group (MIG).
* [gce\_net](gce_net_module#ansible-collections-community-google-gce-net-module) β create/destroy GCE networks and firewall rules
* [gce\_pd](gce_pd_module#ansible-collections-community-google-gce-pd-module) β utilize GCE persistent disk resources
* [gce\_snapshot](gce_snapshot_module#ansible-collections-community-google-gce-snapshot-module) β Create or destroy snapshots for GCE storage volumes
* [gce\_tag](gce_tag_module#ansible-collections-community-google-gce-tag-module) β add or remove tag(s) to/from GCE instances
* [gcpubsub](gcpubsub_module#ansible-collections-community-google-gcpubsub-module) β Create and Delete Topics/Subscriptions, Publish and pull messages on PubSub
* [gcpubsub\_info](gcpubsub_info_module#ansible-collections-community-google-gcpubsub-info-module) β List Topics/Subscriptions and Messages from Google PubSub.
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
ansible community.google.gce_lb β create/destroy GCE load-balancer resources community.google.gce\_lb β create/destroy GCE load-balancer resources
=====================================================================
Note
This plugin is part of the [community.google collection](https://galaxy.ansible.com/community/google) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.google`.
To use it in a playbook, specify: `community.google.gce_lb`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* This module can create and destroy Google Compute Engine `loadbalancer` and `httphealthcheck` resources. The primary LB resource is the `load_balancer` resource and the health check parameters are all prefixed with *httphealthcheck*. The full documentation for Google Compute Engine load balancing is at <https://developers.google.com/compute/docs/load-balancing/>. However, the ansible module simplifies the configuration by following the libcloud model. Full install/configuration instructions for the gce\* modules can be found in the comments of ansible/test/gce\_tests.py.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* apache-libcloud >= 0.13.3, >= 0.17.0 if using JSON credentials
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **credentials\_file** path | | path to the JSON file associated with the service account email |
| **external\_ip** string | | the external static IPv4 (or auto-assigned) address for the LB |
| **httphealthcheck\_healthy\_count** integer | **Default:**2 | number of consecutive successful checks before marking a node healthy |
| **httphealthcheck\_host** string | | host header to pass through on HTTP check requests |
| **httphealthcheck\_interval** integer | **Default:**5 | the duration in seconds between each health check request |
| **httphealthcheck\_name** string | | the name identifier for the HTTP health check |
| **httphealthcheck\_path** string | **Default:**"/" | the url path to use for HTTP health checking |
| **httphealthcheck\_port** integer | **Default:**80 | the TCP port to use for HTTP health checking |
| **httphealthcheck\_timeout** integer | **Default:**5 | the timeout in seconds before a request is considered a failed check |
| **httphealthcheck\_unhealthy\_count** integer | **Default:**2 | number of consecutive failed checks before marking a node unhealthy |
| **members** list / elements=string | | a list of zone/nodename pairs, e.g ['us-central1-a/www-a', ...] |
| **name** string | | name of the load-balancer resource |
| **pem\_file** path | | path to the pem file associated with the service account email This option is deprecated. Use 'credentials\_file'. |
| **port\_range** string | | the port (range) to forward, e.g. 80 or 8000-8888 defaults to all ports |
| **project\_id** string | | your GCE project ID |
| **protocol** string | **Default:**"tcp" | the protocol used for the load-balancer packet forwarding, tcp or udp the available choices are: `tcp` or `udp`. |
| **region** string | | the GCE region where the load-balancer is defined |
| **service\_account\_email** string | | service account email |
| **state** string | **Default:**"present" | desired state of the LB the available choices are: `active`, `present`, `absent`, `deleted`. |
Examples
--------
```
- name: Simple example of creating a new LB, adding members, and a health check
local_action:
module: gce_lb
name: testlb
region: us-central1
members: ["us-central1-a/www-a", "us-central1-b/www-b"]
httphealthcheck_name: hc
httphealthcheck_port: 80
httphealthcheck_path: "/up"
```
### Authors
* Eric Johnson (@erjohnso) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#d5b0a7bfbabdbba6baf3f6e6e2eef3f6e0e7eef3f6e1edeeb2babab2b9b0f3f6e1e3eeb6bab8)>
ansible community.google.gcpubsub_info β List Topics/Subscriptions and Messages from Google PubSub. community.google.gcpubsub\_info β List Topics/Subscriptions and Messages from Google PubSub.
============================================================================================
Note
This plugin is part of the [community.google collection](https://galaxy.ansible.com/community/google) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.google`.
To use it in a playbook, specify: `community.google.gcpubsub_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* List Topics/Subscriptions from Google PubSub. Use the gcpubsub module for topic/subscription management. See <https://cloud.google.com/pubsub/docs> for an overview.
* This module was called `gcpubsub_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* google-auth >= 0.5.0
* google-cloud-pubsub >= 0.22.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **credentials\_file** string | | path to the JSON file associated with the service account email |
| **project\_id** string | | your GCE project ID |
| **service\_account\_email** string | | service account email |
| **state** string | **Choices:*** **list** β
| list is the only valid option. |
| **topic** string | | GCP pubsub topic name. Only the name, not the full path, is required. |
| **view** string | **Choices:*** **topics** β
* subscriptions
| Choices are 'topics' or 'subscriptions' |
Notes
-----
Note
* list state enables user to list topics or subscriptions in the project. See examples for details.
Examples
--------
```
- name: List all Topics in a project
community.google.gcpubsub_info:
view: topics
state: list
- name: List all Subscriptions in a project
community.google.gcpubsub_info:
view: subscriptions
state: list
- name: List all Subscriptions for a Topic in a project
community.google.gcpubsub_info:
view: subscriptions
topic: my-topic
state: list
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **subscriptions** list / elements=string | When view is set to subscriptions. | List of subscriptions. **Sample:** ['mysubscription', 'mysubscription2'] |
| **topic** string | Always | Name of topic. Used to filter subscriptions. **Sample:** mytopic |
| **topics** list / elements=string | When view is set to topics. | List of topics. **Sample:** ['mytopic', 'mytopic2'] |
### Authors
* Tom Melendez (@supertom) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#10647f7d363323272b363325222b363324282b6365607562647f7d363324262b737f7d)>
ansible community.google.gce_eip β Create or Destroy Global or Regional External IP addresses. community.google.gce\_eip β Create or Destroy Global or Regional External IP addresses.
=======================================================================================
Note
This plugin is part of the [community.google collection](https://galaxy.ansible.com/community/google) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.google`.
To use it in a playbook, specify: `community.google.gce_eip`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create (reserve) or Destroy (release) Regional or Global IP Addresses. See <https://cloud.google.com/compute/docs/configure-instance-ip-addresses#reserve_new_static> for more on reserving static addresses.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* apache-libcloud >= 0.19.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **credentials\_file** path | | The path to the JSON file associated with the service account email. |
| **name** string / required | | Name of Address. |
| **pem\_file** path | | The path to the PEM file associated with the service account email. This option is deprecated and may be removed in a future release. Use *credentials\_file* instead. |
| **project\_id** string | | The Google Cloud Platform project ID to use. |
| **region** string / required | | Region to create the address in. Set to 'global' to create a global address. |
| **service\_account\_email** string | | service account email |
| **service\_account\_permissions** list / elements=string | | service account permissions |
| **state** string | **Choices:*** **present** β
* absent
| The state the address should be in. `present` or `absent` are the only valid options. |
Notes
-----
Note
* Global addresses can only be used with Global Forwarding Rules.
Examples
--------
```
- name: Create a Global external IP address
community.google.gce_eip:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"
name: my-global-ip
region: global
state: present
- name: Create a Regional external IP address
community.google.gce_eip:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"
name: my-global-ip
region: us-east1
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **address** string | always | IP address being operated on **Sample:** 35.186.222.233 |
| **name** string | always | name of the address being operated on **Sample:** my-address |
| **region** string | always | Which region an address belongs. **Sample:** global |
### Authors
* Tom Melendez (@supertom) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#afdbc0c2898c9c9894898c9a9d94898c9b9794dcdadfcadddbc0c2898c9b9994ccc0c2)>
ansible community.google.gce_mig β Create, Update or Destroy a Managed Instance Group (MIG). community.google.gce\_mig β Create, Update or Destroy a Managed Instance Group (MIG).
=====================================================================================
Note
This plugin is part of the [community.google collection](https://galaxy.ansible.com/community/google) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.google`.
To use it in a playbook, specify: `community.google.gce_mig`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, Update or Destroy a Managed Instance Group (MIG). See <https://cloud.google.com/compute/docs/instance-groups> for an overview. Full install/configuration instructions for the gce\* modules can be found in the comments of ansible/test/gce\_tests.py.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* apache-libcloud >= 1.2.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **autoscaling** dictionary | | A dictionary of configuration for the autoscaler. 'enabled (bool)', 'name (str)' and policy.max\_instances (int) are required fields if autoscaling is used. See <https://cloud.google.com/compute/docs/reference/beta/autoscalers> for more information on Autoscaling. |
| **credentials\_file** path | | Path to the JSON file associated with the service account email |
| **name** string / required | | Name of the Managed Instance Group. |
| **named\_ports** list / elements=string | | Define named ports that backend services can forward data to. Format is a a list of name:port dictionaries. |
| **pem\_file** path | | path to the pem file associated with the service account email This option is deprecated. Use 'credentials\_file'. |
| **project\_id** string | | GCE project ID |
| **recreate\_instances** boolean | **Choices:*** **no** β
* yes
| Recreate MIG instances. |
| **service\_account\_email** string | | service account email |
| **service\_account\_permissions** list / elements=string | | service account permissions |
| **size** integer | | Size of Managed Instance Group. If MIG already exists, it will be resized to the number provided here. Required for creating MIGs. |
| **state** string | **Choices:*** absent
* **present** β
| desired state of the resource |
| **template** string | | Instance Template to be used in creating the VMs. See <https://cloud.google.com/compute/docs/instance-templates> to learn more about Instance Templates. Required for creating MIGs. |
| **zone** string / required | | The GCE zone to use for this Managed Instance Group. |
Notes
-----
Note
* Resizing and Recreating VM are also supported.
* An existing instance template is required in order to create a Managed Instance Group.
Examples
--------
```
# Following playbook creates, rebuilds instances, resizes and then deletes a MIG.
# Notes:
# - Two valid Instance Templates must exist in your GCE project in order to run
# this playbook. Change the fields to match the templates used in your
# project.
# - The use of the 'pause' module is not required, it is just for convenience.
- name: Managed Instance Group Example
hosts: localhost
gather_facts: False
tasks:
- name: Create MIG
community.google.gce_mig:
name: ansible-mig-example
zone: us-central1-c
state: present
size: 1
template: my-instance-template-1
named_ports:
- name: http
port: 80
- name: foobar
port: 82
- name: Pause for 30 seconds
ansible.builtin.pause:
seconds: 30
- name: Recreate MIG Instances with Instance Template change.
community.google.gce_mig:
name: ansible-mig-example
zone: us-central1-c
state: present
template: my-instance-template-2-small
recreate_instances: yes
- name: Pause for 30 seconds
ansible.builtin.pause:
seconds: 30
- name: Resize MIG
community.google.gce_mig:
name: ansible-mig-example
zone: us-central1-c
state: present
size: 3
- name: Update MIG with Autoscaler
community.google.gce_mig:
name: ansible-mig-example
zone: us-central1-c
state: present
size: 3
template: my-instance-template-2-small
recreate_instances: yes
autoscaling:
enabled: yes
name: my-autoscaler
policy:
min_instances: 2
max_instances: 5
cool_down_period: 37
cpu_utilization:
target: .39
load_balancing_utilization:
target: 0.4
- name: Pause for 30 seconds
ansible.builtin.pause:
seconds: 30
- name: Delete MIG
community.google.gce_mig:
name: ansible-mig-example
zone: us-central1-c
state: absent
autoscaling:
enabled: no
name: my-autoscaler
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **created\_autoscaler** boolean | When the creation of an Autoscaler was attempted. | True if Autoscaler was attempted and created. False otherwise. **Sample:** True |
| **created\_instances** list / elements=string | When instances are created. | Names of instances created. **Sample:** ['ansible-mig-new-0k4y', 'ansible-mig-new-0zk5', 'ansible-mig-new-kp68'] |
| **deleted\_autoscaler** boolean | When the delete of an Autoscaler was attempted. | True if an Autoscaler delete attempted and succeeded. False returned if delete failed. **Sample:** True |
| **deleted\_instances** list / elements=string | When instances are deleted. | Names of instances deleted. **Sample:** ['ansible-mig-new-0k4y', 'ansible-mig-new-0zk5', 'ansible-mig-new-kp68'] |
| **name** string | changed | Name of the Managed Instance Group. **Sample:** my-managed-instance-group |
| **named\_ports** list / elements=string | when named\_ports are initially set or updated | list of named ports acted upon **Sample:** [{'name': 'http', 'port': 80}, {'name': 'foo', 'port': 82}] |
| **recreated\_instances** list / elements=string | When instances are recreated. | Names of instances recreated. **Sample:** ['ansible-mig-new-0k4y', 'ansible-mig-new-0zk5', 'ansible-mig-new-kp68'] |
| **resize\_created\_instances** list / elements=string | When a resize results in the creation of instances. | Names of instances created during resizing. **Sample:** ['ansible-mig-new-0k4y', 'ansible-mig-new-0zk5', 'ansible-mig-new-kp68'] |
| **resize\_deleted\_instances** list / elements=string | When a resize results in the deletion of instances. | Names of instances deleted during resizing. **Sample:** ['ansible-mig-new-0k4y', 'ansible-mig-new-0zk5', 'ansible-mig-new-kp68'] |
| **set\_named\_ports** boolean | named\_ports have been set | True if the named\_ports have been set **Sample:** True |
| **size** integer | changed | Number of VMs in Managed Instance Group. **Sample:** 4 |
| **template** string | changed | Instance Template to use for VMs. Must exist prior to using with MIG. **Sample:** my-instance-template |
| **updated\_autoscaler** boolean | When the update of an Autoscaler was attempted. | True if an Autoscaler update was attempted and succeeded. False returned if update failed. **Sample:** True |
| **updated\_named\_ports** boolean | named\_ports have been updated | True if the named\_ports have been updated **Sample:** True |
| **zone** string | always | Zone in which to launch MIG. **Sample:** us-central1-b |
### Authors
* Tom Melendez (@supertom) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#5723383a717464606c717462656c7174636f6c242227322523383a717463616c34383a)>
| programming_docs |
ansible community.google.gce_tag β add or remove tag(s) to/from GCE instances community.google.gce\_tag β add or remove tag(s) to/from GCE instances
======================================================================
Note
This plugin is part of the [community.google collection](https://galaxy.ansible.com/community/google) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.google`.
To use it in a playbook, specify: `community.google.gce_tag`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module can add or remove tags <https://cloud.google.com/compute/docs/label-or-tag-resources#tags> to/from GCE instances. Use βinstance\_patternβ to update multiple instances in a specify zone.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* apache-libcloud >= 0.17.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **instance\_name** string | | The name of the GCE instance to add/remove tags. Required if `instance_pattern` is not specified. |
| **instance\_pattern** string | | The pattern of GCE instance names to match for adding/removing tags. Full-Python regex is supported. See <https://docs.python.org/2/library/re.html> for details. If `instance_name` is not specified, this field is required. |
| **pem\_file** path | | Path to the PEM file associated with the service account email. |
| **project\_id** string | | Your GCE project ID. |
| **service\_account\_email** string | | Service account email. |
| **state** string | **Choices:*** absent
* **present** β
| Desired state of the tags. |
| **tags** list / elements=string / required | | Comma-separated list of tags to add or remove. |
| **zone** string | **Default:**"us-central1-a" | The zone of the disk specified by source. |
Notes
-----
Note
* Either *instance\_name* or *instance\_pattern* is required.
Examples
--------
```
- name: Add tags to instance
community.google.gce_tag:
instance_name: staging-server
tags: http-server,https-server,staging
zone: us-central1-a
state: present
- name: Remove tags from instance in default zone (us-central1-a)
community.google.gce_tag:
instance_name: test-server
tags: foo,bar
state: absent
- name: Add tags to instances in zone that match pattern
community.google.gce_tag:
instance_pattern: test-server-*
tags: foo,bar
zone: us-central1-a
state: present
```
### Authors
* Do Hoang Khiem (@dohoangkhiem) <([[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#1c787374737d727b77747579713a3f2f2b273a3f292e273a3f2824277b717d75703a3f282a277f7371)>
* Tom Melendez (@supertom)
ansible community.google.gc_storage β This module manages objects/buckets in Google Cloud Storage. community.google.gc\_storage β This module manages objects/buckets in Google Cloud Storage.
===========================================================================================
Note
This plugin is part of the [community.google collection](https://galaxy.ansible.com/community/google) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.google`.
To use it in a playbook, specify: `community.google.gc_storage`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* This module allows users to manage their objects/buckets in Google Cloud Storage. It allows upload and download operations and can set some canned permissions. It also allows retrieval of URLs for objects for use in playbooks, and retrieval of string contents of objects. This module requires setting the default project in GCS prior to playbook usage. See <https://developers.google.com/storage/docs/reference/v1/apiversion1> for information about setting the default project.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* boto >= 2.9
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bucket** string / required | | Bucket name. |
| **dest** path | | The destination file path when downloading an object/key with a GET operation. |
| **expiration** integer | **Default:**600 | Time limit (in seconds) for the URL generated and returned by GCA when performing a mode=put or mode=get\_url operation. This url is only available when public-read is the acl for the object.
aliases: expiry |
| **gs\_access\_key** string / required | | GS access key. If not set then the value of the GS\_ACCESS\_KEY\_ID environment variable is used. |
| **gs\_secret\_key** string / required | | GS secret key. If not set then the value of the GS\_SECRET\_ACCESS\_KEY environment variable is used. |
| **headers** dictionary | **Default:**{} | Headers to attach to object. |
| **mode** string / required | **Choices:*** get
* put
* get\_url
* get\_str
* delete
* create
| Switches the module behaviour between upload, download, get\_url (return download url) , get\_str (download object as string), create (bucket) and delete (bucket). |
| **object** path | | Keyname of the object inside the bucket. Can be also be used to create "virtual directories" (see examples). |
| **overwrite** boolean | **Choices:*** no
* **yes** β
| Forces an overwrite either locally on the filesystem or remotely with the object/key. Used with PUT and GET operations.
aliases: force |
| **permission** string | **Choices:*** **private** β
* public-read
* authenticated-read
| This option let's the user set the canned permissions on the object/bucket that are created. The permissions that can be set are 'private', 'public-read', 'authenticated-read'. |
| **region** string | **Default:**"US" | The gs region to use. If not defined then the value 'US' will be used. See <https://cloud.google.com/storage/docs/bucket-locations>
|
| **src** string | | The source file path when performing a PUT operation. |
| **versioning** boolean | **Choices:*** **no** β
* yes
| Whether versioning is enabled or disabled (note that once versioning is enabled, it can only be suspended) |
Examples
--------
```
- name: Upload some content
community.google.gc_storage:
bucket: mybucket
object: key.txt
src: /usr/local/myfile.txt
mode: put
permission: public-read
- name: Upload some headers
community.google.gc_storage:
bucket: mybucket
object: key.txt
src: /usr/local/myfile.txt
headers: '{"Content-Encoding": "gzip"}'
- name: Download some content
community.google.gc_storage:
bucket: mybucket
object: key.txt
dest: /usr/local/myfile.txt
mode: get
- name: Download an object as a string to use else where in your playbook
community.google.gc_storage:
bucket: mybucket
object: key.txt
mode: get_str
- name: Create an empty bucket
community.google.gc_storage:
bucket: mybucket
mode: create
- name: Create a bucket with key as directory
community.google.gc_storage:
bucket: mybucket
object: /my/directory/path
mode: create
- name: Delete a bucket and all contents
community.google.gc_storage:
bucket: mybucket
mode: delete
- name: Create a bucket with versioning enabled
community.google.gc_storage:
bucket: "mybucket"
versioning: yes
mode: create
- name: Create a bucket located in the eu
community.google.gc_storage:
bucket: "mybucket"
region: "europe-west3"
mode: create
```
### Authors
* Benno Joy (@bennojoy)
* Lukas Beumer (@Nitaco)
ansible community.google.gcp_storage_file β Return GC Storage content community.google.gcp\_storage\_file β Return GC Storage content
===============================================================
Note
This plugin is part of the [community.google collection](https://galaxy.ansible.com/community/google) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.google`.
To use it in a playbook, specify: `community.google.gcp_storage_file`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This lookup returns the contents from a file residing on Google Cloud Storage
Requirements
------------
The below requirements are needed on the local controller node that executes this lookup.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| | The type of credential used. |
| **bucket** string | | | The name of the bucket. |
| **env\_type** string | | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | | Array of scopes to be used. |
| **service\_account\_contents** jsonarg | | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **src** string | | | Source location of file (may be local machine or cloud depending on action). |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the c(gcp\_service\_account\_file) env variable.
* for authentication, you can set service\_account\_contents using the c(GCP\_SERVICE\_ACCOUNT\_CONTENTS) env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- ansible.builtin.debug:
msg: |
the value of foo.txt is {{ lookup('community.google.gcp_storage_file',
bucket='gcp-bucket', src='mydir/foo.txt', project='project-name',
auth_kind='serviceaccount', service_account_file='/tmp/myserviceaccountfile.json') }}
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:
| Key | Returned | Description |
| --- | --- | --- |
| **\_raw** list / elements=string | success | base64 encoded file content |
### Authors
* Eric Anderson (!UNKNOWN) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#1c797d7278796e6f73723a3f2f2b273a3f292e273a3f2824277d6a757279686b736e776f3a3f282a277f7371)>
ansible community.google.gce_labels β Create, Update or Destroy GCE Labels. community.google.gce\_labels β Create, Update or Destroy GCE Labels.
====================================================================
Note
This plugin is part of the [community.google collection](https://galaxy.ansible.com/community/google) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.google`.
To use it in a playbook, specify: `community.google.gce_labels`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, Update or Destroy GCE Labels on instances, disks, snapshots, etc. When specifying the GCE resource, users may specify the full URL for the resource (its βself\_linkβ), or the individual parameters of the resource (type, location, name). Examples for the two options can be seen in the documentation. See <https://cloud.google.com/compute/docs/label-or-tag-resources> for more information about GCE Labels. Labels are gradually being added to more GCE resources, so this module will need to be updated as new resources are added to the GCE (v1) API.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* google-api-python-client >= 1.6.2
* google-auth >= 1.0.0
* google-auth-httplib2 >= 0.0.2
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **credentials\_file** string | | The path to the JSON file associated with the service account email. |
| **labels** dictionary | | A list of labels (key/value pairs) to add or remove for the resource. |
| **pem\_file** string | | The path to the PEM file associated with the service account email. This option is deprecated and may be removed in a future release. Use *credentials\_file* instead. |
| **project\_id** string | | The Google Cloud Platform project ID to use. |
| **resource\_location** string | | The location of resource (global, us-central1-f, etc.) |
| **resource\_name** string | | The name of resource. |
| **resource\_type** string | | The type of resource (instances, disks, snapshots, images) |
| **resource\_url** string | | The 'self\_link' for the resource (instance, disk, snapshot, etc) |
| **service\_account\_email** string | | service account email |
| **service\_account\_permissions** list / elements=string | | service account email |
| **state** string | **Choices:*** **present** β
* absent
| The state the labels should be in. `present` or `absent` are the only valid options. |
Notes
-----
Note
* Labels support resources such as instances, disks, images, etc. See <https://cloud.google.com/compute/docs/labeling-resources> for the list of resources available in the GCE v1 API (not alpha or beta).
Examples
--------
```
- name: Add labels on an existing instance (using resource_url)
community.google.gce_labels:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"
labels:
webserver-frontend: homepage
environment: test
experiment-name: kennedy
resource_url: https://www.googleapis.com/compute/beta/projects/myproject/zones/us-central1-f/instances/example-instance
state: present
- name: Add labels on an image (using resource params)
community.google.gce_labels:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"
labels:
webserver-frontend: homepage
environment: test
experiment-name: kennedy
resource_type: images
resource_location: global
resource_name: my-custom-image
state: present
- name: Remove specified labels from the GCE instance
community.google.gce_labels:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"
labels:
environment: prod
experiment-name: kennedy
resource_url: https://www.googleapis.com/compute/beta/projects/myproject/zones/us-central1-f/instances/example-instance
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **labels** dictionary | Always. | List of labels that exist on the resource. **Sample:** [{'environment': 'test', 'environment-name': 'kennedy', 'webserver-frontend': 'homepage'}] |
| **resource\_location** string | Always. | The location of the GCE resource. **Sample:** us-central1-f |
| **resource\_name** string | Always. | The name of the GCE resource. **Sample:** my-happy-little-instance |
| **resource\_type** string | Always. | The type of the GCE resource. **Sample:** instances |
| **resource\_url** string | Always. | The 'self\_link' of the GCE resource. **Sample:** https://www.googleapis.com/compute/beta/projects/myproject/zones/us-central1-f/instances/example-instance |
| **state** string | Always. | state of the labels **Sample:** present |
### Authors
* Eric Johnson (@erjohnso) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#dabfa8b0b5b2b4a9b5fcf9e9ede1fcf9efe8e1fcf9eee2e1bdb5b5bdb6bffcf9eeece1b9b5b7)>
ansible community.google.gcpubsub β Create and Delete Topics/Subscriptions, Publish and pull messages on PubSub community.google.gcpubsub β Create and Delete Topics/Subscriptions, Publish and pull messages on PubSub
=======================================================================================================
Note
This plugin is part of the [community.google collection](https://galaxy.ansible.com/community/google) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.google`.
To use it in a playbook, specify: `community.google.gcpubsub`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and Delete Topics/Subscriptions, Publish and pull messages on PubSub. See <https://cloud.google.com/pubsub/docs> for an overview.
Requirements
------------
The below requirements are needed on the host that executes this module.
* google-auth >= 0.5.0
* google-cloud-pubsub >= 0.22.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **credentials\_file** string | | path to the JSON file associated with the service account email |
| **project\_id** string | | your GCE project ID |
| **publish** list / elements=string | | List of dictionaries describing messages and attributes to be published. Dictionary is in message(str):attributes(dict) format. Only message is required. |
| **service\_account\_email** string | | service account email |
| **state** string | **Choices:*** absent
* **present** β
| State of the topic or queue. Applies to the most granular resource. If subscription isspecified we remove it. If only topic is specified, that is what is removed. NOTE - A topic can be removed without first removing the subscription. |
| **subscription** dictionary | | Dictionary containing a subscription name associated with a topic (required), along with optional ack\_deadline, push\_endpoint and pull. For pulling from a subscription, message\_ack (bool), max\_messages (int) and return\_immediate are available as subfields. See subfields name, push\_endpoint and ack\_deadline for more information. |
| | **ack\_deadline** string | | Subfield of subscription. Not required. Default deadline for subscriptions to ACK the message before it is resent. See examples. |
| | **name** string | | Subfield of subscription. Required if subscription is specified. See examples. |
| | **pull** string | | Subfield of subscription. Not required. If specified, messages will be retrieved from topic via the provided subscription name. max\_messages (int; default None; max number of messages to pull), message\_ack (bool; default False; acknowledge the message) and return\_immediately (bool; default True, don't wait for messages to appear). If the messages are acknowledged, changed is set to True, otherwise, changed is False. |
| | **push\_endpoint** string | | Subfield of subscription. Not required. If specified, message will be sent to an endpoint. See <https://cloud.google.com/pubsub/docs/advanced#push_endpoints> for more information. |
| **topic** string / required | | GCP pubsub topic name. Only the name, not the full path, is required. |
Notes
-----
Note
* Subscription pull happens before publish. You cannot publish and pull in the same task.
Examples
--------
```
# (Message will be pushed; there is no check to see if the message was pushed before
- name: Create a topic and publish a message to it
community.google.gcpubsub:
topic: ansible-topic-example
state: present
# Subscriptions associated with topic are not deleted.
- name: Delete Topic
community.google.gcpubsub:
topic: ansible-topic-example
state: absent
# Setting absent will keep the messages from being sent
- name: Publish multiple messages, with attributes (key:value available with the message)
community.google.gcpubsub:
topic: '{{ topic_name }}'
state: present
publish:
- message: this is message 1
attributes:
mykey1: myvalue
mykey2: myvalu2
mykey3: myvalue3
- message: this is message 2
attributes:
server: prod
sla: "99.9999"
owner: fred
- name: Create Subscription (pull)
community.google.gcpubsub:
topic: ansible-topic-example
subscription:
- name: mysub
state: present
# pull is default, ack_deadline is not required
- name: Create Subscription with ack_deadline and push endpoint
community.google.gcpubsub:
topic: ansible-topic-example
subscription:
- name: mysub
ack_deadline: "60"
push_endpoint: http://pushendpoint.example.com
state: present
# Setting push_endpoint to "None" converts subscription to pull.
- name: Subscription change from push to pull
community.google.gcpubsub:
topic: ansible-topic-example
subscription:
name: mysub
push_endpoint: "None"
### Topic will not be deleted
- name: Delete subscription
community.google.gcpubsub:
topic: ansible-topic-example
subscription:
- name: mysub
state: absent
# only pull keyword is required.
- name: Pull messages from subscription
community.google.gcpubsub:
topic: ansible-topic-example
subscription:
name: ansible-topic-example-sub
pull:
message_ack: yes
max_messages: "100"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **publish** list / elements=string | Only when specified | List of dictionaries describing messages and attributes to be published. Dictionary is in message(str):attributes(dict) format. Only message is required. **Sample:** publish: ['message': 'my message', attributes: {'key1': 'value1'}] |
| **pulled\_messages** list / elements=string | Only when subscription.pull is specified | list of dictionaries containing message info. Fields are ack\_id, attributes, data, message\_id. **Sample:** [{'ack\_id': 'XkASTCcYREl...', 'attributes': {'...': None, 'key1': 'val1'}, 'data': 'this is message 1', 'message\_id': '49107464153705'}, '..'] |
| **state** string | Always | The state of the topic or subscription. Value will be either 'absent' or 'present'. **Sample:** present |
| **subscription** string | When subscription fields are specified | Name of subscription. **Sample:** mysubscription |
| **topic** string | Always | Name of topic. **Sample:** mytopic |
### Authors
* Tom Melendez (@supertom) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#b4c0dbd9929787838f929781868f9297808c8fc7c1c4d1c6c0dbd9929780828fd7dbd9)>
| programming_docs |
ansible community.google.gce_img β utilize GCE image resources community.google.gce\_img β utilize GCE image resources
=======================================================
Note
This plugin is part of the [community.google collection](https://galaxy.ansible.com/community/google) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.google`.
To use it in a playbook, specify: `community.google.gce_img`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* This module can create and delete GCE private images from gzipped compressed tarball containing raw disk data or from existing detached disks in any zone. <https://cloud.google.com/compute/docs/images>
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* apache-libcloud
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **description** string | | an optional description |
| **family** string | | an optional family name |
| **name** string / required | | the name of the image to create or delete |
| **pem\_file** path | | path to the pem file associated with the service account email |
| **project\_id** string | | your GCE project ID |
| **service\_account\_email** string | | service account email |
| **source** string | | the source disk or the Google Cloud Storage URI to create the image from |
| **state** string | **Choices:*** **present** β
* absent
| desired state of the image |
| **timeout** integer | **Default:**180 | timeout for the operation |
| **zone** string | **Default:**"us-central1-a" | the zone of the disk specified by source |
Examples
--------
```
- name: Create an image named test-image from the disk 'test-disk' in zone us-central1-a
community.google.gce_img:
name: test-image
source: test-disk
zone: us-central1-a
state: present
- name: Create an image named test-image from a tarball in Google Cloud Storage
community.google.gce_img:
name: test-image
source: https://storage.googleapis.com/bucket/path/to/image.tgz
- name: Alternatively use the gs scheme
community.google.gce_img:
name: test-image
source: gs://bucket/path/to/image.tgz
- name: Delete an image named test-image
community.google.gce_img:
name: test-image
state: absent
```
### Authors
* Tom Melendez (@supertom)
ansible community.google.gce_pd β utilize GCE persistent disk resources community.google.gce\_pd β utilize GCE persistent disk resources
================================================================
Note
This plugin is part of the [community.google collection](https://galaxy.ansible.com/community/google) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.google`.
To use it in a playbook, specify: `community.google.gce_pd`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* This module can create and destroy unformatted GCE persistent disks <https://developers.google.com/compute/docs/disks#persistentdisks>. It also supports attaching and detaching disks from running instances. Full install/configuration instructions for the gce\* modules can be found in the comments of ansible/test/gce\_tests.py.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* apache-libcloud >= 0.13.3, >= 0.17.0 if using JSON credentials
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **credentials\_file** path | | path to the JSON file associated with the service account email |
| **delete\_on\_termination** boolean | **Choices:*** no
* yes
| If `yes`, deletes the volume when instance is terminated |
| **detach\_only** boolean | **Choices:*** no
* yes
| do not destroy the disk, merely detach it from an instance |
| **disk\_type** string | **Default:**"pd-standard" | Specify a `pd-standard` disk or `pd-ssd` for an SSD disk. |
| **external\_projects** list / elements=string | | A list of other projects (accessible with the provisioning credentials) to be searched for the image. |
| **image** string | | the source image to use for the disk |
| **image\_family** string | | The image family to use to create the instance. If *image* has been used *image\_family* is ignored. Cannot specify both *image* and *source*. |
| **instance\_name** string | | instance name if you wish to attach or detach the disk |
| **mode** string | **Choices:*** READ\_WRITE
* **READ\_ONLY** β
| GCE mount mode of disk, READ\_ONLY (default) or READ\_WRITE |
| **name** string / required | | name of the disk |
| **pem\_file** path | | path to the pem file associated with the service account email This option is deprecated. Use 'credentials\_file'. |
| **project\_id** string | | your GCE project ID |
| **service\_account\_email** string | | service account email |
| **size\_gb** string | **Default:**"10" | whole integer size of disk (in GB) to create, default is 10 GB |
| **snapshot** string | | the source snapshot to use for the disk |
| **state** string | **Default:**"present" | desired state of the persistent disk Available choices are: `active`, `present`, `absent`, `deleted`. |
| **zone** string | **Default:**"us-central1-b" | zone in which to create the disk |
Examples
--------
```
- name: Simple attachment action to an existing instance
local_action:
module: gce_pd
instance_name: notlocalhost
size_gb: 5
name: pd
```
### Authors
* Eric Johnson (@erjohnso) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#3a5f485055525449551c19090d011c190f08011c190e02015d55555d565f1c190e0c01595557)>
ansible community.google.gce_instance_template β create or destroy instance templates of Compute Engine of GCP. community.google.gce\_instance\_template β create or destroy instance templates of Compute Engine of GCP.
=========================================================================================================
Note
This plugin is part of the [community.google collection](https://galaxy.ansible.com/community/google) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.google`.
To use it in a playbook, specify: `community.google.gce_instance_template`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Creates or destroy Google instance templates of Compute Engine of Google Cloud Platform.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* apache-libcloud >= 0.13.3, >= 0.17.0 if using JSON credentials, >= 0.20.0 if using preemptible option
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **automatic\_restart** boolean | **Choices:*** no
* yes
| Defines whether the instance should be automatically restarted when it is terminated by Compute Engine. |
| **can\_ip\_forward** boolean | **Choices:*** **no** β
* yes
| Set to `yes` to allow instance to send/receive non-matching src/dst packets. |
| **credentials\_file** path | | path to the JSON file associated with the service account email |
| **description** string | | description of instance template |
| **disk\_auto\_delete** boolean | **Choices:*** no
* **yes** β
| Indicate that the boot disk should be deleted when the Node is deleted. |
| **disk\_type** string | **Choices:*** **pd-standard** β
* pd-ssd
| Specify a `pd-standard` disk or `pd-ssd` for an SSD disk. |
| **disks** list / elements=string | | a list of persistent disks to attach to the instance; a string value gives the name of the disk; alternatively, a dictionary value can define 'name' and 'mode' ('READ\_ONLY' or 'READ\_WRITE'). The first entry will be the boot disk (which must be READ\_WRITE). |
| **disks\_gce\_struct** list / elements=string | | Support passing in the GCE-specific formatted formatted disks[] structure. Case sensitive. see <https://cloud.google.com/compute/docs/reference/latest/instanceTemplates#resource> for detailed information |
| **external\_ip** string | **Default:**"ephemeral" | The external IP address to use. If `ephemeral`, a new non-static address will be used. If `None`, then no external address will be used. To use an existing static IP address specify address name. |
| **image** string | | The image to use to create the instance. Cannot specify both both *image* and *source*. |
| **image\_family** string | **Default:**"debian-8" | The image family to use to create the instance. If *image* has been used *image\_family* is ignored. Cannot specify both *image* and *source*. |
| **metadata** string | | a hash/dictionary of custom data for the instance; '{"key":"value", ...}' |
| **name** string / required | | The name of the GCE instance template.
aliases: base\_name |
| **network** string | **Default:**"default" | The network to associate with the instance. |
| **nic\_gce\_struct** list / elements=string | | Support passing in the GCE-specific formatted networkInterfaces[] structure. |
| **pem\_file** path | | path to the pem file associated with the service account email This option is deprecated. Use 'credentials\_file'. |
| **preemptible** boolean | **Choices:*** no
* yes
| Defines whether the instance is preemptible. |
| **project\_id** string | | your GCE project ID |
| **service\_account\_email** string | | service account email |
| **service\_account\_permissions** list / elements=string | | service account permissions (see <https://cloud.google.com/sdk/gcloud/reference/compute/instances/create>, --scopes section for detailed information) Available choices are: `bigquery`, `cloud-platform`, `compute-ro`, `compute-rw`, `useraccounts-ro`, `useraccounts-rw`, `datastore`, `logging-write`, `monitoring`, `sql-admin`, `storage-full`, `storage-ro`, `storage-rw`, `taskqueue`, `userinfo-email`. |
| **size** string | **Default:**"f1-micro" | The desired machine type for the instance template. |
| **source** string | | A source disk to attach to the instance. Cannot specify both *image* and *source*. |
| **state** string | **Choices:*** **present** β
* absent
| The desired state for the instance template. |
| **subnetwork** string | | The Subnetwork resource name for this instance. |
| **subnetwork\_region** string | | Region that subnetwork resides in. (Required for subnetwork to successfully complete) |
| **tags** list / elements=string | | a comma-separated list of tags to associate with the instance |
Notes
-----
Note
* JSON credentials strongly preferred.
Examples
--------
```
# Usage
- name: Create instance template named foo
community.google.gce_instance_template:
name: foo
size: n1-standard-1
image_family: ubuntu-1604-lts
state: present
project_id: "your-project-name"
credentials_file: "/path/to/your-key.json"
service_account_email: "[email protected]"
# Example Playbook
- name: Compute Engine Instance Template Examples
hosts: localhost
vars:
service_account_email: "[email protected]"
credentials_file: "/path/to/your-key.json"
project_id: "your-project-name"
tasks:
- name: Create instance template
community.google.gce_instance_template:
name: my-test-instance-template
size: n1-standard-1
image_family: ubuntu-1604-lts
state: present
project_id: "{{ project_id }}"
credentials_file: "{{ credentials_file }}"
service_account_email: "{{ service_account_email }}"
- name: Delete instance template
community.google.gce_instance_template:
name: my-test-instance-template
size: n1-standard-1
image_family: ubuntu-1604-lts
state: absent
project_id: "{{ project_id }}"
credentials_file: "{{ credentials_file }}"
service_account_email: "{{ service_account_email }}"
# Example playbook using disks_gce_struct
- name: Compute Engine Instance Template Examples
hosts: localhost
vars:
service_account_email: "[email protected]"
credentials_file: "/path/to/your-key.json"
project_id: "your-project-name"
tasks:
- name: Create instance template
community.google.gce_instance_template:
name: foo
size: n1-standard-1
state: present
project_id: "{{ project_id }}"
credentials_file: "{{ credentials_file }}"
service_account_email: "{{ service_account_email }}"
disks_gce_struct:
- device_name: /dev/sda
boot: true
autoDelete: true
initializeParams:
diskSizeGb: 30
diskType: pd-ssd
sourceImage: projects/debian-cloud/global/images/family/debian-8
```
### Authors
* Gwenael Pellen (@GwenaelPellenArkeup) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#ee89998b808f8b82c8cddad8d59e8b82828b80c8cdddd9d5c8cddbdcd5c8cddad6d58f9c858b9b9ec8cddad8d58d8183)>
ansible community.google.gce_snapshot β Create or destroy snapshots for GCE storage volumes community.google.gce\_snapshot β Create or destroy snapshots for GCE storage volumes
====================================================================================
Note
This plugin is part of the [community.google collection](https://galaxy.ansible.com/community/google) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.google`.
To use it in a playbook, specify: `community.google.gce_snapshot`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages snapshots for GCE instances. This module manages snapshots for the storage volumes of a GCE compute instance. If there are multiple volumes, each snapshot will be prepended with the disk name
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* apache-libcloud >= 0.19.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **credentials\_file** path | | The path to the credentials file associated with the service account |
| **disks** list / elements=string | | A list of disks to create snapshots for. If none is provided, all of the volumes will have snapshots created. |
| **instance\_name** string / required | | The GCE instance to snapshot |
| **project\_id** string | | The GCP project ID to use |
| **service\_account\_email** string | | GCP service account email for the project where the instance resides |
| **snapshot\_name** string / required | | The name of the snapshot to manage |
| **state** string | **Choices:*** **present** β
* absent
| Whether a snapshot should be `present` or `absent`
|
Examples
--------
```
- name: Create gce snapshot
community.google.gce_snapshot:
instance_name: example-instance
snapshot_name: example-snapshot
state: present
service_account_email: [email protected]
credentials_file: /path/to/credentials
project_id: project_name
delegate_to: localhost
- name: Delete gce snapshot
community.google.gce_snapshot:
instance_name: example-instance
snapshot_name: example-snapshot
state: absent
service_account_email: [email protected]
credentials_file: /path/to/credentials
project_id: project_name
delegate_to: localhost
# This example creates snapshots for only two of the available disks as
# disk0-example-snapshot and disk1-example-snapshot
- name: Create snapshots of specific disks
community.google.gce_snapshot:
instance_name: example-instance
snapshot_name: example-snapshot
state: present
disks:
- disk0
- disk1
service_account_email: [email protected]
credentials_file: /path/to/credentials
project_id: project_name
delegate_to: localhost
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **snapshots\_absent** list / elements=string | When snapshots were already absent | List of snapshots that were already absent (no-op) **Sample:** [disk0-example-snapshot, disk1-example-snapshot] |
| **snapshots\_created** list / elements=string | When snapshots are created | List of newly created snapshots **Sample:** [disk0-example-snapshot, disk1-example-snapshot] |
| **snapshots\_deleted** list / elements=string | When snapshots are deleted | List of destroyed snapshots **Sample:** [disk0-example-snapshot, disk1-example-snapshot] |
| **snapshots\_existing** list / elements=string | When snapshots were already present | List of snapshots that already existed (no-op) **Sample:** [disk0-example-snapshot, disk1-example-snapshot] |
### Authors
* Rob Wagner (@robwagner33)
ansible community.digitalocean.digital_ocean_firewall_info β Gather information about DigitalOcean firewalls community.digitalocean.digital\_ocean\_firewall\_info β Gather information about DigitalOcean firewalls
=======================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_firewall_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information about DigitalOcean firewalls.
* This module was called `digital_ocean_firewall_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name** string | | Firewall rule name that can be used to identify and reference a specific firewall rule. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Gather information about all firewalls
community.digitalocean.digital_ocean_firewall_info:
oauth_token: "{{ oauth_token }}"
- name: Gather information about a specific firewall by name
community.digitalocean.digital_ocean_firewall_info:
oauth_token: "{{ oauth_token }}"
name: "firewall_name"
- name: Gather information from a firewall rule
community.digitalocean.digital_ocean_firewall_info:
name: SSH
register: resp_out
- set_fact:
firewall_id: "{{ resp_out.data.id }}"
- debug:
msg: "{{ firewall_id }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** list / elements=dictionary | success | DigitalOcean firewall information **Sample:** [{'created\_at': '2018-01-15T07:04:25Z', 'droplet\_ids': [87426985], 'id': '435tbg678-1db53-32b6-t543-28322569t252', 'inbound\_rules': [{'ports': '9100', 'protocol': 'tcp', 'sources': {'addresses': ['1.1.1.1']}}], 'name': 'metrics', 'outbound\_rules': [], 'pending\_changes': [], 'status': 'succeeded', 'tags': []}] |
### Authors
* Anthony Bond (@BondAnthony)
| programming_docs |
ansible community.digitalocean.digital_ocean_tag_info β Gather information about DigitalOcean tags community.digitalocean.digital\_ocean\_tag\_info β Gather information about DigitalOcean tags
=============================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_tag_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information about DigitalOcean provided tags.
* This module was called `digital_ocean_tag_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **tag\_name** string | | Tag name that can be used to identify and reference a tag. |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Gather information about all tags
community.digitalocean.digital_ocean_tag_info:
oauth_token: "{{ oauth_token }}"
- name: Gather information about tag with given name
community.digitalocean.digital_ocean_tag_info:
oauth_token: "{{ oauth_token }}"
tag_name: "extra_awesome_tag"
- name: Get resources from tag name
community.digitalocean.digital_ocean_tag_info:
register: resp_out
- set_fact:
resources: "{{ item.resources }}"
loop: "{{ resp_out.data | community.general.json_query(name) }}"
vars:
name: "[?name=='extra_awesome_tag']"
- debug:
var: resources
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** list / elements=dictionary | success | DigitalOcean tag information **Sample:** [{'name': 'extra-awesome', 'resources': {'droplets': {'...': None, 'count': 1}}}] |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.digitalocean.digital_ocean_domain_record β Manage DigitalOcean domain records community.digitalocean.digital\_ocean\_domain\_record β Manage DigitalOcean domain records
==========================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_domain_record`.
New in version 1.1.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create/delete a domain record in DigitalOcean.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **data** string | **Default:**"" | This is the value of the record, depending on the record type. |
| **domain** string / required | | Name of the domain. |
| **flags** integer | | An unsignedinteger between 0-255 used for CAA records. |
| **force\_update** boolean | **Choices:*** **no** β
* yes
| If there is already a record with the same `name` and `type` force update it. |
| **name** string | **Default:**"@" | Required for `A, AAAA, CNAME, TXT, SRV` records. The host name, alias, or service being defined by the record. |
| **oauth\_token** string | | DigitalOcean OAuth token. Can be specified in `DO_API_KEY`, `DO_API_TOKEN`, or `DO_OAUTH_TOKEN` environment variables
aliases: API\_TOKEN |
| **port** integer | | The port that the service is accessible on for SRV records only. |
| **priority** integer | | The priority of the host for `SRV, MX` records). |
| **record\_id** integer | | Used with `force_update=yes` and `state='absent'` to update or delete a specific record. |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the target. |
| **tag** string | **Choices:*** issue
* wildissue
* iodef
| The parameter tag for CAA records. |
| **ttl** integer | **Default:**1800 | Time to live for the record, in seconds. |
| **type** string | **Choices:*** A
* AAAA
* CNAME
* MX
* TXT
* SRV
* NS
* CAA
| The type of record you would like to create. |
| **weight** integer | | The weight of records with the same priority for SRV records only. |
Notes
-----
Note
* Version 2 of DigitalOcean API is used.
* The number of requests that can be made through the API is currently limited to 5,000 per hour per OAuth token.
Examples
--------
```
- name: Create default A record for example.com
community.digitalocean.digital_ocean_domain_record:
oauth_token: xxxx
state: present
domain: example.com
type: A
name: "@"
data: 127.0.0.1
- name: Create A record for www
community.digitalocean.digital_ocean_domain_record:
oauth_token: xxxx
state: present
domain: example.com
type: A
name: www
data: 127.0.0.1
- name: Update A record for www based on name/type/data
community.digitalocean.digital_ocean_domain_record:
oauth_token: xxxx
state: present
domain: example.com
type: A
name: www
data: 127.0.0.2
force_update: yes
- name: Update A record for www based on record_id
community.digitalocean.digital_ocean_domain_record:
oauth_token: xxxx
state: present
domain: example.com
record_id: 123456
type: A
name: www
data: 127.0.0.2
force_update: yes
- name: Remove www record based on name/type/data
community.digitalocean.digital_ocean_domain_record:
oauth_token: xxxx
state: absent
domain: example.com
type: A
name: www
data: 127.0.0.1
- name: Remove www record based on record_id
community.digitalocean.digital_ocean_domain_record:
oauth_token: xxxx
state: absent
domain: example.com
record_id: 1234567
- name: Create MX record with priority 10 for example.com
community.digitalocean.digital_ocean_domain_record:
oauth_token: xxxx
state: present
domain: example.com
type: MX
data: mail1.example.com
priority: 10
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | success | a DigitalOcean Domain Record **Sample:** {'data': '192.168.0.1', 'flags': 16, 'id': 3352896, 'name': 'www', 'port': 5556, 'priority': 10, 'tag': 'issue', 'ttl': 3600, 'type': 'CNAME', 'weight': 10} |
### Authors
* Adam Papai (@woohgit)
ansible community.digitalocean.digital_ocean_load_balancer β Manage DigitalOcean Load Balancers community.digitalocean.digital\_ocean\_load\_balancer β Manage DigitalOcean Load Balancers
==========================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_load_balancer`.
New in version 1.10.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage DigitalOcean Load Balancers
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **algorithm** string | **Choices:*** **round\_robin** β
* least\_connections
| The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either `round_robin` or `least_connections`. |
| **droplet\_ids** list / elements=integer | | An array containing the IDs of the Droplets assigned to the load balancer. Required when creating load balancers. |
| **enable\_backend\_keepalive** boolean | **Choices:*** **no** β
* yes
| A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. |
| **enable\_proxy\_protocol** boolean | **Choices:*** **no** β
* yes
| A boolean value indicating whether PROXY Protocol is in use. |
| **forwarding\_rules** list / elements=dictionary | **Default:**[{"certificate\_id": "", "entry\_port": 8080, "entry\_protocol": "http", "target\_port": 8080, "target\_protocol": "http", "tls\_passthrough": false}] | An array of objects specifying the forwarding rules for a load balancer. Required when creating load balancers. |
| | **certificate\_id** string | **Default:**"" | Certificate ID |
| | **entry\_port** integer | **Default:**8080 | Entry port |
| | **entry\_protocol** string | **Default:**"http" | Entry protocol |
| | **target\_port** integer | **Default:**8080 | Target port |
| | **target\_protocol** string | **Default:**"http" | Target protocol |
| | **tls\_passthrough** boolean | **Choices:*** **no** β
* yes
| TLS passthrough |
| **health\_check** dictionary | **Default:**{"check\_interval\_seconds": 10, "healthy\_threshold": 5, "path": "/", "port": 80, "protocol": "http", "response\_timeout\_seconds": 5, "unhealthy\_threshold": 3} | An object specifying health check settings for the load balancer. |
| | **check\_interval\_seconds** integer | **Default:**10 | Check interval seconds |
| | **healthy\_threshold** integer | **Default:**5 | Healthy threshold |
| | **path** string | **Default:**"/" | Path |
| | **port** integer | **Default:**80 | Port |
| | **protocol** string | **Default:**"http" | Protocol |
| | **response\_timeout\_seconds** integer | **Default:**5 | Response timeout seconds |
| | **unhealthy\_threshold** integer | **Default:**3 | Unhealthy threshold |
| **name** string / required | | A human-readable name for a load balancer instance. Required and must be unique (current API documentation is not up-to-date for this parameter). |
| **oauth\_token** string / required | | DigitalOcean OAuth token; can be specified in `DO_API_KEY`, `DO_API_TOKEN`, or `DO_OAUTH_TOKEN` environment variables
aliases: API\_TOKEN |
| **redirect\_http\_to\_https** boolean | **Choices:*** **no** β
* yes
| A boolean value indicating whether HTTP requests to the load balancer on port 80 will be redirected to HTTPS on port 443. |
| **region** string | **Default:**"nyc1" | The slug identifier for the region where the resource will initially be available.
aliases: region\_id |
| **size** string | **Choices:*** **lb-small** β
* lb-medium
* lb-large
| The size of the load balancer. The available sizes are `lb-small`, `lb-medium`, or `lb-large`. You can resize load balancers after creation up to once per hour. You cannot resize a load balancer within the first hour of its creation. |
| **state** string | **Choices:*** **present** β
* absent
| The usual, `present` to create, `absent` to destroy |
| **sticky\_sessions** dictionary | **Default:**{"type": "none"} | An object specifying sticky sessions settings for the load balancer. |
| | **type** string | **Default:**"none" | Type |
| **vpc\_uuid** string | | A string specifying the UUID of the VPC to which the load balancer is assigned. If unspecified, uses the default VPC in the region. |
| **wait** boolean | **Choices:*** no
* **yes** β
| Wait for the Load Balancer to be running before returning. |
| **wait\_timeout** integer | **Default:**600 | How long before wait gives up, in seconds, when creating a Load Balancer. |
Examples
--------
```
- name: Create a Load Balancer
community.digitalocean.digital_ocean_load_balancer:
state: present
name: test-loadbalancer-1
droplet_ids:
- 12345678
region: nyc1
forwarding_rules:
- entry_protocol: http
entry_port: 8080
target_protocol: http
target_port: 8080
certificate_id: ""
tls_passthrough: false
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | changed | A DigitalOcean Load Balancer **Sample:** {'load\_balancer': {'algorithm': 'round\_robin', 'created\_at': '2021-08-22T14:23:41Z', 'droplet\_ids': [261172461], 'enable\_backend\_keepalive': False, 'enable\_proxy\_protocol': False, 'forwarding\_rules': [{'certificate\_id': '', 'entry\_port': 8080, 'entry\_protocol': 'http', 'target\_port': 8080, 'target\_protocol': 'http', 'tls\_passthrough': False}], 'health\_check': {'check\_interval\_seconds': 10, 'healthy\_threshold': 5, 'path': '/', 'port': 80, 'protocol': 'http', 'response\_timeout\_seconds': 5, 'unhealthy\_threshold': 3}, 'id': 'b4fdb507-70e8-4325-a89e-d02271b93618', 'ip': '159.203.150.113', 'name': 'test-loadbalancer-1', 'redirect\_http\_to\_https': False, 'region': {'available': True, 'features': ['backups', 'ipv6', 'metadata', 'install\_agent', 'storage', 'image\_transfer'], 'name': 'New York 3', 'sizes': ['s-1vcpu-1gb', 's-1vcpu-1gb-amd', 's-1vcpu-1gb-intel', 's-1vcpu-2gb', 's-1vcpu-2gb-amd', 's-1vcpu-2gb-intel', 's-2vcpu-2gb', 's-2vcpu-2gb-amd', 's-2vcpu-2gb-intel', 's-2vcpu-4gb', 's-2vcpu-4gb-amd', 's-2vcpu-4gb-intel', 's-4vcpu-8gb', 'c-2', 'c2-2vcpu-4gb', 's-4vcpu-8gb-amd', 's-4vcpu-8gb-intel', 'g-2vcpu-8gb', 'gd-2vcpu-8gb', 's-8vcpu-16gb', 'm-2vcpu-16gb', 'c-4', 'c2-4vcpu-8gb', 's-8vcpu-16gb-amd', 's-8vcpu-16gb-intel', 'm3-2vcpu-16gb', 'g-4vcpu-16gb', 'so-2vcpu-16gb', 'm6-2vcpu-16gb', 'gd-4vcpu-16gb', 'so1\_5-2vcpu-16gb', 'm-4vcpu-32gb', 'c-8', 'c2-8vcpu-16gb', 'm3-4vcpu-32gb', 'g-8vcpu-32gb', 'so-4vcpu-32gb', 'm6-4vcpu-32gb', 'gd-8vcpu-32gb', 'so1\_5-4vcpu-32gb', 'm-8vcpu-64gb', 'c-16', 'c2-16vcpu-32gb', 'm3-8vcpu-64gb', 'g-16vcpu-64gb', 'so-8vcpu-64gb', 'm6-8vcpu-64gb', 'gd-16vcpu-64gb', 'so1\_5-8vcpu-64gb', 'm-16vcpu-128gb', 'c-32', 'c2-32vcpu-64gb', 'm3-16vcpu-128gb', 'm-24vcpu-192gb', 'g-32vcpu-128gb', 'so-16vcpu-128gb', 'm6-16vcpu-128gb', 'gd-32vcpu-128gb', 'm3-24vcpu-192gb', 'g-40vcpu-160gb', 'so1\_5-16vcpu-128gb', 'm-32vcpu-256gb', 'gd-40vcpu-160gb', 'so-24vcpu-192gb', 'm6-24vcpu-192gb', 'm3-32vcpu-256gb', 'so1\_5-24vcpu-192gb', 'm6-32vcpu-256gb'], 'slug': 'nyc3'}, 'size': 'lb-small', 'status': 'active', 'sticky\_sessions': {'type': 'none'}, 'tag': '', 'vpc\_uuid': 'b8fd9a58-d93d-4329-b54a-78a397d64855'}} |
### Authors
* Mark Mercado (@mamercad)
ansible community.digitalocean.digital_ocean_sshkey_info β Gather information about DigitalOcean SSH keys community.digitalocean.digital\_ocean\_sshkey\_info β Gather information about DigitalOcean SSH keys
====================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_sshkey_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information about DigitalOcean SSH keys.
* This module replaces the `digital_ocean_sshkey_facts` module.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* Version 2 of DigitalOcean API is used.
Examples
--------
```
- name: Gather information about DigitalOcean SSH keys
community.digitalocean.digital_ocean_sshkey_info:
oauth_token: "{{ my_do_key }}"
register: ssh_keys
- name: Set facts based on the gathered information
set_fact:
pubkey: "{{ item.public_key }}"
loop: "{{ ssh_keys.data | community.general.json_query(ssh_pubkey) }}"
vars:
ssh_pubkey: "[?name=='ansible_ctrl']"
- name: Print SSH public key
debug:
msg: "{{ pubkey }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** list / elements=dictionary | success and no resource constraint | List of SSH keys on DigitalOcean **Sample:** [{'fingerprint': '3b:16:bf:e4:8b:00:8b:b8:59:8c:a9:d3:f0:19:45:fa', 'id': 512189, 'name': 'My SSH Public Key', 'public\_key': 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example'}] |
### Authors
* Patrick Marques (@pmarques)
ansible community.digitalocean.digital_ocean_certificate_info β Gather information about DigitalOcean certificates community.digitalocean.digital\_ocean\_certificate\_info β Gather information about DigitalOcean certificates
=============================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_certificate_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information about DigitalOcean provided certificates.
* This module was called `digital_ocean_certificate_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **certificate\_id** string | | Certificate ID that can be used to identify and reference a certificate. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Gather information about all certificates
community.digitalocean.digital_ocean_certificate_info:
oauth_token: "{{ oauth_token }}"
- name: Gather information about certificate with given id
community.digitalocean.digital_ocean_certificate_info:
oauth_token: "{{ oauth_token }}"
certificate_id: "892071a0-bb95-49bc-8021-3afd67a210bf"
- name: Get not after information about certificate
community.digitalocean.digital_ocean_certificate_info:
register: resp_out
- set_fact:
not_after_date: "{{ item.not_after }}"
loop: "{{ resp_out.data | community.general.json_query(name) }}"
vars:
name: "[?name=='web-cert-01']"
- debug:
var: not_after_date
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** list / elements=dictionary | success | DigitalOcean certificate information **Sample:** [{'created\_at': '2017-02-08T16:02:37Z', 'id': '892071a0-bb95-49bc-8021-3afd67a210bf', 'name': 'web-cert-01', 'not\_after': '2017-02-22T00:23:00Z', 'sha1\_fingerprint': 'dfcc9f57d86bf58e321c2c6c31c7a971be244ac7'}] |
### Authors
* Abhijeet Kasurde (@Akasurde)
| programming_docs |
ansible community.digitalocean.digital_ocean_database_info β Gather information about DigitalOcean databases community.digitalocean.digital\_ocean\_database\_info β Gather information about DigitalOcean databases
=======================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_database_info`.
New in version 1.3.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather information about DigitalOcean databases.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **id** integer | | A unique ID that can be used to identify and reference a database cluster.
aliases: database\_id |
| **name** string | | A unique, human-readable name for the database cluster. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Gather all DigitalOcean databases
community.digitalocean.digital_ocean_database_info:
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_KEY') }}"
register: my_databases
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** list / elements=string | success | List of DigitalOcean databases **Sample:** [{'connection': {'database': '', 'host': 'testdatabase1-do-user-3097135-0.b.db.ondigitalocean.com', 'password': 'REDACTED', 'port': 25061, 'protocol': 'rediss', 'ssl': True, 'uri': 'rediss://default:[email protected]:25061', 'user': 'default'}, 'created\_at': '2021-04-21T15:41:14Z', 'db\_names': None, 'engine': 'redis', 'id': '37de10e4-808b-4f4b-b25f-7b5b3fd194ac', 'maintenance\_window': {'day': 'monday', 'hour': '11:33:47', 'pending': False}, 'name': 'testdatabase1', 'num\_nodes': 1, 'private\_connection': {'database': '', 'host': 'private-testdatabase1-do-user-3097135-0.b.db.ondigitalocean.com', 'password': 'REDACTED', 'port': 25061, 'protocol': 'rediss', 'ssl': True, 'uri': 'rediss://default:REDACTED@private-testdatabase1-do-user-3097135-0.b.db.ondigitalocean.com:25061', 'user': 'default'}, 'private\_network\_uuid': '0db3519b-9efc-414a-8868-8f2e6934688c', 'region': 'nyc1', 'size': 'db-s-1vcpu-1gb', 'status': 'online', 'tags': None, 'users': None, 'version': '6'}, '...'] |
### Authors
* Mark Mercado (@mamercad)
ansible community.digitalocean.digital_ocean_size_info β Gather information about DigitalOcean Droplet sizes community.digitalocean.digital\_ocean\_size\_info β Gather information about DigitalOcean Droplet sizes
=======================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_size_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information about droplet sizes.
* This module was called `digital_ocean_size_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Gather information about all droplet sizes
community.digitalocean.digital_ocean_size_info:
oauth_token: "{{ oauth_token }}"
- name: Get droplet Size Slug where vcpus is 1
community.digitalocean.digital_ocean_size_info:
oauth_token: "{{ oauth_token }}"
register: resp_out
- debug: var=resp_out
- set_fact:
size_slug: "{{ item.slug }}"
loop: "{{ resp_out.data | community.general.json_query(name) }}"
vars:
name: "[?vcpus==`1`]"
- debug:
var: size_slug
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** list / elements=string | success | DigitalOcean droplet size information **Sample:** [{'available': True, 'disk': 20, 'memory': 512, 'price\_hourly': 0.00744, 'price\_monthly': 5.0, 'regions': ['ams2', 'ams3', 'blr1', 'fra1', 'lon1', 'nyc1', 'nyc2', 'nyc3', 'sfo1', 'sfo2', 'sgp1', 'tor1'], 'slug': '512mb', 'transfer': 1.0, 'vcpus': 1}] |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible Community.Digitalocean Community.Digitalocean
======================
Collection version 1.11.0
Plugin Index
------------
These are the plugins in the community.digitalocean collection
### Inventory Plugins
* [digitalocean](digitalocean_inventory#ansible-collections-community-digitalocean-digitalocean-inventory) β DigitalOcean Inventory Plugin
### Modules
* [digital\_ocean](digital_ocean_module#ansible-collections-community-digitalocean-digital-ocean-module) β Create/delete a droplet/SSH\_key in DigitalOcean
* [digital\_ocean\_account\_info](digital_ocean_account_info_module#ansible-collections-community-digitalocean-digital-ocean-account-info-module) β Gather information about DigitalOcean User account
* [digital\_ocean\_balance\_info](digital_ocean_balance_info_module#ansible-collections-community-digitalocean-digital-ocean-balance-info-module) β Display DigitalOcean customer balance
* [digital\_ocean\_block\_storage](digital_ocean_block_storage_module#ansible-collections-community-digitalocean-digital-ocean-block-storage-module) β Create/destroy or attach/detach Block Storage volumes in DigitalOcean
* [digital\_ocean\_cdn\_endpoints](digital_ocean_cdn_endpoints_module#ansible-collections-community-digitalocean-digital-ocean-cdn-endpoints-module) β Create, update, and delete DigitalOcean CDN Endpoints
* [digital\_ocean\_cdn\_endpoints\_info](digital_ocean_cdn_endpoints_info_module#ansible-collections-community-digitalocean-digital-ocean-cdn-endpoints-info-module) β Display DigitalOcean CDN Endpoints
* [digital\_ocean\_certificate](digital_ocean_certificate_module#ansible-collections-community-digitalocean-digital-ocean-certificate-module) β Manage certificates in DigitalOcean
* [digital\_ocean\_certificate\_info](digital_ocean_certificate_info_module#ansible-collections-community-digitalocean-digital-ocean-certificate-info-module) β Gather information about DigitalOcean certificates
* [digital\_ocean\_database](digital_ocean_database_module#ansible-collections-community-digitalocean-digital-ocean-database-module) β Create and delete a DigitalOcean database
* [digital\_ocean\_database\_info](digital_ocean_database_info_module#ansible-collections-community-digitalocean-digital-ocean-database-info-module) β Gather information about DigitalOcean databases
* [digital\_ocean\_domain](digital_ocean_domain_module#ansible-collections-community-digitalocean-digital-ocean-domain-module) β Create/delete a DNS domain in DigitalOcean
* [digital\_ocean\_domain\_info](digital_ocean_domain_info_module#ansible-collections-community-digitalocean-digital-ocean-domain-info-module) β Gather information about DigitalOcean Domains
* [digital\_ocean\_domain\_record](digital_ocean_domain_record_module#ansible-collections-community-digitalocean-digital-ocean-domain-record-module) β Manage DigitalOcean domain records
* [digital\_ocean\_droplet](digital_ocean_droplet_module#ansible-collections-community-digitalocean-digital-ocean-droplet-module) β Create and delete a DigitalOcean droplet
* [digital\_ocean\_droplet\_info](digital_ocean_droplet_info_module#ansible-collections-community-digitalocean-digital-ocean-droplet-info-module) β Gather information about DigitalOcean Droplets
* [digital\_ocean\_firewall](digital_ocean_firewall_module#ansible-collections-community-digitalocean-digital-ocean-firewall-module) β Manage cloud firewalls within DigitalOcean
* [digital\_ocean\_firewall\_info](digital_ocean_firewall_info_module#ansible-collections-community-digitalocean-digital-ocean-firewall-info-module) β Gather information about DigitalOcean firewalls
* [digital\_ocean\_floating\_ip](digital_ocean_floating_ip_module#ansible-collections-community-digitalocean-digital-ocean-floating-ip-module) β Manage DigitalOcean Floating IPs
* [digital\_ocean\_floating\_ip\_info](digital_ocean_floating_ip_info_module#ansible-collections-community-digitalocean-digital-ocean-floating-ip-info-module) β DigitalOcean Floating IPs information
* [digital\_ocean\_image\_info](digital_ocean_image_info_module#ansible-collections-community-digitalocean-digital-ocean-image-info-module) β Gather information about DigitalOcean images
* [digital\_ocean\_kubernetes](digital_ocean_kubernetes_module#ansible-collections-community-digitalocean-digital-ocean-kubernetes-module) β Create and delete a DigitalOcean Kubernetes cluster
* [digital\_ocean\_kubernetes\_info](digital_ocean_kubernetes_info_module#ansible-collections-community-digitalocean-digital-ocean-kubernetes-info-module) β Returns information about an existing DigitalOcean Kubernetes cluster
* [digital\_ocean\_load\_balancer](digital_ocean_load_balancer_module#ansible-collections-community-digitalocean-digital-ocean-load-balancer-module) β Manage DigitalOcean Load Balancers
* [digital\_ocean\_load\_balancer\_info](digital_ocean_load_balancer_info_module#ansible-collections-community-digitalocean-digital-ocean-load-balancer-info-module) β Gather information about DigitalOcean load balancers
* [digital\_ocean\_monitoring\_alerts](digital_ocean_monitoring_alerts_module#ansible-collections-community-digitalocean-digital-ocean-monitoring-alerts-module) β Programmatically retrieve metrics as well as configure alert policies based on these metrics
* [digital\_ocean\_monitoring\_alerts\_info](digital_ocean_monitoring_alerts_info_module#ansible-collections-community-digitalocean-digital-ocean-monitoring-alerts-info-module) β Programmatically retrieve metrics as well as configure alert policies based on these metrics
* [digital\_ocean\_project](digital_ocean_project_module#ansible-collections-community-digitalocean-digital-ocean-project-module) β Manage a DigitalOcean project
* [digital\_ocean\_project\_info](digital_ocean_project_info_module#ansible-collections-community-digitalocean-digital-ocean-project-info-module) β Gather information about DigitalOcean Projects
* [digital\_ocean\_region\_info](digital_ocean_region_info_module#ansible-collections-community-digitalocean-digital-ocean-region-info-module) β Gather information about DigitalOcean regions
* [digital\_ocean\_size\_info](digital_ocean_size_info_module#ansible-collections-community-digitalocean-digital-ocean-size-info-module) β Gather information about DigitalOcean Droplet sizes
* [digital\_ocean\_snapshot](digital_ocean_snapshot_module#ansible-collections-community-digitalocean-digital-ocean-snapshot-module) β Create and delete DigitalOcean snapshots
* [digital\_ocean\_snapshot\_info](digital_ocean_snapshot_info_module#ansible-collections-community-digitalocean-digital-ocean-snapshot-info-module) β Gather information about DigitalOcean Snapshot
* [digital\_ocean\_sshkey](digital_ocean_sshkey_module#ansible-collections-community-digitalocean-digital-ocean-sshkey-module) β Manage DigitalOcean SSH keys
* [digital\_ocean\_sshkey\_info](digital_ocean_sshkey_info_module#ansible-collections-community-digitalocean-digital-ocean-sshkey-info-module) β Gather information about DigitalOcean SSH keys
* [digital\_ocean\_tag](digital_ocean_tag_module#ansible-collections-community-digitalocean-digital-ocean-tag-module) β Create and remove tag(s) to DigitalOcean resource.
* [digital\_ocean\_tag\_info](digital_ocean_tag_info_module#ansible-collections-community-digitalocean-digital-ocean-tag-info-module) β Gather information about DigitalOcean tags
* [digital\_ocean\_volume\_info](digital_ocean_volume_info_module#ansible-collections-community-digitalocean-digital-ocean-volume-info-module) β Gather information about DigitalOcean volumes
* [digital\_ocean\_vpc](digital_ocean_vpc_module#ansible-collections-community-digitalocean-digital-ocean-vpc-module) β Create and delete DigitalOcean VPCs
* [digital\_ocean\_vpc\_info](digital_ocean_vpc_info_module#ansible-collections-community-digitalocean-digital-ocean-vpc-info-module) β Gather information about DigitalOcean VPCs
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
ansible community.digitalocean.digital_ocean_vpc β Create and delete DigitalOcean VPCs community.digitalocean.digital\_ocean\_vpc β Create and delete DigitalOcean VPCs
================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_vpc`.
New in version 1.7.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to create and delete DigitalOcean VPCs.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **default** boolean | **Choices:*** **no** β
* yes
| A boolean value indicating whether or not the VPC is the default network for the region. All applicable resources are placed into the default VPC network unless otherwise specified during their creation. The `default` field cannot be unset from `true`. If you want to set a new default VPC network, update the `default` field of another VPC network in the same region. The previous network's `default` field will be set to `false` when a new default VPC has been defined. |
| **description** string | | A free-form text field for describing the VPC's purpose. It may be a maximum of 255 characters. |
| **ip\_range** string | | The requested range of IP addresses for the VPC in CIDR notation. Network ranges cannot overlap with other networks in the same account and must be in range of private addresses as defined in RFC1918. It may not be smaller than /24 nor larger than /16. If no IP range is specified, a /20 network range is generated that won't conflict with other VPC networks in your account. |
| **name** string / required | | The name of the VPC. Must be unique and contain alphanumeric characters, dashes, and periods only. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **region** string | | The slug identifier for the region where the VPC will be created. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the VPC should be present (created) or absent (deleted). |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Create a VPC
community.digitalocean.digital_ocean_vpc:
state: present
name: myvpc1
region: nyc1
- name: Create a VPC (choose IP range)
community.digitalocean.digital_ocean_vpc:
state: present
name: myvpc1
region: nyc1
ip_range: 192.168.192.0/24
- name: Update a VPC (make it default)
community.digitalocean.digital_ocean_vpc:
state: present
name: myvpc1
region: nyc1
default: true
- name: Update a VPC (change description)
community.digitalocean.digital_ocean_vpc:
state: present
name: myvpc1
region: nyc1
description: myvpc
- name: Delete a VPC
community.digitalocean.digital_ocean_vpc:
state: absent
name: myvpc1
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | success | A DigitalOcean VPC. **Sample:** {'created\_at': '2021-06-17T11:43:12.12121565Z', 'default': False, 'description': '', 'id': 'a3b72d97-192f-4984-9d71-08a5faf2e0c7', 'ip\_range': '10.116.16.0/20', 'name': 'testvpc1', 'region': 'nyc1', 'urn': 'do:vpc:a3b72d97-192f-4984-9d71-08a5faf2e0c7'} |
### Authors
* Mark Mercado (@mamercad)
ansible community.digitalocean.digital_ocean_domain β Create/delete a DNS domain in DigitalOcean community.digitalocean.digital\_ocean\_domain β Create/delete a DNS domain in DigitalOcean
==========================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_domain`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create/delete a DNS domain in DigitalOcean.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **id** integer | | The droplet id you want to operate on.
aliases: droplet\_id |
| **ip** string | | An 'A' record for '@' ($ORIGIN) will be created with the value 'ip'. 'ip' is an IP version 4 address. |
| **name** string | | The name of the droplet - must be formatted by hostname rules, or the name of a SSH key, or the name of a domain. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the target. |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* Environment variables DO\_OAUTH\_TOKEN can be used for the oauth\_token.
* As of Ansible 1.9.5 and 2.0, Version 2 of the DigitalOcean API is used, this removes `client_id` and `api_key` options in favor of `oauth_token`.
* If you are running Ansible 1.9.4 or earlier you might not be able to use the included version of this module as the API version used has been retired.
Examples
--------
```
- name: Create a domain
community.digitalocean.digital_ocean_domain:
state: present
name: my.digitalocean.domain
ip: 127.0.0.1
# Create a droplet and corresponding domain
- name: Create a droplet
community.digitalocean.digital_ocean:
state: present
name: test_droplet
size_id: 1gb
region_id: sgp1
image_id: ubuntu-14-04-x64
register: test_droplet
- name: Create a corresponding domain
community.digitalocean.digital_ocean_domain:
state: present
name: "{{ test_droplet.droplet.name }}.my.domain"
ip: "{{ test_droplet.droplet.ip_address }}"
```
### Authors
* Michael Gregson (@mgregson)
| programming_docs |
ansible community.digitalocean.digital_ocean_sshkey β Manage DigitalOcean SSH keys community.digitalocean.digital\_ocean\_sshkey β Manage DigitalOcean SSH keys
============================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_sshkey`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create/delete DigitalOcean SSH keys.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **fingerprint** string | | This is a unique identifier for the SSH key used to delete a key
aliases: id |
| **name** string | | The name for the SSH key |
| **oauth\_token** string / required | | DigitalOcean OAuth token. |
| **ssh\_pub\_key** string | | The Public SSH key to add. |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the target. |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* Version 2 of DigitalOcean API is used.
Examples
--------
```
- name: "Create ssh key"
community.digitalocean.digital_ocean_sshkey:
oauth_token: "{{ oauth_token }}"
name: "My SSH Public Key"
ssh_pub_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example"
state: present
register: result
- name: "Delete ssh key"
community.digitalocean.digital_ocean_sshkey:
oauth_token: "{{ oauth_token }}"
state: "absent"
fingerprint: "3b:16:bf:e4:8b:00:8b:b8:59:8c:a9:d3:f0:19:45:fa"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | when `state=present` | This is only present when `state=present`
**Sample:** {'ssh\_key': {'fingerprint': '3b:16:bf:e4:8b:00:8b:b8:59:8c:a9:d3:f0:19:45:fa', 'id': 512189, 'name': 'My SSH Public Key', 'public\_key': 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example'}} |
### Authors
* Patrick Marques (@pmarques)
ansible community.digitalocean.digital_ocean β Create/delete a droplet/SSH_key in DigitalOcean community.digitalocean.digital\_ocean β Create/delete a droplet/SSH\_key in DigitalOcean
========================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Status](#status)
DEPRECATED
----------
Removed in
version 2.0.0
Why
Updated module to remove external dependency with increased functionality.
Alternative
Use [community.digitalocean.digital\_ocean\_droplet](digital_ocean_droplet_module#ansible-collections-community-digitalocean-digital-ocean-droplet-module) instead.
Synopsis
--------
* Create/delete a droplet in DigitalOcean and optionally wait for it to be βrunningβ, or deploy an SSH key.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* dopy
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | DigitalOcean api token.
aliases: API\_TOKEN |
| **backups\_enabled** boolean | **Choices:*** **no** β
* yes
| Optional, Boolean, enables backups for your droplet. |
| **command** string | **Choices:*** **droplet** β
* ssh
| Which target you want to operate on. |
| **id** integer | | Numeric, the droplet id you want to operate on.
aliases: droplet\_id |
| **image\_id** string | | This is the slug of the image you would like the droplet created with. |
| **ipv6** boolean | **Choices:*** **no** β
* yes
| Optional, Boolean, enable IPv6 for your droplet. |
| **name** string | | String, this is the name of the droplet - must be formatted by hostname rules, or the name of a SSH key. |
| **private\_networking** boolean | **Choices:*** **no** β
* yes
| Bool, add an additional, private network interface to droplet for inter-droplet communication. |
| **region\_id** string | | This is the slug of the region you would like your server to be created in. |
| **size\_id** string | | This is the slug of the size you would like the droplet created with. |
| **ssh\_key\_ids** list / elements=string | | Optional, array of SSH key (numeric) ID that you would like to be added to the server. |
| **ssh\_pub\_key** string | | The public SSH key you want to add to your account. |
| **state** string | **Choices:*** **present** β
* active
* absent
* deleted
| Indicate desired state of the target. |
| **unique\_name** boolean | **Choices:*** **no** β
* yes
| Bool, require unique hostnames. By default, DigitalOcean allows multiple hosts with the same name. Setting this to "yes" allows only one host per name. Useful for idempotence. |
| **user\_data** string | | opaque blob of data which is made available to the droplet |
| **virtio** boolean | **Choices:*** no
* **yes** β
| Bool, turn on virtio driver in droplet for improved network and storage I/O. |
| **wait** boolean | **Choices:*** no
* **yes** β
| Wait for the droplet to be in state 'running' before returning. If wait is "no" an ip\_address may not be returned. |
| **wait\_timeout** integer | **Default:**300 | How long before wait gives up, in seconds. |
Notes
-----
Note
* Two environment variables can be used, DO\_API\_KEY and DO\_API\_TOKEN. They both refer to the v2 token.
* As of Ansible 1.9.5 and 2.0, Version 2 of the DigitalOcean API is used, this removes `client_id` and `api_key` options in favor of `api_token`.
* If you are running Ansible 1.9.4 or earlier you might not be able to use the included version of this module as the API version used has been retired. Upgrade Ansible or, if unable to, try downloading the latest version of this module from github and putting it into a βlibraryβ directory.
Examples
--------
```
# Ensure a SSH key is present
# If a key matches this name, will return the ssh key id and changed = False
# If no existing key matches this name, a new key is created, the ssh key id is returned and changed = False
- name: Ensure a SSH key is present
community.digitalocean.digital_ocean:
state: present
command: ssh
name: my_ssh_key
ssh_pub_key: 'ssh-rsa AAAA...'
api_token: XXX
# Will return the droplet details including the droplet id (used for idempotence)
- name: Create a new Droplet
community.digitalocean.digital_ocean:
state: present
command: droplet
name: mydroplet
api_token: XXX
size_id: 2gb
region_id: ams2
image_id: fedora-19-x64
wait_timeout: 500
register: my_droplet
- debug:
msg: "ID is {{ my_droplet.droplet.id }}"
- debug:
msg: "IP is {{ my_droplet.droplet.ip_address }}"
# Ensure a droplet is present
# If droplet id already exist, will return the droplet details and changed = False
# If no droplet matches the id, a new droplet will be created and the droplet details (including the new id) are returned, changed = True.
- name: Ensure a droplet is present
community.digitalocean.digital_ocean:
state: present
command: droplet
id: 123
name: mydroplet
api_token: XXX
size_id: 2gb
region_id: ams2
image_id: fedora-19-x64
wait_timeout: 500
# Create a droplet with ssh key
# The ssh key id can be passed as argument at the creation of a droplet (see ssh_key_ids).
# Several keys can be added to ssh_key_ids as id1,id2,id3
# The keys are used to connect as root to the droplet.
- name: Create a droplet with ssh key
community.digitalocean.digital_ocean:
state: present
ssh_key_ids: 123,456
name: mydroplet
api_token: XXX
size_id: 2gb
region_id: ams2
image_id: fedora-19-x64
```
Status
------
* This module will be removed in version 2.0.0. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Vincent Viallet (@zbal)
ansible community.digitalocean.digital_ocean_cdn_endpoints_info β Display DigitalOcean CDN Endpoints community.digitalocean.digital\_ocean\_cdn\_endpoints\_info β Display DigitalOcean CDN Endpoints
================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_cdn_endpoints_info`.
New in version 1.10.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Display DigitalOcean CDN Endpoints
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **state** string | **Choices:*** **present** β
* absent
| The usual, `present` to create, `absent` to destroy |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Display DigitalOcean CDN Endpoints
community.digitalocean.digital_ocean_cdn_endpoints_info:
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | success | DigitalOcean CDN Endpoints **Sample:** {'data': {'endpoints': [{'created\_at': '2021-09-05T13:47:23Z', 'endpoint': 'mamercad.nyc3.cdn.digitaloceanspaces.com', 'id': '01739563-3f50-4da4-a451-27f6d59d7573', 'origin': 'mamercad.nyc3.digitaloceanspaces.com', 'ttl': 3600}], 'meta': {'total': 1}}} |
### Authors
* Mark Mercado (@mamercad)
ansible community.digitalocean.digital_ocean_monitoring_alerts β Programmatically retrieve metrics as well as configure alert policies based on these metrics community.digitalocean.digital\_ocean\_monitoring\_alerts β Programmatically retrieve metrics as well as configure alert policies based on these metrics
========================================================================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_monitoring_alerts`.
New in version 1.10.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* The DigitalOcean Monitoring API makes it possible to programmatically retrieve metrics as well as configure alert policies based on these metrics.
* The Monitoring API can help you gain insight into how your apps are performing and consuming resources.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **alerts** dictionary | | Alert object, required for `state=present`
Supports `email["email1", "email2", ...]` and `slack[{"channel1", "url1"}, {"channel2", "url2"}, ...]`
|
| **compare** string | **Choices:*** GreaterThan
* LessThan
| Alert comparison, required for `state=present`
|
| **description** string | | Alert description, required for `state=present`
|
| **enabled** boolean | **Choices:*** no
* yes
| Enabled or not, required for `state=present`
|
| **entities** list / elements=string | | Alert entities, required for `state=present`
|
| **oauth\_token** string / required | | DigitalOcean OAuth token; can be specified in `DO_API_KEY`, `DO_API_TOKEN`, or `DO_OAUTH_TOKEN` environment variables
aliases: API\_TOKEN |
| **state** string | **Choices:*** **present** β
* absent
| The usual, `present` to create, `absent` to destroy |
| **tags** list / elements=string | | Alert tags, required for `state=present`
|
| **type** string | **Choices:*** v1/insights/droplet/load\_1
* v1/insights/droplet/load\_5
* v1/insights/droplet/load\_15
* v1/insights/droplet/memory\_utilization\_percent
* v1/insights/droplet/disk\_utilization\_percent
* v1/insights/droplet/cpu
* v1/insights/droplet/disk\_read
* v1/insights/droplet/disk\_write
* v1/insights/droplet/public\_outbound\_bandwidth
* v1/insights/droplet/public\_inbound\_bandwidth
* v1/insights/droplet/private\_outbound\_bandwidth
* v1/insights/droplet/private\_inbound\_bandwidth
| Alert type, required for `state=present`
See <https://docs.digitalocean.com/reference/api/api-reference/#operation/create_alert_policy> for valid types |
| **uuid** string | | Alert uuid, required for `state=absent`
|
| **value** float | | Alert threshold, required for `state=present`
|
| **window** string | **Choices:*** 5m
* 10m
* 30m
* 1h
| Alert window, required for `state=present`
|
Examples
--------
```
- name: Create Droplet Monitoring alerts policy
community.digitalocean.digital_ocean_monitoring_alerts:
state: present
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}"
alerts:
email: ["[email protected]"]
slack: []
compare: GreaterThan
description: Droplet load1 alert
enabled: true
entities: ["{{ droplet_id }}"]
tags: ["my_alert_tag"]
type: v1/insights/droplet/load_1
value: 3.14159
window: 5m
register: monitoring_alert_policy
- name: Delete Droplet Monitoring alerts policy
community.digitalocean.digital_ocean_monitoring_alerts:
state: absent
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}"
uuid: "{{ monitoring_alert_policy.data.uuid }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | changed | A DigitalOcean Monitoring alerts policy **Sample:** {'alerts': {'email': ['[email protected]'], 'slack': []}, 'compare': 'GreaterThan', 'description': 'Droplet load1 alert', 'enabled': True, 'entities': ['262383737'], 'tags': ['my\_alert\_tag'], 'type': 'v1/insights/droplet/load\_1', 'uuid': '9f988f00-4690-443d-b638-ed5a99bbad3b', 'value': 3.14159, 'window': '5m'} |
### Authors
* Mark Mercado (@mamercad)
ansible community.digitalocean.digital_ocean_snapshot_info β Gather information about DigitalOcean Snapshot community.digitalocean.digital\_ocean\_snapshot\_info β Gather information about DigitalOcean Snapshot
======================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_snapshot_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information about snapshot information based upon provided values such as droplet, volume and snapshot id.
* This module was called `digital_ocean_snapshot_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **snapshot\_id** string | | To retrieve information about a snapshot, please specify this as a snapshot id. If set to actual snapshot id, then information are gathered related to that particular snapshot only. This is required parameter, if `snapshot_type` is set to `by_id`. |
| **snapshot\_type** string | **Choices:*** **all** β
* droplet
* volume
* by\_id
| Specifies the type of snapshot information to be retrieved. If set to `droplet`, then information are gathered related to snapshots based on Droplets only. If set to `volume`, then information are gathered related to snapshots based on volumes only. If set to `by_id`, then information are gathered related to snapshots based on snapshot id only. If not set to any of the above, then information are gathered related to all snapshots. |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Gather information about all snapshots
community.digitalocean.digital_ocean_snapshot_info:
snapshot_type: all
oauth_token: "{{ oauth_token }}"
- name: Gather information about droplet snapshots
community.digitalocean.digital_ocean_snapshot_info:
snapshot_type: droplet
oauth_token: "{{ oauth_token }}"
- name: Gather information about volume snapshots
community.digitalocean.digital_ocean_snapshot_info:
snapshot_type: volume
oauth_token: "{{ oauth_token }}"
- name: Gather information about snapshot by snapshot id
community.digitalocean.digital_ocean_snapshot_info:
snapshot_type: by_id
snapshot_id: 123123123
oauth_token: "{{ oauth_token }}"
- name: Get information about snapshot named big-data-snapshot1
community.digitalocean.digital_ocean_snapshot_info:
register: resp_out
- set_fact:
snapshot_id: "{{ item.id }}"
loop: "{{ resp_out.data | community.general.json_query(name) }}"
vars:
name: "[?name=='big-data-snapshot1']"
- debug:
var: snapshot_id
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** list / elements=dictionary | success | DigitalOcean snapshot information **Sample:** [{'created\_at': '2016-09-28T23:14:30Z', 'id': '4f60fc64-85d1-11e6-a004-000f53315871', 'min\_disk\_size': 10, 'name': 'big-data-snapshot1', 'regions': ['nyc1'], 'resource\_id': '89bcc42f-85cf-11e6-a004-000f53315871', 'resource\_type': 'volume', 'size\_gigabytes': 0}] |
### Authors
* Abhijeet Kasurde (@Akasurde)
| programming_docs |
ansible community.digitalocean.digital_ocean_database β Create and delete a DigitalOcean database community.digitalocean.digital\_ocean\_database β Create and delete a DigitalOcean database
===========================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_database`.
New in version 1.3.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and delete a database in DigitalOcean and optionally wait for it to be online.
* DigitalOceanβs managed database service simplifies the creation and management of highly available database clusters.
* Currently, it offers support for PostgreSQL, Redis, MySQL, and MongoDB.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **engine** string / required | **Choices:*** pg
* mysql
* redis
* mongodb
| A slug representing the database engine used for the cluster. The possible values are `pg` for PostgreSQL, `mysql` for MySQL, `redis` for Redis, and `mongodb` for MongoDB. |
| **id** integer | | A unique ID that can be used to identify and reference a database cluster.
aliases: database\_id |
| **name** string / required | | A unique, human-readable name for the database cluster. |
| **num\_nodes** integer | **Choices:*** 1
* 2
* 3
**Default:**1 | The number of nodes in the database cluster. Valid choices are 1, 2 or 3. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **private\_network\_uuid** string | | A string specifying the UUID of the VPC to which the database cluster is assigned. |
| **region** string / required | | The slug identifier for the region where the database cluster is located.
aliases: region\_id |
| **size** string / required | | The slug identifier representing the size of the nodes in the database cluster. See <https://developers.digitalocean.com/documentation/v2/#create-a-new-database-cluster> for supported sizes.
aliases: size\_id |
| **state** string | **Choices:*** **present** β
* absent
| Indicates the desired state of the target. |
| **tags** list / elements=string | | An array of tags that have been applied to the database cluster. |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
| **version** string | | A string representing the version of the database engine in use for the cluster. For `pg`, versions are 10, 11 and 12. For `mysql`, version is 8. For `redis`, version is 5. For `mongodb`, version is 4. |
| **wait** boolean | **Choices:*** no
* **yes** β
| Wait for the database to be online before returning. |
| **wait\_timeout** integer | **Default:**600 | How long before wait gives up, in seconds, when creating a database. |
Examples
--------
```
- name: Create a Redis database
community.digitalocean.digital_ocean_database:
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_KEY') }}"
state: present
name: testdatabase1
engine: redis
size: db-s-1vcpu-1gb
region: nyc1
num_nodes: 1
register: my_database
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | success | A DigitalOcean database **Sample:** {'database': {'connection': {'database': '', 'host': 'testdatabase1-do-user-3097135-0.b.db.ondigitalocean.com', 'password': 'REDACTED', 'port': 25061, 'protocol': 'rediss', 'ssl': True, 'uri': 'rediss://default:[email protected]:25061', 'user': 'default'}, 'created\_at': '2021-04-21T15:41:14Z', 'db\_names': None, 'engine': 'redis', 'id': '37de10e4-808b-4f4b-b25f-7b5b3fd194ac', 'maintenance\_window': {'day': 'monday', 'hour': '11:33:47', 'pending': False}, 'name': 'testdatabase1', 'num\_nodes': 1, 'private\_connection': {'database': '', 'host': 'private-testdatabase1-do-user-3097135-0.b.db.ondigitalocean.com', 'password': 'REDIS', 'port': 25061, 'protocol': 'rediss', 'ssl': True, 'uri': 'rediss://default:REDACTED@private-testdatabase1-do-user-3097135-0.b.db.ondigitalocean.com:25061', 'user': 'default'}, 'private\_network\_uuid': '0db3519b-9efc-414a-8868-8f2e6934688c', 'region': 'nyc1', 'size': 'db-s-1vcpu-1gb', 'status': 'online', 'tags': None, 'users': None, 'version': '6'}} |
### Authors
* Mark Mercado (@mamercad)
ansible community.digitalocean.digital_ocean_kubernetes_info β Returns information about an existing DigitalOcean Kubernetes cluster community.digitalocean.digital\_ocean\_kubernetes\_info β Returns information about an existing DigitalOcean Kubernetes cluster
===============================================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_kubernetes_info`.
New in version 1.3.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Returns information about an existing DigitalOcean Kubernetes cluster.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name** string / required | | A human-readable name for a Kubernetes cluster. |
| **oauth\_token** string / required | | DigitalOcean OAuth token; can be specified in `DO_API_KEY`, `DO_API_TOKEN`, or `DO_OAUTH_TOKEN` environment variables
aliases: API\_TOKEN |
| **return\_kubeconfig** boolean | **Choices:*** **no** β
* yes
| Controls whether or not to return the `kubeconfig`. |
Examples
--------
```
- name: Get information about an existing DigitalOcean Kubernetes cluster
community.digitalocean.digital_ocean_kubernetes_info:
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}"
name: hacktoberfest
return_kubeconfig: yes
register: my_cluster
- ansible.builtin.debug:
msg: "Cluster name is {{ my_cluster.data.name }}, ID is {{ my_cluster.data.id }}"
- ansible.builtin.debug:
msg: "Cluster kubeconfig is {{ my_cluster.data.kubeconfig }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | changed | A DigitalOcean Kubernetes cluster (and optional `kubeconfig`) **Sample:** {'auto\_upgrade': False, 'cluster\_subnet': '10.244.0.0/16', 'created\_at': '2020-09-26T21:36:18Z', 'endpoint': 'https://REDACTED.k8s.ondigitalocean.com', 'id': 'REDACTED', 'ipv4': 'REDACTED', 'kubeconfig': 'apiVersion: v1\nclusters:\n- cluster:\n certificate-authority-data: REDACTED\n server: https://REDACTED.k8s.ondigitalocean.com\n name: do-nyc1-hacktoberfest\ncontexts:\n- context:\n cluster: do-nyc1-hacktoberfest\n user: do-nyc1-hacktoberfest-admin\n name: do-nyc1-hacktoberfest\ncurrent-context: do-nyc1-hacktoberfest\nkind: Config\npreferences: {}\nusers:\n- name: do-nyc1-hacktoberfest-admin\n user:\n token: REDACTED', 'maintenance\_policy': {'day': 'any', 'duration': '4h0m0s', 'start\_time': '13:00'}, 'name': 'hacktoberfest', 'node\_pools': [{'auto\_scale': False, 'count': 1, 'id': 'REDACTED', 'labels': None, 'max\_nodes': 0, 'min\_nodes': 0, 'name': 'hacktoberfest-workers', 'nodes': [{'created\_at': '2020-09-26T21:36:18Z', 'droplet\_id': 'REDACTED', 'id': 'REDACTED', 'name': 'hacktoberfest-workers-3tv46', 'status': {'state': 'running'}, 'updated\_at': '2020-09-26T21:40:28Z'}], 'size': 's-1vcpu-2gb', 'tags': ['k8s', 'k8s:REDACTED', 'k8s:worker'], 'taints': []}], 'region': 'nyc1', 'service\_subnet': '10.245.0.0/16', 'status': {'state': 'running'}, 'surge\_upgrade': False, 'tags': ['k8s', 'k8s:REDACTED'], 'updated\_at': '2020-09-26T21:42:29Z', 'version': '1.18.8-do.0', 'vpc\_uuid': 'REDACTED'} |
### Authors
* Mark Mercado (@mamercad)
ansible community.digitalocean.digital_ocean_vpc_info β Gather information about DigitalOcean VPCs community.digitalocean.digital\_ocean\_vpc\_info β Gather information about DigitalOcean VPCs
=============================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_vpc_info`.
New in version 1.7.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information about DigitalOcean VPCs.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **members** boolean | **Choices:*** **no** β
* yes
| Return VPC members (instead of all VPCs). |
| **name** string | | The name of the VPC. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Fetch all VPCs
community.digitalocean.digital_ocean_vpc_info:
register: my_vpcs
- name: Fetch members of a VPC
community.digitalocean.digital_ocean_vpc_info:
members: true
name: myvpc1
register: my_vpc_members
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | success | All DigitalOcean VPCs, or, members of a VPC (with `members=True`). **Sample:** [{'created\_at': '2021-02-06T17:57:22Z', 'default': True, 'description': '', 'id': '0db3519b-9efc-414a-8868-8f2e6934688c', 'ip\_range': '10.116.0.0/20', 'name': 'default-nyc1', 'region': 'nyc1', 'urn': 'do:vpc:0db3519b-9efc-414a-8868-8f2e6934688c'}, {'links': {}, 'members': [], 'meta': {'total': 0}}] |
### Authors
* Mark Mercado (@mamercad)
ansible community.digitalocean.digital_ocean_image_info β Gather information about DigitalOcean images community.digitalocean.digital\_ocean\_image\_info β Gather information about DigitalOcean images
=================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_image_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information about DigitalOcean provided images.
* These images can be either of type `distribution`, `application` and `private`.
* This module was called `digital_ocean_image_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **image\_type** string | **Choices:*** **all** β
* application
* distribution
* private
| Specifies the type of image information to be retrieved. If set to `application`, then information are gathered related to all application images. If set to `distribution`, then information are gathered related to all distribution images. If set to `private`, then information are gathered related to all private images. If not set to any of above, then information are gathered related to all images. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Gather information about all images
community.digitalocean.digital_ocean_image_info:
image_type: all
oauth_token: "{{ oauth_token }}"
- name: Gather information about application images
community.digitalocean.digital_ocean_image_info:
image_type: application
oauth_token: "{{ oauth_token }}"
- name: Gather information about distribution images
community.digitalocean.digital_ocean_image_info:
image_type: distribution
oauth_token: "{{ oauth_token }}"
- name: Get distribution about image with slug coreos-beta
community.digitalocean.digital_ocean_image_info:
register: resp_out
- set_fact:
distribution_name: "{{ item.distribution }}"
loop: "{{ resp_out.data | community.general.json_query(name) }}"
vars:
name: "[?slug=='coreos-beta']"
- debug:
var: distribution_name
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** list / elements=string | success | DigitalOcean image information **Sample:** [{'created\_at': '2018-02-02T07:11:43Z', 'distribution': 'CoreOS', 'id': 31434061, 'min\_disk\_size': 20, 'name': '1662.1.0 (beta)', 'public': True, 'regions': ['nyc1', 'sfo1', 'nyc2', 'ams2', 'sgp1', 'lon1', 'nyc3', 'ams3', 'fra1', 'tor1', 'sfo2', 'blr1'], 'size\_gigabytes': 0.42, 'slug': 'coreos-beta', 'type': 'snapshot'}] |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.digitalocean.digital_ocean_domain_info β Gather information about DigitalOcean Domains community.digitalocean.digital\_ocean\_domain\_info β Gather information about DigitalOcean Domains
===================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_domain_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information about DigitalOcean provided Domains.
* This module was called `digital_ocean_domain_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **domain\_name** string | | Name of the domain to gather information for. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Gather information about all domains
community.digitalocean.digital_ocean_domain_info:
oauth_token: "{{ oauth_token }}"
- name: Gather information about domain with given name
community.digitalocean.digital_ocean_domain_info:
oauth_token: "{{ oauth_token }}"
domain_name: "example.com"
- name: Get ttl from domain
community.digitalocean.digital_ocean_domain_info:
register: resp_out
- set_fact:
domain_ttl: "{{ item.ttl }}"
loop: "{{ resp_out.data | community.general.json_query(name) }}"
vars:
name: "[?name=='example.com']"
- debug:
var: domain_ttl
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** list / elements=dictionary | success | DigitalOcean Domain information **Sample:** [{'domain\_records': [{'data': 'ns1.digitalocean.com', 'flags': None, 'id': 37826823, 'name': '@', 'port': None, 'priority': None, 'tag': None, 'ttl': 1800, 'type': 'NS', 'weight': None}], 'name': 'myexample123.com', 'ttl': 1800, 'zone\_file': 'myexample123.com. IN SOA ns1.digitalocean.com. hostmaster.myexample123.com. 1520702984 10800 3600 604800 1800\n'}] |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.digitalocean.digital_ocean_account_info β Gather information about DigitalOcean User account community.digitalocean.digital\_ocean\_account\_info β Gather information about DigitalOcean User account
=========================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_account_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information about User account.
* This module was called `digital_ocean_account_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Gather information about user account
community.digitalocean.digital_ocean_account_info:
oauth_token: "{{ oauth_token }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | success | DigitalOcean account information **Sample:** {'droplet\_limit': 10, 'email': '[email protected]', 'email\_verified': True, 'floating\_ip\_limit': 3, 'status': 'active', 'status\_message': '', 'uuid': 'aaaaaaaaaaaaaa'} |
### Authors
* Abhijeet Kasurde (@Akasurde)
| programming_docs |
ansible community.digitalocean.digital_ocean_project β Manage a DigitalOcean project community.digitalocean.digital\_ocean\_project β Manage a DigitalOcean project
==============================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_project`.
New in version 1.6.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage a project in DigitalOcean
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **description** string | | The description of the project. The maximum length is 255 characters. |
| **environment** string | **Choices:*** Development
* Staging
* Production
| The environment of the projects resources. |
| **id** string | | UUID of the project |
| **is\_default** boolean | **Choices:*** **no** β
* yes
| If true, all resources will be added to this project if no project is specified. |
| **name** string | | The human-readable name for the project. The maximum length is 175 characters and the name must be unique. |
| **oauth\_token** string / required | | DigitalOcean OAuth token. Can be specified in `DO_API_KEY`, `DO_API_TOKEN`, or `DO_OAUTH_TOKEN` environment variables
aliases: API\_TOKEN |
| **purpose** string | | The purpose of the project. The maximum length is 255 characters Required if state is `present`
If not one of DO provided purposes, will be prefixed with `Other`
DO provided purposes can be found below `Just trying out DigitalOcean` `Class project/Educational Purposes` `Website or blog` `Web Application` `Service or API` `Mobile Application` `Machine Learning/AI/Data Processing` `IoT` `Operational/Developer tooling` |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the target.
`present` will create the project
`absent` will delete the project, if it exists. |
Examples
--------
```
# Creates a new project
- community.digitalocean.digital_ocean_project:
name: "TestProj"
state: "present"
description: "This is a test project"
purpose: "IoT"
environment: "Development"
# Updates the existing project with the new environment
- community.digitalocean.digital_ocean_project:
name: "TestProj"
state: "present"
description: "This is a test project"
purpose: "IoT"
environment: "Production"
# This renames an existing project by utilizing the id of the project
- community.digitalocean.digital_ocean_project:
name: "TestProj2"
id: "12312312-abcd-efgh-ijkl-123123123123"
state: "present"
description: "This is a test project"
purpose: "IoT"
environment: "Development"
# This creates a project that results with a purpose of "Other: My Prod App"
- community.digitalocean.digital_ocean_project:
name: "ProdProj"
state: "present"
description: "This is a prod app"
purpose: "My Prod App"
environment: "Production"
# This removes a project
- community.digitalocean.digital_ocean_project:
name: "ProdProj"
state: "absent"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | changed | a DigitalOcean Project **Sample:** {'project': {'created\_at': '2021-05-28T00:00:00Z', 'description': 'This is a test description', 'environment': 'Development', 'id': '12312312-abcd-efgh-1234-abcdefgh123', 'is\_default': False, 'name': 'Test123', 'owner\_id': 1234567, 'owner\_uuid': '12312312-1234-5678-abcdefghijklm', 'purpose': 'IoT', 'updated\_at': '2021-05-29T00:00:00Z'}} |
### Authors
* Tyler Auerbeck (@tylerauerbeck)
ansible community.digitalocean.digital_ocean_floating_ip_info β DigitalOcean Floating IPs information community.digitalocean.digital\_ocean\_floating\_ip\_info β DigitalOcean Floating IPs information
=================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_floating_ip_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to fetch DigitalOcean Floating IPs information.
* This module was called `digital_ocean_floating_ip_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* Version 2 of DigitalOcean API is used.
Examples
--------
```
- name: "Gather information about all Floating IPs"
community.digitalocean.digital_ocean_floating_ip_info:
register: result
- name: "List of current floating ips"
debug:
var: result.floating_ips
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **floating\_ips** list / elements=string | success and no resource constraint | a DigitalOcean Floating IP resource **Sample:** [{'droplet': None, 'ip': '45.55.96.47', 'locked': False, 'region': {'available': True, 'features': ['private\_networking', 'backups', 'ipv6', 'metadata'], 'name': 'New York 3', 'sizes': ['512mb', '1gb', '2gb', '4gb', '8gb', '16gb', '32gb', '48gb', '64gb'], 'slug': 'nyc3'}}] |
### Authors
* Patrick Marques (@pmarques)
ansible community.digitalocean.digital_ocean_kubernetes β Create and delete a DigitalOcean Kubernetes cluster community.digitalocean.digital\_ocean\_kubernetes β Create and delete a DigitalOcean Kubernetes cluster
=======================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_kubernetes`.
New in version 1.3.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and delete a Kubernetes cluster in DigitalOcean (and optionally wait for it to be running).
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_upgrade** boolean | **Choices:*** **no** β
* yes
| A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. |
| **maintenance\_policy** dictionary | | An object specifying the maintenance window policy for the Kubernetes cluster (see table below). |
| **name** string / required | | A human-readable name for a Kubernetes cluster. |
| **node\_pools** list / elements=dictionary | **Default:**[{"auto\_scale": false, "count": 1, "labels": {}, "max\_nodes": 0, "min\_nodes": 0, "name": "worker-pool", "size": "s-1vcpu-2gb", "tags": [], "taints": []}] | An object specifying the details of the worker nodes available to the Kubernetes cluster (see table below). |
| | **auto\_scale** boolean | **Choices:*** no
* yes
| A boolean value indicating whether auto-scaling is enabled for this node pool. |
| | **count** integer | | The number of Droplet instances in the node pool. |
| | **labels** dictionary | | An object containing a set of Kubernetes labels. The keys are user-defined. |
| | **max\_nodes** integer | | The maximum number of nodes that this node pool can be auto-scaled to. The value will be `0` if `auto_scale` is set to `false`. |
| | **min\_nodes** integer | | The minimum number of nodes that this node pool can be auto-scaled to. The value will be `0` if `auto_scale` is set to `false`. |
| | **name** string | | A human-readable name for the node pool. |
| | **size** string | | The slug identifier for the type of Droplet used as workers in the node pool. |
| | **tags** list / elements=string | | An array containing the tags applied to the node pool. All node pools are automatically tagged `"k8s"`, `"k8s-worker"`, and `"k8s:$K8S_CLUSTER_ID"`. |
| | **taints** list / elements=string | | An array of taints to apply to all nodes in a pool. Taints will automatically be applied to all existing nodes and any subsequent nodes added to the pool. When a taint is removed, it is removed from all nodes in the pool. |
| **oauth\_token** string / required | | DigitalOcean OAuth token; can be specified in `DO_API_KEY`, `DO_API_TOKEN`, or `DO_OAUTH_TOKEN` environment variables
aliases: API\_TOKEN |
| **region** string | **Default:**"nyc1" | The slug identifier for the region where the Kubernetes cluster will be created.
aliases: region\_id |
| **return\_kubeconfig** boolean | **Choices:*** **no** β
* yes
| Controls whether or not to return the `kubeconfig`. |
| **state** string | **Choices:*** **present** β
* absent
| The usual, `present` to create, `absent` to destroy |
| **surge\_upgrade** boolean | **Choices:*** **no** β
* yes
| A boolean value indicating whether surge upgrade is enabled/disabled for the cluster. Surge upgrade makes cluster upgrades fast and reliable by bringing up new nodes before destroying the outdated nodes. |
| **tags** list / elements=string | | A flat array of tag names as strings to be applied to the Kubernetes cluster. All clusters will be automatically tagged "k8s" and "k8s:$K8S\_CLUSTER\_ID" in addition to any tags provided by the user. |
| **version** string | **Default:**"latest" | The slug identifier for the version of Kubernetes used for the cluster. See the /v2/kubernetes/options endpoint for available versions. |
| **vpc\_uuid** string | | A string specifying the UUID of the VPC to which the Kubernetes cluster will be assigned. If excluded, the cluster will be assigned to your account's default VPC for the region. |
| **wait** boolean | **Choices:*** no
* **yes** β
| Wait for the cluster to be running before returning. |
| **wait\_timeout** integer | **Default:**600 | How long before wait gives up, in seconds, when creating a cluster. |
Examples
--------
```
- name: Create a new DigitalOcean Kubernetes cluster in New York 1
community.digitalocean.digital_ocean_kubernetes:
state: present
oauth_token: "{{ lookup('env', 'DO_API_TOKEN') }}"
name: hacktoberfest
region: nyc1
node_pools:
- name: hacktoberfest-workers
size: s-1vcpu-2gb
count: 3
return_kubeconfig: yes
wait_timeout: 600
register: my_cluster
- name: Show the kubeconfig for the cluster we just created
debug:
msg: "{{ my_cluster.data.kubeconfig }}"
- name: Destroy (delete) an existing DigitalOcean Kubernetes cluster
community.digitalocean.digital_ocean_kubernetes:
state: absent
oauth_token: "{{ lookup('env', 'DO_API_TOKEN') }}"
name: hacktoberfest
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | changed | A DigitalOcean Kubernetes cluster (and optional `kubeconfig`) **Sample:** {'kubeconfig': 'apiVersion: v1\nclusters:\n- cluster:\n certificate-authority-data: REDACTED\n server: https://REDACTED.k8s.ondigitalocean.com\n name: do-nyc1-hacktoberfest\ncontexts:\n- context:\n cluster: do-nyc1-hacktoberfest\n user: do-nyc1-hacktoberfest-admin\n name: do-nyc1-hacktoberfest\ncurrent-context: do-nyc1-hacktoberfest\nkind: Config\npreferences: {}\nusers:\n- name: do-nyc1-hacktoberfest-admin\n user:\n token: REDACTED', 'kubernetes\_cluster': {'auto\_upgrade': False, 'cluster\_subnet': '10.244.0.0/16', 'created\_at': '2020-09-27T00:55:37Z', 'endpoint': 'https://REDACTED.k8s.ondigitalocean.com', 'id': 'REDACTED', 'ipv4': 'REDACTED', 'maintenance\_policy': {'day': 'any', 'duration': '4h0m0s', 'start\_time': '15:00'}, 'name': 'hacktoberfest', 'node\_pools': [{'auto\_scale': False, 'count': 1, 'id': 'REDACTED', 'labels': None, 'max\_nodes': 0, 'min\_nodes': 0, 'name': 'hacktoberfest-workers', 'nodes': [{'created\_at': '2020-09-27T00:55:37Z', 'droplet\_id': '209555245', 'id': 'REDACTED', 'name': 'hacktoberfest-workers-3tdq1', 'status': {'state': 'running'}, 'updated\_at': '2020-09-27T00:58:36Z'}], 'size': 's-1vcpu-2gb', 'tags': ['k8s', 'k8s:REDACTED', 'k8s:worker'], 'taints': []}], 'region': 'nyc1', 'service\_subnet': '10.245.0.0/16', 'status': {'state': 'running'}, 'surge\_upgrade': False, 'tags': ['k8s', 'k8s:REDACTED'], 'updated\_at': '2020-09-27T01:00:37Z', 'version': '1.18.8-do.1', 'vpc\_uuid': 'REDACTED'}} |
### Authors
* Mark Mercado (@mamercad)
ansible community.digitalocean.digital_ocean_firewall β Manage cloud firewalls within DigitalOcean community.digitalocean.digital\_ocean\_firewall β Manage cloud firewalls within DigitalOcean
============================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_firewall`.
New in version 1.1.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to add or remove firewalls on the DigitalOcean cloud platform.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **droplet\_ids** list / elements=string | | List of droplet ids to be assigned to the firewall |
| **inbound\_rules** list / elements=dictionary / required | | Firewall rules specifically targeting inbound network traffic into DigitalOcean |
| | **ports** string / required | | The ports on which traffic will be allowed, single, range, or all |
| | **protocol** string | **Choices:*** udp
* **tcp** β
* icmp
| Network protocol to be accepted. |
| | **sources** dictionary / required | | Dictionary of locations from which inbound traffic will be accepted |
| | | **addresses** list / elements=string | | List of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs to which the firewall will allow traffic |
| | | **droplet\_ids** list / elements=string | | List of integers containing the IDs of the Droplets to which the firewall will allow traffic |
| | | **load\_balancer\_uids** list / elements=string | | List of strings containing the IDs of the Load Balancers to which the firewall will allow traffic |
| | | **tags** list / elements=string | | List of strings containing the names of Tags corresponding to groups of Droplets to which the Firewall will allow traffic |
| **name** string / required | | Name of the firewall rule to create or manage |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **outbound\_rules** list / elements=dictionary / required | | Firewall rules specifically targeting outbound network traffic from DigitalOcean |
| | **destinations** dictionary / required | | Dictionary of locations from which outbound traffic will be allowed |
| | | **addresses** list / elements=string | | List of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs to which the firewall will allow traffic |
| | | **droplet\_ids** list / elements=string | | List of integers containing the IDs of the Droplets to which the firewall will allow traffic |
| | | **load\_balancer\_uids** list / elements=string | | List of strings containing the IDs of the Load Balancers to which the firewall will allow traffic |
| | | **tags** list / elements=string | | List of strings containing the names of Tags corresponding to groups of Droplets to which the Firewall will allow traffic |
| | **ports** string / required | | The ports on which traffic will be allowed, single, range, or all |
| | **protocol** string | **Choices:*** udp
* **tcp** β
* icmp
| Network protocol to be accepted. |
| **state** string | **Choices:*** **present** β
* absent
| Assert the state of the firewall rule. Set to 'present' to create or update and 'absent' to remove. |
| **tags** list / elements=string | | List of tags to be assigned to the firewall |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
# Allows tcp connections to port 22 (SSH) from specific sources
# Allows tcp connections to ports 80 and 443 from any source
# Allows outbound access to any destination for protocols tcp, udp and icmp
# The firewall rules will be applied to any droplets with the tag "sample"
- name: Create a Firewall named my-firewall
digital_ocean_firewall:
name: my-firewall
state: present
inbound_rules:
- protocol: "tcp"
ports: "22"
sources:
addresses: ["1.2.3.4"]
droplet_ids: ["my_droplet_id_1", "my_droplet_id_2"]
load_balancer_uids: ["my_lb_id_1", "my_lb_id_2"]
tags: ["tag_1", "tag_2"]
- protocol: "tcp"
ports: "80"
sources:
addresses: ["0.0.0.0/0", "::/0"]
- protocol: "tcp"
ports: "443"
sources:
addresses: ["0.0.0.0/0", "::/0"]
outbound_rules:
- protocol: "tcp"
ports: "1-65535"
destinations:
addresses: ["0.0.0.0/0", "::/0"]
- protocol: "udp"
ports: "1-65535"
destinations:
addresses: ["0.0.0.0/0", "::/0"]
- protocol: "icmp"
ports: "1-65535"
destinations:
addresses: ["0.0.0.0/0", "::/0"]
droplet_ids: []
tags: ["sample"]
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | success | DigitalOcean firewall resource **Sample:** {'created\_at': '2020-08-11T18:41:30Z', 'droplet\_ids': [], 'id': '7acd6ee2-257b-434f-8909-709a5816d4f9', 'inbound\_rules': [{'ports': '443', 'protocol': 'tcp', 'sources': {'addresses': ['1.2.3.4'], 'droplet\_ids': ['my\_droplet\_id\_1', 'my\_droplet\_id\_2'], 'load\_balancer\_uids': ['my\_lb\_id\_1', 'my\_lb\_id\_2'], 'tags': ['tag\_1', 'tag\_2']}}, {'ports': '80', 'protocol': 'tcp', 'sources': {'addresses': ['0.0.0.0/0', '::/0']}}, {'ports': '443', 'protocol': 'tcp', 'sources': {'addresses': ['0.0.0.0/0', '::/0']}}], 'name': 'my-firewall', 'outbound\_rules': [{'destinations': {'addresses': ['0.0.0.0/0', '::/0']}, 'ports': '1-65535', 'protocol': 'tcp'}, {'destinations': {'addresses': ['0.0.0.0/0', '::/0']}, 'ports': '1-65535', 'protocol': 'udp'}, {'destinations': {'addresses': ['0.0.0.0/0', '::/0']}, 'ports': '1-65535', 'protocol': 'icmp'}], 'pending\_changes': [], 'status': 'succeeded', 'tags': ['sample']} |
### Authors
* Anthony Bond (@BondAnthony)
* Lucas Basquerotto (@lucasbasquerotto)
| programming_docs |
ansible community.digitalocean.digital_ocean_monitoring_alerts_info β Programmatically retrieve metrics as well as configure alert policies based on these metrics community.digitalocean.digital\_ocean\_monitoring\_alerts\_info β Programmatically retrieve metrics as well as configure alert policies based on these metrics
==============================================================================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_monitoring_alerts_info`.
New in version 1.10.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* The DigitalOcean Monitoring API makes it possible to programmatically retrieve metrics as well as configure alert policies based on these metrics.
* The Monitoring API can help you gain insight into how your apps are performing and consuming resources.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **oauth\_token** string / required | | DigitalOcean OAuth token; can be specified in `DO_API_KEY`, `DO_API_TOKEN`, or `DO_OAUTH_TOKEN` environment variables
aliases: API\_TOKEN |
| **state** string | **Choices:*** **present** β
|
`present` to return alerts |
| **uuid** string | | Alert uuid (if specified only returns the specific alert policy) |
Examples
--------
```
- name: Get Droplet Monitoring alerts polices
community.digitalocean.digital_ocean_monitoring_alerts_info:
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}"
register: monitoring_alerts
- name: Get specific Droplet Monitoring alerts policy
community.digitalocean.digital_ocean_monitoring_alerts_info:
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}"
uuid: ec48b0e7-23bb-4a7f-95f2-d83da62fcd60
register: monitoring_alert
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | changed | DigitalOcean Monitoring alerts policies **Sample:** {'data': [{'alerts': {'email': ['[email protected]'], 'slack': []}, 'compare': 'GreaterThan', 'description': 'Droplet load1 alert', 'enabled': True, 'entities': ['262383737'], 'tags': ['my\_alert\_tag'], 'type': 'v1/insights/droplet/load\_1', 'uuid': 'ec48b0e7-23bb-4a7f-95f2-d83da62fcd60', 'value': 3.14159, 'window': '5m'}]} |
### Authors
* Mark Mercado (@mamercad)
ansible community.digitalocean.digital_ocean_droplet β Create and delete a DigitalOcean droplet community.digitalocean.digital\_ocean\_droplet β Create and delete a DigitalOcean droplet
=========================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_droplet`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and delete a droplet in DigitalOcean and optionally wait for it to be active.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **backups** boolean | **Choices:*** **no** β
* yes
| indicates whether automated backups should be enabled. |
| **id** integer | | Numeric, the droplet id you want to operate on.
aliases: droplet\_id |
| **image** string | | This is the slug of the image you would like the droplet created with.
aliases: image\_id |
| **ipv6** boolean | **Choices:*** **no** β
* yes
| enable IPv6 for your droplet. |
| **monitoring** boolean | **Choices:*** **no** β
* yes
| indicates whether to install the DigitalOcean agent for monitoring. |
| **name** string | | String, this is the name of the droplet - must be formatted by hostname rules. |
| **oauth\_token** string / required | | DigitalOcean OAuth token. Can be specified in `DO_API_KEY`, `DO_API_TOKEN`, or `DO_OAUTH_TOKEN` environment variables
aliases: API\_TOKEN |
| **private\_networking** boolean | **Choices:*** **no** β
* yes
| add an additional, private network interface to droplet for inter-droplet communication. |
| **region** string | | This is the slug of the region you would like your server to be created in.
aliases: region\_id |
| **resize\_disk** boolean | **Choices:*** **no** β
* yes
| Whether to increase disk size (only consulted if the `unique_name` is `True` and `size` dictates an increase) |
| **size** string | | This is the slug of the size you would like the droplet created with.
aliases: size\_id |
| **ssh\_keys** list / elements=string | | array of SSH key Fingerprint that you would like to be added to the server. |
| **state** string | **Choices:*** **present** β
* absent
* active
* inactive
| Indicate desired state of the target.
`present` will create the named droplet; be mindful of the `unique_name` parameter.
`absent` will delete the named droplet, if it exists.
`active` will create the named droplet (unless it exists) and ensure that it is powered on.
`inactive` will create the named droplet (unless it exists) and ensure that it is powered off. |
| **tags** list / elements=string | | List, A list of tag names as strings to apply to the Droplet after it is created. Tag names can either be existing or new tags. |
| **unique\_name** boolean | **Choices:*** **no** β
* yes
| require unique hostnames. By default, DigitalOcean allows multiple hosts with the same name. Setting this to "yes" allows only one host per name. Useful for idempotence. |
| **user\_data** string | | opaque blob of data which is made available to the droplet |
| **volumes** list / elements=string | | List, A list including the unique string identifier for each Block Storage volume to be attached to the Droplet. |
| **vpc\_uuid** string added in 0.1.0 of community.digitalocean | | A string specifying the UUID of the VPC to which the Droplet will be assigned. If excluded, Droplet will be assigned to the account's default VPC for the region. |
| **wait** boolean | **Choices:*** no
* **yes** β
| Wait for the droplet to be active before returning. If wait is "no" an ip\_address may not be returned. |
| **wait\_timeout** integer | **Default:**120 | How long before wait gives up, in seconds, when creating a droplet. |
Examples
--------
```
- name: Create a new droplet
community.digitalocean.digital_ocean_droplet:
state: present
name: mydroplet
oauth_token: XXX
size: 2gb
region: sfo1
image: ubuntu-16-04-x64
wait_timeout: 500
ssh_keys: [ .... ]
register: my_droplet
- debug:
msg: "ID is {{ my_droplet.data.droplet.id }}, IP is {{ my_droplet.data.ip_address }}"
- name: Ensure a droplet is present
community.digitalocean.digital_ocean_droplet:
state: present
id: 123
name: mydroplet
oauth_token: XXX
size: 2gb
region: sfo1
image: ubuntu-16-04-x64
wait_timeout: 500
- name: Ensure a droplet is present with SSH keys installed
community.digitalocean.digital_ocean_droplet:
state: present
id: 123
name: mydroplet
oauth_token: XXX
size: 2gb
region: sfo1
ssh_keys: ['1534404', '1784768']
image: ubuntu-16-04-x64
wait_timeout: 500
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | changed | a DigitalOcean Droplet **Sample:** {'droplet': {'backup\_ids': [], 'created\_at': '2014-11-14T16:36:31Z', 'disk': 20, 'features': ['virtio'], 'id': 3164494, 'image': {}, 'kernel': {'id': 2233, 'name': 'Ubuntu 14.04 x64 vmlinuz-3.13.0-37-generic', 'version': '3.13.0-37-generic'}, 'locked': True, 'memory': 512, 'name': 'example.com', 'networks': {}, 'region': {}, 'size': {}, 'size\_slug': '512mb', 'snapshot\_ids': [], 'status': 'new', 'tags': ['web'], 'vcpus': 1, 'volume\_ids': []}, 'ip\_address': '104.248.118.172', 'ipv6\_address': '2604:a880:400:d1::90a:6001', 'private\_ipv4\_address': '10.136.122.141'} |
### Authors
* Gurchet Rai (@gurch101)
ansible community.digitalocean.digital_ocean_cdn_endpoints β Create, update, and delete DigitalOcean CDN Endpoints community.digitalocean.digital\_ocean\_cdn\_endpoints β Create, update, and delete DigitalOcean CDN Endpoints
=============================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_cdn_endpoints`.
New in version 1.10.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update, and delete DigitalOcean CDN Endpoints
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **certificate\_id** string | | The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided. |
| **custom\_domain** string | | The fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **origin** string / required | | The fully qualified domain name (FQDN) for the origin server which provides the content for the CDN. This is currently restricted to a Space. |
| **state** string | **Choices:*** **present** β
* absent
| The usual, `present` to create, `absent` to destroy |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **ttl** integer | **Choices:*** 60
* 600
* 3600
* 86400
* 604800
**Default:**3600 | The amount of time the content is cached by the CDN's edge servers in seconds. TTL must be one of 60, 600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when excluded. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Create DigitalOcean CDN Endpoint
community.digitalocean.digital_ocean_cdn_endpoints_info:
state: present
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}"
origin: mamercad.nyc3.digitaloceanspaces.com
- name: Update DigitalOcean CDN Endpoint (change ttl to 600, default is 3600)
community.digitalocean.digital_ocean_cdn_endpoints_info:
state: present
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}"
origin: mamercad.nyc3.digitaloceanspaces.com
ttl: 600
- name: Delete DigitalOcean CDN Endpoint
community.digitalocean.digital_ocean_cdn_endpoints_info:
state: absent
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}"
origin: mamercad.nyc3.digitaloceanspaces.com
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | success | DigitalOcean CDN Endpoints **Sample:** {'data': {'endpoint': {'created\_at': '2021-09-05T13:47:23Z', 'endpoint': 'mamercad.nyc3.cdn.digitaloceanspaces.com', 'id': '01739563-3f50-4da4-a451-27f6d59d7573', 'origin': 'mamercad.nyc3.digitaloceanspaces.com', 'ttl': 3600}}} |
### Authors
* Mark Mercado (@mamercad)
ansible community.digitalocean.digital_ocean_floating_ip β Manage DigitalOcean Floating IPs community.digitalocean.digital\_ocean\_floating\_ip β Manage DigitalOcean Floating IPs
======================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_floating_ip`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create/delete/assign a floating IP.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **droplet\_id** string | | The Droplet that the Floating IP has been assigned to. |
| **ip** string | | Public IP address of the Floating IP. Used to remove an IP
aliases: id |
| **oauth\_token** string / required | | DigitalOcean OAuth token. |
| **region** string | | The region that the Floating IP is reserved to. |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the target. |
| **timeout** integer | **Default:**30 | Floating IP creation timeout. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* Version 2 of DigitalOcean API is used.
Examples
--------
```
- name: "Create a Floating IP in region lon1"
community.digitalocean.digital_ocean_floating_ip:
state: present
region: lon1
- name: "Create a Floating IP assigned to Droplet ID 123456"
community.digitalocean.digital_ocean_floating_ip:
state: present
droplet_id: 123456
- name: "Delete a Floating IP with ip 1.2.3.4"
community.digitalocean.digital_ocean_floating_ip:
state: absent
ip: "1.2.3.4"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | success and no resource constraint | a DigitalOcean Floating IP resource **Sample:** {'action': {'completed\_at': None, 'id': 68212728, 'region': {'available': True, 'features': ['private\_networking', 'backups', 'ipv6', 'metadata'], 'name': 'New York 3', 'sizes': ['512mb', '1gb', '2gb', '4gb', '8gb', '16gb', '32gb', '48gb', '64gb'], 'slug': 'nyc3'}, 'region\_slug': 'nyc3', 'resource\_id': 758603823, 'resource\_type': 'floating\_ip', 'started\_at': '2015-10-15T17:45:44Z', 'status': 'in-progress', 'type': 'assign\_ip'}} |
### Authors
* Patrick Marques (@pmarques)
ansible community.digitalocean.digital_ocean_balance_info β Display DigitalOcean customer balance community.digitalocean.digital\_ocean\_balance\_info β Display DigitalOcean customer balance
============================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_balance_info`.
New in version 1.2.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to display the DigitalOcean customer balance.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Display DigitalOcean customer balance
community.digitalocean.digital_ocean_balance_info:
oauth_token: "{{ oauth_token }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | success | DigitalOcean customer balance **Sample:** {'account\_balance': '-27.52', 'generated\_at': '2021-04-11T05:08:24Z', 'month\_to\_date\_balance': '-27.40', 'month\_to\_date\_usage': '0.00'} |
### Authors
* Mark Mercado (@mamercad)
ansible community.digitalocean.digital_ocean_block_storage β Create/destroy or attach/detach Block Storage volumes in DigitalOcean community.digitalocean.digital\_ocean\_block\_storage β Create/destroy or attach/detach Block Storage volumes in DigitalOcean
=============================================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_block_storage`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create/destroy Block Storage volume in DigitalOcean, or attach/detach Block Storage volume to a droplet.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **block\_size** integer | | The size of the Block Storage volume in gigabytes. Required when *command=create* and *state=present*. If snapshot\_id is included, this will be ignored. If block\_size > current size of the volume, the volume is resized. |
| **command** string / required | **Choices:*** create
* attach
| Which operation do you want to perform. |
| **description** string | | Description of the Block Storage volume. |
| **droplet\_id** integer | | The droplet id you want to operate on. Required when *command=attach*. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **region** string | | The slug of the region where your Block Storage volume should be located in. If *snapshot\_id* is included, this will be ignored. |
| **snapshot\_id** string | | The snapshot id you would like the Block Storage volume created with. If included, *region* and *block\_size* will be ignored and changed to `null`. |
| **state** string / required | **Choices:*** present
* absent
| Indicate desired state of the target. |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
| **volume\_name** string / required | | The name of the Block Storage volume. |
Notes
-----
Note
* Two environment variables can be used, DO\_API\_KEY and DO\_API\_TOKEN. They both refer to the v2 token.
* If snapshot\_id is used, region and block\_size will be ignored and changed to null.
Examples
--------
```
- name: Create new Block Storage
community.digitalocean.digital_ocean_block_storage:
state: present
command: create
api_token: <TOKEN>
region: nyc1
block_size: 10
volume_name: nyc1-block-storage
- name: Resize an existing Block Storage
community.digitalocean.digital_ocean_block_storage:
state: present
command: create
api_token: <TOKEN>
region: nyc1
block_size: 20
volume_name: nyc1-block-storage
- name: Delete Block Storage
community.digitalocean.digital_ocean_block_storage:
state: absent
command: create
api_token: <TOKEN>
region: nyc1
volume_name: nyc1-block-storage
- name: Attach Block Storage to a Droplet
community.digitalocean.digital_ocean_block_storage:
state: present
command: attach
api_token: <TOKEN>
volume_name: nyc1-block-storage
region: nyc1
droplet_id: <ID>
- name: Detach Block Storage from a Droplet
community.digitalocean.digital_ocean_block_storage:
state: absent
command: attach
api_token: <TOKEN>
volume_name: nyc1-block-storage
region: nyc1
droplet_id: <ID>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **id** string | changed | Unique identifier of a Block Storage volume returned during creation. **Sample:** 69b25d9a-494c-12e6-a5af-001f53126b44 |
### Authors
* Harnek Sidhu (@harneksidhu)
| programming_docs |
ansible community.digitalocean.digital_ocean_droplet_info β Gather information about DigitalOcean Droplets community.digitalocean.digital\_ocean\_droplet\_info β Gather information about DigitalOcean Droplets
=====================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_droplet_info`.
New in version 1.4.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information about Droplets.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **id** string | | Droplet ID that can be used to identify and reference a droplet. |
| **name** string | | Droplet name that can be used to identify and reference a droplet. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Gather information about all droplets
community.digitalocean.digital_ocean_droplet_info:
oauth_token: "{{ oauth_token }}"
- name: Gather information about a specific droplet by name
community.digitalocean.digital_ocean_droplet_info:
oauth_token: "{{ oauth_token }}"
name: my-droplet-name
- name: Gather information about a specific droplet by id
community.digitalocean.digital_ocean_droplet_info:
oauth_token: "{{ oauth_token }}"
id: abc-123-d45
- name: Get information about all droplets to loop through
community.digitalocean.digital_ocean_droplet_info:
oauth_token: "{{ oauth_token }}"
register: droplets
- name: Get number of droplets
set_fact:
droplet_count: "{{ droplets.data | length }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** list / elements=dictionary | success | DigitalOcean droplet information **Sample:** [{'backup\_ids': [], 'created\_at': '2021-04-07T00:44:53Z', 'disk': 25, 'features': ['private\_networking'], 'id': 123456789, 'image': {'created\_at': '2020-10-20T08:49:55Z', 'description': 'Ubuntu 18.04 x86 image', 'distribution': 'Ubuntu', 'id': 987654321, 'min\_disk\_size': 15, 'name': '18.04 (LTS) x64', 'public': False, 'regions': [], 'size\_gigabytes': 0.34, 'slug': None, 'status': 'retired', 'tags': [], 'type': 'base'}, 'kernel': None, 'locked': False, 'memory': 1024, 'name': 'my-droplet-01', 'networks': {'v4': [{'gateway': '', 'ip\_address': '1.2.3.4', 'netmask': '255.255.240.0', 'type': 'private'}, {'gateway': '5.6.7.8', 'ip\_address': '4.3.2.1', 'netmask': '255.255.240.0', 'type': 'public'}], 'v6': []}, 'next\_backup\_window': None, 'region': {'available': True, 'features': ['backups', 'ipv6', 'metadata', 'install\_agent', 'storage', 'image\_transfer'], 'name': 'New York 1', 'sizes': ['s-1vcpu-1gb', 's-1vcpu-1gb-intel', 's-1vcpu-2gb', 's-1vcpu-2gb-intel', 's-2vcpu-2gb', 's-2vcpu-2gb-intel', 's-2vcpu-4gb', 's-2vcpu-4gb-intel', 's-4vcpu-8gb', 'c-2', 'c2-2vcpu-4gb', 's-4vcpu-8gb-intel', 'g-2vcpu-8gb', 'gd-2vcpu-8gb', 's-8vcpu-16gb', 'm-2vcpu-16gb', 'c-4', 'c2-4vcpu-8gb', 's-8vcpu-16gb-intel', 'm3-2vcpu-16gb', 'g-4vcpu-16gb', 'so-2vcpu-16gb', 'm6-2vcpu-16gb', 'gd-4vcpu-16gb', 'so1\_5-2vcpu-16gb', 'm-4vcpu-32gb', 'c-8', 'c2-8vcpu-16gb', 'm3-4vcpu-32gb', 'g-8vcpu-32gb', 'so-4vcpu-32gb', 'm6-4vcpu-32gb', 'gd-8vcpu-32gb', 'so1\_5-4vcpu-32gb', 'm-8vcpu-64gb', 'c-16', 'c2-16vcpu-32gb', 'm3-8vcpu-64gb', 'g-16vcpu-64gb', 'so-8vcpu-64gb', 'm6-8vcpu-64gb', 'gd-16vcpu-64gb', 'so1\_5-8vcpu-64gb', 'm-16vcpu-128gb', 'c-32', 'c2-32vcpu-64gb', 'm3-16vcpu-128gb', 'm-24vcpu-192gb', 'g-32vcpu-128gb', 'so-16vcpu-128gb', 'm6-16vcpu-128gb', 'gd-32vcpu-128gb', 'm3-24vcpu-192gb', 'g-40vcpu-160gb', 'so1\_5-16vcpu-128gb', 'm-32vcpu-256gb', 'gd-40vcpu-160gb', 'so-24vcpu-192gb', 'm6-24vcpu-192gb', 'm3-32vcpu-256gb', 'so1\_5-24vcpu-192gb', 'so-32vcpu-256gb', 'm6-32vcpu-256gb', 'so1\_5-32vcpu-256gb'], 'slug': 'nyc1'}, 'size': {'available': True, 'description': 'Basic', 'disk': 25, 'memory': 1024, 'price\_hourly': 0.00744, 'price\_monthly': 5.0, 'regions': ['ams2', 'ams3', 'blr1', 'fra1', 'lon1', 'nyc1', 'nyc2', 'nyc3', 'sfo1', 'sfo3', 'sgp1', 'tor1'], 'slug': 's-1vcpu-1gb', 'transfer': 1.0, 'vcpus': 1}, 'size\_slug': 's-1vcpu-1gb', 'snapshot\_ids': [], 'status': 'active', 'tags': ['tag1'], 'vcpus': 1, 'volume\_ids': [], 'vpc\_uuid': '123-abc-567a'}] |
### Authors
* Tyler Auerbeck (@tylerauerbeck)
ansible community.digitalocean.digital_ocean_tag β Create and remove tag(s) to DigitalOcean resource. community.digitalocean.digital\_ocean\_tag β Create and remove tag(s) to DigitalOcean resource.
===============================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_tag`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and remove tag(s) to DigitalOcean resource.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name** string / required | | The name of the tag. The supported characters for names include alphanumeric characters, dashes, and underscores. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **resource\_id** string | | The ID of the resource to operate on. The data type of resource\_id is changed from integer to string since Ansible 2.5.
aliases: droplet\_id |
| **resource\_type** string | **Choices:*** **droplet** β
| The type of resource to operate on. Currently, only tagging of droplets is supported. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the tag should be present or absent on the resource. |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* Two environment variables can be used, DO\_API\_KEY and DO\_API\_TOKEN. They both refer to the v2 token.
* As of Ansible 2.0, Version 2 of the DigitalOcean API is used.
Examples
--------
```
- name: Create a tag
community.digitalocean.digital_ocean_tag:
name: production
state: present
- name: Tag a resource; creating the tag if it does not exist
community.digitalocean.digital_ocean_tag:
name: "{{ item }}"
resource_id: "73333005"
state: present
loop:
- staging
- dbserver
- name: Untag a resource
community.digitalocean.digital_ocean_tag:
name: staging
resource_id: "73333005"
state: absent
# Deleting a tag also untags all the resources that have previously been
# tagged with it
- name: Remove a tag
community.digitalocean.digital_ocean_tag:
name: dbserver
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | success and no resource constraint | a DigitalOcean Tag resource **Sample:** {'tag': {'name': 'awesome', 'resources': {'droplets': {'count': 0, 'last\_tagged': None}}}} |
### Authors
* Victor Volle (@kontrafiktion)
ansible community.digitalocean.digital_ocean_volume_info β Gather information about DigitalOcean volumes community.digitalocean.digital\_ocean\_volume\_info β Gather information about DigitalOcean volumes
===================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_volume_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information about DigitalOcean provided volumes.
* This module was called `digital_ocean_volume_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **region\_name** string | | Name of region to restrict results to volumes available in a specific region. Please use [community.digitalocean.digital\_ocean\_region\_info](digital_ocean_region_info_module) for getting valid values related regions. |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Gather information about all volume
community.digitalocean.digital_ocean_volume_info:
oauth_token: "{{ oauth_token }}"
- name: Gather information about volume in given region
community.digitalocean.digital_ocean_volume_info:
region_name: nyc1
oauth_token: "{{ oauth_token }}"
- name: Get information about volume named nyc3-test-volume
community.digitalocean.digital_ocean_volume_info:
register: resp_out
- set_fact:
volume_id: "{{ item.id }}"
loop: "{{ resp_out.data | community.general.json_query(name) }}"
vars:
name: "[?name=='nyc3-test-volume']"
- debug: var=volume_id
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** list / elements=string | success | DigitalOcean volume information **Sample:** [{'created\_at': '2016-03-02T17:00:49Z', 'description': 'Block store for examples', 'droplet\_ids': [], 'id': '506f78a4-e098-11e5-ad9f-000f53306ae1', 'name': 'example', 'region': {'available': True, 'features': ['private\_networking', 'backups', 'ipv6', 'metadata'], 'name': 'New York 1', 'sizes': ['s-1vcpu-1gb', 's-1vcpu-2gb', 's-1vcpu-3gb', 's-2vcpu-2gb', 's-3vcpu-1gb', 's-2vcpu-4gb', 's-4vcpu-8gb', 's-6vcpu-16gb', 's-8vcpu-32gb', 's-12vcpu-48gb', 's-16vcpu-64gb', 's-20vcpu-96gb', 's-24vcpu-128gb', 's-32vcpu-192gb'], 'slug': 'nyc1'}, 'size\_gigabytes': 10}] |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.digitalocean.digital_ocean_load_balancer_info β Gather information about DigitalOcean load balancers community.digitalocean.digital\_ocean\_load\_balancer\_info β Gather information about DigitalOcean load balancers
==================================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_load_balancer_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information about DigitalOcean provided load balancers.
* This module was called `digital_ocean_load_balancer_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **load\_balancer\_id** string | | Load balancer ID that can be used to identify and reference a load\_balancer. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Gather information about all load balancers
community.digitalocean.digital_ocean_load_balancer_info:
oauth_token: "{{ oauth_token }}"
- name: Gather information about load balancer with given id
community.digitalocean.digital_ocean_load_balancer_info:
oauth_token: "{{ oauth_token }}"
load_balancer_id: "4de7ac8b-495b-4884-9a69-1050c6793cd6"
- name: Get name from load balancer id
community.digitalocean.digital_ocean_load_balancer_info:
register: resp_out
- set_fact:
load_balancer_name: "{{ item.name }}"
loop: "{{ resp_out.data | community.general.json_query(name) }}"
vars:
name: "[?id=='4de7ac8b-495b-4884-9a69-1050c6793cd6']"
- debug:
var: load_balancer_name
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** list / elements=dictionary | success | DigitalOcean Load balancer information **Sample:** [{'...': None, 'algorithm': 'round\_robin', 'created\_at': '2017-02-01T22:22:58Z', 'id': '4de7ac8b-495b-4884-9a69-1050c6793cd6', 'ip': '104.131.186.241', 'name': 'example-lb-01', 'status': 'new'}] |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.digitalocean.digital_ocean_snapshot β Create and delete DigitalOcean snapshots community.digitalocean.digital\_ocean\_snapshot β Create and delete DigitalOcean snapshots
==========================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_snapshot`.
New in version 1.7.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to create and delete DigitalOcean Droplet and volume snapshots.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **droplet\_id** string | | Droplet ID to snapshot. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **snapshot\_id** string | | Snapshot ID to delete. |
| **snapshot\_name** string | | Name of the snapshot to create. |
| **snapshot\_tags** list / elements=string | | List of tags to apply to the volume snapshot. Only applies to volume snapshots (not Droplets). |
| **snapshot\_type** string | **Choices:*** **droplet** β
* volume
| Specifies the type of snapshot information to be create or delete. If set to `droplet`, then a Droplet snapshot is created. If set to `volume`, then a volume snapshot is created. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the snapshot should be present (created) or absent (deleted). |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
| **volume\_id** string | | Volume ID to snapshot. |
| **wait** boolean | **Choices:*** no
* **yes** β
| Wait for the snapshot to be created before returning. |
| **wait\_timeout** integer | **Default:**120 | How long before wait gives up, in seconds, when creating a snapshot. |
Examples
--------
```
- name: Snapshot a Droplet
community.digitalocean.digital_ocean_snapshot:
state: present
snapshot_type: droplet
droplet_id: 250329179
register: result
- name: Delete a Droplet snapshot
community.digitalocean.digital_ocean_snapshot:
state: absent
snapshot_type: droplet
snapshot_id: 85905825
register: result
- name: Snapshot a Volume
community.digitalocean.digital_ocean_snapshot:
state: present
snapshot_type: volume
snapshot_name: mysnapshot1
volume_id: 9db5e329-cc68-11eb-b027-0a58ac144f91
- name: Delete a Volume snapshot
community.digitalocean.digital_ocean_snapshot:
state: absent
snapshot_type: volume
snapshot_id: a902cdba-cc68-11eb-a701-0a58ac145708
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** dictionary | success | Snapshot creation or deletion action. **Sample:** [{'completed\_at': '2021-06-14T12:36:00Z', 'id': 1229119156, 'region': {'available': True, 'features': ['backups', 'ipv6', 'metadata', 'install\_agent', 'storage', 'image\_transfer'], 'name': 'New York 1', 'sizes': ['s-1vcpu-1gb', 's-1vcpu-1gb-amd', 's-1vcpu-1gb-intel', '<snip>'], 'slug': 'nyc1'}, 'region\_slug': 'nyc1', 'resource\_id': 250445117, 'resource\_type': 'droplet', 'started\_at': '2021-06-14T12:35:25Z', 'status': 'completed', 'type': 'snapshot'}, {'created\_at': '2021-06-14T12:55:10Z', 'id': 'c06d4a86-cd0f-11eb-b13c-0a58ac145472', 'min\_disk\_size': 1, 'name': 'my-snapshot-1', 'regions': ['nbg1'], 'resource\_id': 'f0adea7e-cd0d-11eb-b027-0a58ac144f91', 'resource\_type': 'volume', 'size\_gigabytes': 0, 'tags': ['tag1', 'tag2']}] |
### Authors
* Mark Mercado (@mamercad)
| programming_docs |
ansible community.digitalocean.digital_ocean_project_info β Gather information about DigitalOcean Projects community.digitalocean.digital\_ocean\_project\_info β Gather information about DigitalOcean Projects
=====================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_project_info`.
New in version 1.6.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information about Projects.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **id** string | | Project ID that can be used to identify and reference a project. |
| **name** string | | Project name that can be used to identify and reference a project. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
# Get specific project by id
- community.digitalocean.digital_ocean_project_info:
id: cb1ef55e-3cd8-4c7c-aa5d-07c32bf41627
# Get specific project by name
- community.digitalocean.digital_ocean_project_info:
name: my-project-name
# Get all projects
- community.digitalocean.digital_ocean_project_info:
register: projects
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** list / elements=dictionary | success | DigitalOcean project information **Sample:** [{'created\_at': '2021-03-11T00:00:00Z', 'description': 'My project description', 'environment': 'Development', 'id': '12345678-abcd-efgh-5678-10111213', 'is\_default': False, 'name': 'my-test-project', 'owner\_id': 12345678, 'owner\_uuid': '12345678-1234-4321-abcd-20212223', 'purpose': '', 'updated\_at': '2021-03-11T00:00:00Z'}] |
### Authors
* Tyler Auerbeck (@tylerauerbeck)
ansible community.digitalocean.digitalocean β DigitalOcean Inventory Plugin community.digitalocean.digitalocean β DigitalOcean Inventory Plugin
===================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digitalocean`.
New in version 1.1.0: of community.digitalocean
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* DigitalOcean (DO) inventory plugin.
* Acquires droplet list from DO API.
* Uses configuration file that ends with β(do\_hosts|digitalocean|digital\_ocean).(yaml|yml)β.
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **api\_token** string / required | | env:DO\_API\_TOKEN | DigitalOcean OAuth token. Template expressions can be used in this field.
aliases: oauth\_token |
| **attributes** list / elements=string | **Default:**["id", "name", "networks", "region", "size\_slug"] | | Droplet attributes to add as host vars to each inventory host. Check out the DO API docs for full list of attributes at <https://developers.digitalocean.com/documentation/v2/#list-all-droplets>. |
| **cache** boolean | **Choices:*** **no** β
* yes
| ini entries: [inventory]cache = no env:ANSIBLE\_INVENTORY\_CACHE | Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work. |
| **cache\_connection** string | | ini entries: [defaults]fact\_caching\_connection = None [inventory]cache\_connection = None env:ANSIBLE\_CACHE\_PLUGIN\_CONNECTION env:ANSIBLE\_INVENTORY\_CACHE\_CONNECTION | Cache connection data or path, read cache plugin documentation for specifics. |
| **cache\_plugin** string | **Default:**"memory" | ini entries: [defaults]fact\_caching = memory [inventory]cache\_plugin = memory env:ANSIBLE\_CACHE\_PLUGIN env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN | Cache plugin to use for the inventory's source data. |
| **cache\_prefix** string | **Default:**"ansible\_inventory\_" | ini entries: [default]fact\_caching\_prefix = ansible\_inventory\_ [inventory]cache\_prefix = ansible\_inventory\_ env:ANSIBLE\_CACHE\_PLUGIN\_PREFIX env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN\_PREFIX | Prefix to use for cache plugin files/tables |
| **cache\_timeout** integer | **Default:**3600 | ini entries: [defaults]fact\_caching\_timeout = 3600 [inventory]cache\_timeout = 3600 env:ANSIBLE\_CACHE\_PLUGIN\_TIMEOUT env:ANSIBLE\_INVENTORY\_CACHE\_TIMEOUT | Cache duration in seconds |
| **compose** dictionary | **Default:**{} | | Create vars from jinja2 expressions. |
| **filters** list / elements=string added in 1.5.0 of community.digitalocean | **Default:**[] | | Filter hosts with Jinja templates. If no filters are specified, all hosts are added to the inventory. |
| **groups** dictionary | **Default:**{} | | Add hosts to group based on Jinja2 conditionals. |
| **keyed\_groups** list / elements=string | **Default:**[] | | Add hosts to group based on the values of a variable. |
| **leading\_separator** boolean added in 2.11 of ansible.builtin | **Choices:*** no
* **yes** β
| | Use in conjunction with keyed\_groups. By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is "" and the default separator is "\_". Set this option to False to omit the leading underscore (or other separator) if no prefix is given. If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. |
| **oauth\_token** string | | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **pagination** integer | **Default:**200 | | Maximum droplet objects per response page. If the number of droplets related to the account exceeds this value, the query will be broken to multiple requests (pages). DigitalOcean currently allows a maximum of 200. |
| **plugin** string / required | **Choices:*** community.digitalocean.digitalocean
| | The name of the DigitalOcean Inventory Plugin, this should always be `community.digitalocean.digitalocean`. |
| **strict** boolean | **Choices:*** **no** β
* yes
| | If `yes` make invalid entries a fatal error, otherwise skip and continue. Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. |
| **timeout** integer | **Default:**30 | | The timeout in seconds used for polling DigitalOcean's API. |
| **use\_extra\_vars** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [inventory\_plugins]use\_extra\_vars = no env:ANSIBLE\_INVENTORY\_USE\_EXTRA\_VARS | Merge extra vars into the available variables for composition (highest precedence). |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| | If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
| **var\_prefix** string | **Default:**"do\_" | | Prefix of generated varible names (e.g. `tags` -> `do_tags`) |
Examples
--------
```
# Using keyed groups and compose for hostvars
plugin: community.digitalocean.digitalocean
api_token: '{{ lookup("pipe", "./get-do-token.sh" }}'
attributes:
- id
- name
- memory
- vcpus
- disk
- size
- image
- networks
- volume_ids
- tags
- region
keyed_groups:
- key: do_region.slug
prefix: 'region'
separator: '_'
- key: do_tags | lower
prefix: ''
separator: ''
compose:
ansible_host: do_networks.v4 | selectattr('type','eq','public')
| map(attribute='ip_address') | first
class: do_size.description | lower
distro: do_image.distribution | lower
filters:
- '"kubernetes" in do_tags'
- 'do_region.slug == "fra1"'
```
### Authors
* Janos Gerzson (@grzs)
* Tadej BorovΕ‘ak (@tadeboro)
* Max Truxa (@maxtruxa)
ansible community.digitalocean.digital_ocean_certificate β Manage certificates in DigitalOcean community.digitalocean.digital\_ocean\_certificate β Manage certificates in DigitalOcean
========================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_certificate`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, Retrieve and remove certificates DigitalOcean.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **certificate\_chain** string | | The full PEM-formatted trust chain between the certificate authority's certificate and your domain's SSL certificate. |
| **leaf\_certificate** string | | A PEM-formatted public SSL Certificate. |
| **name** string / required | | The name of the certificate. |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **private\_key** string | | A PEM-formatted private key content of SSL Certificate. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the certificate should be present or absent. |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* Two environment variables can be used, DO\_API\_KEY, DO\_OAUTH\_TOKEN and DO\_API\_TOKEN. They both refer to the v2 token.
Examples
--------
```
- name: Create a certificate
community.digitalocean.digital_ocean_certificate:
name: production
state: present
private_key: "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkM8OI7pRpgyj1I\n-----END PRIVATE KEY-----"
leaf_certificate: "-----BEGIN CERTIFICATE-----\nMIIFDmg2Iaw==\n-----END CERTIFICATE-----"
oauth_token: b7d03a6947b217efb6f3ec3bd365652
- name: Create a certificate using file lookup plugin
community.digitalocean.digital_ocean_certificate:
name: production
state: present
private_key: "{{ lookup('file', 'test.key') }}"
leaf_certificate: "{{ lookup('file', 'test.cert') }}"
oauth_token: "{{ oauth_token }}"
- name: Create a certificate with trust chain
community.digitalocean.digital_ocean_certificate:
name: production
state: present
private_key: "{{ lookup('file', 'test.key') }}"
leaf_certificate: "{{ lookup('file', 'test.cert') }}"
certificate_chain: "{{ lookup('file', 'chain.cert') }}"
oauth_token: "{{ oauth_token }}"
- name: Remove a certificate
community.digitalocean.digital_ocean_certificate:
name: production
state: absent
oauth_token: "{{ oauth_token }}"
```
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.digitalocean.digital_ocean_region_info β Gather information about DigitalOcean regions community.digitalocean.digital\_ocean\_region\_info β Gather information about DigitalOcean regions
===================================================================================================
Note
This plugin is part of the [community.digitalocean collection](https://galaxy.ansible.com/community/digitalocean) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.digitalocean`.
To use it in a playbook, specify: `community.digitalocean.digital_ocean_region_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information about regions.
* This module was called `digital_ocean_region_facts` before Ansible 2.9. The usage did not change.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **oauth\_token** string | | DigitalOcean OAuth token. There are several other environment variables which can be used to provide this value. i.e., - 'DO\_API\_TOKEN', 'DO\_API\_KEY', 'DO\_OAUTH\_TOKEN' and 'OAUTH\_TOKEN'
aliases: api\_token |
| **timeout** integer | **Default:**30 | The timeout in seconds used for polling DigitalOcean's API. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If set to `no`, the SSL certificates will not be validated. This should only set to `no` used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Gather information about all regions
community.digitalocean.digital_ocean_region_info:
oauth_token: "{{ oauth_token }}"
- name: Get Name of region where slug is known
community.digitalocean.digital_ocean_region_info:
oauth_token: "{{ oauth_token }}"
register: resp_out
- debug: var=resp_out
- set_fact:
region_slug: "{{ item.name }}"
loop: "{{ resp_out.data | community.general.json_query(name) }}"
vars:
name: "[?slug==`nyc1`]"
- debug:
var: region_slug
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **data** list / elements=string | success | DigitalOcean regions information **Sample:** [{'available': True, 'features': ['private\_networking', 'backups', 'ipv6', 'metadata', 'install\_agent', 'storage'], 'name': 'New York 1', 'sizes': ['512mb', 's-1vcpu-1gb', '1gb', 's-3vcpu-1gb', 's-1vcpu-2gb', 's-2vcpu-2gb', '2gb', 's-1vcpu-3gb', 's-2vcpu-4gb', '4gb', 'c-2', 'm-1vcpu-8gb', '8gb', 's-4vcpu-8gb', 's-6vcpu-16gb', '16gb'], 'slug': 'nyc1'}] |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.network.avi_clusterclouddetails β Module for setup of ClusterCloudDetails Avi RESTful Object community.network.avi\_clusterclouddetails β Module for setup of ClusterCloudDetails Avi RESTful Object
=======================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_clusterclouddetails`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure ClusterCloudDetails object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **azure\_info** string | | Azure info to configure cluster\_vip on the controller. Field introduced in 17.2.5. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **name** string / required | | Field introduced in 17.2.5. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. Field introduced in 17.2.5. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Field introduced in 17.2.5. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create ClusterCloudDetails object
community.network.avi_clusterclouddetails:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_clusterclouddetails
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | ClusterCloudDetails (api/clusterclouddetails) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#81e6f3e0f2f5eee6e8a7a2b2b6baa7a2b4b3baa7a2b5b9bae0f7e8efe4f5f6eef3eaf2a7a2b5b7bae2eeec)>
| programming_docs |
ansible community.network.nos_command β Run commands on remote devices running Extreme Networks NOS community.network.nos\_command β Run commands on remote devices running Extreme Networks NOS
============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.nos_command`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Sends arbitrary commands to a NOS device and returns the results read from the device. This module includes an argument that will cause the module to wait for a specific condition before returning or timing out if the condition is not met.
* This module does not support running commands in configuration mode. Please use [community.network.nos\_config](nos_config_module#ansible-collections-community-network-nos-config-module) to configure NOS devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **commands** string / required | | List of commands to send to the remote NOS device over the configured provider. The resulting output from the command is returned. If the *wait\_for* argument is provided, the module is not returned until the condition is satisfied or the number of retries has expired. |
| **interval** string | **Default:**1 | Configures the interval in seconds to wait between retries of the command. If the command does not pass the specified conditions, the interval indicates how long to wait before trying the command again. |
| **match** string | **Choices:*** any
* **all** β
| The *match* argument is used in conjunction with the *wait\_for* argument to specify the match policy. Valid values are `all` or `any`. If the value is set to `all` then all conditionals in the wait\_for must be satisfied. If the value is set to `any` then only one of the values must be satisfied. |
| **retries** string | **Default:**10 | Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the *wait\_for* conditions. |
| **wait\_for** string | | List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples. |
Notes
-----
Note
* Tested against NOS 7.2.0
* If a command sent to the device requires answering a prompt, it is possible to pass a dict containing *command*, *answer* and *prompt*. See examples.
Examples
--------
```
tasks:
- name: Run show version on remote devices
community.network.nos_command:
commands: show version
- name: Run show version and check to see if output contains NOS
community.network.nos_command:
commands: show version
wait_for: result[0] contains NOS
- name: Run multiple commands on remote nodes
community.network.nos_command:
commands:
- show version
- show interfaces
- name: Run multiple commands and evaluate the output
community.network.nos_command:
commands:
- show version
- show interface status
wait_for:
- result[0] contains NOS
- result[1] contains Te
- name: Run command that requires answering a prompt
community.network.nos_command:
commands:
- command: 'clear sessions'
prompt: 'This operation will logout all the user sessions. Do you want to continue (yes/no)?:'
answer: y
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **failed\_conditions** list / elements=string | failed | The list of conditionals that have failed **Sample:** ['...', '...'] |
| **stdout** list / elements=string | always apart from low level errors (such as action plugin) | The set of responses from the commands **Sample:** ['...', '...'] |
| **stdout\_lines** list / elements=string | always apart from low level errors (such as action plugin) | The value of stdout split into a list **Sample:** [['...', '...'], ['...'], ['...']] |
### Authors
* Lindsay Hill (@LindsayHill)
ansible community.network.ftd β HttpApi Plugin for Cisco ASA Firepower device community.network.ftd β HttpApi Plugin for Cisco ASA Firepower device
=====================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ftd`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
Synopsis
--------
* This HttpApi plugin provides methods to connect to Cisco ASA firepower devices over a HTTP(S)-based api.
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **spec\_path** string | **Default:**"/apispec/ngfw.json" | var: ansible\_httpapi\_ftd\_spec\_path | Specifies the api spec path of the FTD device |
| **token\_path** string | | var: ansible\_httpapi\_ftd\_token\_path | Specifies the api token path of the FTD device |
### Authors
* Ansible Networking Team (!UNKNOWN)
ansible community.network.ce_is_is_interface β Manages isis interface configuration on HUAWEI CloudEngine devices. community.network.ce\_is\_is\_interface β Manages isis interface configuration on HUAWEI CloudEngine devices.
=============================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_is_is_interface`.
New in version 0.2.0: of community.network
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages isis process id, creates a isis instance id or deletes a process id on HUAWEI CloudEngine devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bfdblocken** boolean | **Choices:*** no
* yes
| Blocking interfaces to dynamically create BFD features. The value is a bool type. |
| **bfdstaticen** boolean | **Choices:*** no
* yes
| Configure static BFD on a specific interface enabled with ISIS. The value is a bool type. |
| **ifname** string / required | | A L3 interface. |
| **instance\_id** integer / required | | Specifies the id of a isis process. The value is a number of 1 to 4294967295. |
| **level1cost** integer | | Specifies the link cost of the interface when performing Level-1 SPF calculation. The value is a number of 0 to 16777215. |
| **level1dispriority** integer | | the dispriority of the level1. The value is a number of 1 to 127. |
| **level2cost** integer | | Specifies the link cost of the interface when performing Level-2 SPF calculation. The value is a number of 0 to 16777215. |
| **level2dispriority** integer | | the dispriority of the level1. The value is a number of 1 to 127. |
| **leveltype** string | **Choices:*** level\_1
* level\_2
* level\_1\_2
| level type for three types. |
| **p2pnegotiationmode** string | **Choices:*** 2\_way
* 3\_way
* 3\_wayonly
| Set the P2P neighbor negotiation type. |
| **p2ppeeripignore** boolean | **Choices:*** no
* yes
| When the P2P hello packet is received, no IP address check is performed. The value is a bool type. |
| **ppposicpcheckenable** boolean | **Choices:*** no
* yes
| Interface for setting PPP link protocol to check OSICP negotiation status. The value is a bool type. |
| **silentcost** boolean | **Choices:*** no
* yes
| Specifies whether the routing cost of the silent interface is 0. The value is a bool type. |
| **silentenable** boolean | **Choices:*** no
* yes
| enable the interface can send isis message. The value is a bool type. |
| **snpacheck** boolean | **Choices:*** no
* yes
| Enable SNPA check for LSPs and SNPs. The value is a bool type. |
| **state** string | **Choices:*** **present** β
* absent
| Determines whether the config should be present or not on the device. |
| **typep2penable** boolean | **Choices:*** no
* yes
| Simulate the network type of the interface as P2P. The value is a bool type. |
Notes
-----
Note
* Interface must already be a L3 port when using this module.
* This module requires the netconf system service be enabled on the remote device being managed.
* This module works with connection `netconf`.
Examples
--------
```
- name: "create vlan and config vlanif"
ce_config:
lines: 'vlan {{ test_vlan_id }},quit,interface {{test_intf_vlanif}},ip address {{test_vlanif_ip}} 24'
match: none
- name: "create eth-trunk and config eth-trunk"
ce_config:
lines: 'interface {{test_intf_trunk}},undo portswitch,ip address {{test_trunk_ip}} 24'
match: none
- name: "create vpn instance"
ce_config:
lines: 'ip vpn-instance {{test_vpn}},ipv4-family'
match: none
- name: Set isis circuit-level
community.network.ce_is_is_interface:
instance_id: 3
ifname: Eth-Trunk10
leveltype: level_1_2
state: present
- name: Set isis level1dispriority
community.network.ce_is_is_interface:
instance_id: 3
ifname: Eth-Trunk10
level1dispriority: 0
state: present
- name: Set isis level2dispriority
community.network.ce_is_is_interface:
instance_id: 3
ifname: Eth-Trunk10
level2dispriority: 0
state: present
- name: Set isis silentenable
community.network.ce_is_is_interface:
instance_id: 3
ifname: Eth-Trunk10
silentenable: true
state: present
- name: Set vpn name
ce_is_is_instance:
instance_id: 22
vpn_name: vpn1
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of configuration after module execution **Sample:** {'session': {'addrType': 'IPV4', 'createType': 'SESS\_STATIC', 'destAddr': None, 'outIfName': '10GE1/0/1', 'sessName': 'bfd\_l2link', 'srcAddr': None, 'useDefaultIp': 'true', 'vrfName': None}} |
| **existing** dictionary | always | k/v pairs of existing configuration **Sample:** {'session': {}} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'addr\_type': None, 'create\_type': None, 'dest\_addr': None, 'out\_if\_name': '10GE1/0/1', 'session\_name': 'bfd\_l2link', 'src\_addr': None, 'state': 'present', 'use\_default\_ip': True, 'vrf\_name': None} |
| **updates** list / elements=string | always | commands sent to the device **Sample:** ['bfd bfd\_l2link bind peer-ip default-ip interface 10ge1/0/1'] |
### Authors
* xuxiaowei0512 (@CloudEngine-Ansible)
ansible community.network.vdirect_commit β Commits pending configuration changes on Radware devices community.network.vdirect\_commit β Commits pending configuration changes on Radware devices
============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.vdirect_commit`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Commits pending configuration changes on one or more Radware devices via vDirect server.
* For Alteon ADC device, apply, sync and save actions will be performed by default. Skipping of an action is possible by explicit parameter specifying.
* For Alteon VX Container device, no sync operation will be performed since sync action is only relevant for Alteon ADC devices.
* For DefensePro and AppWall devices, a bulk commit action will be performed. Explicit apply, sync and save actions specifying is not relevant.
Requirements
------------
The below requirements are needed on the host that executes this module.
* vdirect-client >= 4.9.0-post4
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **apply** boolean | **Choices:*** no
* **yes** β
| If `no`, apply action will not be performed. Relevant for ADC devices only. |
| **devices** string / required | | List of Radware Alteon device names for commit operations. |
| **save** boolean | **Choices:*** no
* **yes** β
| If `no`, save action will not be performed. Relevant for ADC devices only. |
| **sync** boolean | **Choices:*** no
* **yes** β
| If `no`, sync action will not be performed. Relevant for ADC devices only. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated, may be set as `VDIRECT_VALIDATE_CERTS` or `VDIRECT_VERIFY` environment variable. This should only set to `no` used on personally controlled sites using self-signed certificates.
aliases: vdirect\_validate\_certs |
| **vdirect\_http\_port** string | **Default:**2188 | vDirect server HTTP port number, may be set as `VDIRECT_HTTP_PORT` environment variable. |
| **vdirect\_https\_port** string | **Default:**2189 | vDirect server HTTPS port number, may be set as `VDIRECT_HTTPS_PORT` environment variable. |
| **vdirect\_ip** string / required | | Primary vDirect server IP address, may be set as `VDIRECT_IP` environment variable. |
| **vdirect\_password** string / required | | vDirect server password, may be set as `VDIRECT_PASSWORD` environment variable. |
| **vdirect\_secondary\_ip** string | | Secondary vDirect server IP address, may be set as `VDIRECT_SECONDARY_IP` environment variable. |
| **vdirect\_timeout** string | **Default:**60 | Amount of time to wait for async operation completion [seconds], may be set as `VDIRECT_TIMEOUT` environment variable. |
| **vdirect\_use\_ssl** boolean | **Choices:*** no
* **yes** β
| If `no`, an HTTP connection will be used instead of the default HTTPS connection, may be set as `VDIRECT_HTTPS` or `VDIRECT_USE_SSL` environment variable. |
| **vdirect\_user** string / required | | vDirect server username, may be set as `VDIRECT_USER` environment variable. |
| **vdirect\_wait** boolean | **Choices:*** no
* **yes** β
| Wait for async operation to complete, may be set as `VDIRECT_WAIT` environment variable. |
Notes
-----
Note
* Requires the Radware vdirect-client Python package on the host. This is as easy as `pip install vdirect-client`
Examples
--------
```
- name: Commit
community.network.vdirect_commit:
vdirect_ip: 10.10.10.10
vdirect_user: vDirect
vdirect_password: radware
devices: ['dev1', 'dev2']
sync: no
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **result** string | success | Message detailing actions result **Sample:** Requested actions were successfully performed on all devices. |
### Authors
* Evgeny Fedoruk @ Radware LTD (@evgenyfedoruk)
ansible community.network.dladm_vnic β Manage VNICs on Solaris/illumos systems. community.network.dladm\_vnic β Manage VNICs on Solaris/illumos systems.
========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.dladm_vnic`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create or delete VNICs on Solaris/illumos systems.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **link** string / required | | VNIC underlying link name. |
| **mac** string | **Default:**"no" | Sets the VNIC's MAC address. Must be valid unicast MAC address.
aliases: macaddr |
| **name** string / required | | VNIC name. |
| **state** string | **Choices:*** **present** β
* absent
| Create or delete Solaris/illumos VNIC. |
| **temporary** boolean | **Choices:*** **no** β
* yes
| Specifies that the VNIC is temporary. Temporary VNICs do not persist across reboots. |
| **vlan** integer | **Default:**"no" | Enable VLAN tagging for this VNIC. The VLAN tag will have id *vlan*.
aliases: vlan\_id |
Examples
--------
```
- name: Create 'vnic0' VNIC over 'bnx0' link
community.network.dladm_vnic:
name: vnic0
link: bnx0
state: present
- name: Create VNIC with specified MAC and VLAN tag over 'aggr0'
community.network.dladm_vnic:
name: vnic1
link: aggr0
mac: '00:00:5E:00:53:23'
vlan: 4
- name: Remove 'vnic0' VNIC
community.network.dladm_vnic:
name: vnic0
link: bnx0
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **link** string | always | VNIC underlying link name **Sample:** igb0 |
| **mac** string | if mac is specified | MAC address to use for VNIC **Sample:** 00:00:5E:00:53:42 |
| **name** string | always | VNIC name **Sample:** vnic0 |
| **state** string | always | state of the target **Sample:** present |
| **temporary** boolean | always | VNIC's persistence **Sample:** True |
| **vlan** integer | success | VLAN to use for VNIC **Sample:** 42 |
### Authors
* Adam Ε tevko (@xen0l)
ansible community.network.ordnance_config β Manage Ordnance configuration sections community.network.ordnance\_config β Manage Ordnance configuration sections
===========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ordnance_config`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Ordnance router configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with these configuration sections in a deterministic way.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **after** string | | The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with *before* this allows the playbook designer to append a set of commands to be executed after the command set. |
| **backup** boolean | **Choices:*** **no** β
* yes
| This argument will cause the module to create a full backup of the current `running-config` from the remote device before any changes are made. The backup file is written to the `backup` folder in the playbook root directory. If the directory does not exist, it is created. |
| **before** string | | The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system. |
| **config** string | | The `config` argument allows the playbook designer to supply the base configuration to be used to validate configuration changes necessary. If this argument is provided, the module will not download the running-config from the remote node. |
| **defaults** boolean | **Choices:*** **no** β
* yes
| This argument specifies whether or not to collect all defaults when getting the remote device running config. When enabled, the module will get the current config by issuing the command `show running-config all`. |
| **lines** string | | The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser.
aliases: commands |
| **match** string | **Choices:*** **line** β
* strict
* exact
* none
| Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to *line*, commands are matched line by line. If match is set to *strict*, command lines are matched with respect to position. If match is set to *exact*, command lines must be an equal match. Finally, if match is set to *none*, the module will not attempt to compare the source configuration with the running configuration on the remote device. |
| **multiline\_delimiter** string | **Default:**"@" | This argument is used when pushing a multiline configuration element to the Ordnance router. It specifies the character to use as the delimiting character. This only applies to the configuration action |
| **parents** string | | The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. |
| **replace** string | **Choices:*** **line** β
* block
| Instructs the module on the way to perform the configuration on the device. If the replace argument is set to *line* then the modified lines are pushed to the device in configuration mode. If the replace argument is set to *block* then the entire command block is pushed to the device in configuration mode if any line is not correct. |
| **save** boolean | **Choices:*** **no** β
* yes
| The `save` argument instructs the module to save the running- config to the startup-config at the conclusion of the module running. If check mode is specified, this argument is ignored. |
| **src** string | | Specifies the source path to the file that contains the configuration or configuration template to load. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. This argument is mutually exclusive with *lines*, *parents*. |
Examples
--------
```
---
# Note: examples below use the following provider dict to handle
# transport and authentication to the node.
vars:
cli:
host: "{{ inventory_hostname }}"
username: RouterName
password: password
transport: cli
---
- name: Configure top level configuration
community.network.ordnance_config:
lines: hostname {{ inventory_hostname }}
provider: "{{ cli }}"
- name: Configure interface settings
community.network.ordnance_config:
lines:
- description test interface
- ip address 172.31.1.1 255.255.255.0
parents: interface Ethernet1
provider: "{{ cli }}"
- name: Configure bgp router
community.network.ordnance_config:
lines:
- neighbor 1.1.1.1 remote-as 1234
- network 10.0.0.0/24
parents: router bgp 65001
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **backup\_path** string | when backup is yes | The full path to the backup file **Sample:** /playbooks/ansible/backup/ordnance\_config.2016-07-16@22:28:34 |
| **updates** list / elements=string | Only when commands is specified. | The set of commands that will be pushed to the remote device **Sample:** ['...', '...'] |
### Authors
* Alexander Turner (@alexanderturner) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#fe9f929b86d8ddcac8c58a8b8c909b8cd8ddcdc9c5d8ddcbccc5d8ddcac6c5918c9a909f909d9bd8ddcac8c59791)>
| programming_docs |
ansible community.network.ce_netstream_aging β Manages timeout mode of NetStream on HUAWEI CloudEngine switches. community.network.ce\_netstream\_aging β Manages timeout mode of NetStream on HUAWEI CloudEngine switches.
==========================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_netstream_aging`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages timeout mode of NetStream on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **manual\_slot** string | | Specifies the slot number of netstream manual timeout. |
| **state** string | **Choices:*** **present** β
* absent
| Specify desired state of the resource. |
| **timeout\_interval** string | **Default:**30 | Netstream timeout interval. If is active type the interval is 1-60. If is inactive ,the interval is 5-600. |
| **timeout\_type** string | **Choices:*** active
* inactive
* tcp-session
* manual
| Netstream timeout type. |
| **type** string | **Choices:*** ip
* vxlan
| Specifies the packet type of netstream timeout active interval. |
Notes
-----
Note
* Recommended connection is `network_cli`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Netstream aging module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Configure netstream ip timeout active interval , the interval is 40 minutes.
community.network.ce_netstream_aging:
timeout_interval: 40
type: ip
timeout_type: active
state: present
provider: "{{ cli }}"
- name: Configure netstream vxlan timeout active interval , the interval is 40 minutes.
community.network.ce_netstream_aging:
timeout_interval: 40
type: vxlan
timeout_type: active
active_state: present
provider: "{{ cli }}"
- name: Delete netstream ip timeout active interval , set the ip timeout interval to 30 minutes.
community.network.ce_netstream_aging:
type: ip
timeout_type: active
state: absent
provider: "{{ cli }}"
- name: Delete netstream vxlan timeout active interval , set the vxlan timeout interval to 30 minutes.
community.network.ce_netstream_aging:
type: vxlan
timeout_type: active
state: absent
provider: "{{ cli }}"
- name: Enable netstream ip tcp session timeout.
community.network.ce_netstream_aging:
type: ip
timeout_type: tcp-session
state: present
provider: "{{ cli }}"
- name: Enable netstream vxlan tcp session timeout.
community.network.ce_netstream_aging:
type: vxlan
timeout_type: tcp-session
state: present
provider: "{{ cli }}"
- name: Disable netstream ip tcp session timeout.
community.network.ce_netstream_aging:
type: ip
timeout_type: tcp-session
state: absent
provider: "{{ cli }}"
- name: Disable netstream vxlan tcp session timeout.
community.network.ce_netstream_aging:
type: vxlan
timeout_type: tcp-session
state: absent
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | verbose mode | k/v pairs of configuration after module execution **Sample:** {'active\_timeout': [{'ip': 30, 'vxlan': 30}], 'inactive\_timeout': [{'ip': 30, 'vxlan': 30}], 'tcp\_timeout': [{'ip': 'disable', 'vxlan': 'disable'}]} |
| **existing** dictionary | verbose mode | k/v pairs of existing configuration **Sample:** {'active\_timeout': [{'ip': '40', 'vxlan': 30}], 'inactive\_timeout': [{'ip': 30, 'vxlan': 30}], 'tcp\_timeout': [{'ip': 'disable', 'vxlan': 'disable'}]} |
| **proposed** dictionary | verbose mode | k/v pairs of parameters passed into module **Sample:** {'state': 'absent', 'timeout\_interval': '40', 'timeout\_type': 'active', 'type': 'ip'} |
| **updates** list / elements=string | always | commands sent to the device **Sample:** ['undo netstream timeout ip active 40'] |
### Authors
* YangYang (@QijunPan)
ansible community.network.avi_alertsyslogconfig β Module for setup of AlertSyslogConfig Avi RESTful Object community.network.avi\_alertsyslogconfig β Module for setup of AlertSyslogConfig Avi RESTful Object
===================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_alertsyslogconfig`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure AlertSyslogConfig object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **description** string | | User defined description for alert syslog config. |
| **name** string / required | | A user-friendly name of the syslog notification. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **syslog\_servers** string | | The list of syslog servers. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create Alert Syslog object to forward all events to external syslog server
community.network.avi_alertsyslogconfig:
controller: '{{ controller }}'
name: Roberts-syslog
password: '{{ password }}'
syslog_servers:
- syslog_server: 10.10.0.100
syslog_server_port: 514
udp: true
tenant_ref: admin
username: '{{ username }}'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | AlertSyslogConfig (api/alertsyslogconfig) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#7512071406011a121c535646424e535640474e5356414d4e14031c1b1001021a071e06535641434e161a18)>
ansible community.network.sros_config β Manage Nokia SR OS device configuration community.network.sros\_config β Manage Nokia SR OS device configuration
========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.sros_config`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Nokia SR OS configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with SR OS configuration sections in a deterministic way.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **after** string | | The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with *before* this allows the playbook designer to append a set of commands to be executed after the command set. |
| **backup** boolean | **Choices:*** **no** β
* yes
| This argument will cause the module to create a full backup of the current `running-config` from the remote device before any changes are made. If the `backup_options` value is not given, the backup file is written to the `backup` folder in the playbook root directory. If the directory does not exist, it is created. |
| **backup\_options** dictionary | | This is a dict object containing configurable options related to backup file path. The value of this option is read only when `backup` is set to *yes*, if `backup` is set to *no* this option will be silently ignored. |
| | **dir\_path** path | | This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of `filename` or default filename as described in `filename` options description. If the path value is not given in that case a *backup* directory will be created in the current working directory and backup configuration will be copied in `filename` within *backup* directory. |
| | **filename** string | | The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by <hostname>\_config.<current-date>@<current-time> |
| **before** string | | The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system. |
| **config** string | | The `config` argument allows the playbook designer to supply the base configuration to be used to validate configuration changes necessary. If this argument is provided, the module will not download the running-config from the remote node. |
| **defaults** boolean | **Choices:*** **no** β
* yes
| This argument specifies whether or not to collect all defaults when getting the remote device running config. When enabled, the module will get the current config by issuing the command `admin display-config detail`.
aliases: detail |
| **force** boolean | **Choices:*** no
* yes
| The force argument instructs the module to not consider the current devices running-config. When set to true, this will cause the module to push the contents of *src* into the device without first checking if already configured. Note this argument should be considered deprecated. To achieve the equivalent, set the `match=none` which is idempotent. This argument will be removed in a future release. |
| **lines** string | | The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser. The *lines* argument only supports current context lines. See EXAMPLES
aliases: commands |
| **match** string | **Choices:*** **line** β
* none
| Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to *line*, commands are matched line by line. If match is set to *none*, the module will not attempt to compare the source configuration with the running configuration on the remote device. |
| **parents** string | | The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. |
| **provider** dictionary | | A dict object containing connection details. |
| | **host** string / required | | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
| | **port** integer | **Default:**22 | Specifies the port to use when building the connection to the remote device. |
| | **ssh\_keyfile** path | | Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
| | **timeout** integer | **Default:**10 | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
| | **username** string | | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
| **replace** string | **Choices:*** **line** β
* block
| Instructs the module on the way to perform the configuration on the device. If the replace argument is set to *line* then the modified lines are pushed to the device in configuration mode. If the replace argument is set to *block* then the entire command block is pushed to the device in configuration mode if any line is not correct. |
| **save** boolean | **Choices:*** **no** β
* yes
| The `save` argument instructs the module to save the running- config to the startup-config at the conclusion of the module running. If check mode is specified, this argument is ignored. |
| **src** string | | Specifies the source path to the file that contains the configuration or configuration template to load. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. This argument is mutually exclusive with *lines*, *parents*. |
Notes
-----
Note
* For more information on using Ansible to manage Nokia SR OS Network devices see <https://www.ansible.com/ansible-nokia>.
Examples
--------
```
# Note: examples below use the following provider dict to handle
# transport and authentication to the node.
---
vars:
cli:
host: "{{ inventory_hostname }}"
username: admin
password: admin
transport: cli
---
- name: Enable rollback location
community.network.sros_config:
lines: configure system rollback rollback-location "cf3:/ansible"
provider: "{{ cli }}"
- name: Set system name to {{ inventory_hostname }} using one line
community.network.sros_config:
lines:
- configure system name "{{ inventory_hostname }}"
provider: "{{ cli }}"
- name: Set system name to {{ inventory_hostname }} using parents
community.network.sros_config:
lines:
- 'name "{{ inventory_hostname }}"'
parents:
- configure
- system
provider: "{{ cli }}"
backup: yes
- name: Load config from file
community.network.sros_config:
src: "{{ inventory_hostname }}.cfg"
provider: "{{ cli }}"
save: yes
- name: Invalid use of lines
community.network.sros_config:
lines:
- service
- vpls 1000 customer foo 1 create
- description "invalid lines example"
provider: "{{ cli }}"
- name: Valid use of lines
community.network.sros_config:
lines:
- description "invalid lines example"
parents:
- service
- vpls 1000 customer foo 1 create
provider: "{{ cli }}"
- name: Configurable backup path
community.network.sros_config:
backup: yes
backup_options:
filename: backup.cfg
dir_path: /home/user
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **backup\_path** string | when backup is yes | The full path to the backup file **Sample:** /playbooks/ansible/backup/sros\_config.2016-07-16@22:28:34 |
| **commands** list / elements=string | always | The set of commands that will be pushed to the remote device **Sample:** ['config system name "sros01"'] |
| **updates** list / elements=string | always | The set of commands that will be pushed to the remote device **Sample:** ['config system name "sros01"'] |
### Authors
* Peter Sprygada (@privateip)
| programming_docs |
ansible community.network.pn_switch_setup β CLI command to modify switch-setup community.network.pn\_switch\_setup β CLI command to modify switch-setup
========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_switch_setup`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to modify switch setup.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_analytics\_store** string | **Choices:*** default
* optimized
| type of disk storage for analytics. |
| **pn\_banner** string | | Banner to display on server-switch. |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_date** string | | Date. |
| **pn\_dns\_ip** string | | DNS IP address. |
| **pn\_dns\_secondary\_ip** string | | secondary DNS IP address. |
| **pn\_domain\_name** string | | Domain name. |
| **pn\_enable\_host\_ports** boolean | **Choices:*** no
* yes
| Enable host ports by default. |
| **pn\_eula\_accepted** string | **Choices:*** true
* false
| Accept EULA. |
| **pn\_eula\_timestamp** string | | EULA timestamp. |
| **pn\_force** boolean | **Choices:*** no
* yes
| Force analytics-store change even if it involves removing data. |
| **pn\_gateway\_ip** string | | gateway IPv4 address. |
| **pn\_gateway\_ip6** string | | Gateway IPv6 address. |
| **pn\_in\_band\_ip** string | | data in-band IP address. |
| **pn\_in\_band\_ip6** string | | Data in-band IPv6 address. |
| **pn\_in\_band\_ip6\_assign** string | **Choices:*** none
* autoconf
| Data IPv6 address assignment. |
| **pn\_in\_band\_netmask** string | | Data in-band netmask. |
| **pn\_in\_band\_netmask\_ip6** string | | Data in-band IPv6 netmask. |
| **pn\_loopback\_ip** string | | loopback IPv4 address. |
| **pn\_loopback\_ip6** string | | loopback IPv6 address. |
| **pn\_mgmt\_ip** string | | Management IP address. |
| **pn\_mgmt\_ip6** string | | IPv6 address. |
| **pn\_mgmt\_ip6\_assignment** string | **Choices:*** none
* autoconf
| IPv6 address assignment. |
| **pn\_mgmt\_ip\_assignment** string | **Choices:*** none
* dhcp
| IP address assignment. |
| **pn\_mgmt\_netmask** string | | Netmask. |
| **pn\_mgmt\_netmask\_ip6** string | | IPv6 netmask. |
| **pn\_motd** string | | Message of the Day. |
| **pn\_ntp\_secondary\_server** string | | Secondary NTP server. |
| **pn\_ntp\_server** string | | NTP server. |
| **pn\_password** string | | plain text password. |
| **pn\_switch\_name** string | | switch name. |
| **pn\_timezone** string | | Timezone to be configured. |
| **state** string / required | **Choices:*** update
| State the action to perform. Use `update` to modify the switch-setup. |
Examples
--------
```
- name: Modify switch
community.network.pn_switch_setup:
pn_cliswitch: "sw01"
state: "update"
pn_timezone: "America/New_York"
pn_in_band_ip: "20.20.1.1"
pn_in_band_netmask: "24"
- name: Modify switch
community.network.pn_switch_setup:
pn_cliswitch: "sw01"
state: "update"
pn_in_band_ip6: "2001:0db8:85a3::8a2e:0370:7334"
pn_in_band_netmask_ip6: "127"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the switch-setup command. |
| **stdout** list / elements=string | always | set of responses from the switch-setup command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.avi_gslbservice_patch_member β Avi API Module community.network.avi\_gslbservice\_patch\_member β Avi API Module
==================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_gslbservice_patch_member`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used for calling any resources defined in Avi REST API. <https://avinetworks.com/>
* This module is useful for invoking HTTP Patch methods and accessing resources that do not have an REST object associated with them.
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **data** string | | HTTP body of GSLB Service Member in YAML or JSON format. |
| **name** string / required | | Name of the GSLB Service |
| **params** string | | Query parameters passed to the HTTP API. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied to the member. Member is identified using field member.ip.addr. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Patch GSLB Service to add a new member and group
community.network.avi_gslbservice_patch_member:
controller: "{{ controller }}"
username: "{{ username }}"
password: "{{ password }}"
name: gs-3
api_version: 17.2.1
data:
group:
name: newfoo
priority: 60
members:
- enabled: true
ip:
addr: 10.30.10.66
type: V4
ratio: 3
- name: Patch GSLB Service to delete an existing member
community.network.avi_gslbservice_patch_member:
controller: "{{ controller }}"
username: "{{ username }}"
password: "{{ password }}"
name: gs-3
state: absent
api_version: 17.2.1
data:
group:
name: newfoo
members:
- enabled: true
ip:
addr: 10.30.10.68
type: V4
ratio: 3
- name: Update priority of GSLB Service Pool
community.network.avi_gslbservice_patch_member:
controller: ""
username: ""
password: ""
name: gs-3
state: present
api_version: 17.2.1
data:
group:
name: newfoo
priority: 42
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | Avi REST resource |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#3255405341465d555b141101050914110700091411060a0953445b5c5746455d4059411411060409515d5f)>
ansible community.network.pn_ipv6security_raguard β CLI command to create/modify/delete ipv6security-raguard community.network.pn\_ipv6security\_raguard β CLI command to create/modify/delete ipv6security-raguard
======================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_ipv6security_raguard`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to add ipv6 RA Guard Policy, Update ipv6 RA guard Policy and Remove ipv6 RA Guard Policy.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_access\_list** string | | RA Guard Access List of Source IPs. |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_device** string | **Choices:*** host
* router
| RA Guard Device. host or router. |
| **pn\_name** string / required | | RA Guard Policy Name. |
| **pn\_prefix\_list** string | | RA Guard Prefix List. |
| **pn\_router\_priority** string | **Choices:*** low
* medium
* high
| RA Guard Router Priority. |
| **state** string | **Choices:*** **present** β
* update
* absent
| ipv6security-raguard configuration command. |
Examples
--------
```
- name: Ipv6 security ragurad create
community.network.pn_ipv6security_raguard:
pn_cliswitch: "sw01"
pn_name: "foo"
pn_device: "host"
- name: Ipv6 security ragurad create
community.network.pn_ipv6security_raguard:
pn_cliswitch: "sw01"
pn_name: "foo1"
pn_device: "host"
pn_access_list: "sample"
pn_prefix_list: "sample"
pn_router_priority: "low"
- name: Ipv6 security ragurad modify
community.network.pn_ipv6security_raguard:
pn_cliswitch: "sw01"
pn_name: "foo1"
pn_device: "router"
pn_router_priority: "medium"
state: "update"
- name: Ipv6 security ragurad delete
community.network.pn_ipv6security_raguard:
pn_cliswitch: "sw01"
pn_name: "foo"
state: "absent"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the ipv6security-raguard command. |
| **stdout** list / elements=string | always | set of responses from the ipv6security-raguard command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.voss β Use voss cliconf to run command on Extreme VOSS platform community.network.voss β Use voss cliconf to run command on Extreme VOSS platform
=================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.voss`.
Synopsis
--------
* This voss plugin provides low level abstraction apis for sending and receiving CLI commands from Extreme VOSS network devices.
### Authors
* Unknown (!UNKNOWN)
ansible community.network.ironware_command β Run arbitrary commands on Extreme IronWare devices community.network.ironware\_command β Run arbitrary commands on Extreme IronWare devices
========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ironware_command`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Sends arbitrary commands to a Extreme Ironware node and returns the results read from the device. This module includes a *wait\_for* argument that will cause the module to wait for a specific condition before returning or timing out if the condition is not met.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **authorize** boolean | **Choices:*** **no** β
* yes
| **Deprecated** Starting with Ansible 2.7 we recommend using `connection: network_cli` and `become: yes`. For more information please see the [IronWare Platform Options guide](user_guide/platform_ironware). Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
| **commands** string / required | | List of commands to send to the remote device over the configured provider. The resulting output from the command is returned. If the *wait\_for* argument is provided, the module is not returned until the condition is satisfied or the number of retires as expired. |
| **interval** string | **Default:**1 | Configures the interval in seconds to wait between retries of the command. If the command does not pass the specified conditions, the interval indicates how long to wait before trying the command again. |
| **match** string | **Choices:*** any
* **all** β
| The *match* argument is used in conjunction with the *wait\_for* argument to specify the match policy. If the value is set to `all` then all conditionals in the *wait\_for* must be satisfied. If the value is set to `any` then only one of the values must be satisfied. |
| **provider** dictionary | | **Deprecated** Starting with Ansible 2.7 we recommend using `connection: network_cli` and `become: yes`. For more information please see the [IronWare Platform Options guide](user_guide/platform_ironware). A dict object containing connection details. |
| | **auth\_pass** string | | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
| | **authorize** boolean | **Choices:*** **no** β
* yes
| Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
| | **host** string | | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
| | **port** integer | **Default:**22 | Specifies the port to use when building the connection to the remote device. |
| | **ssh\_keyfile** path | | Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
| | **timeout** integer | **Default:**10 | Specifies idle timeout in seconds for the connection, in seconds. Useful if the console freezes before continuing. For example when saving configurations. |
| | **username** string | | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
| **retries** string | **Default:**10 | Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the *wait\_for* conditions. |
| **wait\_for** string | | List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples. |
Notes
-----
Note
* For more information on using Ansible to manage network devices see the [Ansible Network Guide](../../../network/index#network-guide)
Examples
--------
```
- name: Run a command
community.network.ironware_command:
commands:
- show version
- name: Run several commands
community.network.ironware_command:
commands:
- show interfaces brief wide
- show mpls vll
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **failed\_conditions** list / elements=string | failed | the conditionals that failed **Sample:** ['...', '...'] |
| **stdout** list / elements=string | always | the set of responses from the commands **Sample:** ['...', '...'] |
| **stdout\_lines** list / elements=string | always | The value of stdout split into a list **Sample:** [['...', '...'], ['...'], ['...']] |
### Authors
* Paul Baker (@paulquack)
| programming_docs |
ansible community.network.icx_system β Manage the system attributes on Ruckus ICX 7000 series switches community.network.icx\_system β Manage the system attributes on Ruckus ICX 7000 series switches
===============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.icx_system`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of node system attributes on Ruckus ICX 7000 series switches. It provides an option to configure host system parameters or remove those parameters from the device active configuration.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aaa\_servers** list / elements=string | | Configures radius/tacacs server |
| | **acct\_port\_num** string | | Configures the accounting UDP port. The default value is 1813. |
| | **acct\_type** string | **Choices:*** accounting-only
* authentication-only
* authorization-only
* default
| Usage of the accounting port. |
| | **auth\_key** string | | Configure the key for the server |
| | **auth\_key\_type** list / elements=string | **Choices:*** dot1x
* mac-auth
* web-auth
| List of authentication level specified in the choices |
| | **auth\_port\_num** string | | Configures the authentication UDP port. The default value is 1812. |
| | **auth\_port\_type** string | **Choices:*** auth-port
| specifies the type of the authentication port |
| | **hostname** string | | Configures the host name of the RADIUS server |
| | **type** string | **Choices:*** radius
* tacacs
| specify the type of the server |
| **check\_running\_config** boolean | **Choices:*** no
* **yes** β
| Check running configuration. This can be set as environment variable. Module will use environment variable value(default:True), unless it is overridden, by specifying it as module parameter. |
| **domain\_name** list / elements=string | | Configure the IP domain name on the remote device to the provided value. Value should be in the dotted name form and will be appended to the hostname to create a fully-qualified domain name. |
| **domain\_search** list / elements=string | | Provides the list of domain names to append to the hostname for the purpose of doing name resolution. This argument accepts a list of names and will be reconciled with the current active configuration on the running node. |
| **hostname** string | | Configure the device hostname parameter. This option takes an ASCII string value. |
| **name\_servers** list / elements=string | | List of DNS name servers by IP address to use to perform name resolution lookups. |
| **state** string | **Choices:*** **present** β
* absent
| State of the configuration values in the device's current active configuration. When set to *present*, the values should be configured in the device active configuration and when set to *absent* the values should not be in the device active configuration |
Notes
-----
Note
* Tested against ICX 10.1.
* For information on using ICX platform, see [the ICX OS Platform Options guide](user_guide/platform_icx).
Examples
--------
```
- name: Configure hostname and domain name
community.network.icx_system:
hostname: icx
domain_search:
- ansible.com
- redhat.com
- ruckus.com
- name: Configure radius server of type auth-port
community.network.icx_system:
aaa_servers:
- type: radius
hostname: radius-server
auth_port_type: auth-port
auth_port_num: 1821
acct_port_num: 1321
acct_type: accounting-only
auth_key: abc
auth_key_type:
- dot1x
- mac-auth
- name: Configure tacacs server
community.network.icx_system:
aaa_servers:
- type: tacacs
hostname: tacacs-server
auth_port_type: auth-port
auth_port_num: 1821
acct_port_num: 1321
acct_type: accounting-only
auth_key: xyz
- name: Configure name servers
community.network.icx_system:
name_servers:
- 8.8.8.8
- 8.8.4.4
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always | The list of configuration mode commands to send to the device **Sample:** ['hostname icx', 'ip domain name test.example.com', 'radius-server host 172.16.10.12 auth-port 2083 acct-port 1850 default key abc dot1x mac-auth', 'tacacs-server host 10.2.3.4 auth-port 4058 authorization-only key xyz'] |
### Authors
* Ruckus Wireless (@Commscope)
ansible community.network.icx_l3_interface β Manage Layer-3 interfaces on Ruckus ICX 7000 series switches community.network.icx\_l3\_interface β Manage Layer-3 interfaces on Ruckus ICX 7000 series switches
===================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.icx_l3_interface`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of Layer-3 interfaces on ICX network devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate** list / elements=string | | List of Layer-3 interfaces definitions. Each of the entry in aggregate list should define name of interface `name` and a optional `ipv4` or `ipv6` address. |
| | **check\_running\_config** boolean | **Choices:*** no
* yes
| Check running configuration. This can be set as environment variable. Module will use environment variable value(default:True), unless it is overridden, by specifying it as module parameter. |
| | **ipv4** string | | IPv4 address to be set for the Layer-3 interface mentioned in *name* option. The address format is <ipv4 address>/<mask>, the mask is number in range 0-32 eg. 192.168.0.1/24 |
| | **ipv6** string | | IPv6 address to be set for the Layer-3 interface mentioned in *name* option. The address format is <ipv6 address>/<mask>, the mask is number in range 0-128 eg. fd5d:12c9:2201:1::1/64. |
| | **mode** string | **Choices:*** dynamic
* ospf-ignore
* ospf-passive
| Specifies if ipv4 address should be dynamic/advertise to ospf/not advertise to ospf. This should be specified only if ipv4 address is configured and if it is not secondary IP address. |
| | **name** string | | Name of the Layer-3 interface to be configured eg. GigabitEthernet0/2, ve 10, ethernet 1/1/1 |
| | **replace** string | **Choices:*** yes
* no
| Replaces the configured primary IP address on the interface. |
| | **secondary** string | **Choices:*** yes
* no
| Specifies that the configured address is a secondary IP address. If this keyword is omitted, the configured address is the primary IP address. |
| | **state** string | **Choices:*** present
* absent
| State of the Layer-3 interface configuration. It indicates if the configuration should be present or absent on remote device. |
| **check\_running\_config** boolean | **Choices:*** no
* **yes** β
| Check running configuration. This can be set as environment variable. Module will use environment variable value(default:True), unless it is overridden, by specifying it as module parameter. |
| **ipv4** string | | IPv4 address to be set for the Layer-3 interface mentioned in *name* option. The address format is <ipv4 address>/<mask>, the mask is number in range 0-32 eg. 192.168.0.1/24 |
| **ipv6** string | | IPv6 address to be set for the Layer-3 interface mentioned in *name* option. The address format is <ipv6 address>/<mask>, the mask is number in range 0-128 eg. fd5d:12c9:2201:1::1/64. |
| **mode** string | **Choices:*** dynamic
* ospf-ignore
* ospf-passive
| Specifies if ipv4 address should be dynamic/advertise to ospf/not advertise to ospf. This should be specified only if ipv4 address is configured and if it is not secondary IP address. |
| **name** string | | Name of the Layer-3 interface to be configured eg. GigabitEthernet0/2, ve 10, ethernet 1/1/1 |
| **replace** string | **Choices:*** yes
* no
| Replaces the configured primary IP address on the interface. |
| **secondary** string | **Choices:*** yes
* no
| Specifies that the configured address is a secondary IP address. If this keyword is omitted, the configured address is the primary IP address. |
| **state** string | **Choices:*** **present** β
* absent
| State of the Layer-3 interface configuration. It indicates if the configuration should be present or absent on remote device. |
Notes
-----
Note
* Tested against ICX 10.1.
* For information on using ICX platform, see [the ICX OS Platform Options guide](user_guide/platform_icx).
Examples
--------
```
- name: Remove ethernet 1/1/1 IPv4 and IPv6 address
community.network.icx_l3_interface:
name: ethernet 1/1/1
ipv4: 192.168.0.1/24
ipv6: "fd5d:12c9:2201:1::1/64"
state: absent
- name: Replace ethernet 1/1/1 primary IPv4 address
community.network.icx_l3_interface:
name: ethernet 1/1/1
ipv4: 192.168.0.1/24
replace: yes
state: absent
- name: Replace ethernet 1/1/1 dynamic IPv4 address
community.network.icx_l3_interface:
name: ethernet 1/1/1
ipv4: 192.168.0.1/24
mode: dynamic
state: absent
- name: Set ethernet 1/1/1 secondary IPv4 address
community.network.icx_l3_interface:
name: ethernet 1/1/1
ipv4: 192.168.0.1/24
secondary: yes
state: absent
- name: Set ethernet 1/1/1 IPv4 address
community.network.icx_l3_interface:
name: ethernet 1/1/1
ipv4: 192.168.0.1/24
- name: Set ethernet 1/1/1 IPv6 address
community.network.icx_l3_interface:
name: ethernet 1/1/1
ipv6: "fd5d:12c9:2201:1::1/64"
- name: Set IP addresses on aggregate
community.network.icx_l3_interface:
aggregate:
- { name: GigabitEthernet0/3, ipv4: 192.168.2.10/24 }
- { name: GigabitEthernet0/3, ipv4: 192.168.3.10/24, ipv6: "fd5d:12c9:2201:1::1/64" }
- name: Remove IP addresses on aggregate
community.network.icx_l3_interface:
aggregate:
- { name: GigabitEthernet0/3, ipv4: 192.168.2.10/24 }
- { name: GigabitEthernet0/3, ipv4: 192.168.3.10/24, ipv6: "fd5d:12c9:2201:1::1/64" }
state: absent
- name: Set the ipv4 and ipv6 of a virtual ethernet(ve)
community.network.icx_l3_interface:
name: ve 100
ipv4: 192.168.0.1
ipv6: "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device **Sample:** ['interface ethernet 1/1/1', 'ip address 192.168.0.1 255.255.255.0', 'ipv6 address fd5d:12c9:2201:1::1/64'] |
### Authors
* Ruckus Wireless (@Commscope)
ansible community.network.ce_info_center_trap β Manages information center trap configuration on HUAWEI CloudEngine switches. community.network.ce\_info\_center\_trap β Manages information center trap configuration on HUAWEI CloudEngine switches.
========================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_info_center_trap`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages information center trap configurations on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **channel\_id** string | | Number of a channel. The value is an integer ranging from 0 to 9. The default value is 0. |
| **module\_name** string | | Module name of the rule. The value is a string of 1 to 31 case-insensitive characters. The default value is default. Please use lower-case letter, such as [aaa, acl, arp, bfd]. |
| **state** string | **Choices:*** **present** β
* absent
| Specify desired state of the resource. |
| **trap\_buff\_enable** string | **Choices:*** **no\_use** β
* true
* false
| Whether a trap buffer is enabled to output information. |
| **trap\_buff\_size** string | | Size of a trap buffer. The value is an integer ranging from 0 to 1024. The default value is 256. |
| **trap\_enable** string | **Choices:*** **no\_use** β
* true
* false
| Whether a device is enabled to output alarms. |
| **trap\_level** string | **Choices:*** emergencies
* alert
* critical
* error
* warning
* notification
* informational
* debugging
| Trap level permitted to output. |
| **trap\_time\_stamp** string | **Choices:*** date\_boot
* date\_second
* date\_tenthsecond
* date\_millisecond
* shortdate\_second
* shortdate\_tenthsecond
* shortdate\_millisecond
* formatdate\_second
* formatdate\_tenthsecond
* formatdate\_millisecond
| Timestamp format of alarm information. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: CloudEngine info center trap test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Config trap buffer"
community.network.ce_info_center_trap:
state: present
trap_buff_enable: true
trap_buff_size: 768
provider: "{{ cli }}"
- name: "Undo trap buffer"
community.network.ce_info_center_trap:
state: absent
trap_buff_enable: true
trap_buff_size: 768
provider: "{{ cli }}"
- name: "Config trap module log level"
community.network.ce_info_center_trap:
state: present
module_name: aaa
channel_id: 1
trap_enable: true
trap_level: error
provider: "{{ cli }}"
- name: "Undo trap module log level"
community.network.ce_info_center_trap:
state: absent
module_name: aaa
channel_id: 1
trap_enable: true
trap_level: error
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution **Sample:** {'icTrapBuffEn': 'true', 'trapBuffSize': '768'} |
| **existing** dictionary | always | k/v pairs of existing aaa server **Sample:** {'icTrapBuffEn': 'false', 'trapBuffSize': '256'} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'state': 'present', 'trap\_buff\_enable': 'true', 'trap\_buff\_size': '768'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['info-center trapbuffer', 'info-center trapbuffer size 768'] |
### Authors
* wangdezhuang (@QijunPan)
ansible community.network.cnos_config β Manage Lenovo CNOS configuration sections community.network.cnos\_config β Manage Lenovo CNOS configuration sections
==========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_config`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Lenovo CNOS configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with CNOS configuration sections in a deterministic way.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **admin** boolean | **Choices:*** **no** β
* yes
| Enters into administration configuration mode for making config changes to the device. |
| **after** string | | The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with *before* this allows the playbook designer to append a set of commands to be executed after the command set. |
| **backup** boolean | **Choices:*** **no** β
* yes
| This argument will cause the module to create a full backup of the current `running-config` from the remote device before any changes are made. If the `backup_options` value is not given, the backup file is written to the `backup` folder in the playbook root directory. If the directory does not exist, it is created. |
| **backup\_options** dictionary | | This is a dict object containing configurable options related to backup file path. The value of this option is read only when `backup` is set to *yes*, if `backup` is set to *no* this option will be silently ignored. |
| | **dir\_path** path | | This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of `filename` or default filename as described in `filename` options description. If the path value is not given in that case a *backup* directory will be created in the current working directory and backup configuration will be copied in `filename` within *backup* directory. |
| | **filename** string | | The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by <hostname>\_config.<current-date>@<current-time> |
| **before** string | | The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system. |
| **comment** string | **Default:**"configured by cnos\_config" | Allows a commit description to be specified to be included when the configuration is committed. If the configuration is not changed or committed, this argument is ignored. |
| **config** string | | The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The *config* argument allows the implementer to pass in the configuration to use as the base config for comparison. |
| **lines** string | | The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser.
aliases: commands |
| **match** string | **Choices:*** **line** β
* strict
* exact
* none
| Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to *line*, commands are matched line by line. If match is set to *strict*, command lines are matched with respect to position. If match is set to *exact*, command lines must be an equal match. Finally, if match is set to *none*, the module will not attempt to compare the source configuration with the running configuration on the remote device. |
| **parents** string | | The ordered set of parents that uniquely identify the section the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. |
| **replace** string | **Choices:*** **line** β
* block
* config
| Instructs the module on the way to perform the configuration on the device. If the replace argument is set to *line* then the modified lines are pushed to the device in configuration mode. If the replace argument is set to *block* then the entire command block is pushed to the device in configuration mode if any line is not correct. |
| **src** string | | Specifies the source path to the file that contains the configuration or configuration template to load. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. This argument is mutually exclusive with *lines*, *parents*. |
Notes
-----
Note
* Tested against CNOS 10.9.1
Examples
--------
```
Tasks: The following are examples of using the module cnos_config.
---
- name: Configure top level configuration
community.network.cnos_config:
"lines: hostname {{ inventory_hostname }}"
- name: Configure interface settings
community.network.cnos_config:
lines:
- enable
- ip ospf enable
parents: interface ip 13
- name: Load a config from disk and replace the current config
community.network.cnos_config:
src: config.cfg
backup: yes
- name: Configurable backup path
community.network.cnos_config:
src: config.cfg
backup: yes
backup_options:
filename: backup.cfg
dir_path: /home/user
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **backup\_path** string | when backup is yes | The full path to the backup file **Sample:** /playbooks/ansible/backup/cnos01.2016-07-16@22:28:34 |
| **updates** list / elements=string | Only when lines is specified. | The set of commands that will be pushed to the remote device **Sample:** ['...', '...'] |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
| programming_docs |
ansible community.network.netscaler_gslb_site β Manage gslb site entities in Netscaler. community.network.netscaler\_gslb\_site β Manage gslb site entities in Netscaler.
=================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.netscaler_gslb_site`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage gslb site entities in Netscaler.
Requirements
------------
The below requirements are needed on the host that executes this module.
* nitro python sdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **clip** string | | Cluster IP address. Specify this parameter to connect to the remote cluster site for GSLB auto-sync. Note: The cluster IP address is defined when creating the cluster. |
| **metricexchange** string | **Choices:*** enabled
* disabled
| Exchange metrics with other sites. Metrics are exchanged by using Metric Exchange Protocol (MEP). The appliances in the GSLB setup exchange health information once every second. If you disable metrics exchange, you can use only static load balancing methods (such as round robin, static proximity, or the hash-based methods), and if you disable metrics exchange when a dynamic load balancing method (such as least connection) is in operation, the appliance falls back to round robin. Also, if you disable metrics exchange, you must use a monitor to determine the state of GSLB services. Otherwise, the service is marked as DOWN. |
| **naptrreplacementsuffix** string | | The naptr replacement suffix configured here will be used to construct the naptr replacement field in NAPTR record. Minimum length = 1 |
| **nitro\_pass** string / required | | The password with which to authenticate to the netscaler node. |
| **nitro\_protocol** string | **Choices:*** **http** β
* https
| Which protocol to use when accessing the nitro API objects. |
| **nitro\_timeout** float | **Default:**310 | Time in seconds until a timeout error is thrown when establishing a new session with Netscaler |
| **nitro\_user** string / required | | The username with which to authenticate to the netscaler node. |
| **nsip** string / required | | The ip address of the netscaler appliance where the nitro API calls will be made. The port can be specified with the colon (:). E.g. 192.168.1.1:555. |
| **nwmetricexchange** string | **Choices:*** enabled
* disabled
| Exchange, with other GSLB sites, network metrics such as round-trip time (RTT), learned from communications with various local DNS (LDNS) servers used by clients. RTT information is used in the dynamic RTT load balancing method, and is exchanged every 5 seconds. |
| **parentsite** string | | Parent site of the GSLB site, in a parent-child topology. |
| **publicclip** string | | IP address to be used to globally access the remote cluster when it is deployed behind a NAT. It can be same as the normal cluster IP address. |
| **publicip** string | | Public IP address for the local site. Required only if the appliance is deployed in a private address space and the site has a public IP address hosted on an external firewall or a NAT device. Minimum length = 1 |
| **save\_config** boolean | **Choices:*** no
* **yes** β
| If `yes` the module will save the configuration on the netscaler node if it makes any changes. The module will not save the configuration on the netscaler node if it made no changes. |
| **sessionexchange** string | **Choices:*** enabled
* disabled
| Exchange persistent session entries with other GSLB sites every five seconds. |
| **siteipaddress** string | | IP address for the GSLB site. The GSLB site uses this IP address to communicate with other GSLB sites. For a local site, use any IP address that is owned by the appliance (for example, a SNIP or MIP address, or the IP address of the ADNS service). Minimum length = 1 |
| **sitename** string | | Name for the GSLB site. Must begin with an ASCII alphanumeric or underscore `_` character, and must contain only ASCII alphanumeric, underscore `_`, hash `#`, period `.`, space , colon `:`, at `@`, equals `=`, and hyphen `-` characters. Cannot be changed after the virtual server is created. Minimum length = 1 |
| **sitetype** string | **Choices:*** REMOTE
* LOCAL
| Type of site to create. If the type is not specified, the appliance automatically detects and sets the type on the basis of the IP address being assigned to the site. If the specified site IP address is owned by the appliance (for example, a MIP address or SNIP address), the site is a local site. Otherwise, it is a remote site. |
| **state** string | **Choices:*** absent
* **present** β
| The state of the resource being configured by the module on the netscaler node. When present the resource will be created if needed and configured according to the module's parameters. When absent the resource will be deleted from the netscaler node. |
| **triggermonitor** string | **Choices:*** ALWAYS
* MEPDOWN
* MEPDOWN\_SVCDOWN
| Specify the conditions under which the GSLB service must be monitored by a monitor, if one is bound. Available settings function as follows: \* `ALWAYS` - Monitor the GSLB service at all times. \* `MEPDOWN` - Monitor the GSLB service only when the exchange of metrics through the Metrics Exchange Protocol (MEP) is disabled.
`MEPDOWN_SVCDOWN` - Monitor the service in either of the following situations: \* The exchange of metrics through MEP is disabled. \* The exchange of metrics through MEP is enabled but the status of the service, learned through metrics exchange, is DOWN. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* For more information on using Ansible to manage Citrix NetScaler Network devices see <https://www.ansible.com/ansible-netscaler>.
Examples
--------
```
- name: Setup gslb site
delegate_to: localhost
community.network.netscaler_gslb_site:
nsip: 172.18.0.2
nitro_user: nsroot
nitro_pass: nsroot
sitename: gslb-site-1
siteipaddress: 192.168.1.1
sitetype: LOCAL
publicip: 192.168.1.1
metricexchange: enabled
nwmetricexchange: enabled
sessionexchange: enabled
triggermonitor: ALWAYS
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **diff** dictionary | failure | List of differences between the actual configured object and the configuration specified in the module **Sample:** { 'targetlbvserver': 'difference. ours: (str) server1 other: (str) server2' } |
| **loglines** list / elements=string | always | list of logged messages by the module **Sample:** ['message 1', 'message 2'] |
| **msg** string | failure | Message detailing the failure reason **Sample:** Action does not exist |
### Authors
* George Nikolopoulos (@giorgos-nikolopoulos)
ansible community.network.avi_alertconfig β Module for setup of AlertConfig Avi RESTful Object community.network.avi\_alertconfig β Module for setup of AlertConfig Avi RESTful Object
=======================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_alertconfig`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure AlertConfig object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action\_group\_ref** string | | The alert config will trigger the selected alert action, which can send notifications and execute a controlscript. It is a reference to an object of type actiongroupconfig. |
| **alert\_rule** string / required | | List of filters matching on events or client logs used for triggering alerts. |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **autoscale\_alert** boolean | **Choices:*** no
* yes
| This alert config applies to auto scale alerts. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **category** string / required | | Determines whether an alert is raised immediately when event occurs (realtime) or after specified number of events occurs within rolling time window. Enum options - REALTIME, ROLLINGWINDOW, WATERMARK. Default value when not specified in API or module is interpreted by Avi Controller as REALTIME. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **description** string | | A custom description field. |
| **enabled** boolean | **Choices:*** no
* yes
| Enable or disable this alert config from generating new alerts. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **expiry\_time** string | | An alert is expired and deleted after the expiry time has elapsed. The original event triggering the alert remains in the event's log. Allowed values are 1-31536000. Default value when not specified in API or module is interpreted by Avi Controller as 86400. |
| **name** string / required | | Name of the alert configuration. |
| **obj\_uuid** string | | Uuid of the resource for which alert was raised. |
| **object\_type** string | | The object type to which the alert config is associated with. Valid object types are - virtual service, pool, service engine. Enum options - VIRTUALSERVICE, POOL, HEALTHMONITOR, NETWORKPROFILE, APPLICATIONPROFILE, HTTPPOLICYSET, DNSPOLICY, SECURITYPOLICY, IPADDRGROUP, STRINGGROUP, SSLPROFILE, SSLKEYANDCERTIFICATE, NETWORKSECURITYPOLICY, APPLICATIONPERSISTENCEPROFILE, ANALYTICSPROFILE, VSDATASCRIPTSET, TENANT, PKIPROFILE, AUTHPROFILE, CLOUD, SERVERAUTOSCALEPOLICY, AUTOSCALELAUNCHCONFIG, MICROSERVICEGROUP, IPAMPROFILE, HARDWARESECURITYMODULEGROUP, POOLGROUP, PRIORITYLABELS, POOLGROUPDEPLOYMENTPOLICY, GSLBSERVICE, GSLBSERVICERUNTIME, SCHEDULER, GSLBGEODBPROFILE, GSLBAPPLICATIONPERSISTENCEPROFILE, TRAFFICCLONEPROFILE, VSVIP, WAFPOLICY, WAFPROFILE, ERRORPAGEPROFILE, ERRORPAGEBODY, L4POLICYSET, GSLBSERVICERUNTIMEBATCH, WAFPOLICYPSMGROUP, PINGACCESSAGENT, SERVICEENGINEPOLICY, NATPOLICY, SSOPOLICY, PROTOCOLPARSER, SERVICEENGINE, DEBUGSERVICEENGINE, DEBUGCONTROLLER, DEBUGVIRTUALSERVICE, SERVICEENGINEGROUP, SEPROPERTIES, NETWORK, CONTROLLERNODE, CONTROLLERPROPERTIES, SYSTEMCONFIGURATION, VRFCONTEXT, USER, ALERTCONFIG, ALERTSYSLOGCONFIG, ALERTEMAILCONFIG, ALERTTYPECONFIG, APPLICATION, ROLE, CLOUDPROPERTIES, SNMPTRAPPROFILE, ACTIONGROUPPROFILE, MICROSERVICE, ALERTPARAMS, ACTIONGROUPCONFIG, CLOUDCONNECTORUSER, GSLB, GSLBDNSUPDATE, GSLBSITEOPS, GLBMGRWARMSTART, IPAMDNSRECORD, GSLBDNSGSSTATUS, GSLBDNSGEOFILEOPS, GSLBDNSGEOUPDATE, GSLBDNSGEOCLUSTEROPS, GSLBDNSCLEANUP, GSLBSITEOPSRESYNC, IPAMDNSPROVIDERPROFILE, TCPSTATRUNTIME, UDPSTATRUNTIME, IPSTATRUNTIME, ARPSTATRUNTIME, MBSTATRUNTIME, IPSTKQSTATSRUNTIME, MALLOCSTATRUNTIME, SHMALLOCSTATRUNTIME, CPUUSAGERUNTIME, L7GLOBALSTATSRUNTIME, L7VIRTUALSERVICESTATSRUNTIME, SEAGENTVNICDBRUNTIME, SEAGENTGRAPHDBRUNTIME, SEAGENTSTATERUNTIME, INTERFACERUNTIME, ARPTABLERUNTIME, DISPATCHERSTATRUNTIME, DISPATCHERSTATCLEARRUNTIME, DISPATCHERTABLEDUMPRUNTIME, DISPATCHERREMOTETIMERLISTDUMPRUNTIME, METRICSAGENTMESSAGE, HEALTHMONITORSTATRUNTIME, METRICSENTITYRUNTIME, PERSISTENCEINTERNAL, HTTPPOLICYSETINTERNAL, DNSPOLICYINTERNAL, CONNECTIONDUMPRUNTIME, SHAREDDBSTATS, SHAREDDBSTATSCLEAR, ICMPSTATRUNTIME, ROUTETABLERUNTIME, VIRTUALMACHINE, POOLSERVER, SEVSLIST, MEMINFORUNTIME, RTERINGSTATRUNTIME, ALGOSTATRUNTIME, HEALTHMONITORRUNTIME, CPUSTATRUNTIME, SEVM, HOST, PORTGROUP, CLUSTER, DATACENTER, VCENTER, HTTPPOLICYSETSTATS, DNSPOLICYSTATS, METRICSSESTATS, RATELIMITERSTATRUNTIME, NETWORKSECURITYPOLICYSTATS, TCPCONNRUNTIME, POOLSTATS, CONNPOOLINTERNAL, CONNPOOLSTATS, VSHASHSHOWRUNTIME, SELOGSTATSRUNTIME, NETWORKSECURITYPOLICYDETAIL, LICENSERUNTIME, SERVERRUNTIME, METRICSRUNTIMESUMMARY, METRICSRUNTIMEDETAIL, DISPATCHERSEHMPROBETEMPDISABLERUNTIME, POOLDEBUG, VSLOGMGRMAP, SERUMINSERTIONSTATS, HTTPCACHE, HTTPCACHESTATS, SEDOSSTATRUNTIME, VSDOSSTATRUNTIME, SERVERUPDATEREQ, VSSCALEOUTLIST, SEMEMDISTRUNTIME, TCPCONNRUNTIMEDETAIL, SEUPGRADESTATUS, SEUPGRADEPREVIEW, SEFAULTINJECTEXHAUSTM, SEFAULTINJECTEXHAUSTMCL, SEFAULTINJECTEXHAUSTMCLSMALL, SEFAULTINJECTEXHAUSTCONN, SEHEADLESSONLINEREQ, SEUPGRADE, SEUPGRADESTATUSDETAIL, SERESERVEDVS, SERESERVEDVSCLEAR, VSCANDIDATESEHOSTLIST, SEGROUPUPGRADE, REBALANCE, SEGROUPREBALANCE, SEAUTHSTATSRUNTIME, AUTOSCALESTATE, VIRTUALSERVICEAUTHSTATS, NETWORKSECURITYPOLICYDOS, KEYVALINTERNAL, KEYVALSUMMARYINTERNAL, SERVERSTATEUPDATEINFO, CLTRACKINTERNAL, CLTRACKSUMMARYINTERNAL, MICROSERVICERUNTIME, SEMICROSERVICE, VIRTUALSERVICEANALYSIS, CLIENTINTERNAL, CLIENTSUMMARYINTERNAL, MICROSERVICEGROUPRUNTIME, BGPRUNTIME, REQUESTQUEUERUNTIME, MIGRATEALL, MIGRATEALLSTATUSSUMMARY, MIGRATEALLSTATUSDETAIL, INTERFACESUMMARYRUNTIME, INTERFACELACPRUNTIME, DNSTABLE, GSLBSERVICEDETAIL, GSLBSERVICEINTERNAL, GSLBSERVICEHMONSTAT, SETROLESREQUEST, TRAFFICCLONERUNTIME, GEOLOCATIONINFO, SEVSHBSTATRUNTIME, GEODBINTERNAL, GSLBSITEINTERNAL, WAFSTATS, USERDEFINEDDATASCRIPTCOUNTERS, LLDPRUNTIME, VSESSHARINGPOOL, NDTABLERUNTIME, IP6STATRUNTIME, ICMP6STATRUNTIME, SEVSSPLACEMENT, L4POLICYSETSTATS, L4POLICYSETINTERNAL, BGPDEBUGINFO, SHARD, CPUSTATRUNTIMEDETAIL, SEASSERTSTATRUNTIME, SEFAULTINJECTINFRA, SEAGENTASSERTSTATRUNTIME, SEDATASTORESTATUS, DIFFQUEUESTATUS, IP6ROUTETABLERUNTIME, SECURITYMGRSTATE, VIRTUALSERVICESESCALEOUTSTATUS, SHARDSERVERSTATUS, SEAGENTSHARDCLIENTRESOURCEMAP, SEAGENTCONSISTENTHASH, SEAGENTVNICDBHISTORY, SEAGENTSHARDCLIENTAPPMAP, SEAGENTSHARDCLIENTEVENTHISTORY, SENATSTATRUNTIME, SENATFLOWRUNTIME, SERESOURCEPROTO, SECONSUMERPROTO, SECREATEPENDINGPROTO, PLACEMENTSTATS, SEVIPPROTO, RMVRFPROTO, VCENTERMAP, VIMGRVCENTERRUNTIME, INTERESTEDVMS, INTERESTEDHOSTS, VCENTERSUPPORTEDCOUNTERS, ENTITYCOUNTERS, TRANSACTIONSTATS, SEVMCREATEPROGRESS, PLACEMENTSTATUS, VISUBFOLDERS, VIDATASTORE, VIHOSTRESOURCES, CLOUDCONNECTOR, VINETWORKSUBNETVMS, VIDATASTORECONTENTS, VIMGRVCENTERCLOUDRUNTIME, VIVCENTERPORTGROUPS, VIVCENTERDATACENTERS, VIMGRHOSTRUNTIME, PLACEMENTGLOBALS, APICCONFIGURATION, CIFTABLE, APICTRANSACTION, VIRTUALSERVICESTATEDBCACHESUMMARY, POOLSTATEDBCACHESUMMARY, SERVERSTATEDBCACHESUMMARY, APICAGENTINTERNAL, APICTRANSACTIONFLAP, APICGRAPHINSTANCES, APICEPGS, APICEPGEPS, APICDEVICEPKGVER, APICTENANTS, APICVMMDOMAINS, NSXCONFIGURATION, NSXSGTABLE, NSXAGENTINTERNAL, NSXSGINFO, NSXSGIPS, NSXAGENTINTERNALCLI, MAXOBJECTS. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **recommendation** string | | Recommendation of alertconfig. |
| **rolling\_window** string | | Only if the number of events is reached or exceeded within the time window will an alert be generated. Allowed values are 1-31536000. Default value when not specified in API or module is interpreted by Avi Controller as 300. |
| **source** string / required | | Signifies system events or the type of client logsused in this alert configuration. Enum options - CONN\_LOGS, APP\_LOGS, EVENT\_LOGS, METRICS. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **summary** string | | Summary of reason why alert is generated. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **threshold** string | | An alert is created only when the number of events meets or exceeds this number within the chosen time frame. Allowed values are 1-65536. Default value when not specified in API or module is interpreted by Avi Controller as 1. |
| **throttle** string | | Alerts are suppressed (throttled) for this duration of time since the last alert was raised for this alert config. Allowed values are 0-31536000. Default value when not specified in API or module is interpreted by Avi Controller as 600. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create AlertConfig object
community.network.avi_alertconfig:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_alertconfig
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | AlertConfig (api/alertconfig) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#1473667567607b737d323727232f323721262f3237202c2f75627d7a7160637b667f67323720222f777b79)>
| programming_docs |
ansible community.network.dladm_iptun β Manage IP tunnel interfaces on Solaris/illumos systems. community.network.dladm\_iptun β Manage IP tunnel interfaces on Solaris/illumos systems.
========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.dladm_iptun`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage IP tunnel interfaces on Solaris/illumos systems.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **local\_address** string | | Literal IP address or hostname corresponding to the tunnel source.
aliases: local |
| **name** string / required | | IP tunnel interface name. |
| **remote\_address** string | | Literal IP address or hostname corresponding to the tunnel destination.
aliases: remote |
| **state** string | **Choices:*** **present** β
* absent
| Create or delete Solaris/illumos VNIC. |
| **temporary** boolean | **Choices:*** **no** β
* yes
| Specifies that the IP tunnel interface is temporary. Temporary IP tunnel interfaces do not persist across reboots. |
| **type** string | **Choices:*** **ipv4** β
* ipv6
* 6to4
| Specifies the type of tunnel to be created.
aliases: tunnel\_type |
Examples
--------
```
- name: Create IPv4 tunnel interface 'iptun0'
community.network.dladm_iptun: name=iptun0 local_address=192.0.2.23 remote_address=203.0.113.10 state=present
- name: Change IPv4 tunnel remote address
community.network.dladm_iptun: name=iptun0 type=ipv4 local_address=192.0.2.23 remote_address=203.0.113.11
- name: Create IPv6 tunnel interface 'tun0'
community.network.dladm_iptun: name=tun0 type=ipv6 local_address=192.0.2.23 remote_address=203.0.113.42
- name: Remove 'iptun0' tunnel interface
community.network.dladm_iptun: name=iptun0 state=absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **local\_address** string | always | local IP address **Sample:** 1.1.1.1/32 |
| **name** string | always | tunnel interface name **Sample:** iptun0 |
| **remote\_address** string | always | remote IP address **Sample:** 2.2.2.2/32 |
| **state** string | always | state of the target **Sample:** present |
| **temporary** boolean | always | specifies if operation will persist across reboots **Sample:** True |
| **type** string | always | tunnel type **Sample:** ipv4 |
### Authors
* Adam Ε tevko (@xen0l)
ansible community.network.pn_dscp_map β CLI command to create/delete dscp-map community.network.pn\_dscp\_map β CLI command to create/delete dscp-map
=======================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_dscp_map`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to create a DSCP priority mapping table.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_name** string | | Name for the DSCP map. |
| **pn\_scope** string | **Choices:*** local
* fabric
| Scope for dscp map. |
| **state** string / required | **Choices:*** present
* absent
| State the action to perform. Use `present` to create dscp-map and `absent` to delete. |
Examples
--------
```
- name: Dscp map create
community.network.pn_dscp_map:
pn_cliswitch: "sw01"
state: "present"
pn_name: "foo"
pn_scope: "local"
- name: Dscp map delete
community.network.pn_dscp_map:
pn_cliswitch: "sw01"
state: "absent"
pn_name: "foo"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the dscp-map command. |
| **stdout** list / elements=string | always | set of responses from the dscp-map command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.ironware_config β Manage configuration sections on Extreme Ironware devices community.network.ironware\_config β Manage configuration sections on Extreme Ironware devices
==============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ironware_config`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Extreme Ironware configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with Ironware configuration sections in a deterministic way.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **after** string | | The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with *before* this allows the playbook designer to append a set of commands to be executed after the command set. |
| **authorize** boolean | **Choices:*** **no** β
* yes
| **Deprecated** Starting with Ansible 2.7 we recommend using `connection: network_cli` and `become: yes`. For more information please see the [IronWare Platform Options guide](user_guide/platform_ironware). Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
| **backup** boolean | **Choices:*** **no** β
* yes
| This argument will cause the module to create a full backup of the current `running-config` from the remote device before any changes are made. If the `backup_options` value is not given, the backup file is written to the `backup` folder in the playbook root directory. If the directory does not exist, it is created. |
| **backup\_options** dictionary | | This is a dict object containing configurable options related to backup file path. The value of this option is read only when `backup` is set to *yes*, if `backup` is set to *no* this option will be silently ignored. |
| | **dir\_path** path | | This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of `filename` or default filename as described in `filename` options description. If the path value is not given in that case a *backup* directory will be created in the current working directory and backup configuration will be copied in `filename` within *backup* directory. |
| | **filename** string | | The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by <hostname>\_config.<current-date>@<current-time> |
| **before** string | | The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system |
| **commit** string | **Choices:*** **merge** β
* check
| This argument specifies the update method to use when applying the configuration changes to the remote node. If the value is set to *merge* the configuration updates are merged with the running- config. If the value is set to *check*, no changes are made to the remote host. |
| **config** string | | The `config` argument allows the playbook designer to supply the base configuration to be used to validate configuration changes necessary. If this argument is provided, the module will not download the running-config from the remote node. |
| **lines** string | | The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser.
aliases: commands |
| **match** string | **Choices:*** **line** β
* strict
* exact
* none
| Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to *line*, commands are matched line by line. If match is set to *strict*, command lines are matched with respect to position. If match is set to *exact*, command lines must be an equal match. Finally, if match is set to *none*, the module will not attempt to compare the source configuration with the running configuration on the remote device. |
| **parents** string | | The ordered set of parents that uniquely identify the section the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. |
| **provider** dictionary | | **Deprecated** Starting with Ansible 2.7 we recommend using `connection: network_cli` and `become: yes`. For more information please see the [IronWare Platform Options guide](user_guide/platform_ironware). A dict object containing connection details. |
| | **auth\_pass** string | | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
| | **authorize** boolean | **Choices:*** **no** β
* yes
| Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
| | **host** string | | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
| | **port** integer | **Default:**22 | Specifies the port to use when building the connection to the remote device. |
| | **ssh\_keyfile** path | | Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
| | **timeout** integer | **Default:**10 | Specifies idle timeout in seconds for the connection, in seconds. Useful if the console freezes before continuing. For example when saving configurations. |
| | **username** string | | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
| **replace** string | **Choices:*** **line** β
* block
| Instructs the module on the way to perform the configuration on the device. If the replace argument is set to *line* then the modified lines are pushed to the device in configuration mode. If the replace argument is set to *block* then the entire command block is pushed to the device in configuration mode if any line is not correct |
| **save\_when** string | **Choices:*** always
* **never** β
* modified
| When changes are made to the device running-configuration, the changes are not copied to non-volatile storage by default. Using this argument will change that before. If the argument is set to *always*, then the running-config will always be copied to the startup-config and the *modified* flag will always be set to True. If the argument is set to *modified*, then the running-config will only be copied to the startup-config if it has changed since the last save to startup-config. If the argument is set to *never*, the running-config will never be copied to the startup-config |
| **src** string | | Specifies the source path to the file that contains the configuration or configuration template to load. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. This argument is mutually exclusive with *lines*, *parents*. |
| **update** string | **Choices:*** **merge** β
* check
| The *update* argument controls how the configuration statements are processed on the remote device. Valid choices for the *update* argument are *merge* and *check*. When the argument is set to *merge*, the configuration changes are merged with the current device running configuration. When the argument is set to *check* the configuration updates are determined but not actually configured on the remote device. |
Notes
-----
Note
* For more information on using Ansible to manage network devices see the [Ansible Network Guide](../../../network/index#network-guide)
Examples
--------
```
- name: Run commands that should be configured in the section
community.network.ironware_config:
lines:
- port-name test
- enable
- load-interval 30
- rate-limit input broadcast unknown-unicast multicast 521216 64000
parents: ['interface ethernet 1/2']
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **backup\_path** string | when backup is yes | The full path to the backup file **Sample:** /playbooks/ansible/backup/ironware\_config.2016-07-16@22:28:34 |
| **updates** list / elements=string | always | The set of commands that will be pushed to the remote device **Sample:** ['...', '...'] |
### Authors
* Paul Baker (@paulquack)
ansible community.network.ce_ntp_auth β Manages NTP authentication configuration on HUAWEI CloudEngine switches. community.network.ce\_ntp\_auth β Manages NTP authentication configuration on HUAWEI CloudEngine switches.
==========================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_ntp_auth`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages NTP authentication configuration on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_mode** string | **Choices:*** hmac-sha256
* md5
| Specify authentication algorithm. |
| **auth\_pwd** string | | Plain text with length of 1 to 255, encrypted text with length of 20 to 392. |
| **auth\_type** string | **Choices:*** text
* **encrypt** β
| Whether the given password is in cleartext or has been encrypted. If in cleartext, the device will encrypt it before storing it. |
| **authentication** string | **Choices:*** enable
* disable
| Configure ntp authentication enable or unconfigure ntp authentication enable. |
| **key\_id** string / required | | Authentication key identifier (numeric). |
| **state** string | **Choices:*** **present** β
* absent
| Manage the state of the resource. |
| **trusted\_key** string | **Choices:*** enable
* **disable** β
| Whether the given key is required to be supplied by a time source for the device to synchronize to the time source. |
Notes
-----
Note
* If `state=absent`, the module will attempt to remove the given key configuration. If a matching key configuration isnβt found on the device, the module will fail.
* If `state=absent` and `authentication=on`, authentication will be turned on.
* If `state=absent` and `authentication=off`, authentication will be turned off.
* Recommended connection is `network_cli`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: NTP AUTH test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Configure ntp authentication key-id"
community.network.ce_ntp_auth:
key_id: 32
auth_mode: md5
auth_pwd: 11111111111111111111111
provider: "{{ cli }}"
- name: "Configure ntp authentication key-id and trusted authentication keyid"
community.network.ce_ntp_auth:
key_id: 32
auth_mode: md5
auth_pwd: 11111111111111111111111
trusted_key: enable
provider: "{{ cli }}"
- name: "Configure ntp authentication key-id and authentication enable"
community.network.ce_ntp_auth:
key_id: 32
auth_mode: md5
auth_pwd: 11111111111111111111111
authentication: enable
provider: "{{ cli }}"
- name: "Unconfigure ntp authentication key-id and trusted authentication keyid"
community.network.ce_ntp_auth:
key_id: 32
state: absent
provider: "{{ cli }}"
- name: "Unconfigure ntp authentication key-id and authentication enable"
community.network.ce_ntp_auth:
key_id: 32
authentication: enable
state: absent
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of ntp authentication after module execution **Sample:** {'authentication': 'off', 'authentication-keyid': [{'auth\_mode': 'md5', 'key\_id': '1', 'trusted\_key': 'disable'}, {'auth\_mode': 'md5', 'key\_id': '32', 'trusted\_key': 'enable'}]} |
| **existing** dictionary | always | k/v pairs of existing ntp authentication **Sample:** {'authentication': 'off', 'authentication-keyid': [{'auth\_mode': 'md5', 'key\_id': '1', 'trusted\_key': 'disable'}]} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'auth\_mode': 'md5', 'auth\_pwd': '1111', 'auth\_type': 'text', 'authentication': 'enable', 'key\_id': '32', 'state': 'present', 'trusted\_key': 'enable'} |
| **state** string | always | state as sent in from the playbook **Sample:** present |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['ntp authentication-key 32 md5 1111', 'ntp trusted-key 32', 'ntp authentication enable'] |
### Authors
* Zhijin Zhou (@QijunPan)
| programming_docs |
ansible community.network.avi_autoscalelaunchconfig β Module for setup of AutoScaleLaunchConfig Avi RESTful Object community.network.avi\_autoscalelaunchconfig β Module for setup of AutoScaleLaunchConfig Avi RESTful Object
===========================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_autoscalelaunchconfig`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure AutoScaleLaunchConfig object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **description** string | | User defined description for the object. |
| **image\_id** string | | Unique id of the amazon machine image (ami) or openstack vm id. |
| **mesos** string | | Autoscalemesossettings settings for autoscalelaunchconfig. |
| **name** string / required | | Name of the object. |
| **openstack** string | | Autoscaleopenstacksettings settings for autoscalelaunchconfig. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **use\_external\_asg** boolean | **Choices:*** no
* yes
| If set to true, serverautoscalepolicy will use the autoscaling group (external\_autoscaling\_groups) from pool to perform scale up and scale down. Pool should have single autoscaling group configured. Field introduced in 17.2.3. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create an Autoscale Launch configuration.
community.network.avi_autoscalelaunchconfig:
controller: '{{ controller }}'
username: '{{ username }}'
password: '{{ password }}'
image_id: default
name: default-autoscalelaunchconfig
tenant_ref: admin
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | AutoScaleLaunchConfig (api/autoscalelaunchconfig) object |
### Authors
* Chaitanya Deshpande (@chaitanyaavi) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#aecdc6cfc7dacfc0d7cf888d9a9895cacbddc6decfc0cacb888d9d9995888d9b9c95888d9a9695cfd8c7c0cbdad9c1dcc5dd888d9a9895cdc1c3)>
ansible community.network.avi_sslprofile β Module for setup of SSLProfile Avi RESTful Object community.network.avi\_sslprofile β Module for setup of SSLProfile Avi RESTful Object
=====================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_sslprofile`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure SSLProfile object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **accepted\_ciphers** string | | Ciphers suites represented as defined by <http://www.openssl.org/docs/apps/ciphers.html>. Default value when not specified in API or module is interpreted by Avi Controller as AES:3DES:RC4. |
| **accepted\_versions** string | | Set of versions accepted by the server. |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **cipher\_enums** string | | Enum options - tls\_ecdhe\_ecdsa\_with\_aes\_128\_gcm\_sha256, tls\_ecdhe\_ecdsa\_with\_aes\_256\_gcm\_sha384, tls\_ecdhe\_rsa\_with\_aes\_128\_gcm\_sha256, tls\_ecdhe\_rsa\_with\_aes\_256\_gcm\_sha384, tls\_ecdhe\_ecdsa\_with\_aes\_128\_cbc\_sha256, tls\_ecdhe\_ecdsa\_with\_aes\_256\_cbc\_sha384, tls\_ecdhe\_rsa\_with\_aes\_128\_cbc\_sha256, tls\_ecdhe\_rsa\_with\_aes\_256\_cbc\_sha384, tls\_rsa\_with\_aes\_128\_gcm\_sha256, tls\_rsa\_with\_aes\_256\_gcm\_sha384, tls\_rsa\_with\_aes\_128\_cbc\_sha256, tls\_rsa\_with\_aes\_256\_cbc\_sha256, tls\_ecdhe\_ecdsa\_with\_aes\_128\_cbc\_sha, tls\_ecdhe\_ecdsa\_with\_aes\_256\_cbc\_sha, tls\_ecdhe\_rsa\_with\_aes\_128\_cbc\_sha, tls\_ecdhe\_rsa\_with\_aes\_256\_cbc\_sha, tls\_rsa\_with\_aes\_128\_cbc\_sha, tls\_rsa\_with\_aes\_256\_cbc\_sha, tls\_rsa\_with\_3des\_ede\_cbc\_sha, tls\_rsa\_with\_rc4\_128\_sha. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **description** string | | User defined description for the object. |
| **dhparam** string | | Dh parameters used in ssl. At this time, it is not configurable and is set to 2048 bits. |
| **enable\_ssl\_session\_reuse** boolean | **Choices:*** no
* yes
| Enable ssl session re-use. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **name** string / required | | Name of the object. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **prefer\_client\_cipher\_ordering** boolean | **Choices:*** no
* yes
| Prefer the ssl cipher ordering presented by the client during the ssl handshake over the one specified in the ssl profile. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **send\_close\_notify** boolean | **Choices:*** no
* yes
| Send 'close notify' alert message for a clean shutdown of the ssl connection. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **ssl\_rating** string | | Sslrating settings for sslprofile. |
| **ssl\_session\_timeout** string | | The amount of time in seconds before an ssl session expires. Default value when not specified in API or module is interpreted by Avi Controller as 86400. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tags** string | | List of tag. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **type** string | | Ssl profile type. Enum options - SSL\_PROFILE\_TYPE\_APPLICATION, SSL\_PROFILE\_TYPE\_SYSTEM. Field introduced in 17.2.8. Default value when not specified in API or module is interpreted by Avi Controller as SSL\_PROFILE\_TYPE\_APPLICATION. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create SSL profile with list of allowed ciphers
community.network.avi_sslprofile:
controller: '{{ controller }}'
username: '{{ username }}'
password: '{{ password }}'
accepted_ciphers: >
ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA:
ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:
AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:
AES256-SHA:DES-CBC3-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:
ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA
accepted_versions:
- type: SSL_VERSION_TLS1
- type: SSL_VERSION_TLS1_1
- type: SSL_VERSION_TLS1_2
cipher_enums:
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
- TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
- TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
- TLS_RSA_WITH_AES_128_GCM_SHA256
- TLS_RSA_WITH_AES_256_GCM_SHA384
- TLS_RSA_WITH_AES_128_CBC_SHA256
- TLS_RSA_WITH_AES_256_CBC_SHA256
- TLS_RSA_WITH_AES_128_CBC_SHA
- TLS_RSA_WITH_AES_256_CBC_SHA
- TLS_RSA_WITH_3DES_EDE_CBC_SHA
- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
- TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
name: PFS-BOTH-RSA-EC
send_close_notify: true
ssl_rating:
compatibility_rating: SSL_SCORE_EXCELLENT
performance_rating: SSL_SCORE_EXCELLENT
security_score: '100.0'
tenant_ref: Demo
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | SSLProfile (api/sslprofile) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#8becf9eaf8ffe4ece2ada8b8bcb0ada8beb9b0ada8bfb3b0eafde2e5eefffce4f9e0f8ada8bfbdb0e8e4e6)>
ansible community.network.ce_static_route_bfd β Manages static route configuration on HUAWEI CloudEngine switches. community.network.ce\_static\_route\_bfd β Manages static route configuration on HUAWEI CloudEngine switches.
=============================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_static_route_bfd`.
New in version 0.2.0: of community.network
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages the static routes on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aftype** string / required | **Choices:*** v4
* v6
| Destination ip address family type of static route. |
| **bfd\_session\_name** string | | bfd name (range 1-15). |
| **commands** list / elements=string | | Incoming command line is used to send sys,undo ip route-static default-bfd,commit. |
| **description** string | | Name of the route. Used with the name parameter on the CLI. |
| **destvrf** string | | VPN instance of next hop ip address. |
| **detect\_multiplier** integer | | Configure the BFD multiplier (range 3-50). |
| **function\_flag** string / required | **Choices:*** globalBFD
* singleBFD
* dynamicBFD
* staticBFD
| Used to distinguish between command line functions. |
| **mask** string | | Destination ip mask of static route. |
| **min\_rx\_interval** integer | | Set the minimum BFD receive interval (range 50-1000). |
| **min\_tx\_interval** integer | | Set the minimum BFD session sending interval (range 50-1000). |
| **next\_hop** string | | Next hop address of static route. |
| **nhp\_interface** string | | Next hop interface full name of static route. |
| **pref** integer | | Preference or administrative difference of route (range 1-255). |
| **prefix** string / required | | Destination ip address of static route. |
| **state** string | **Choices:*** **present** β
* absent
| Specify desired state of the resource. |
| **tag** integer | | Route tag value (numeric). |
| **vrf** string | | VPN instance of destination ip address. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
* If no vrf is supplied, vrf is set to default.
* If *state=absent*, the route configuration will be removed, regardless of the non-required parameters.
Examples
--------
```
#ip route-static bfd interface-type interface-number nexthop-address [ local-address address ]
#[ min-rx-interval min-rx-interval | min-tx-interval min-tx-interval | detect-multiplier multiplier ]
- name: Config an ip route-static bfd 10GE1/0/1 3.3.3.3 min-rx-interval 50 min-tx-interval 50 detect-multiplier 5
community.network.ce_static_route_bfd:
function_flag: 'singleBFD'
nhp_interface: 10GE1/0/1
next_hop: 3.3.3.3
min_tx_interval: 50
min_rx_interval: 50
detect_multiplier: 5
aftype: v4
state: present
#undo ip route-static bfd [ interface-type interface-number | vpn-instance vpn-instance-name ] nexthop-address
- name: Undo ip route-static bfd 10GE1/0/1 3.3.3.4
community.network.ce_static_route_bfd:
function_flag: 'singleBFD'
nhp_interface: 10GE1/0/1
next_hop: 3.3.3.4
aftype: v4
state: absent
#ip route-static default-bfd { min-rx-interval {min-rx-interval} | min-tx-interval {min-tx-interval} | detect-multiplier {multiplier}}
- name: Config an ip route-static default-bfd min-rx-interval 50 min-tx-interval 50 detect-multiplier 6
community.network.ce_static_route_bfd:
function_flag: 'globalBFD'
min_tx_interval: 50
min_rx_interval: 50
detect_multiplier: 6
aftype: v4
state: present
- name: Undo ip route-static default-bfd
community.network.ce_static_route_bfd:
function_flag: 'globalBFD'
aftype: v4
state: absent
commands: 'sys,undo ip route-static default-bfd,commit'
- name: Config an ipv4 static route 2.2.2.0/24 2.2.2.1 preference 1 tag 2 description test for staticBFD
community.network.ce_static_route_bfd:
function_flag: 'staticBFD'
prefix: 2.2.2.2
mask: 24
next_hop: 2.2.2.1
tag: 2
description: test
pref: 1
aftype: v4
bfd_session_name: btoa
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of switchport after module execution **Sample:** {'bfd\_session\_name': 'btoa', 'description': 'testing', 'function\_flag': 'staticBFD', 'mask': '24', 'next\_hop': '3.3.3.3', 'pref': '100', 'prefix': '192.168.20.0', 'tag': 'null'} |
| **existing** dictionary | always | k/v pairs of existing switchport **Sample:** {'bfd\_session\_name': 'btoa', 'description': 'testing', 'function\_flag': '', 'mask': '24', 'next\_hop': '', 'pref': '101', 'prefix': '192.168.20.0', 'tag': 'null'} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'bfd\_session\_name': 'btoa', 'description': 'testing', 'function\_flag': 'staticBFD', 'mask': '24', 'next\_hop': '3.3.3.3', 'pref': '100', 'prefix': '192.168.20.642', 'vrf': '\_public\_'} |
| **updates** list / elements=string | always | command list sent to the device **Sample:** ['ip route-static 192.168.20.0 255.255.255.0 3.3.3.3 preference 100 description testing'] |
### Authors
* xuxiaowei0512 (@CloudEngine-Ansible)
| programming_docs |
ansible community.network.ce_lldp β Manages LLDP configuration on HUAWEI CloudEngine switches. community.network.ce\_lldp β Manages LLDP configuration on HUAWEI CloudEngine switches.
=======================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_lldp`.
New in version 0.2.0: of community.network
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages LLDP configuration on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bind\_name** string | | Binding interface name. |
| **fast\_count** integer | | The number of LLDP messages sent to the neighbor nodes by the specified device. |
| **hold\_multiplier** integer | | Time multiplier for device information in neighbor devices. |
| **interval** integer | | Frequency at which LLDP advertisements are sent (in seconds). |
| **lldpenable** string | **Choices:*** enabled
* disabled
| Set global LLDP enable state. |
| **management\_address** string | | The management IP address of LLDP. |
| **mdn\_notification\_interval** integer | | Delay time for sending MDN neighbor information change alarm. |
| **mdnstatus** string | **Choices:*** rxOnly
* disabled
| Set global MDN enable state. |
| **notification\_interval** integer | | Suppression time for sending LLDP alarm. |
| **restart\_delay** integer | | Specifies the delay time of the interface LLDP module from disabled state to re enable. |
| **state** string | **Choices:*** **present** β
* absent
| Manage the state of the resource. |
| **transmit\_delay** integer | | Delay time for sending LLDP messages. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: "Configure global LLDP enable state"
community.network.ce_lldp:
lldpenable: enabled
- name: "Configure global MDN enable state"
community.network.ce_lldp:
mdnstatus: rxOnly
- name: "Configure LLDP transmit interval and ensure global LLDP state is already enabled"
community.network.ce_lldp:
enable: enable
interval: 32
- name: "Configure LLDP transmit multiplier hold and ensure global LLDP state is already enabled"
community.network.ce_lldp:
enable: enable
hold_multiplier: 5
- name: "Configure the delay time of the interface LLDP module from disabled state to re enable"
community.network.ce_lldp:
enable: enable
restart_delay: 3
- name: "Reset the delay time for sending LLDP messages"
community.network.ce_lldp:
enable: enable
transmit_delay: 4
- name: "Configure device to send neighbor device information change alarm delay time"
community.network.ce_lldp:
lldpenable: enabled
notification_interval: 6
- name: "Configure the number of LLDP messages sent to the neighbor nodes by the specified device"
community.network.ce_lldp:
enable: enable
fast_count: 5
- name: "Configure the delay time for sending MDN neighbor information change alarm"
community.network.ce_lldp:
enable: enable
mdn_notification_interval: 6
- name: "Configuring the management IP address of LLDP"
community.network.ce_lldp:
enable: enable
management_address: 10.1.0.1
- name: "Configuring LLDP to manage the binding relationship between IP addresses and interfaces"
community.network.ce_lldp:
enable: enable
bind_name: LoopBack2
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of global LLDP configuration after module execution. **Sample:** {'bind\_name': 'LoopBack2', 'fast\_count': '5', 'hold\_multiplier': '5', 'interval': '32', 'lldpenable': 'enabled', 'management\_address': '10.1.0.1', 'mdn\_notification\_interval': '6', 'mdnstatus': 'rxOnly', 'notification\_interval': '6', 'restart\_delay': '3', 'transmit\_delay': '4'} |
| **existing** dictionary | always | k/v pairs of existing global LLDP configuration. **Sample:** {'lldpenable': 'disabled', 'mdnstatus': 'disabled'} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'bind\_name': 'LoopBack2', 'fast\_count': '5', 'hold\_multiplier': '5', 'interval': '32', 'lldpenable': 'enabled', 'management\_address': '10.1.0.1', 'mdn\_notification\_interval': '6', 'mdnstatus': 'rxOnly', 'notification\_interval': '6', 'restart\_delay': '3', 'state': 'present', 'transmit\_delay': '4'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['lldp enable', 'lldp mdn enable', 'lldp transmit interval 32', 'lldp transmit multiplier 5', 'lldp restart 3', 'lldp transmit delay 4', 'lldp trap-interval 6', 'lldp fast-count 5', 'lldp mdn trap-interval 6', 'lldp management-address 10.1.0.1', 'lldp management-address bind interface LoopBack 2'] |
### Authors
* xuxiaowei0512 (@CloudEngine-Ansible)
ansible community.network.avi_gslbgeodbprofile β Module for setup of GslbGeoDbProfile Avi RESTful Object community.network.avi\_gslbgeodbprofile β Module for setup of GslbGeoDbProfile Avi RESTful Object
=================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_gslbgeodbprofile`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure GslbGeoDbProfile object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **description** string | | Field introduced in 17.1.1. |
| **entries** string | | List of geodb entries. An entry can either be a geodb file or an ip address group with geo properties. Field introduced in 17.1.1. |
| **is\_federated** boolean | **Choices:*** no
* yes
| This field indicates that this object is replicated across gslb federation. Field introduced in 17.1.3. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **name** string / required | | A user-friendly name for the geodb profile. Field introduced in 17.1.1. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. Field introduced in 17.1.1. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the geodb profile. Field introduced in 17.1.1. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create GslbGeoDbProfile object
community.network.avi_gslbgeodbprofile:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_gslbgeodbprofile
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | GslbGeoDbProfile (api/gslbgeodbprofile) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#e582978496918a828cc3c6d6d2dec3c6d0d7dec3c6d1ddde84938c8b8091928a978e96c3c6d1d3de868a88)>
ansible community.network.avi_networkprofile β Module for setup of NetworkProfile Avi RESTful Object community.network.avi\_networkprofile β Module for setup of NetworkProfile Avi RESTful Object
=============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_networkprofile`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure NetworkProfile object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **connection\_mirror** boolean | **Choices:*** no
* yes
| When enabled, avi mirrors all tcp fastpath connections to standby. Applicable only in legacy ha mode. Field introduced in 18.1.3,18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **description** string | | User defined description for the object. |
| **name** string / required | | The name of the network profile. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **profile** string / required | | Networkprofileunion settings for networkprofile. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the network profile. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create a network profile for an UDP application
community.network.avi_networkprofile:
controller: '{{ controller }}'
username: '{{ username }}'
password: '{{ password }}'
name: System-UDP-Fast-Path
profile:
type: PROTOCOL_TYPE_UDP_FAST_PATH
udp_fast_path_profile:
per_pkt_loadbalance: false
session_idle_timeout: 10
snat: true
tenant_ref: admin
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | NetworkProfile (api/networkprofile) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#ec8b9e8d9f98838b85cacfdfdbd7cacfd9ded7cacfd8d4d78d9a858289989b839e879fcacfd8dad78f8381)>
ansible community.network.avi_gslb β Module for setup of Gslb Avi RESTful Object community.network.avi\_gslb β Module for setup of Gslb Avi RESTful Object
=========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_gslb`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure Gslb object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **async\_interval** string | | Frequency with which messages are propagated to vs mgr. Value of 0 disables async behavior and rpc are sent inline. Allowed values are 0-5. Field introduced in 18.2.3. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **clear\_on\_max\_retries** string | | Max retries after which the remote site is treated as a fresh start. In fresh start all the configs are downloaded. Allowed values are 1-1024. Default value when not specified in API or module is interpreted by Avi Controller as 20. |
| **client\_ip\_addr\_group** string | | Group to specify if the client ip addresses are public or private. Field introduced in 17.1.2. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **description** string | | User defined description for the object. |
| **dns\_configs** string | | Sub domain configuration for the gslb. Gslb service's fqdn must be a match one of these subdomains. |
| **is\_federated** boolean | **Choices:*** no
* yes
| This field indicates that this object is replicated across gslb federation. Field introduced in 17.1.3. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **leader\_cluster\_uuid** string / required | | Mark this site as leader of gslb configuration. This site is the one among the avi sites. |
| **maintenance\_mode** boolean | **Choices:*** no
* yes
| This field disables the configuration operations on the leader for all federated objects. Cud operations on gslb, gslbservice, gslbgeodbprofile and other federated objects will be rejected. The rest-api disabling helps in upgrade scenarios where we don't want configuration sync operations to the gslb member when the member is being upgraded. This configuration programmatically blocks the leader from accepting new gslb configuration when member sites are undergoing upgrade. Field introduced in 17.2.1. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **name** string / required | | Name for the gslb object. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **send\_interval** string | | 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. |
| **send\_interval\_prior\_to\_maintenance\_mode** string | | The user can specify a send-interval while entering maintenance mode. The validity of this 'maintenance send-interval' is only during maintenance mode. When the user leaves maintenance mode, the original send-interval is reinstated. This internal variable is used to store the original send-interval. Field introduced in 18.2.3. |
| **sites** string | | Select avi site member belonging to this gslb. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **third\_party\_sites** string | | Third party site member belonging to this gslb. Field introduced in 17.1.1. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the gslb object. |
| **view\_id** string | | The view-id is used in change-leader mode to differentiate partitioned groups while they have the same gslb namespace. Each partitioned group will be able to operate independently by using the view-id. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create Gslb object
community.network.avi_gslb:
name: "test-gslb"
avi_credentials:
username: '{{ username }}'
password: '{{ password }}'
controller: '{{ controller }}'
sites:
- name: "test-site1"
username: "gslb_username"
password: "gslb_password"
ip_addresses:
- type: "V4"
addr: "10.10.28.83"
enabled: True
member_type: "GSLB_ACTIVE_MEMBER"
port: 443
cluster_uuid: "cluster-d4ee5fcc-3e0a-4d4f-9ae6-4182bc605829"
- name: "test-site2"
username: "gslb_username"
password: "gslb_password"
ip_addresses:
- type: "V4"
addr: "10.10.28.86"
enabled: True
member_type: "GSLB_ACTIVE_MEMBER"
port: 443
cluster_uuid: "cluster-0c37ae8d-ab62-410c-ad3e-06fa831950b1"
dns_configs:
- domain_name: "test1.com"
- domain_name: "test2.com"
leader_cluster_uuid: "cluster-d4ee5fcc-3e0a-4d4f-9ae6-4182bc605829"
- name: Update Gslb site's configurations (Patch Add Operation)
community.network.avi_gslb:
avi_credentials:
username: '{{ username }}'
password: '{{ password }}'
controller: '{{ controller }}'
avi_api_update_method: patch
avi_api_patch_op: add
leader_cluster_uuid: "cluster-d4ee5fcc-3e0a-4d4f-9ae6-4182bc605829"
name: "test-gslb"
dns_configs:
- domain_name: "temp1.com"
- domain_name: "temp2.com"
gslb_sites_config:
- ip_addr: "10.10.28.83"
dns_vses:
- dns_vs_uuid: "virtualservice-f2a711cd-5e78-473f-8f47-d12de660fd62"
domain_names:
- "test1.com"
- "test2.com"
- ip_addr: "10.10.28.86"
dns_vses:
- dns_vs_uuid: "virtualservice-c1a63a16-f2a1-4f41-aab4-1e90f92a5e49"
domain_names:
- "temp1.com"
- "temp2.com"
- name: Update Gslb site's configurations (Patch Replace Operation)
community.network.avi_gslb:
avi_credentials:
username: "{{ username }}"
password: "{{ password }}"
controller: "{{ controller }}"
# On basis of cluster leader uuid dns_configs is set for that particular leader cluster
leader_cluster_uuid: "cluster-84aa795f-8f09-42bb-97a4-5103f4a53da9"
name: "test-gslb"
avi_api_update_method: patch
avi_api_patch_op: replace
dns_configs:
- domain_name: "test3.com"
- domain_name: "temp3.com"
gslb_sites_config:
# Ip address is mapping key for dns_vses field update. For the given IP address,
# dns_vses is updated.
- ip_addr: "10.10.28.83"
dns_vses:
- dns_vs_uuid: "virtualservice-7c947ed4-77f3-4a52-909c-4f12afaf5bb0"
domain_names:
- "test3.com"
- ip_addr: "10.10.28.86"
dns_vses:
- dns_vs_uuid: "virtualservice-799b2c6d-7f2d-4c3f-94c6-6e813b20b674"
domain_names:
- "temp3.com"
- name: Update Gslb site's configurations (Patch Delete Operation)
community.network.avi_gslb:
avi_credentials:
username: "{{ username }}"
password: "{{ password }}"
controller: "{{ controller }}"
# On basis of cluster leader uuid dns_configs is set for that particular leader cluster
leader_cluster_uuid: "cluster-84aa795f-8f09-42bb-97a4-5103f4a53da9"
name: "test-gslb"
avi_api_update_method: patch
avi_api_patch_op: delete
dns_configs:
gslb_sites_config:
- ip_addr: "10.10.28.83"
- ip_addr: "10.10.28.86"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | Gslb (api/gslb) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#a4c3d6c5d7d0cbc3cd828797939f828791969f8287909c9fc5d2cdcac1d0d3cbd6cfd7828790929fc7cbc9)>
| programming_docs |
ansible community.network.pn_prefix_list_network β CLI command to add/remove prefix-list-network community.network.pn\_prefix\_list\_network β CLI command to add/remove prefix-list-network
===========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_prefix_list_network`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to add network associated with prefix list and remove networks associated with prefix list.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_name** string | | Prefix List Name. |
| **pn\_netmask** string | | netmask of the network associated the prefix list. |
| **pn\_network** string | | network associated with the prefix list. |
| **state** string / required | **Choices:*** present
* absent
| State the action to perform. Use `present` to create prefix-list-network and `absent` to delete prefix-list-network. |
Examples
--------
```
- name: Prefix list network add
community.network.pn_prefix_list_network:
pn_cliswitch: "sw01"
pn_name: "foo"
pn_network: "172.16.3.1"
pn_netmask: "24"
state: "present"
- name: Prefix list network remove
community.network.pn_prefix_list_network:
pn_cliswitch: "sw01"
state: "absent"
pn_name: "foo"
pn_network: "172.16.3.1"
pn_netmask: "24"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the prefix-list-network command. |
| **stdout** list / elements=string | always | set of responses from the prefix-list-network command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.avi_applicationprofile β Module for setup of ApplicationProfile Avi RESTful Object community.network.avi\_applicationprofile β Module for setup of ApplicationProfile Avi RESTful Object
=====================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_applicationprofile`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure ApplicationProfile object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **cloud\_config\_cksum** string | | Checksum of application profiles. Internally set by cloud connector. Field introduced in 17.2.14, 18.1.5, 18.2.1. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **created\_by** string | | Name of the application profile creator. Field introduced in 17.2.14, 18.1.5, 18.2.1. |
| **description** string | | User defined description for the object. |
| **dns\_service\_profile** string | | Specifies various dns service related controls for virtual service. |
| **dos\_rl\_profile** string | | Specifies various security related controls for virtual service. |
| **http\_profile** string | | Specifies the http application proxy profile parameters. |
| **name** string / required | | The name of the application profile. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **preserve\_client\_ip** boolean | **Choices:*** no
* yes
| Specifies if client ip needs to be preserved for backend connection. Not compatible with connection multiplexing. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **preserve\_client\_port** boolean | **Choices:*** no
* yes
| Specifies if we need to preserve client port while preserving client ip for backend connections. Field introduced in 17.2.7. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **sip\_service\_profile** string | | Specifies various sip service related controls for virtual service. Field introduced in 17.2.8, 18.1.3, 18.2.1. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tcp\_app\_profile** string | | Specifies the tcp application proxy profile parameters. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **type** string / required | | Specifies which application layer proxy is enabled for the virtual service. Enum options - APPLICATION\_PROFILE\_TYPE\_L4, APPLICATION\_PROFILE\_TYPE\_HTTP, APPLICATION\_PROFILE\_TYPE\_SYSLOG, APPLICATION\_PROFILE\_TYPE\_DNS, APPLICATION\_PROFILE\_TYPE\_SSL, APPLICATION\_PROFILE\_TYPE\_SIP. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the application profile. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create an Application Profile for HTTP application enabled for SSL traffic
community.network.avi_applicationprofile:
controller: '{{ controller }}'
username: '{{ username }}'
password: '{{ password }}'
http_profile:
cache_config:
age_header: true
aggressive: false
date_header: true
default_expire: 600
enabled: false
heuristic_expire: false
max_cache_size: 0
max_object_size: 4194304
mime_types_group_refs:
- admin:System-Cacheable-Resource-Types
min_object_size: 100
query_cacheable: false
xcache_header: true
client_body_timeout: 0
client_header_timeout: 10000
client_max_body_size: 0
client_max_header_size: 12
client_max_request_size: 48
compression_profile:
compressible_content_ref: admin:System-Compressible-Content-Types
compression: false
remove_accept_encoding_header: true
type: AUTO_COMPRESSION
connection_multiplexing_enabled: true
hsts_enabled: false
hsts_max_age: 365
http_to_https: false
httponly_enabled: false
keepalive_header: false
keepalive_timeout: 30000
max_bad_rps_cip: 0
max_bad_rps_cip_uri: 0
max_bad_rps_uri: 0
max_rps_cip: 0
max_rps_cip_uri: 0
max_rps_unknown_cip: 0
max_rps_unknown_uri: 0
max_rps_uri: 0
post_accept_timeout: 30000
secure_cookie_enabled: false
server_side_redirect_to_https: false
spdy_enabled: false
spdy_fwd_proxy_mode: false
ssl_client_certificate_mode: SSL_CLIENT_CERTIFICATE_NONE
ssl_everywhere_enabled: false
websockets_enabled: true
x_forwarded_proto_enabled: false
xff_alternate_name: X-Forwarded-For
xff_enabled: true
name: System-HTTP
tenant_ref: admin
type: APPLICATION_PROFILE_TYPE_HTTP
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | ApplicationProfile (api/applicationprofile) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#92f5e0f3e1e6fdf5fbb4b1a1a5a9b4b1a7a0a9b4b1a6aaa9f3e4fbfcf7e6e5fde0f9e1b4b1a6a4a9f1fdff)>
ansible community.network.ce_dldp β Manages global DLDP configuration on HUAWEI CloudEngine switches. community.network.ce\_dldp β Manages global DLDP configuration on HUAWEI CloudEngine switches.
==============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_dldp`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages global DLDP configuration on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_mode** string | **Choices:*** md5
* simple
* sha
* hmac-sha256
* none
| Specifies authentication algorithm of DLDP. |
| **auth\_pwd** string | | Specifies authentication password. The value is a string of 1 to 16 case-sensitive plaintexts or 24/32/48/108/128 case-sensitive encrypted characters. The string excludes a question mark (?). |
| **enable** string | **Choices:*** enable
* disable
| Set global DLDP enable state. |
| **reset** string | **Choices:*** enable
* disable
| Specify whether reset DLDP state of disabled interfaces. |
| **time\_internal** string | | Specifies the interval for sending Advertisement packets. The value is an integer ranging from 1 to 100, in seconds. The default interval for sending Advertisement packets is 5 seconds. |
| **work\_mode** string | **Choices:*** enhance
* normal
| Set global DLDP work-mode. |
Notes
-----
Note
* The relevant configurations will be deleted if DLDP is disabled using enable=disable.
* When using auth\_mode=none, it will restore the default DLDP authentication mode. By default, DLDP packets are not authenticated.
* By default, the working mode of DLDP is enhance, so you are advised to use work\_mode=enhance to restore default DLDP working mode.
* The default interval for sending Advertisement packets is 5 seconds, so you are advised to use time\_interval=5 to restore default DLDP interval.
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: DLDP test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Configure global DLDP enable state"
community.network.ce_dldp:
enable: enable
provider: "{{ cli }}"
- name: "Configure DLDP work-mode and ensure global DLDP state is already enabled"
community.network.ce_dldp:
enable: enable
work_mode: normal
provider: "{{ cli }}"
- name: "Configure advertisement message time interval in seconds and ensure global DLDP state is already enabled"
community.network.ce_dldp:
enable: enable
time_interval: 6
provider: "{{ cli }}"
- name: "Configure a DLDP authentication mode and ensure global DLDP state is already enabled"
community.network.ce_dldp:
enable: enable
auth_mode: md5
auth_pwd: abc
provider: "{{ cli }}"
- name: "Reset DLDP state of disabled interfaces and ensure global DLDP state is already enabled"
community.network.ce_dldp:
enable: enable
reset: enable
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of global DLDP configuration after module execution **Sample:** {'enable': 'enable', 'reset': 'enable', 'time\_internal': '12', 'work\_mode': 'normal'} |
| **existing** dictionary | always | k/v pairs of existing global DLDP configuration **Sample:** {'enable': 'disable', 'reset': 'disable', 'time\_internal': '5', 'work\_mode': 'enhance'} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'enable': 'enable', 'reset': 'enable', 'time\_internal': '12', 'work\_mode': 'normal'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['dldp enable', 'dldp work-mode normal', 'dldp interval 12', 'dldp reset'] |
### Authors
* Zhijin Zhou (@QijunPan)
ansible community.network.ce_stp β Manages STP configuration on HUAWEI CloudEngine switches. community.network.ce\_stp β Manages STP configuration on HUAWEI CloudEngine switches.
=====================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_stp`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages STP configurations on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bpdu\_filter** string | **Choices:*** enable
* disable
| Specify a port as a BPDU filter port. |
| **bpdu\_protection** string | **Choices:*** enable
* disable
| Configure BPDU protection on an edge port. This function prevents network flapping caused by attack packets. |
| **cost** string | | Set the path cost of the current port. The default instance is 0. |
| **edged\_port** string | **Choices:*** enable
* disable
| Set the current port as an edge port. |
| **interface** string | | Interface name. If the value is `all`, will apply configuration to all interfaces. if the value is a special name, only support input the full name. |
| **loop\_protection** string | **Choices:*** enable
* disable
| Enable loop protection on the current port. |
| **root\_protection** string | **Choices:*** enable
* disable
| Enable root protection on the current port. |
| **state** string | **Choices:*** **present** β
* absent
| Specify desired state of the resource. |
| **stp\_converge** string | **Choices:*** fast
* normal
| STP convergence mode. Fast means set STP aging mode to Fast. Normal means set STP aging mode to Normal. |
| **stp\_enable** string | **Choices:*** enable
* disable
| Enable or disable STP on a switch. |
| **stp\_mode** string | **Choices:*** stp
* rstp
* mstp
| Set an operation mode for the current MSTP process. The mode can be STP, RSTP, or MSTP. |
| **tc\_protection** string | **Choices:*** enable
* disable
| Configure the TC BPDU protection function for an MSTP process. |
| **tc\_protection\_interval** string | | Set the time the MSTP device takes to handle the maximum number of TC BPDUs and immediately refresh forwarding entries. The value is an integer ranging from 1 to 600, in seconds. |
| **tc\_protection\_threshold** string | | Set the maximum number of TC BPDUs that the MSTP can handle. The value is an integer ranging from 1 to 255. The default value is 1 on the switch. |
Notes
-----
Note
* Recommended connection is `network_cli`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: CloudEngine stp test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Config stp mode"
community.network.ce_stp:
state: present
stp_mode: stp
provider: "{{ cli }}"
- name: "Undo stp mode"
community.network.ce_stp:
state: absent
stp_mode: stp
provider: "{{ cli }}"
- name: "Enable bpdu protection"
community.network.ce_stp:
state: present
bpdu_protection: enable
provider: "{{ cli }}"
- name: "Disable bpdu protection"
community.network.ce_stp:
state: present
bpdu_protection: disable
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution **Sample:** {'bpdu\_protection': 'enable'} |
| **existing** dictionary | always | k/v pairs of existing aaa server **Sample:** {'bpdu\_protection': 'disable'} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'bpdu\_protection': 'enable', 'state': 'present'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['stp bpdu-protection'] |
### Authors
* wangdezhuang (@QijunPan)
| programming_docs |
ansible community.network.netvisor β Use netvisor cliconf to run command on Pluribus netvisor platform community.network.netvisor β Use netvisor cliconf to run command on Pluribus netvisor platform
==============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.netvisor`.
Synopsis
--------
* This netvisor plugin provides low level abstraction apis for sending and receiving CLI commands from Pluribus netvisor devices.
### Authors
* Unknown (!UNKNOWN)
ansible community.network.netscaler_ssl_certkey β Manage ssl certificate keys. community.network.netscaler\_ssl\_certkey β Manage ssl certificate keys.
========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.netscaler_ssl_certkey`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage ssl certificate keys.
Requirements
------------
The below requirements are needed on the host that executes this module.
* nitro python sdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cert** string | | Name of and, optionally, path to the X509 certificate file that is used to form the certificate-key pair. The certificate file should be present on the appliance's hard-disk drive or solid-state drive. Storing a certificate in any location other than the default might cause inconsistency in a high availability setup. /nsconfig/ssl/ is the default path. Minimum length = 1 |
| **certkey** string | | Name for the certificate and private-key pair. Must begin with an ASCII alphanumeric or underscore `_` character, and must contain only ASCII alphanumeric, underscore `_`, hash `#`, period `.`, space , colon `:`, at `@`, equals `=`, and hyphen `-` characters. Cannot be changed after the certificate-key pair is created. The following requirement applies only to the NetScaler CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my cert" or 'my cert'). Minimum length = 1 |
| **expirymonitor** string | **Choices:*** enabled
* disabled
| Issue an alert when the certificate is about to expire. |
| **inform** string | **Choices:*** DER
* PEM
* PFX
| Input format of the certificate and the private-key files. The three formats supported by the appliance are: PEM - Privacy Enhanced Mail DER - Distinguished Encoding Rule PFX - Personal Information Exchange. |
| **key** string | | Name of and, optionally, path to the private-key file that is used to form the certificate-key pair. The certificate file should be present on the appliance's hard-disk drive or solid-state drive. Storing a certificate in any location other than the default might cause inconsistency in a high availability setup. /nsconfig/ssl/ is the default path. Minimum length = 1 |
| **nitro\_pass** string / required | | The password with which to authenticate to the netscaler node. |
| **nitro\_protocol** string | **Choices:*** **http** β
* https
| Which protocol to use when accessing the nitro API objects. |
| **nitro\_timeout** float | **Default:**310 | Time in seconds until a timeout error is thrown when establishing a new session with Netscaler |
| **nitro\_user** string / required | | The username with which to authenticate to the netscaler node. |
| **notificationperiod** string | | Time, in number of days, before certificate expiration, at which to generate an alert that the certificate is about to expire. Minimum value = `10`
Maximum value = `100`
|
| **nsip** string / required | | The ip address of the netscaler appliance where the nitro API calls will be made. The port can be specified with the colon (:). E.g. 192.168.1.1:555. |
| **passplain** string | | Pass phrase used to encrypt the private-key. Required when adding an encrypted private-key in PEM format. Minimum length = 1 |
| **password** string | | Passphrase that was used to encrypt the private-key. Use this option to load encrypted private-keys in PEM format. |
| **save\_config** boolean | **Choices:*** no
* **yes** β
| If `yes` the module will save the configuration on the netscaler node if it makes any changes. The module will not save the configuration on the netscaler node if it made no changes. |
| **state** string | **Choices:*** absent
* **present** β
| The state of the resource being configured by the module on the netscaler node. When present the resource will be created if needed and configured according to the module's parameters. When absent the resource will be deleted from the netscaler node. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* For more information on using Ansible to manage Citrix NetScaler Network devices see <https://www.ansible.com/ansible-netscaler>.
Examples
--------
```
- name: Setup ssl certkey
delegate_to: localhost
community.network.netscaler_ssl_certkey:
nitro_user: nsroot
nitro_pass: nsroot
nsip: 172.18.0.2
certkey: certirificate_1
cert: server.crt
key: server.key
expirymonitor: enabled
notificationperiod: 30
inform: PEM
password: False
passplain: somesecret
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **diff** dictionary | failure | List of differences between the actual configured object and the configuration specified in the module **Sample:** { 'targetlbvserver': 'difference. ours: (str) server1 other: (str) server2' } |
| **loglines** list / elements=string | always | list of logged messages by the module **Sample:** ['message 1', 'message 2'] |
| **msg** string | failure | Message detailing the failure reason **Sample:** Action does not exist |
### Authors
* George Nikolopoulos (@giorgos-nikolopoulos)
ansible community.network.pn_access_list_ip β CLI command to add/remove access-list-ip community.network.pn\_access\_list\_ip β CLI command to add/remove access-list-ip
=================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_access_list_ip`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This modules can be used to add and remove IPs associated with access list.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_ip** string | **Default:**"::" | IP associated with the access list. |
| **pn\_name** string | | Access List Name. |
| **state** string / required | **Choices:*** present
* absent
| State the action to perform. Use 'present' to add access-list-ip and 'absent' to remove access-list-ip. |
Examples
--------
```
- name: Access list ip functionality
community.network.pn_access_list_ip:
pn_cliswitch: "sw01"
pn_name: "foo"
pn_ip: "172.16.3.1"
state: "present"
- name: Access list ip functionality
community.network.pn_access_list_ip:
pn_cliswitch: "sw01"
pn_name: "foo"
pn_ip: "172.16.3.1"
state: "absent"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the access-list-ip command. |
| **stdout** list / elements=string | always | set of responses from the access-list-ip command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.slxos_command β Run commands on remote devices running Extreme Networks SLX-OS community.network.slxos\_command β Run commands on remote devices running Extreme Networks SLX-OS
=================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.slxos_command`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Sends arbitrary commands to an SLX node and returns the results read from the device. This module includes an argument that will cause the module to wait for a specific condition before returning or timing out if the condition is not met.
* This module does not support running commands in configuration mode. Please use [community.network.slxos\_config](slxos_config_module#ansible-collections-community-network-slxos-config-module) to configure SLX-OS devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **commands** string / required | | List of commands to send to the remote SLX-OS device over the configured provider. The resulting output from the command is returned. If the *wait\_for* argument is provided, the module is not returned until the condition is satisfied or the number of retries has expired. |
| **interval** string | **Default:**1 | Configures the interval in seconds to wait between retries of the command. If the command does not pass the specified conditions, the interval indicates how long to wait before trying the command again. |
| **match** string | **Choices:*** any
* **all** β
| The *match* argument is used in conjunction with the *wait\_for* argument to specify the match policy. Valid values are `all` or `any`. If the value is set to `all` then all conditionals in the wait\_for must be satisfied. If the value is set to `any` then only one of the values must be satisfied. |
| **retries** string | **Default:**10 | Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the *wait\_for* conditions. |
| **wait\_for** string | | List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples. |
Notes
-----
Note
* Tested against SLX-OS 17s.1.02
* If a command sent to the device requires answering a prompt, it is possible to pass a dict containing *command*, *answer* and *prompt*. See examples.
Examples
--------
```
tasks:
- name: Run show version on remote devices
community.network.slxos_command:
commands: show version
- name: Run show version and check to see if output contains SLX
community.network.slxos_command:
commands: show version
wait_for: result[0] contains SLX
- name: Run multiple commands on remote nodes
community.network.slxos_command:
commands:
- show version
- show interfaces
- name: Run multiple commands and evaluate the output
community.network.slxos_command:
commands:
- show version
- show interface status
wait_for:
- result[0] contains SLX
- result[1] contains Eth
- name: Run command that requires answering a prompt
community.network.slxos_command:
commands:
- command: 'clear sessions'
prompt: 'This operation will logout all the user sessions. Do you want to continue (yes/no)?:'
answer: y
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **failed\_conditions** list / elements=string | failed | The list of conditionals that have failed **Sample:** ['...', '...'] |
| **stdout** list / elements=string | always apart from low level errors (such as action plugin) | The set of responses from the commands **Sample:** ['...', '...'] |
| **stdout\_lines** list / elements=string | always apart from low level errors (such as action plugin) | The value of stdout split into a list **Sample:** [['...', '...'], ['...'], ['...']] |
### Authors
* Lindsay Hill (@LindsayHill)
ansible community.network.ftd_file_download β Downloads files from Cisco FTD devices over HTTP(S) community.network.ftd\_file\_download β Downloads files from Cisco FTD devices over HTTP(S)
===========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ftd_file_download`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Downloads files from Cisco FTD devices including pending changes, disk files, certificates, troubleshoot reports, and backups.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **destination** path / required | | Absolute path of where to download the file to. If destination is a directory, the module uses a filename from 'Content-Disposition' header specified by the server. |
| **operation** string / required | | The name of the operation to execute. Only operations that return a file can be used in this module. |
| **path\_params** dictionary | | Key-value pairs that should be sent as path parameters in a REST API call. |
Examples
--------
```
- name: Download pending changes
community.network.ftd_file_download:
operation: 'getdownload'
path_params:
objId: 'default'
destination: /tmp/
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | error | The error message describing why the module failed. |
### Authors
* Cisco Systems, Inc. (@annikulin)
ansible community.network.pn_fabric_local β CLI command to modify fabric-local community.network.pn\_fabric\_local β CLI command to modify fabric-local
========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_fabric_local`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to modify fabric local information.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_cliswitch** string / required | | Target switch to run the CLI on. |
| **pn\_control\_network** string | **Choices:*** in-band
* mgmt
* vmgmt
| control plane network. |
| **pn\_fabric\_advertisement\_network** string | **Choices:*** inband-mgmt
* inband-only
* inband-vmgmt
* mgmt-only
| network to send fabric advertisements on. |
| **pn\_fabric\_network** string | **Choices:*** in-band
* **mgmt** β
* vmgmt
| fabric administration network. |
| **pn\_vlan** string | | VLAN assigned to fabric. |
| **state** string | **Choices:*** **update** β
| State the action to perform. Use `update` to modify the fabric-local. |
Examples
--------
```
- name: Fabric local module
community.network.pn_fabric_local:
pn_cliswitch: "sw01"
pn_vlan: "500"
- name: Fabric local module
community.network.pn_fabric_local:
pn_cliswitch: "sw01"
pn_fabric_advertisement_network: "mgmt-only"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the fabric-local command. |
| **stdout** list / elements=string | always | set of responses from the fabric-local command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.slxos_l3_interface β Manage L3 interfaces on Extreme Networks SLX-OS network devices. community.network.slxos\_l3\_interface β Manage L3 interfaces on Extreme Networks SLX-OS network devices.
=========================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.slxos_l3_interface`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of L3 interfaces on slxos network devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate** string | | List of L3 interfaces definitions. Each of the entry in aggregate list should define name of interface `name` and a optional `ipv4` or `ipv6` address. |
| **ipv4** string | | IPv4 address to be set for the L3 interface mentioned in *name* option. The address format is <ipv4 address>/<mask>, the mask is number in range 0-32 eg. 192.168.0.1/24 |
| **ipv6** string | | IPv6 address to be set for the L3 interface mentioned in *name* option. The address format is <ipv6 address>/<mask>, the mask is number in range 0-128 eg. fd5d:12c9:2201:1::1/64 |
| **name** string | | Name of the L3 interface to be configured eg. Ethernet 0/2 |
| **state** string | **Choices:*** **present** β
* absent
| State of the L3 interface configuration. It indicates if the configuration should be present or absent on remote device. |
Notes
-----
Note
* Tested against slxos 15.2
Examples
--------
```
- name: Remove Ethernet 0/3 IPv4 and IPv6 address
community.network.slxos_l3_interface:
name: Ethernet 0/3
state: absent
- name: Set Ethernet 0/3 IPv4 address
community.network.slxos_l3_interface:
name: Ethernet 0/3
ipv4: 192.168.0.1/24
- name: Set Ethernet 0/3 IPv6 address
community.network.slxos_l3_interface:
name: Ethernet 0/3
ipv6: "fd5d:12c9:2201:1::1/64"
- name: Set IP addresses on aggregate
community.network.slxos_l3_interface:
aggregate:
- { name: Ethernet 0/3, ipv4: 192.168.2.10/24 }
- { name: Ethernet 0/3, ipv4: 192.168.3.10/24, ipv6: "fd5d:12c9:2201:1::1/64" }
- name: Remove IP addresses on aggregate
community.network.slxos_l3_interface:
aggregate:
- { name: Ethernet 0/3, ipv4: 192.168.2.10/24 }
- { name: Ethernet 0/3, ipv4: 192.168.3.10/24, ipv6: "fd5d:12c9:2201:1::1/64" }
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device **Sample:** ['interface Ethernet 0/2', 'ip address 192.168.0.1/24', 'ipv6 address fd5d:12c9:2201:1::1/64'] |
### Authors
* Matthew Stone (@bigmstone)
| programming_docs |
ansible community.network.a10_server_axapi3 β Manage A10 Networks AX/SoftAX/Thunder/vThunder devices community.network.a10\_server\_axapi3 β Manage A10 Networks AX/SoftAX/Thunder/vThunder devices
==============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.a10_server_axapi3`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage SLB (Server Load Balancer) server objects on A10 Networks devices via aXAPIv3.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **client\_cert** path | | PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, `client_key` is not required. |
| **client\_key** path | | PEM formatted file that contains your private key to be used for SSL client authentication. If `client_cert` contains both the certificate and key, this option is not required. |
| **force** boolean | **Choices:*** **no** β
* yes
| If `yes` do not get a cached copy. Alias `thirsty` has been deprecated and will be removed in 2.13.
aliases: thirsty |
| **force\_basic\_auth** boolean | **Choices:*** **no** β
* yes
| Credentials specified with *url\_username* and *url\_password* should be passed in HTTP Header. |
| **host** string / required | | Hostname or IP of the A10 Networks device. |
| **http\_agent** string | **Default:**"ansible-httpget" | Header to identify as, generally appears in web server logs. |
| **operation** string | **Choices:*** **create** β
* update
* remove
| Create, Update or Remove SLB server. For create and update operation, we use the IP address and server name specified in the POST message. For delete operation, we use the server name in the request URI. |
| **password** string / required | | Password for the `username` account.
aliases: pass, pwd |
| **server\_ip** string / required | | The SLB (Server Load Balancer) server IPv4 address.
aliases: ip, address |
| **server\_name** string / required | | The SLB (Server Load Balancer) server name.
aliases: server |
| **server\_ports** string | | A list of ports to create for the server. Each list item should be a dictionary which specifies the `port:` and `protocol:`.
aliases: port |
| **server\_status** string | **Choices:*** **enable** β
* disable
| The SLB (Server Load Balancer) virtual server status.
aliases: action |
| **url** string | | HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path |
| **url\_password** string | | The password for use in HTTP basic authentication. If the *url\_username* parameter is not specified, the *url\_password* parameter will not be used. |
| **url\_username** string | | The username for use in HTTP basic authentication. This parameter can be used without *url\_password* for sites that allow empty passwords |
| **use\_gssapi** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication. Requires the Python library [gssapi](https://github.com/pythongssapi/python-gssapi) to be installed. Credentials for GSSAPI can be specified with *url\_username*/*url\_password* or with the GSSAPI env var `KRB5CCNAME` that specified a custom Kerberos credential cache. NTLM authentication is `not` supported even if the GSSAPI mech for NTLM has been installed. |
| **use\_proxy** boolean | **Choices:*** no
* **yes** β
| If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. |
| **username** string / required | | An account with administrator privileges.
aliases: admin, user |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled devices using self-signed certificates. |
| **write\_config** boolean | **Choices:*** **no** β
* yes
| If `yes`, any changes will cause a write of the running configuration to non-volatile memory. This will save *all* configuration changes, including those that may have been made manually or through other modules, so care should be taken when specifying `yes`. |
Notes
-----
Note
* Requires A10 Networks aXAPI 2.1.
Examples
--------
```
- name: Create a new server
a10_server:
host: a10.mydomain.com
username: myadmin
password: mypassword
server: test
server_ip: 1.1.1.100
validate_certs: false
server_status: enable
write_config: yes
operation: create
server_ports:
- port-number: 8080
protocol: tcp
action: enable
- port-number: 8443
protocol: TCP
```
### Authors
* Eric Chou (@ericchou1)
ansible community.network.pn_cpu_mgmt_class β CLI command to modify cpu-mgmt-class community.network.pn\_cpu\_mgmt\_class β CLI command to modify cpu-mgmt-class
=============================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_cpu_mgmt_class`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can we used to update mgmt port ingress policers.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_burst\_size** string | | ingress traffic burst size (bytes) or default. |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_name** string | **Choices:*** arp
* icmp
* ssh
* snmp
* fabric
* bcast
* nfs
* web
* web-ssl
* net-api
| mgmt port ingress traffic class. |
| **pn\_rate\_limit** string | | ingress rate limit on mgmt port(bps) or unlimited. |
| **state** string / required | **Choices:*** update
| State the action to perform. Use `update` to modify cpu-mgmt-class. |
Examples
--------
```
- name: Cpu mgmt class modify ingress policers
community.network.pn_cpu_mgmt_class:
pn_cliswitch: "sw01"
state: "update"
pn_name: "icmp"
pn_rate_limit: "10000"
pn_burst_size: "14000"
- name: Cpu mgmt class modify ingress policers
community.network.pn_cpu_mgmt_class:
pn_cliswitch: "sw01"
state: "update"
pn_name: "snmp"
pn_burst_size: "8000"
pn_rate_limit: "100000"
- name: Cpu mgmt class modify ingress policers
community.network.pn_cpu_mgmt_class:
pn_cliswitch: "sw01"
state: "update"
pn_name: "web"
pn_rate_limit: "10000"
pn_burst_size: "1000"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the cpu-mgmt-class command. |
| **stdout** list / elements=string | always | set of responses from the cpu-mgmt-class command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.pn_snmp_vacm β CLI command to create/modify/delete snmp-vacm community.network.pn\_snmp\_vacm β CLI command to create/modify/delete snmp-vacm
================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_snmp_vacm`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to create View Access Control Models (VACM), modify VACM and delete VACM.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_auth** boolean | **Choices:*** no
* yes
| authentication required. |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_oid\_restrict** string | | restrict OID. |
| **pn\_priv** boolean | **Choices:*** no
* yes
| privileges. |
| **pn\_user\_name** string | | SNMP administrator name. |
| **pn\_user\_type** string | **Choices:*** rouser
* rwuser
| SNMP user type. |
| **state** string / required | **Choices:*** present
* absent
* update
| State the action to perform. Use `present` to create snmp-vacm and `absent` to delete snmp-vacm and `update` to modify snmp-vacm. |
Examples
--------
```
- name: Create snmp vacm
community.network.pn_snmp_vacm:
pn_cliswitch: "sw01"
state: "present"
pn_user_name: "foo"
pn_user_type: "rouser"
- name: Update snmp vacm
community.network.pn_snmp_vacm:
pn_cliswitch: "sw01"
state: "update"
pn_user_name: "foo"
pn_user_type: "rwuser"
- name: Delete snmp vacm
community.network.pn_snmp_vacm:
pn_cliswitch: "sw01"
state: "absent"
pn_user_name: "foo"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the snmp-vacm command. |
| **stdout** list / elements=string | always | set of responses from the snmp-vacm command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.nos_facts β Collect facts from devices running Extreme NOS community.network.nos\_facts β Collect facts from devices running Extreme NOS
=============================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.nos_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Collects a base set of device facts from a remote device that is running NOS. This module prepends all of the base network fact keys with `ansible_net_<fact>`. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **gather\_subset** string | **Default:**"!config" | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, hardware, config, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial `!` to specify that a specific subset should not be collected. |
Notes
-----
Note
* Tested against NOS 7.2.0
Examples
--------
```
# Collect all facts from the device
- community.network.nos_facts:
gather_subset: all
# Collect only the config and default facts
- community.network.nos_facts:
gather_subset:
- config
# Do not collect hardware facts
- community.network.nos_facts:
gather_subset:
- "!hardware"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ansible\_net\_all\_ipv4\_addresses** list / elements=string | when interfaces is configured | All IPv4 addresses configured on the device |
| **ansible\_net\_all\_ipv6\_addresses** list / elements=string | when interfaces is configured | All Primary IPv6 addresses configured on the device |
| **ansible\_net\_config** string | when config is configured | The current active config from the device |
| **ansible\_net\_gather\_subset** list / elements=string | always | The list of fact subsets collected from the device |
| **ansible\_net\_hostname** string | always | The configured hostname of the device |
| **ansible\_net\_interfaces** dictionary | when interfaces is configured | A hash of all interfaces running on the system |
| **ansible\_net\_memfree\_mb** integer | when hardware is configured | The available free memory on the remote device in Mb |
| **ansible\_net\_memtotal\_mb** integer | when hardware is configured | The total memory on the remote device in Mb |
| **ansible\_net\_model** string | always | The model name returned from the device |
| **ansible\_net\_neighbors** dictionary | when interfaces is configured | The list of LLDP neighbors from the remote device |
| **ansible\_net\_serialnum** string | always | The serial number of the remote device |
| **ansible\_net\_version** string | always | The operating system version running on the remote device |
### Authors
* Lindsay Hill (@LindsayHill)
ansible community.network.avi_serverautoscalepolicy β Module for setup of ServerAutoScalePolicy Avi RESTful Object community.network.avi\_serverautoscalepolicy β Module for setup of ServerAutoScalePolicy Avi RESTful Object
===========================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_serverautoscalepolicy`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure ServerAutoScalePolicy object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **description** string | | User defined description for the object. |
| **intelligent\_autoscale** boolean | **Choices:*** no
* yes
| Use avi intelligent autoscale algorithm where autoscale is performed by comparing load on the pool against estimated capacity of all the servers. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **intelligent\_scalein\_margin** string | | Maximum extra capacity as percentage of load used by the intelligent scheme. Scalein is triggered when available capacity is more than this margin. Allowed values are 1-99. Default value when not specified in API or module is interpreted by Avi Controller as 40. |
| **intelligent\_scaleout\_margin** string | | Minimum extra capacity as percentage of load used by the intelligent scheme. Scaleout is triggered when available capacity is less than this margin. Allowed values are 1-99. Default value when not specified in API or module is interpreted by Avi Controller as 20. |
| **max\_scalein\_adjustment\_step** string | | Maximum number of servers to scalein simultaneously. The actual number of servers to scalein is chosen such that target number of servers is always more than or equal to the min\_size. Default value when not specified in API or module is interpreted by Avi Controller as 1. |
| **max\_scaleout\_adjustment\_step** string | | Maximum number of servers to scaleout simultaneously. The actual number of servers to scaleout is chosen such that target number of servers is always less than or equal to the max\_size. Default value when not specified in API or module is interpreted by Avi Controller as 1. |
| **max\_size** string | | Maximum number of servers after scaleout. Allowed values are 0-400. |
| **min\_size** string | | No scale-in happens once number of operationally up servers reach min\_servers. Allowed values are 0-400. |
| **name** string / required | | Name of the object. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **scalein\_alertconfig\_refs** string | | Trigger scalein when alerts due to any of these alert configurations are raised. It is a reference to an object of type alertconfig. |
| **scalein\_cooldown** string | | Cooldown period during which no new scalein is triggered to allow previous scalein to successfully complete. Default value when not specified in API or module is interpreted by Avi Controller as 300. |
| **scaleout\_alertconfig\_refs** string | | Trigger scaleout when alerts due to any of these alert configurations are raised. It is a reference to an object of type alertconfig. |
| **scaleout\_cooldown** string | | Cooldown period during which no new scaleout is triggered to allow previous scaleout to successfully complete. Default value when not specified in API or module is interpreted by Avi Controller as 300. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **use\_predicted\_load** boolean | **Choices:*** no
* yes
| Use predicted load rather than current load. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create ServerAutoScalePolicy object
community.network.avi_serverautoscalepolicy:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_serverautoscalepolicy
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | ServerAutoScalePolicy (api/serverautoscalepolicy) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#cfa8bdaebcbba0a8a6e9ecfcf8f4e9ecfafdf4e9ecfbf7f4aeb9a6a1aabbb8a0bda4bce9ecfbf9f4aca0a2)>
| programming_docs |
ansible community.network.icx_linkagg β Manage link aggregation groups on Ruckus ICX 7000 series switches community.network.icx\_linkagg β Manage link aggregation groups on Ruckus ICX 7000 series switches
==================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.icx_linkagg`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of link aggregation groups on Ruckus ICX network devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate** list / elements=string | | List of link aggregation definitions. |
| | **check\_running\_config** boolean | **Choices:*** no
* yes
| Check running configuration. This can be set as environment variable. Module will use environment variable value(default:True), unless it is overridden, by specifying it as module parameter. |
| | **group** integer | | Channel-group number for the port-channel Link aggregation group. Range 1-255 or set to 'auto' to auto-generates a LAG ID |
| | **members** list / elements=string | | List of port members or ranges of the link aggregation group. |
| | **mode** string | **Choices:*** dynamic
* static
| Mode of the link aggregation group. |
| | **name** string | | Name of the LAG |
| | **state** string | **Choices:*** present
* absent
| State of the link aggregation group. |
| **check\_running\_config** boolean | **Choices:*** no
* **yes** β
| Check running configuration. This can be set as environment variable. Module will use environment variable value(default:True), unless it is overridden, by specifying it as module parameter. |
| **group** integer | | Channel-group number for the port-channel Link aggregation group. Range 1-255 or set to 'auto' to auto-generates a LAG ID |
| **members** list / elements=string | | List of port members or ranges of the link aggregation group. |
| **mode** string | **Choices:*** dynamic
* static
| Mode of the link aggregation group. |
| **name** string | | Name of the LAG |
| **purge** boolean | **Choices:*** **no** β
* yes
| Purge links not defined in the *aggregate* parameter. |
| **state** string | **Choices:*** **present** β
* absent
| State of the link aggregation group. |
Notes
-----
Note
* Tested against ICX 10.1.
* For information on using ICX platform, see [the ICX OS Platform Options guide](user_guide/platform_icx).
Examples
--------
```
- name: Create static link aggregation group
community.network.icx_linkagg:
group: 10
mode: static
name: LAG1
- name: Create link aggregation group with auto id
community.network.icx_linkagg:
group: auto
mode: dynamic
name: LAG2
- name: Delete link aggregation group
community.network.icx_linkagg:
group: 10
state: absent
- name: Set members to LAG
community.network.icx_linkagg:
group: 200
mode: static
members:
- ethernet 1/1/1 to 1/1/6
- ethernet 1/1/10
- name: Remove links other then LAG id 100 and 3 using purge
community.network.icx_linkagg:
aggregate:
- { group: 3}
- { group: 100}
purge: true
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device **Sample:** ['lag LAG1 dynamic id 11', 'ports ethernet 1/1/1 to 1/1/6', 'no ports ethernet 1/1/10', 'no lag LAG1 dynamic id 12'] |
### Authors
* Ruckus Wireless (@Commscope)
ansible Community.Network Community.Network
=================
Collection version 3.0.0
Plugin Index
------------
These are the plugins in the community.network collection
### Cliconf Plugins
* [aireos](aireos_cliconf#ansible-collections-community-network-aireos-cliconf) β Use aireos cliconf to run command on Cisco WLC platform
* [apconos](apconos_cliconf#ansible-collections-community-network-apconos-cliconf) β Use apconos cliconf to run command on APCON network devices
* [aruba](aruba_cliconf#ansible-collections-community-network-aruba-cliconf) β Use aruba cliconf to run command on Aruba platform
* [ce](ce_cliconf#ansible-collections-community-network-ce-cliconf) β Use ce cliconf to run command on HUAWEI CloudEngine platform
* [cnos](cnos_cliconf#ansible-collections-community-network-cnos-cliconf) β Use cnos cliconf to run command on Lenovo CNOS platform
* [edgeos](edgeos_cliconf#ansible-collections-community-network-edgeos-cliconf) β Use edgeos cliconf to run command on EdgeOS platform
* [edgeswitch](edgeswitch_cliconf#ansible-collections-community-network-edgeswitch-cliconf) β Use edgeswitch cliconf to run command on EdgeSwitch platform
* [enos](enos_cliconf#ansible-collections-community-network-enos-cliconf) β Use enos cliconf to run command on Lenovo ENOS platform
* [eric\_eccli](eric_eccli_cliconf#ansible-collections-community-network-eric-eccli-cliconf) β Use eccli cliconf to run command on Ericsson ECCLI platform
* [exos](exos_cliconf#ansible-collections-community-network-exos-cliconf) β Use exos cliconf to run command on Extreme EXOS platform
* [icx](icx_cliconf#ansible-collections-community-network-icx-cliconf) β Use icx cliconf to run command on Ruckus ICX platform
* [ironware](ironware_cliconf#ansible-collections-community-network-ironware-cliconf) β Use ironware cliconf to run command on Extreme Ironware platform
* [netvisor](netvisor_cliconf#ansible-collections-community-network-netvisor-cliconf) β Use netvisor cliconf to run command on Pluribus netvisor platform
* [nos](nos_cliconf#ansible-collections-community-network-nos-cliconf) β Use nos cliconf to run command on Extreme NOS platform
* [slxos](slxos_cliconf#ansible-collections-community-network-slxos-cliconf) β Use slxos cliconf to run command on Extreme SLX-OS platform
* [voss](voss_cliconf#ansible-collections-community-network-voss-cliconf) β Use voss cliconf to run command on Extreme VOSS platform
* [weos4](weos4_cliconf#ansible-collections-community-network-weos4-cliconf) β Use weos4 cliconf to run commands on Westermo platform
### Httpapi Plugins
* [exos](exos_httpapi#ansible-collections-community-network-exos-httpapi) β Use EXOS REST APIs to communicate with EXOS platform
* [ftd](ftd_httpapi#ansible-collections-community-network-ftd-httpapi) β HttpApi Plugin for Cisco ASA Firepower device
### Lookup Plugins
* [avi](avi_lookup#ansible-collections-community-network-avi-lookup) β Look up `Avi` objects.
### Modules
* [a10\_server](a10_server_module#ansible-collections-community-network-a10-server-module) β Manage A10 Networks AX/SoftAX/Thunder/vThunder devicesβ server object.
* [a10\_server\_axapi3](a10_server_axapi3_module#ansible-collections-community-network-a10-server-axapi3-module) β Manage A10 Networks AX/SoftAX/Thunder/vThunder devices
* [a10\_service\_group](a10_service_group_module#ansible-collections-community-network-a10-service-group-module) β Manage A10 Networks AX/SoftAX/Thunder/vThunder devicesβ service groups.
* [a10\_virtual\_server](a10_virtual_server_module#ansible-collections-community-network-a10-virtual-server-module) β Manage A10 Networks AX/SoftAX/Thunder/vThunder devicesβ virtual servers.
* [aireos\_command](aireos_command_module#ansible-collections-community-network-aireos-command-module) β Run commands on remote devices running Cisco WLC
* [aireos\_config](aireos_config_module#ansible-collections-community-network-aireos-config-module) β Manage Cisco WLC configurations
* [apconos\_command](apconos_command_module#ansible-collections-community-network-apconos-command-module) β Run arbitrary commands on APCON devices
* [aruba\_command](aruba_command_module#ansible-collections-community-network-aruba-command-module) β Run commands on remote devices running Aruba Mobility Controller
* [aruba\_config](aruba_config_module#ansible-collections-community-network-aruba-config-module) β Manage Aruba configuration sections
* [avi\_actiongroupconfig](avi_actiongroupconfig_module#ansible-collections-community-network-avi-actiongroupconfig-module) β Module for setup of ActionGroupConfig Avi RESTful Object
* [avi\_alertconfig](avi_alertconfig_module#ansible-collections-community-network-avi-alertconfig-module) β Module for setup of AlertConfig Avi RESTful Object
* [avi\_alertemailconfig](avi_alertemailconfig_module#ansible-collections-community-network-avi-alertemailconfig-module) β Module for setup of AlertEmailConfig Avi RESTful Object
* [avi\_alertscriptconfig](avi_alertscriptconfig_module#ansible-collections-community-network-avi-alertscriptconfig-module) β Module for setup of AlertScriptConfig Avi RESTful Object
* [avi\_alertsyslogconfig](avi_alertsyslogconfig_module#ansible-collections-community-network-avi-alertsyslogconfig-module) β Module for setup of AlertSyslogConfig Avi RESTful Object
* [avi\_analyticsprofile](avi_analyticsprofile_module#ansible-collections-community-network-avi-analyticsprofile-module) β Module for setup of AnalyticsProfile Avi RESTful Object
* [avi\_api\_session](avi_api_session_module#ansible-collections-community-network-avi-api-session-module) β Avi API Module
* [avi\_api\_version](avi_api_version_module#ansible-collections-community-network-avi-api-version-module) β Avi API Version Module
* [avi\_applicationpersistenceprofile](avi_applicationpersistenceprofile_module#ansible-collections-community-network-avi-applicationpersistenceprofile-module) β Module for setup of ApplicationPersistenceProfile Avi RESTful Object
* [avi\_applicationprofile](avi_applicationprofile_module#ansible-collections-community-network-avi-applicationprofile-module) β Module for setup of ApplicationProfile Avi RESTful Object
* [avi\_authprofile](avi_authprofile_module#ansible-collections-community-network-avi-authprofile-module) β Module for setup of AuthProfile Avi RESTful Object
* [avi\_autoscalelaunchconfig](avi_autoscalelaunchconfig_module#ansible-collections-community-network-avi-autoscalelaunchconfig-module) β Module for setup of AutoScaleLaunchConfig Avi RESTful Object
* [avi\_backup](avi_backup_module#ansible-collections-community-network-avi-backup-module) β Module for setup of Backup Avi RESTful Object
* [avi\_backupconfiguration](avi_backupconfiguration_module#ansible-collections-community-network-avi-backupconfiguration-module) β Module for setup of BackupConfiguration Avi RESTful Object
* [avi\_certificatemanagementprofile](avi_certificatemanagementprofile_module#ansible-collections-community-network-avi-certificatemanagementprofile-module) β Module for setup of CertificateManagementProfile Avi RESTful Object
* [avi\_cloud](avi_cloud_module#ansible-collections-community-network-avi-cloud-module) β Module for setup of Cloud Avi RESTful Object
* [avi\_cloudconnectoruser](avi_cloudconnectoruser_module#ansible-collections-community-network-avi-cloudconnectoruser-module) β Module for setup of CloudConnectorUser Avi RESTful Object
* [avi\_cloudproperties](avi_cloudproperties_module#ansible-collections-community-network-avi-cloudproperties-module) β Module for setup of CloudProperties Avi RESTful Object
* [avi\_cluster](avi_cluster_module#ansible-collections-community-network-avi-cluster-module) β Module for setup of Cluster Avi RESTful Object
* [avi\_clusterclouddetails](avi_clusterclouddetails_module#ansible-collections-community-network-avi-clusterclouddetails-module) β Module for setup of ClusterCloudDetails Avi RESTful Object
* [avi\_controllerproperties](avi_controllerproperties_module#ansible-collections-community-network-avi-controllerproperties-module) β Module for setup of ControllerProperties Avi RESTful Object
* [avi\_customipamdnsprofile](avi_customipamdnsprofile_module#ansible-collections-community-network-avi-customipamdnsprofile-module) β Module for setup of CustomIpamDnsProfile Avi RESTful Object
* [avi\_dnspolicy](avi_dnspolicy_module#ansible-collections-community-network-avi-dnspolicy-module) β Module for setup of DnsPolicy Avi RESTful Object
* [avi\_errorpagebody](avi_errorpagebody_module#ansible-collections-community-network-avi-errorpagebody-module) β Module for setup of ErrorPageBody Avi RESTful Object
* [avi\_errorpageprofile](avi_errorpageprofile_module#ansible-collections-community-network-avi-errorpageprofile-module) β Module for setup of ErrorPageProfile Avi RESTful Object
* [avi\_gslb](avi_gslb_module#ansible-collections-community-network-avi-gslb-module) β Module for setup of Gslb Avi RESTful Object
* [avi\_gslbgeodbprofile](avi_gslbgeodbprofile_module#ansible-collections-community-network-avi-gslbgeodbprofile-module) β Module for setup of GslbGeoDbProfile Avi RESTful Object
* [avi\_gslbservice](avi_gslbservice_module#ansible-collections-community-network-avi-gslbservice-module) β Module for setup of GslbService Avi RESTful Object
* [avi\_gslbservice\_patch\_member](avi_gslbservice_patch_member_module#ansible-collections-community-network-avi-gslbservice-patch-member-module) β Avi API Module
* [avi\_hardwaresecuritymodulegroup](avi_hardwaresecuritymodulegroup_module#ansible-collections-community-network-avi-hardwaresecuritymodulegroup-module) β Module for setup of HardwareSecurityModuleGroup Avi RESTful Object
* [avi\_healthmonitor](avi_healthmonitor_module#ansible-collections-community-network-avi-healthmonitor-module) β Module for setup of HealthMonitor Avi RESTful Object
* [avi\_httppolicyset](avi_httppolicyset_module#ansible-collections-community-network-avi-httppolicyset-module) β Module for setup of HTTPPolicySet Avi RESTful Object
* [avi\_ipaddrgroup](avi_ipaddrgroup_module#ansible-collections-community-network-avi-ipaddrgroup-module) β Module for setup of IpAddrGroup Avi RESTful Object
* [avi\_ipamdnsproviderprofile](avi_ipamdnsproviderprofile_module#ansible-collections-community-network-avi-ipamdnsproviderprofile-module) β Module for setup of IpamDnsProviderProfile Avi RESTful Object
* [avi\_l4policyset](avi_l4policyset_module#ansible-collections-community-network-avi-l4policyset-module) β Module for setup of L4PolicySet Avi RESTful Object
* [avi\_microservicegroup](avi_microservicegroup_module#ansible-collections-community-network-avi-microservicegroup-module) β Module for setup of MicroServiceGroup Avi RESTful Object
* [avi\_network](avi_network_module#ansible-collections-community-network-avi-network-module) β Module for setup of Network Avi RESTful Object
* [avi\_networkprofile](avi_networkprofile_module#ansible-collections-community-network-avi-networkprofile-module) β Module for setup of NetworkProfile Avi RESTful Object
* [avi\_networksecuritypolicy](avi_networksecuritypolicy_module#ansible-collections-community-network-avi-networksecuritypolicy-module) β Module for setup of NetworkSecurityPolicy Avi RESTful Object
* [avi\_pkiprofile](avi_pkiprofile_module#ansible-collections-community-network-avi-pkiprofile-module) β Module for setup of PKIProfile Avi RESTful Object
* [avi\_pool](avi_pool_module#ansible-collections-community-network-avi-pool-module) β Module for setup of Pool Avi RESTful Object
* [avi\_poolgroup](avi_poolgroup_module#ansible-collections-community-network-avi-poolgroup-module) β Module for setup of PoolGroup Avi RESTful Object
* [avi\_poolgroupdeploymentpolicy](avi_poolgroupdeploymentpolicy_module#ansible-collections-community-network-avi-poolgroupdeploymentpolicy-module) β Module for setup of PoolGroupDeploymentPolicy Avi RESTful Object
* [avi\_prioritylabels](avi_prioritylabels_module#ansible-collections-community-network-avi-prioritylabels-module) β Module for setup of PriorityLabels Avi RESTful Object
* [avi\_role](avi_role_module#ansible-collections-community-network-avi-role-module) β Module for setup of Role Avi RESTful Object
* [avi\_scheduler](avi_scheduler_module#ansible-collections-community-network-avi-scheduler-module) β Module for setup of Scheduler Avi RESTful Object
* [avi\_seproperties](avi_seproperties_module#ansible-collections-community-network-avi-seproperties-module) β Module for setup of SeProperties Avi RESTful Object
* [avi\_serverautoscalepolicy](avi_serverautoscalepolicy_module#ansible-collections-community-network-avi-serverautoscalepolicy-module) β Module for setup of ServerAutoScalePolicy Avi RESTful Object
* [avi\_serviceengine](avi_serviceengine_module#ansible-collections-community-network-avi-serviceengine-module) β Module for setup of ServiceEngine Avi RESTful Object
* [avi\_serviceenginegroup](avi_serviceenginegroup_module#ansible-collections-community-network-avi-serviceenginegroup-module) β Module for setup of ServiceEngineGroup Avi RESTful Object
* [avi\_snmptrapprofile](avi_snmptrapprofile_module#ansible-collections-community-network-avi-snmptrapprofile-module) β Module for setup of SnmpTrapProfile Avi RESTful Object
* [avi\_sslkeyandcertificate](avi_sslkeyandcertificate_module#ansible-collections-community-network-avi-sslkeyandcertificate-module) β Module for setup of SSLKeyAndCertificate Avi RESTful Object
* [avi\_sslprofile](avi_sslprofile_module#ansible-collections-community-network-avi-sslprofile-module) β Module for setup of SSLProfile Avi RESTful Object
* [avi\_stringgroup](avi_stringgroup_module#ansible-collections-community-network-avi-stringgroup-module) β Module for setup of StringGroup Avi RESTful Object
* [avi\_systemconfiguration](avi_systemconfiguration_module#ansible-collections-community-network-avi-systemconfiguration-module) β Module for setup of SystemConfiguration Avi RESTful Object
* [avi\_tenant](avi_tenant_module#ansible-collections-community-network-avi-tenant-module) β Module for setup of Tenant Avi RESTful Object
* [avi\_trafficcloneprofile](avi_trafficcloneprofile_module#ansible-collections-community-network-avi-trafficcloneprofile-module) β Module for setup of TrafficCloneProfile Avi RESTful Object
* [avi\_user](avi_user_module#ansible-collections-community-network-avi-user-module) β Avi User Module
* [avi\_useraccount](avi_useraccount_module#ansible-collections-community-network-avi-useraccount-module) β Avi UserAccount Module
* [avi\_useraccountprofile](avi_useraccountprofile_module#ansible-collections-community-network-avi-useraccountprofile-module) β Module for setup of UserAccountProfile Avi RESTful Object
* [avi\_virtualservice](avi_virtualservice_module#ansible-collections-community-network-avi-virtualservice-module) β Module for setup of VirtualService Avi RESTful Object
* [avi\_vrfcontext](avi_vrfcontext_module#ansible-collections-community-network-avi-vrfcontext-module) β Module for setup of VrfContext Avi RESTful Object
* [avi\_vsdatascriptset](avi_vsdatascriptset_module#ansible-collections-community-network-avi-vsdatascriptset-module) β Module for setup of VSDataScriptSet Avi RESTful Object
* [avi\_vsvip](avi_vsvip_module#ansible-collections-community-network-avi-vsvip-module) β Module for setup of VsVip Avi RESTful Object
* [avi\_webhook](avi_webhook_module#ansible-collections-community-network-avi-webhook-module) β Module for setup of Webhook Avi RESTful Object
* [bcf\_switch](bcf_switch_module#ansible-collections-community-network-bcf-switch-module) β Create and remove a bcf switch.
* [bigmon\_chain](bigmon_chain_module#ansible-collections-community-network-bigmon-chain-module) β Create and remove a bigmon inline service chain.
* [bigmon\_policy](bigmon_policy_module#ansible-collections-community-network-bigmon-policy-module) β Create and remove a bigmon out-of-band policy.
* [ce\_aaa\_server](ce_aaa_server_module#ansible-collections-community-network-ce-aaa-server-module) β Manages AAA server global configuration on HUAWEI CloudEngine switches.
* [ce\_aaa\_server\_host](ce_aaa_server_host_module#ansible-collections-community-network-ce-aaa-server-host-module) β Manages AAA server host configuration on HUAWEI CloudEngine switches.
* [ce\_acl](ce_acl_module#ansible-collections-community-network-ce-acl-module) β Manages base ACL configuration on HUAWEI CloudEngine switches.
* [ce\_acl\_advance](ce_acl_advance_module#ansible-collections-community-network-ce-acl-advance-module) β Manages advanced ACL configuration on HUAWEI CloudEngine switches.
* [ce\_acl\_interface](ce_acl_interface_module#ansible-collections-community-network-ce-acl-interface-module) β Manages applying ACLs to interfaces on HUAWEI CloudEngine switches.
* [ce\_bfd\_global](ce_bfd_global_module#ansible-collections-community-network-ce-bfd-global-module) β Manages BFD global configuration on HUAWEI CloudEngine devices.
* [ce\_bfd\_session](ce_bfd_session_module#ansible-collections-community-network-ce-bfd-session-module) β Manages BFD session configuration on HUAWEI CloudEngine devices.
* [ce\_bfd\_view](ce_bfd_view_module#ansible-collections-community-network-ce-bfd-view-module) β Manages BFD session view configuration on HUAWEI CloudEngine devices.
* [ce\_bgp](ce_bgp_module#ansible-collections-community-network-ce-bgp-module) β Manages BGP configuration on HUAWEI CloudEngine switches.
* [ce\_bgp\_af](ce_bgp_af_module#ansible-collections-community-network-ce-bgp-af-module) β Manages BGP Address-family configuration on HUAWEI CloudEngine switches.
* [ce\_bgp\_neighbor](ce_bgp_neighbor_module#ansible-collections-community-network-ce-bgp-neighbor-module) β Manages BGP peer configuration on HUAWEI CloudEngine switches.
* [ce\_bgp\_neighbor\_af](ce_bgp_neighbor_af_module#ansible-collections-community-network-ce-bgp-neighbor-af-module) β Manages BGP neighbor Address-family configuration on HUAWEI CloudEngine switches.
* [ce\_command](ce_command_module#ansible-collections-community-network-ce-command-module) β Run arbitrary command on HUAWEI CloudEngine devices.
* [ce\_config](ce_config_module#ansible-collections-community-network-ce-config-module) β Manage Huawei CloudEngine configuration sections.
* [ce\_dldp](ce_dldp_module#ansible-collections-community-network-ce-dldp-module) β Manages global DLDP configuration on HUAWEI CloudEngine switches.
* [ce\_dldp\_interface](ce_dldp_interface_module#ansible-collections-community-network-ce-dldp-interface-module) β Manages interface DLDP configuration on HUAWEI CloudEngine switches.
* [ce\_eth\_trunk](ce_eth_trunk_module#ansible-collections-community-network-ce-eth-trunk-module) β Manages Eth-Trunk interfaces on HUAWEI CloudEngine switches.
* [ce\_evpn\_bd\_vni](ce_evpn_bd_vni_module#ansible-collections-community-network-ce-evpn-bd-vni-module) β Manages EVPN VXLAN Network Identifier (VNI) on HUAWEI CloudEngine switches.
* [ce\_evpn\_bgp](ce_evpn_bgp_module#ansible-collections-community-network-ce-evpn-bgp-module) β Manages BGP EVPN configuration on HUAWEI CloudEngine switches.
* [ce\_evpn\_bgp\_rr](ce_evpn_bgp_rr_module#ansible-collections-community-network-ce-evpn-bgp-rr-module) β Manages RR for the VXLAN Network on HUAWEI CloudEngine switches.
* [ce\_evpn\_global](ce_evpn_global_module#ansible-collections-community-network-ce-evpn-global-module) β Manages global configuration of EVPN on HUAWEI CloudEngine switches.
* [ce\_facts](ce_facts_module#ansible-collections-community-network-ce-facts-module) β Gets facts about HUAWEI CloudEngine switches.
* [ce\_file\_copy](ce_file_copy_module#ansible-collections-community-network-ce-file-copy-module) β Copy a file to a remote cloudengine device over SCP on HUAWEI CloudEngine switches.
* [ce\_info\_center\_debug](ce_info_center_debug_module#ansible-collections-community-network-ce-info-center-debug-module) β Manages information center debug configuration on HUAWEI CloudEngine switches.
* [ce\_info\_center\_global](ce_info_center_global_module#ansible-collections-community-network-ce-info-center-global-module) β Manages outputting logs on HUAWEI CloudEngine switches.
* [ce\_info\_center\_log](ce_info_center_log_module#ansible-collections-community-network-ce-info-center-log-module) β Manages information center log configuration on HUAWEI CloudEngine switches.
* [ce\_info\_center\_trap](ce_info_center_trap_module#ansible-collections-community-network-ce-info-center-trap-module) β Manages information center trap configuration on HUAWEI CloudEngine switches.
* [ce\_interface](ce_interface_module#ansible-collections-community-network-ce-interface-module) β Manages physical attributes of interfaces on HUAWEI CloudEngine switches.
* [ce\_interface\_ospf](ce_interface_ospf_module#ansible-collections-community-network-ce-interface-ospf-module) β Manages configuration of an OSPF interface instanceon HUAWEI CloudEngine switches.
* [ce\_ip\_interface](ce_ip_interface_module#ansible-collections-community-network-ce-ip-interface-module) β Manages L3 attributes for IPv4 and IPv6 interfaces on HUAWEI CloudEngine switches.
* [ce\_is\_is\_instance](ce_is_is_instance_module#ansible-collections-community-network-ce-is-is-instance-module) β Manages isis process id configuration on HUAWEI CloudEngine devices.
* [ce\_is\_is\_interface](ce_is_is_interface_module#ansible-collections-community-network-ce-is-is-interface-module) β Manages isis interface configuration on HUAWEI CloudEngine devices.
* [ce\_is\_is\_view](ce_is_is_view_module#ansible-collections-community-network-ce-is-is-view-module) β Manages isis view configuration on HUAWEI CloudEngine devices.
* [ce\_lacp](ce_lacp_module#ansible-collections-community-network-ce-lacp-module) β Manages Eth-Trunk interfaces on HUAWEI CloudEngine switches
* [ce\_link\_status](ce_link_status_module#ansible-collections-community-network-ce-link-status-module) β Get interface link status on HUAWEI CloudEngine switches.
* [ce\_lldp](ce_lldp_module#ansible-collections-community-network-ce-lldp-module) β Manages LLDP configuration on HUAWEI CloudEngine switches.
* [ce\_lldp\_interface](ce_lldp_interface_module#ansible-collections-community-network-ce-lldp-interface-module) β Manages INTERFACE LLDP configuration on HUAWEI CloudEngine switches.
* [ce\_mdn\_interface](ce_mdn_interface_module#ansible-collections-community-network-ce-mdn-interface-module) β Manages MDN configuration on HUAWEI CloudEngine switches.
* [ce\_mlag\_config](ce_mlag_config_module#ansible-collections-community-network-ce-mlag-config-module) β Manages MLAG configuration on HUAWEI CloudEngine switches.
* [ce\_mlag\_interface](ce_mlag_interface_module#ansible-collections-community-network-ce-mlag-interface-module) β Manages MLAG interfaces on HUAWEI CloudEngine switches.
* [ce\_mtu](ce_mtu_module#ansible-collections-community-network-ce-mtu-module) β Manages MTU settings on HUAWEI CloudEngine switches.
* [ce\_multicast\_global](ce_multicast_global_module#ansible-collections-community-network-ce-multicast-global-module) β Manages multicast global configuration on HUAWEI CloudEngine switches.
* [ce\_multicast\_igmp\_enable](ce_multicast_igmp_enable_module#ansible-collections-community-network-ce-multicast-igmp-enable-module) β Manages multicast igmp enable configuration on HUAWEI CloudEngine switches.
* [ce\_netconf](ce_netconf_module#ansible-collections-community-network-ce-netconf-module) β Run an arbitrary netconf command on HUAWEI CloudEngine switches.
* [ce\_netstream\_aging](ce_netstream_aging_module#ansible-collections-community-network-ce-netstream-aging-module) β Manages timeout mode of NetStream on HUAWEI CloudEngine switches.
* [ce\_netstream\_export](ce_netstream_export_module#ansible-collections-community-network-ce-netstream-export-module) β Manages netstream export on HUAWEI CloudEngine switches.
* [ce\_netstream\_global](ce_netstream_global_module#ansible-collections-community-network-ce-netstream-global-module) β Manages global parameters of NetStream on HUAWEI CloudEngine switches.
* [ce\_netstream\_template](ce_netstream_template_module#ansible-collections-community-network-ce-netstream-template-module) β Manages NetStream template configuration on HUAWEI CloudEngine switches.
* [ce\_ntp](ce_ntp_module#ansible-collections-community-network-ce-ntp-module) β Manages core NTP configuration on HUAWEI CloudEngine switches.
* [ce\_ntp\_auth](ce_ntp_auth_module#ansible-collections-community-network-ce-ntp-auth-module) β Manages NTP authentication configuration on HUAWEI CloudEngine switches.
* [ce\_ospf](ce_ospf_module#ansible-collections-community-network-ce-ospf-module) β Manages configuration of an OSPF instance on HUAWEI CloudEngine switches.
* [ce\_ospf\_vrf](ce_ospf_vrf_module#ansible-collections-community-network-ce-ospf-vrf-module) β Manages configuration of an OSPF VPN instance on HUAWEI CloudEngine switches.
* [ce\_reboot](ce_reboot_module#ansible-collections-community-network-ce-reboot-module) β Reboot a HUAWEI CloudEngine switches.
* [ce\_rollback](ce_rollback_module#ansible-collections-community-network-ce-rollback-module) β Set a checkpoint or rollback to a checkpoint on HUAWEI CloudEngine switches.
* [ce\_sflow](ce_sflow_module#ansible-collections-community-network-ce-sflow-module) β Manages sFlow configuration on HUAWEI CloudEngine switches.
* [ce\_snmp\_community](ce_snmp_community_module#ansible-collections-community-network-ce-snmp-community-module) β Manages SNMP community configuration on HUAWEI CloudEngine switches.
* [ce\_snmp\_contact](ce_snmp_contact_module#ansible-collections-community-network-ce-snmp-contact-module) β Manages SNMP contact configuration on HUAWEI CloudEngine switches.
* [ce\_snmp\_location](ce_snmp_location_module#ansible-collections-community-network-ce-snmp-location-module) β Manages SNMP location configuration on HUAWEI CloudEngine switches.
* [ce\_snmp\_target\_host](ce_snmp_target_host_module#ansible-collections-community-network-ce-snmp-target-host-module) β Manages SNMP target host configuration on HUAWEI CloudEngine switches.
* [ce\_snmp\_traps](ce_snmp_traps_module#ansible-collections-community-network-ce-snmp-traps-module) β Manages SNMP traps configuration on HUAWEI CloudEngine switches.
* [ce\_snmp\_user](ce_snmp_user_module#ansible-collections-community-network-ce-snmp-user-module) β Manages SNMP user configuration on HUAWEI CloudEngine switches.
* [ce\_startup](ce_startup_module#ansible-collections-community-network-ce-startup-module) β Manages a system startup information on HUAWEI CloudEngine switches.
* [ce\_static\_route](ce_static_route_module#ansible-collections-community-network-ce-static-route-module) β Manages static route configuration on HUAWEI CloudEngine switches.
* [ce\_static\_route\_bfd](ce_static_route_bfd_module#ansible-collections-community-network-ce-static-route-bfd-module) β Manages static route configuration on HUAWEI CloudEngine switches.
* [ce\_stp](ce_stp_module#ansible-collections-community-network-ce-stp-module) β Manages STP configuration on HUAWEI CloudEngine switches.
* [ce\_switchport](ce_switchport_module#ansible-collections-community-network-ce-switchport-module) β Manages Layer 2 switchport interfaces on HUAWEI CloudEngine switches.
* [ce\_vlan](ce_vlan_module#ansible-collections-community-network-ce-vlan-module) β Manages VLAN resources and attributes on Huawei CloudEngine switches.
* [ce\_vrf](ce_vrf_module#ansible-collections-community-network-ce-vrf-module) β Manages VPN instance on HUAWEI CloudEngine switches.
* [ce\_vrf\_af](ce_vrf_af_module#ansible-collections-community-network-ce-vrf-af-module) β Manages VPN instance address family on HUAWEI CloudEngine switches.
* [ce\_vrf\_interface](ce_vrf_interface_module#ansible-collections-community-network-ce-vrf-interface-module) β Manages interface specific VPN configuration on HUAWEI CloudEngine switches.
* [ce\_vrrp](ce_vrrp_module#ansible-collections-community-network-ce-vrrp-module) β Manages VRRP interfaces on HUAWEI CloudEngine devices.
* [ce\_vxlan\_arp](ce_vxlan_arp_module#ansible-collections-community-network-ce-vxlan-arp-module) β Manages ARP attributes of VXLAN on HUAWEI CloudEngine devices.
* [ce\_vxlan\_gateway](ce_vxlan_gateway_module#ansible-collections-community-network-ce-vxlan-gateway-module) β Manages gateway for the VXLAN network on HUAWEI CloudEngine devices.
* [ce\_vxlan\_global](ce_vxlan_global_module#ansible-collections-community-network-ce-vxlan-global-module) β Manages global attributes of VXLAN and bridge domain on HUAWEI CloudEngine devices.
* [ce\_vxlan\_tunnel](ce_vxlan_tunnel_module#ansible-collections-community-network-ce-vxlan-tunnel-module) β Manages VXLAN tunnel configuration on HUAWEI CloudEngine devices.
* [ce\_vxlan\_vap](ce_vxlan_vap_module#ansible-collections-community-network-ce-vxlan-vap-module) β Manages VXLAN virtual access point on HUAWEI CloudEngine Devices.
* [cnos\_backup](cnos_backup_module#ansible-collections-community-network-cnos-backup-module) β Backup the current running or startup configuration to a remote server on devices running Lenovo CNOS
* [cnos\_banner](cnos_banner_module#ansible-collections-community-network-cnos-banner-module) β Manage multiline banners on Lenovo CNOS devices
* [cnos\_bgp](cnos_bgp_module#ansible-collections-community-network-cnos-bgp-module) β Manage BGP resources and attributes on devices running CNOS
* [cnos\_command](cnos_command_module#ansible-collections-community-network-cnos-command-module) β Run arbitrary commands on Lenovo CNOS devices
* [cnos\_conditional\_command](cnos_conditional_command_module#ansible-collections-community-network-cnos-conditional-command-module) β Execute a single command based on condition on devices running Lenovo CNOS
* [cnos\_conditional\_template](cnos_conditional_template_module#ansible-collections-community-network-cnos-conditional-template-module) β Manage switch configuration using templates based on condition on devices running Lenovo CNOS
* [cnos\_config](cnos_config_module#ansible-collections-community-network-cnos-config-module) β Manage Lenovo CNOS configuration sections
* [cnos\_factory](cnos_factory_module#ansible-collections-community-network-cnos-factory-module) β Reset the switch startup configuration to default (factory) on devices running Lenovo CNOS.
* [cnos\_facts](cnos_facts_module#ansible-collections-community-network-cnos-facts-module) β Collect facts from remote devices running Lenovo CNOS
* [cnos\_image](cnos_image_module#ansible-collections-community-network-cnos-image-module) β Perform firmware upgrade/download from a remote server on devices running Lenovo CNOS
* [cnos\_interface](cnos_interface_module#ansible-collections-community-network-cnos-interface-module) β Manage Interface on Lenovo CNOS network devices
* [cnos\_l2\_interface](cnos_l2_interface_module#ansible-collections-community-network-cnos-l2-interface-module) β Manage Layer-2 interface on Lenovo CNOS devices.
* [cnos\_l3\_interface](cnos_l3_interface_module#ansible-collections-community-network-cnos-l3-interface-module) β Manage Layer-3 interfaces on Lenovo CNOS network devices.
* [cnos\_linkagg](cnos_linkagg_module#ansible-collections-community-network-cnos-linkagg-module) β Manage link aggregation groups on Lenovo CNOS devices
* [cnos\_lldp](cnos_lldp_module#ansible-collections-community-network-cnos-lldp-module) β Manage LLDP configuration on Lenovo CNOS network devices.
* [cnos\_logging](cnos_logging_module#ansible-collections-community-network-cnos-logging-module) β Manage logging on network devices
* [cnos\_reload](cnos_reload_module#ansible-collections-community-network-cnos-reload-module) β Perform switch restart on devices running Lenovo CNOS
* [cnos\_rollback](cnos_rollback_module#ansible-collections-community-network-cnos-rollback-module) β Roll back the running or startup configuration from a remote server on devices running Lenovo CNOS
* [cnos\_save](cnos_save_module#ansible-collections-community-network-cnos-save-module) β Save the running configuration as the startup configuration on devices running Lenovo CNOS
* [cnos\_showrun](cnos_showrun_module#ansible-collections-community-network-cnos-showrun-module) β Collect the current running configuration on devices running on CNOS
* [cnos\_static\_route](cnos_static_route_module#ansible-collections-community-network-cnos-static-route-module) β Manage static IP routes on Lenovo CNOS network devices
* [cnos\_system](cnos_system_module#ansible-collections-community-network-cnos-system-module) β Manage the system attributes on Lenovo CNOS devices
* [cnos\_template](cnos_template_module#ansible-collections-community-network-cnos-template-module) β Manage switch configuration using templates on devices running Lenovo CNOS
* [cnos\_user](cnos_user_module#ansible-collections-community-network-cnos-user-module) β Manage the collection of local users on Lenovo CNOS devices
* [cnos\_vlag](cnos_vlag_module#ansible-collections-community-network-cnos-vlag-module) β Manage VLAG resources and attributes on devices running Lenovo CNOS
* [cnos\_vlan](cnos_vlan_module#ansible-collections-community-network-cnos-vlan-module) β Manage VLANs on CNOS network devices
* [cnos\_vrf](cnos_vrf_module#ansible-collections-community-network-cnos-vrf-module) β Manage VRFs on Lenovo CNOS network devices
* [cv\_server\_provision](cv_server_provision_module#ansible-collections-community-network-cv-server-provision-module) β Provision server port by applying or removing template configuration to an Arista CloudVision Portal configlet that is applied to a switch.
* [dladm\_etherstub](dladm_etherstub_module#ansible-collections-community-network-dladm-etherstub-module) β Manage etherstubs on Solaris/illumos systems.
* [dladm\_iptun](dladm_iptun_module#ansible-collections-community-network-dladm-iptun-module) β Manage IP tunnel interfaces on Solaris/illumos systems.
* [dladm\_linkprop](dladm_linkprop_module#ansible-collections-community-network-dladm-linkprop-module) β Manage link properties on Solaris/illumos systems.
* [dladm\_vlan](dladm_vlan_module#ansible-collections-community-network-dladm-vlan-module) β Manage VLAN interfaces on Solaris/illumos systems.
* [dladm\_vnic](dladm_vnic_module#ansible-collections-community-network-dladm-vnic-module) β Manage VNICs on Solaris/illumos systems.
* [edgeos\_command](edgeos_command_module#ansible-collections-community-network-edgeos-command-module) β Run one or more commands on EdgeOS devices
* [edgeos\_config](edgeos_config_module#ansible-collections-community-network-edgeos-config-module) β Manage EdgeOS configuration on remote device
* [edgeos\_facts](edgeos_facts_module#ansible-collections-community-network-edgeos-facts-module) β Collect facts from remote devices running EdgeOS
* [edgeswitch\_facts](edgeswitch_facts_module#ansible-collections-community-network-edgeswitch-facts-module) β Collect facts from remote devices running Edgeswitch
* [edgeswitch\_vlan](edgeswitch_vlan_module#ansible-collections-community-network-edgeswitch-vlan-module) β Manage VLANs on Ubiquiti Edgeswitch network devices
* [enos\_command](enos_command_module#ansible-collections-community-network-enos-command-module) β Run arbitrary commands on Lenovo ENOS devices
* [enos\_config](enos_config_module#ansible-collections-community-network-enos-config-module) β Manage Lenovo ENOS configuration sections
* [enos\_facts](enos_facts_module#ansible-collections-community-network-enos-facts-module) β Collect facts from remote devices running Lenovo ENOS
* [eric\_eccli\_command](eric_eccli_command_module#ansible-collections-community-network-eric-eccli-command-module) β Run commands on remote devices running ERICSSON ECCLI
* [exos\_command](exos_command_module#ansible-collections-community-network-exos-command-module) β Run commands on remote devices running Extreme EXOS
* [exos\_config](exos_config_module#ansible-collections-community-network-exos-config-module) β Manage Extreme Networks EXOS configuration sections
* [exos\_facts](exos_facts_module#ansible-collections-community-network-exos-facts-module) β Collect facts from devices running Extreme EXOS
* [exos\_l2\_interfaces](exos_l2_interfaces_module#ansible-collections-community-network-exos-l2-interfaces-module) β Manage L2 interfaces on Extreme Networks EXOS devices.
* [exos\_lldp\_global](exos_lldp_global_module#ansible-collections-community-network-exos-lldp-global-module) β Configure and manage Link Layer Discovery Protocol(LLDP) attributes on EXOS platforms.
* [exos\_lldp\_interfaces](exos_lldp_interfaces_module#ansible-collections-community-network-exos-lldp-interfaces-module) β Manage link layer discovery protocol (LLDP) attributes of interfaces on EXOS platforms.
* [exos\_vlans](exos_vlans_module#ansible-collections-community-network-exos-vlans-module) β Manage VLANs on Extreme Networks EXOS devices.
* [flowadm](flowadm_module#ansible-collections-community-network-flowadm-module) β Manage bandwidth resource control and priority for protocols, services and zones on Solaris/illumos systems
* [ftd\_configuration](ftd_configuration_module#ansible-collections-community-network-ftd-configuration-module) β Manages configuration on Cisco FTD devices over REST API
* [ftd\_file\_download](ftd_file_download_module#ansible-collections-community-network-ftd-file-download-module) β Downloads files from Cisco FTD devices over HTTP(S)
* [ftd\_file\_upload](ftd_file_upload_module#ansible-collections-community-network-ftd-file-upload-module) β Uploads files to Cisco FTD devices over HTTP(S)
* [ftd\_install](ftd_install_module#ansible-collections-community-network-ftd-install-module) β Installs FTD pkg image on the firewall
* [iap\_start\_workflow](iap_start_workflow_module#ansible-collections-community-network-iap-start-workflow-module) β Start a workflow in the Itential Automation Platform
* [iap\_token](iap_token_module#ansible-collections-community-network-iap-token-module) β Get token for the Itential Automation Platform
* [icx\_banner](icx_banner_module#ansible-collections-community-network-icx-banner-module) β Manage multiline banners on Ruckus ICX 7000 series switches
* [icx\_command](icx_command_module#ansible-collections-community-network-icx-command-module) β Run arbitrary commands on remote Ruckus ICX 7000 series switches
* [icx\_config](icx_config_module#ansible-collections-community-network-icx-config-module) β Manage configuration sections of Ruckus ICX 7000 series switches
* [icx\_copy](icx_copy_module#ansible-collections-community-network-icx-copy-module) β Transfer files from or to remote Ruckus ICX 7000 series switches
* [icx\_facts](icx_facts_module#ansible-collections-community-network-icx-facts-module) β Collect facts from remote Ruckus ICX 7000 series switches
* [icx\_interface](icx_interface_module#ansible-collections-community-network-icx-interface-module) β Manage Interface on Ruckus ICX 7000 series switches
* [icx\_l3\_interface](icx_l3_interface_module#ansible-collections-community-network-icx-l3-interface-module) β Manage Layer-3 interfaces on Ruckus ICX 7000 series switches
* [icx\_linkagg](icx_linkagg_module#ansible-collections-community-network-icx-linkagg-module) β Manage link aggregation groups on Ruckus ICX 7000 series switches
* [icx\_lldp](icx_lldp_module#ansible-collections-community-network-icx-lldp-module) β Manage LLDP configuration on Ruckus ICX 7000 series switches
* [icx\_logging](icx_logging_module#ansible-collections-community-network-icx-logging-module) β Manage logging on Ruckus ICX 7000 series switches
* [icx\_ping](icx_ping_module#ansible-collections-community-network-icx-ping-module) β Tests reachability using ping from Ruckus ICX 7000 series switches
* [icx\_static\_route](icx_static_route_module#ansible-collections-community-network-icx-static-route-module) β Manage static IP routes on Ruckus ICX 7000 series switches
* [icx\_system](icx_system_module#ansible-collections-community-network-icx-system-module) β Manage the system attributes on Ruckus ICX 7000 series switches
* [icx\_user](icx_user_module#ansible-collections-community-network-icx-user-module) β Manage the user accounts on Ruckus ICX 7000 series switches.
* [icx\_vlan](icx_vlan_module#ansible-collections-community-network-icx-vlan-module) β Manage VLANs on Ruckus ICX 7000 series switches
* [ig\_config](ig_config_module#ansible-collections-community-network-ig-config-module) β Manage the configuration database on an Ingate SBC.
* [ig\_unit\_information](ig_unit_information_module#ansible-collections-community-network-ig-unit-information-module) β Get unit information from an Ingate SBC.
* [ipadm\_addr](ipadm_addr_module#ansible-collections-community-network-ipadm-addr-module) β Manage IP addresses on an interface on Solaris/illumos systems
* [ipadm\_addrprop](ipadm_addrprop_module#ansible-collections-community-network-ipadm-addrprop-module) β Manage IP address properties on Solaris/illumos systems.
* [ipadm\_if](ipadm_if_module#ansible-collections-community-network-ipadm-if-module) β Manage IP interfaces on Solaris/illumos systems.
* [ipadm\_ifprop](ipadm_ifprop_module#ansible-collections-community-network-ipadm-ifprop-module) β Manage IP interface properties on Solaris/illumos systems.
* [ipadm\_prop](ipadm_prop_module#ansible-collections-community-network-ipadm-prop-module) β Manage protocol properties on Solaris/illumos systems.
* [ironware\_command](ironware_command_module#ansible-collections-community-network-ironware-command-module) β Run arbitrary commands on Extreme IronWare devices
* [ironware\_config](ironware_config_module#ansible-collections-community-network-ironware-config-module) β Manage configuration sections on Extreme Ironware devices
* [ironware\_facts](ironware_facts_module#ansible-collections-community-network-ironware-facts-module) β Collect facts from devices running Extreme Ironware
* [nclu](nclu_module#ansible-collections-community-network-nclu-module) β Configure network interfaces using NCLU
* [netact\_cm\_command](netact_cm_command_module#ansible-collections-community-network-netact-cm-command-module) β Manage network configuration data in Nokia Core and Radio networks
* [netscaler\_cs\_action](netscaler_cs_action_module#ansible-collections-community-network-netscaler-cs-action-module) β Manage content switching actions
* [netscaler\_cs\_policy](netscaler_cs_policy_module#ansible-collections-community-network-netscaler-cs-policy-module) β Manage content switching policy
* [netscaler\_cs\_vserver](netscaler_cs_vserver_module#ansible-collections-community-network-netscaler-cs-vserver-module) β Manage content switching vserver
* [netscaler\_gslb\_service](netscaler_gslb_service_module#ansible-collections-community-network-netscaler-gslb-service-module) β Manage gslb service entities in Netscaler.
* [netscaler\_gslb\_site](netscaler_gslb_site_module#ansible-collections-community-network-netscaler-gslb-site-module) β Manage gslb site entities in Netscaler.
* [netscaler\_gslb\_vserver](netscaler_gslb_vserver_module#ansible-collections-community-network-netscaler-gslb-vserver-module) β Configure gslb vserver entities in Netscaler.
* [netscaler\_lb\_monitor](netscaler_lb_monitor_module#ansible-collections-community-network-netscaler-lb-monitor-module) β Manage load balancing monitors
* [netscaler\_lb\_vserver](netscaler_lb_vserver_module#ansible-collections-community-network-netscaler-lb-vserver-module) β Manage load balancing vserver configuration
* [netscaler\_nitro\_request](netscaler_nitro_request_module#ansible-collections-community-network-netscaler-nitro-request-module) β Issue Nitro API requests to a Netscaler instance.
* [netscaler\_save\_config](netscaler_save_config_module#ansible-collections-community-network-netscaler-save-config-module) β Save Netscaler configuration.
* [netscaler\_server](netscaler_server_module#ansible-collections-community-network-netscaler-server-module) β Manage server configuration
* [netscaler\_service](netscaler_service_module#ansible-collections-community-network-netscaler-service-module) β Manage service configuration in Netscaler
* [netscaler\_servicegroup](netscaler_servicegroup_module#ansible-collections-community-network-netscaler-servicegroup-module) β Manage service group configuration in Netscaler
* [netscaler\_ssl\_certkey](netscaler_ssl_certkey_module#ansible-collections-community-network-netscaler-ssl-certkey-module) β Manage ssl certificate keys.
* [nos\_command](nos_command_module#ansible-collections-community-network-nos-command-module) β Run commands on remote devices running Extreme Networks NOS
* [nos\_config](nos_config_module#ansible-collections-community-network-nos-config-module) β Manage Extreme Networks NOS configuration sections
* [nos\_facts](nos_facts_module#ansible-collections-community-network-nos-facts-module) β Collect facts from devices running Extreme NOS
* [nuage\_vspk](nuage_vspk_module#ansible-collections-community-network-nuage-vspk-module) β Manage Nuage VSP environments
* [opx\_cps](opx_cps_module#ansible-collections-community-network-opx-cps-module) β CPS operations on networking device running Openswitch (OPX)
* [ordnance\_config](ordnance_config_module#ansible-collections-community-network-ordnance-config-module) β Manage Ordnance configuration sections
* [ordnance\_facts](ordnance_facts_module#ansible-collections-community-network-ordnance-facts-module) β Collect facts from Ordnance Virtual Routers over SSH
* [pn\_access\_list](pn_access_list_module#ansible-collections-community-network-pn-access-list-module) β CLI command to create/delete access-list
* [pn\_access\_list\_ip](pn_access_list_ip_module#ansible-collections-community-network-pn-access-list-ip-module) β CLI command to add/remove access-list-ip
* [pn\_admin\_service](pn_admin_service_module#ansible-collections-community-network-pn-admin-service-module) β CLI command to modify admin-service
* [pn\_admin\_session\_timeout](pn_admin_session_timeout_module#ansible-collections-community-network-pn-admin-session-timeout-module) β CLI command to modify admin-session-timeout
* [pn\_admin\_syslog](pn_admin_syslog_module#ansible-collections-community-network-pn-admin-syslog-module) β CLI command to create/modify/delete admin-syslog
* [pn\_connection\_stats\_settings](pn_connection_stats_settings_module#ansible-collections-community-network-pn-connection-stats-settings-module) β CLI command to modify connection-stats-settings
* [pn\_cpu\_class](pn_cpu_class_module#ansible-collections-community-network-pn-cpu-class-module) β CLI command to create/modify/delete cpu-class
* [pn\_cpu\_mgmt\_class](pn_cpu_mgmt_class_module#ansible-collections-community-network-pn-cpu-mgmt-class-module) β CLI command to modify cpu-mgmt-class
* [pn\_dhcp\_filter](pn_dhcp_filter_module#ansible-collections-community-network-pn-dhcp-filter-module) β CLI command to create/modify/delete dhcp-filter
* [pn\_dscp\_map](pn_dscp_map_module#ansible-collections-community-network-pn-dscp-map-module) β CLI command to create/delete dscp-map
* [pn\_dscp\_map\_pri\_map](pn_dscp_map_pri_map_module#ansible-collections-community-network-pn-dscp-map-pri-map-module) β CLI command to modify dscp-map-pri-map
* [pn\_fabric\_local](pn_fabric_local_module#ansible-collections-community-network-pn-fabric-local-module) β CLI command to modify fabric-local
* [pn\_igmp\_snooping](pn_igmp_snooping_module#ansible-collections-community-network-pn-igmp-snooping-module) β CLI command to modify igmp-snooping
* [pn\_ipv6security\_raguard](pn_ipv6security_raguard_module#ansible-collections-community-network-pn-ipv6security-raguard-module) β CLI command to create/modify/delete ipv6security-raguard
* [pn\_ipv6security\_raguard\_port](pn_ipv6security_raguard_port_module#ansible-collections-community-network-pn-ipv6security-raguard-port-module) β CLI command to add/remove ipv6security-raguard-port
* [pn\_ipv6security\_raguard\_vlan](pn_ipv6security_raguard_vlan_module#ansible-collections-community-network-pn-ipv6security-raguard-vlan-module) β CLI command to add/remove ipv6security-raguard-vlan
* [pn\_log\_audit\_exception](pn_log_audit_exception_module#ansible-collections-community-network-pn-log-audit-exception-module) β CLI command to create/delete an audit exception
* [pn\_port\_config](pn_port_config_module#ansible-collections-community-network-pn-port-config-module) β CLI command to modify port-config
* [pn\_port\_cos\_bw](pn_port_cos_bw_module#ansible-collections-community-network-pn-port-cos-bw-module) β CLI command to modify port-cos-bw
* [pn\_port\_cos\_rate\_setting](pn_port_cos_rate_setting_module#ansible-collections-community-network-pn-port-cos-rate-setting-module) β CLI command to modify port-cos-rate-setting
* [pn\_prefix\_list](pn_prefix_list_module#ansible-collections-community-network-pn-prefix-list-module) β CLI command to create/delete prefix-list
* [pn\_prefix\_list\_network](pn_prefix_list_network_module#ansible-collections-community-network-pn-prefix-list-network-module) β CLI command to add/remove prefix-list-network
* [pn\_role](pn_role_module#ansible-collections-community-network-pn-role-module) β CLI command to create/delete/modify role
* [pn\_snmp\_community](pn_snmp_community_module#ansible-collections-community-network-pn-snmp-community-module) β CLI command to create/modify/delete snmp-community
* [pn\_snmp\_trap\_sink](pn_snmp_trap_sink_module#ansible-collections-community-network-pn-snmp-trap-sink-module) β CLI command to create/delete snmp-trap-sink
* [pn\_snmp\_vacm](pn_snmp_vacm_module#ansible-collections-community-network-pn-snmp-vacm-module) β CLI command to create/modify/delete snmp-vacm
* [pn\_stp](pn_stp_module#ansible-collections-community-network-pn-stp-module) β CLI command to modify stp
* [pn\_stp\_port](pn_stp_port_module#ansible-collections-community-network-pn-stp-port-module) β CLI command to modify stp-port.
* [pn\_switch\_setup](pn_switch_setup_module#ansible-collections-community-network-pn-switch-setup-module) β CLI command to modify switch-setup
* [pn\_user](pn_user_module#ansible-collections-community-network-pn-user-module) β CLI command to create/modify/delete user
* [pn\_vflow\_table\_profile](pn_vflow_table_profile_module#ansible-collections-community-network-pn-vflow-table-profile-module) β CLI command to modify vflow-table-profile
* [pn\_vrouter\_bgp](pn_vrouter_bgp_module#ansible-collections-community-network-pn-vrouter-bgp-module) β CLI command to add/modify/remove vrouter-bgp
* [pn\_vrouter\_bgp\_network](pn_vrouter_bgp_network_module#ansible-collections-community-network-pn-vrouter-bgp-network-module) β CLI command to add/remove vrouter-bgp-network
* [pn\_vrouter\_interface\_ip](pn_vrouter_interface_ip_module#ansible-collections-community-network-pn-vrouter-interface-ip-module) β CLI command to add/remove vrouter-interface-ip
* [pn\_vrouter\_loopback\_interface](pn_vrouter_loopback_interface_module#ansible-collections-community-network-pn-vrouter-loopback-interface-module) β CLI command to add/remove vrouter-loopback-interface
* [pn\_vrouter\_ospf](pn_vrouter_ospf_module#ansible-collections-community-network-pn-vrouter-ospf-module) β CLI command to add/remove vrouter-ospf
* [pn\_vrouter\_ospf6](pn_vrouter_ospf6_module#ansible-collections-community-network-pn-vrouter-ospf6-module) β CLI command to add/remove vrouter-ospf6
* [pn\_vrouter\_packet\_relay](pn_vrouter_packet_relay_module#ansible-collections-community-network-pn-vrouter-packet-relay-module) β CLI command to add/remove vrouter-packet-relay
* [pn\_vrouter\_pim\_config](pn_vrouter_pim_config_module#ansible-collections-community-network-pn-vrouter-pim-config-module) β CLI command to modify vrouter-pim-config
* [pn\_vtep](pn_vtep_module#ansible-collections-community-network-pn-vtep-module) β CLI command to create/delete vtep
* [slxos\_command](slxos_command_module#ansible-collections-community-network-slxos-command-module) β Run commands on remote devices running Extreme Networks SLX-OS
* [slxos\_config](slxos_config_module#ansible-collections-community-network-slxos-config-module) β Manage Extreme Networks SLX-OS configuration sections
* [slxos\_facts](slxos_facts_module#ansible-collections-community-network-slxos-facts-module) β Collect facts from devices running Extreme SLX-OS
* [slxos\_interface](slxos_interface_module#ansible-collections-community-network-slxos-interface-module) β Manage Interfaces on Extreme SLX-OS network devices
* [slxos\_l2\_interface](slxos_l2_interface_module#ansible-collections-community-network-slxos-l2-interface-module) β Manage Layer-2 interface on Extreme Networks SLX-OS devices.
* [slxos\_l3\_interface](slxos_l3_interface_module#ansible-collections-community-network-slxos-l3-interface-module) β Manage L3 interfaces on Extreme Networks SLX-OS network devices.
* [slxos\_linkagg](slxos_linkagg_module#ansible-collections-community-network-slxos-linkagg-module) β Manage link aggregation groups on Extreme Networks SLX-OS network devices
* [slxos\_lldp](slxos_lldp_module#ansible-collections-community-network-slxos-lldp-module) β Manage LLDP configuration on Extreme Networks SLX-OS network devices.
* [slxos\_vlan](slxos_vlan_module#ansible-collections-community-network-slxos-vlan-module) β Manage VLANs on Extreme Networks SLX-OS network devices
* [sros\_command](sros_command_module#ansible-collections-community-network-sros-command-module) β Run commands on remote devices running Nokia SR OS
* [sros\_config](sros_config_module#ansible-collections-community-network-sros-config-module) β Manage Nokia SR OS device configuration
* [sros\_rollback](sros_rollback_module#ansible-collections-community-network-sros-rollback-module) β Configure Nokia SR OS rollback
* [vdirect\_commit](vdirect_commit_module#ansible-collections-community-network-vdirect-commit-module) β Commits pending configuration changes on Radware devices
* [vdirect\_file](vdirect_file_module#ansible-collections-community-network-vdirect-file-module) β Uploads a new or updates an existing runnable file into Radware vDirect server
* [vdirect\_runnable](vdirect_runnable_module#ansible-collections-community-network-vdirect-runnable-module) β Runs templates and workflow actions in Radware vDirect server
* [voss\_command](voss_command_module#ansible-collections-community-network-voss-command-module) β Run commands on remote devices running Extreme VOSS
* [voss\_config](voss_config_module#ansible-collections-community-network-voss-config-module) β Manage Extreme VOSS configuration sections
* [voss\_facts](voss_facts_module#ansible-collections-community-network-voss-facts-module) β Collect facts from remote devices running Extreme VOSS
### Netconf Plugins
* [ce](ce_netconf#ansible-collections-community-network-ce-netconf) β Use ce netconf plugin to run netconf commands on Huawei Cloudengine platform
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
| programming_docs |
ansible community.network.exos_command β Run commands on remote devices running Extreme EXOS community.network.exos\_command β Run commands on remote devices running Extreme EXOS
=====================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.exos_command`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Sends arbitrary commands to an Extreme EXOS device and returns the results read from the device. This module includes an argument that will cause the module to wait for a specific condition before returning or timing out if the condition is not met.
* This module does not support running configuration commands. Please use [community.network.exos\_config](exos_config_module#ansible-collections-community-network-exos-config-module) to configure EXOS devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **commands** string / required | | List of commands to send to the remote EXOS device over the configured provider. The resulting output from the command is returned. If the *wait\_for* argument is provided, the module is not returned until the condition is satisfied or the number of retries has expired. |
| **interval** string | **Default:**1 | Configures the interval in seconds to wait between retries of the command. If the command does not pass the specified conditions, the interval indicates how long to wait before trying the command again. |
| **match** string | **Choices:*** any
* **all** β
| The *match* argument is used in conjunction with the *wait\_for* argument to specify the match policy. Valid values are `all` or `any`. If the value is set to `all` then all conditionals in the wait\_for must be satisfied. If the value is set to `any` then only one of the values must be satisfied. |
| **retries** string | **Default:**10 | Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the *wait\_for* conditions. |
| **wait\_for** string | | List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples. |
Notes
-----
Note
* If a command sent to the device requires answering a prompt, it is possible to pass a dict containing *command*, *answer* and *prompt*. See examples.
Examples
--------
```
tasks:
- name: Run show version on remote devices
community.network.exos_command:
commands: show version
- name: Run show version and check to see if output contains ExtremeXOS
community.network.exos_command:
commands: show version
wait_for: result[0] contains ExtremeXOS
- name: Run multiple commands on remote nodes
community.network.exos_command:
commands:
- show version
- show ports no-refresh
- name: Run multiple commands and evaluate the output
community.network.exos_command:
commands:
- show version
- show ports no-refresh
wait_for:
- result[0] contains ExtremeXOS
- result[1] contains 20
- name: Run command that requires answering a prompt
community.network.exos_command:
commands:
- command: 'clear license-info'
prompt: 'Are you sure.*'
answer: 'Yes'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **failed\_conditions** list / elements=string | failed | The list of conditionals that have failed **Sample:** ['...', '...'] |
| **stdout** list / elements=string | always apart from low level errors (such as action plugin) | The set of responses from the commands **Sample:** ['...', '...'] |
| **stdout\_lines** list / elements=string | always apart from low level errors (such as action plugin) | The value of stdout split into a list **Sample:** [['...', '...'], ['...'], ['...']] |
### Authors
* Rafael D. Vencioneck (@rdvencioneck)
ansible community.network.cnos_user β Manage the collection of local users on Lenovo CNOS devices community.network.cnos\_user β Manage the collection of local users on Lenovo CNOS devices
==========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_user`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of the local usernames configured on Lenovo CNOS devices. It allows playbooks to manage either individual usernames or the collection of usernames in the current running config. It also supports purging usernames from the configuration that are not explicitly defined.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate** string | | The set of username objects to be configured on the remote Lenovo CNOS device. The list entries can either be the username or a hash of username and properties. This argument is mutually exclusive with the `name` argument.
aliases: users, collection |
| **configured\_password** string | | The password to be configured on the network device. The password needs to be provided in cleartext and it will be encrypted on the device. Please note that this option is not same as `provider password`. |
| **name** string | | The username to be configured on the remote Lenovo CNOS device. This argument accepts a string value and is mutually exclusive with the `aggregate` argument. |
| **purge** boolean | **Choices:*** **no** β
* yes
| The `purge` argument instructs the module to consider the resource definition absolute. It will remove any previously configured usernames on the device with the exception of the `admin` user which cannot be deleted per cnos constraints. |
| **role** string | | The `role` argument configures the role for the username in the device running configuration. The argument accepts a string value defining the role name. This argument does not check if the role has been configured on the device.
aliases: roles |
| **sshkey** string | | The `sshkey` argument defines the SSH public key to configure for the username. This argument accepts a valid SSH key value. |
| **state** string | **Choices:*** **present** β
* absent
| The `state` argument configures the state of the username definition as it relates to the device operational configuration. When set to *present*, the username(s) should be configured in the device active configuration and when set to *absent* the username(s) should not be in the device active configuration |
| **update\_password** string | **Choices:*** on\_create
* **always** β
| Since passwords are encrypted in the device running config, this argument will instruct the module when to change the password. When set to `always`, the password will always be updated in the device and when set to `on_create` the password will be updated only if the username is created. |
Examples
--------
```
- name: Create a new user
community.network.cnos_user:
name: ansible
sshkey: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
state: present
- name: Remove all users except admin
community.network.cnos_user:
purge: yes
- name: Set multiple users role
aggregate:
- name: Netop
- name: Netend
role: network-operator
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always | The list of configuration mode commands to send to the device **Sample:** ['name ansible', 'name ansible password password'] |
| **delta** string | always | The time elapsed to perform all operations **Sample:** 0:00:10.469466 |
| **end** string | always | The time the job ended **Sample:** 2016-11-16 10:38:25.595612 |
| **start** string | always | The time the job started **Sample:** 2016-11-16 10:38:15.126146 |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
ansible community.network.ce_bgp_neighbor β Manages BGP peer configuration on HUAWEI CloudEngine switches. community.network.ce\_bgp\_neighbor β Manages BGP peer configuration on HUAWEI CloudEngine switches.
====================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_bgp_neighbor`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages BGP peer configurations on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **conn\_retry\_time** string | | ConnectRetry interval. The value is an integer ranging from 1 to 65535. |
| **connect\_mode** string | | The value can be Connect-only, Listen-only, or Both. |
| **conventional** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, the router has all extended capabilities. If the value is false, the router does not have all extended capabilities. |
| **description** string | | Description of a peer, which can be letters or digits. The value is a string of 1 to 80 characters. |
| **dual\_as** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, the EBGP peer can use either a fake AS number or the actual AS number. If the value is false, the EBGP peer can only use a fake AS number. |
| **ebgp\_max\_hop** string | | Maximum number of hops in an indirect EBGP connection. The value is an ranging from 1 to 255. |
| **fake\_as** string | | Fake AS number that is specified for a local peer. The value is a string of 1 to 11 characters. |
| **hold\_time** string | | Specify the Hold time of a peer or peer group. The value is 0 or an integer ranging from 3 to 65535. |
| **is\_bfd\_block** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, peers are enabled to inherit the BFD function from the peer group. If the value is false, peers are disabled to inherit the BFD function from the peer group. |
| **is\_bfd\_enable** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, BFD is enabled. If the value is false, BFD is disabled. |
| **is\_ignore** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, the session with a specified peer is torn down and all related routing entries are cleared. If the value is false, the session with a specified peer is retained. |
| **is\_log\_change** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, BGP is enabled to record peer session status and event information. If the value is false, BGP is disabled from recording peer session status and event information. |
| **is\_single\_hop** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, the system is enabled to preferentially use the single-hop mode for BFD session setup between IBGP peers. If the value is false, the system is disabled from preferentially using the single-hop mode for BFD session setup between IBGP peers. |
| **keep\_alive\_time** string | | Specify the Keepalive time of a peer or peer group. The value is an integer ranging from 0 to 21845. The default value is 60. |
| **key\_chain\_name** string | | Specify the Keychain authentication name used when BGP peers establish a TCP connection. The value is a string of 1 to 47 case-insensitive characters. |
| **local\_if\_name** string | | Name of a source interface that sends BGP packets. The value is a string of 1 to 63 characters. |
| **min\_hold\_time** string | | Specify the Min hold time of a peer or peer group. |
| **mpls\_local\_ifnet\_disable** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, peer create MPLS Local IFNET disable. If the value is false, peer create MPLS Local IFNET enable. |
| **multiplier** string | | Specify the detection multiplier. The default value is 3. The value is an integer ranging from 3 to 50. |
| **peer\_addr** string / required | | Connection address of a peer, which can be an IPv4 or IPv6 address. |
| **prepend\_fake\_as** string | **Choices:*** **no\_use** β
* true
* false
| Add the Fake AS number to received Update packets. |
| **prepend\_global\_as** string | **Choices:*** **no\_use** β
* true
* false
| Add the global AS number to the Update packets to be advertised. |
| **pswd\_cipher\_text** string | | The character string in a password identifies the contents of the password, spaces not supported. The value is a string of 1 to 255 characters. |
| **pswd\_type** string | **Choices:*** null
* cipher
* simple
| Enable BGP peers to establish a TCP connection and perform the Message Digest 5 (MD5) authentication for BGP messages. |
| **remote\_as** string / required | | AS number of a peer. The value is a string of 1 to 11 characters. |
| **route\_refresh** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, BGP is enabled to advertise REFRESH packets. If the value is false, the route refresh function is enabled. |
| **rx\_interval** string | | Specify the minimum interval at which BFD packets are received. The value is an integer ranging from 50 to 1000, in milliseconds. |
| **state** string | **Choices:*** **present** β
* absent
| Specify desired state of the resource. |
| **tcp\_MSS** string | | Maximum TCP MSS value used for TCP connection establishment for a peer. The value is an integer ranging from 176 to 4096. |
| **tx\_interval** string | | Specify the minimum interval at which BFD packets are sent. The value is an integer ranging from 50 to 1000, in milliseconds. |
| **valid\_ttl\_hops** string | | Enable GTSM on a peer or peer group. The valid-TTL-Value parameter is used to specify the number of TTL hops to be detected. The value is an integer ranging from 1 to 255. |
| **vrf\_name** string / required | | Name of a BGP instance. The name is a case-sensitive string of characters. The BGP instance can be used only after the corresponding VPN instance is created. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: CloudEngine BGP neighbor test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Config bgp peer"
community.network.ce_bgp_neighbor:
state: present
vrf_name: js
peer_addr: 192.168.10.10
remote_as: 500
provider: "{{ cli }}"
- name: "Config bgp route id"
community.network.ce_bgp_neighbor:
state: absent
vrf_name: js
peer_addr: 192.168.10.10
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution **Sample:** {'bgp peer': [['192.168.10.10', '500']]} |
| **existing** dictionary | always | k/v pairs of existing aaa server **Sample:** {'bgp peer': []} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'peer\_addr': '192.168.10.10', 'remote\_as': '500', 'state': 'present', 'vrf\_name': 'js'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['peer 192.168.10.10 as-number 500'] |
### Authors
* wangdezhuang (@QijunPan)
ansible community.network.avi_user β Avi User Module community.network.avi\_user β Avi User Module
=============================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_user`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used for creation, updation and deletion of a user.
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access** list / elements=string | | Access settings (write, read, or no access) for each type of resource within Vantage. |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** post
* **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **default\_tenant\_ref** string | **Default:**"/api/tenant?name=admin" | Default tenant reference. This can also be full URI same as it comes in response payload |
| **email** string | | Email address of the user. This field is used when a user loses their password and requests to have it reset. See Password Recovery. |
| **is\_active** boolean | **Choices:*** no
* yes
| Activates the current user account. |
| **is\_superuser** boolean | **Choices:*** no
* yes
| If the user will need to have the same privileges as the admin account, set it to true. |
| **name** string / required | | Full name of the user. |
| **obj\_password** string / required | | You may either enter a case-sensitive password in this field for the new or existing user. |
| **obj\_username** string / required | | Name that the user will supply when signing into Avi Vantage, such as jdoe or [email protected]. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **user\_profile\_ref** string | | Refer user profile. This can also be full URI same as it comes in response payload |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: User creation
community.network.avi_user:
controller: ""
username: ""
password: ""
api_version: ""
name: "testuser"
obj_username: "testuser"
obj_password: "test123"
email: "[email protected]"
access:
- role_ref: "/api/role?name=Tenant-Admin"
tenant_ref: "/api/tenant/admin#admin"
user_profile_ref: "/api/useraccountprofile?name=Default-User-Account-Profile"
is_active: true
is_superuser: true
default_tenant_ref: "/api/tenant?name=admin"
- name: User creation
community.network.avi_user:
controller: ""
username: ""
password: ""
api_version: ""
name: "testuser"
obj_username: "testuser2"
obj_password: "password"
email: "[email protected]"
access:
- role_ref: "https://192.0.2.10/api/role?name=Tenant-Admin"
tenant_ref: "https://192.0.2.10/api/tenant/admin#admin"
user_profile_ref: "https://192.0.2.10/api/useraccountprofile?name=Default-User-Account-Profile"
is_active: true
is_superuser: true
default_tenant_ref: "https://192.0.2.10/api/tenant?name=admin"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | Avi REST resource |
### Authors
* Shrikant Chaudhari (@gitshrikant) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#7e0d160c17151f100a585d4a48451d161f0b1a161f0c17585d4d4945585d4b4c45585d4a46451f0817101b0a09110c150d585d4a48451d1113)>
| programming_docs |
ansible community.network.pn_snmp_trap_sink β CLI command to create/delete snmp-trap-sink community.network.pn\_snmp\_trap\_sink β CLI command to create/delete snmp-trap-sink
====================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_snmp_trap_sink`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to create a SNMP trap sink and delete a SNMP trap sink.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_community** string | | community type. |
| **pn\_dest\_host** string | | destination host. |
| **pn\_dest\_port** string | **Default:**"162" | destination port. |
| **pn\_type** string | **Choices:*** TRAP\_TYPE\_V1\_TRAP
* **TRAP\_TYPE\_V2C\_TRAP** β
* TRAP\_TYPE\_V2\_INFORM
| trap type. |
| **state** string / required | **Choices:*** present
* absent
| State the action to perform. Use `present` to create snmp-trap-sink and `absent` to delete snmp-trap-sink. |
Examples
--------
```
- name: Snmp trap sink functionality
community.network.pn_snmp_trap_sink:
pn_cliswitch: "sw01"
state: "present"
pn_community: "foo"
pn_type: "TRAP_TYPE_V2_INFORM"
pn_dest_host: "192.168.67.8"
- name: Snmp trap sink functionality
community.network.pn_snmp_trap_sink:
pn_cliswitch: "sw01"
state: "absent"
pn_community: "foo"
pn_type: "TRAP_TYPE_V2_INFORM"
pn_dest_host: "192.168.67.8"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the snmp-trap-sink command. |
| **stdout** list / elements=string | always | set of responses from the snmp-trap-sink command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.ce_static_route β Manages static route configuration on HUAWEI CloudEngine switches. community.network.ce\_static\_route β Manages static route configuration on HUAWEI CloudEngine switches.
========================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_static_route`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages the static routes on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aftype** string / required | **Choices:*** v4
* v6
| Destination ip address family type of static route. |
| **description** string | | Name of the route. Used with the name parameter on the CLI. |
| **destvrf** string | | VPN instance of next hop ip address. |
| **mask** string / required | | Destination ip mask of static route. |
| **next\_hop** string | | Next hop address of static route. |
| **nhp\_interface** string | | Next hop interface full name of static route. |
| **pref** string | | Preference or administrative difference of route (range 1-255). |
| **prefix** string / required | | Destination ip address of static route. |
| **state** string | **Choices:*** **present** β
* absent
| Specify desired state of the resource. |
| **tag** string | | Route tag value (numeric). |
| **vrf** string | | VPN instance of destination ip address. |
Notes
-----
Note
* If no vrf is supplied, vrf is set to default.
* If *state=absent*, the route will be removed, regardless of the non-required parameters.
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Static route module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Config a ipv4 static route, next hop is an address and that it has the proper description
community.network.ce_static_route:
prefix: 2.1.1.2
mask: 24
next_hop: 3.1.1.2
description: 'Configured by Ansible'
aftype: v4
provider: "{{ cli }}"
- name: Config a ipv4 static route ,next hop is an interface and that it has the proper description
community.network.ce_static_route:
prefix: 2.1.1.2
mask: 24
next_hop: 10GE1/0/1
description: 'Configured by Ansible'
aftype: v4
provider: "{{ cli }}"
- name: Config a ipv6 static route, next hop is an address and that it has the proper description
community.network.ce_static_route:
prefix: fc00:0:0:2001::1
mask: 64
next_hop: fc00:0:0:2004::1
description: 'Configured by Ansible'
aftype: v6
provider: "{{ cli }}"
- name: Config a ipv4 static route, next hop is an interface and that it has the proper description
community.network.ce_static_route:
prefix: fc00:0:0:2001::1
mask: 64
next_hop: 10GE1/0/1
description: 'Configured by Ansible'
aftype: v6
provider: "{{ cli }}"
- name: Config a VRF and set ipv4 static route, next hop is an address and that it has the proper description
community.network.ce_static_route:
vrf: vpna
prefix: 2.1.1.2
mask: 24
next_hop: 3.1.1.2
description: 'Configured by Ansible'
aftype: v4
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of switchport after module execution **Sample:** {'description': 'testing', 'mask': '24', 'next\_hop': '3.3.3.3', 'pref': '100', 'prefix': '192.168.20.0', 'tag': 'null'} |
| **existing** dictionary | always | k/v pairs of existing switchport |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'description': 'testing', 'mask': '24', 'next\_hop': '3.3.3.3', 'pref': '100', 'prefix': '192.168.20.642', 'vrf': '\_public\_'} |
| **updates** list / elements=string | always | command list sent to the device **Sample:** ['ip route-static 192.168.20.0 255.255.255.0 3.3.3.3 preference 100 description testing'] |
### Authors
* Yang yang (@QijunPan)
ansible community.network.ce_aaa_server_host β Manages AAA server host configuration on HUAWEI CloudEngine switches. community.network.ce\_aaa\_server\_host β Manages AAA server host configuration on HUAWEI CloudEngine switches.
===============================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_aaa_server_host`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages AAA server host configuration on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **hwtacacs\_is\_public\_net** boolean | **Choices:*** **no** β
* yes
| Set the public-net. |
| **hwtacacs\_is\_secondary\_server** boolean | **Choices:*** **no** β
* yes
| Whether the server is secondary. |
| **hwtacacs\_server\_host\_name** string | | Hwtacacs server host name. |
| **hwtacacs\_server\_ip** string | | Server IPv4 address. Must be a valid unicast IP address. The value is a string of 0 to 255 characters, in dotted decimal notation. |
| **hwtacacs\_server\_ipv6** string | | Server IPv6 address. Must be a valid unicast IP address. The total length is 128 bits. |
| **hwtacacs\_server\_type** string | **Choices:*** Authentication
* Authorization
* Accounting
* Common
| Hwtacacs server type. |
| **hwtacacs\_template** string | | Name of a HWTACACS template. The value is a string of 1 to 32 case-insensitive characters. |
| **hwtacacs\_vpn\_name** string | | VPN instance name. |
| **local\_ftp\_dir** string | | FTP user directory. The value is a string of 1 to 255 characters. |
| **local\_password** string | | Login password of a user. The password can contain letters, numbers, and special characters. The value is a string of 1 to 255 characters. |
| **local\_service\_type** string | | The type of local user login through, such as ftp ssh snmp telnet. |
| **local\_user\_group** string | | Name of the user group where the user belongs. The user inherits all the rights of the user group. The value is a string of 1 to 32 characters. |
| **local\_user\_level** string | | Login level of a local user. The value is an integer ranging from 0 to 15. |
| **local\_user\_name** string | | Name of a local user. The value is a string of 1 to 253 characters. |
| **radius\_group\_name** string | | RADIUS server group's name. The value is a string of 1 to 32 case-insensitive characters. |
| **radius\_server\_ip** string | | IPv4 address of configured server. The value is a string of 0 to 255 characters, in dotted decimal notation. |
| **radius\_server\_ipv6** string | | IPv6 address of configured server. The total length is 128 bits. |
| **radius\_server\_mode** string | **Choices:*** Secondary-server
* Primary-server
| Configured primary or secondary server for a particular server. |
| **radius\_server\_name** string | | Hostname of configured server. The value is a string of 0 to 255 case-sensitive characters. |
| **radius\_server\_port** string | | Configured server port for a particular server. The value is an integer ranging from 1 to 65535. |
| **radius\_server\_type** string | **Choices:*** Authentication
* Accounting
| Type of Radius Server. |
| **radius\_vpn\_name** string | | Set VPN instance. The value is a string of 1 to 31 case-sensitive characters. |
| **state** string | **Choices:*** **present** β
* absent
| Specify desired state of the resource. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: AAA server host test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Config local user when use local scheme"
community.network.ce_aaa_server_host:
state: present
local_user_name: user1
local_password: 123456
provider: "{{ cli }}"
- name: "Undo local user when use local scheme"
community.network.ce_aaa_server_host:
state: absent
local_user_name: user1
local_password: 123456
provider: "{{ cli }}"
- name: "Config radius server ip"
community.network.ce_aaa_server_host:
state: present
radius_group_name: group1
radius_server_type: Authentication
radius_server_ip: 10.1.10.1
radius_server_port: 2000
radius_server_mode: Primary-server
radius_vpn_name: _public_
provider: "{{ cli }}"
- name: "Undo radius server ip"
community.network.ce_aaa_server_host:
state: absent
radius_group_name: group1
radius_server_type: Authentication
radius_server_ip: 10.1.10.1
radius_server_port: 2000
radius_server_mode: Primary-server
radius_vpn_name: _public_
provider: "{{ cli }}"
- name: "Config hwtacacs server ip"
community.network.ce_aaa_server_host:
state: present
hwtacacs_template: template
hwtacacs_server_ip: 10.10.10.10
hwtacacs_server_type: Authorization
hwtacacs_vpn_name: _public_
provider: "{{ cli }}"
- name: "Undo hwtacacs server ip"
community.network.ce_aaa_server_host:
state: absent
hwtacacs_template: template
hwtacacs_server_ip: 10.10.10.10
hwtacacs_server_type: Authorization
hwtacacs_vpn_name: _public_
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution **Sample:** {'radius server ipv4': [['10.1.10.1', 'Authentication', '2000', 'Primary-server', '\_public\_']]} |
| **existing** dictionary | always | k/v pairs of existing aaa server host **Sample:** {'radius server ipv4': []} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'hwtacacs\_is\_public\_net': 'false', 'hwtacacs\_is\_secondary\_server': 'false', 'hwtacacs\_server\_ip': '10.135.182.157', 'hwtacacs\_server\_type': 'Authorization', 'hwtacacs\_template': 'wdz', 'hwtacacs\_vpn\_name': '\_public\_', 'local\_password': '\*\*\*\*\*\*', 'state': 'present'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['hwtacacs server template test', 'hwtacacs server authorization 10.135.182.157 vpn-instance test\_vpn public-net'] |
### Authors
* wangdezhuang (@QijunPan)
ansible community.network.avi_network β Module for setup of Network Avi RESTful Object community.network.avi\_network β Module for setup of Network Avi RESTful Object
===============================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_network`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure Network object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **cloud\_ref** string | | It is a reference to an object of type cloud. |
| **configured\_subnets** string | | List of subnet. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **dhcp\_enabled** boolean | **Choices:*** no
* yes
| 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** boolean | **Choices:*** no
* yes
| 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. |
| **ip6\_autocfg\_enabled** boolean | **Choices:*** no
* yes
| Enable ipv6 auto configuration. Field introduced in 18.1.1. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **name** string / required | | Name of the object. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **synced\_from\_se** boolean | **Choices:*** no
* yes
| Boolean flag to set synced\_from\_se. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
| **vcenter\_dvs** boolean | **Choices:*** no
* yes
| Boolean flag to set vcenter\_dvs. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **vimgrnw\_ref** string | | It is a reference to an object of type vimgrnwruntime. |
| **vrf\_context\_ref** string | | It is a reference to an object of type vrfcontext. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create Network object
community.network.avi_network:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_network
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | Network (api/network) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#adcadfccded9c2cac48b8e9e9a968b8e989f968b8e999596ccdbc4c3c8d9dac2dfc6de8b8e999b96cec2c0)>
| programming_docs |
ansible community.network.avi_actiongroupconfig β Module for setup of ActionGroupConfig Avi RESTful Object community.network.avi\_actiongroupconfig β Module for setup of ActionGroupConfig Avi RESTful Object
===================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_actiongroupconfig`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure ActionGroupConfig object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action\_script\_config\_ref** string | | Reference of the action script configuration to be used. It is a reference to an object of type alertscriptconfig. |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **autoscale\_trigger\_notification** boolean | **Choices:*** no
* yes
| Trigger notification to autoscale manager. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **description** string | | User defined description for the object. |
| **email\_config\_ref** string | | Select the email notification configuration to use when sending alerts via email. It is a reference to an object of type alertemailconfig. |
| **external\_only** boolean / required | **Choices:*** no
* yes
| Generate alert only to external destinations. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **level** string / required | | When an alert is generated, mark its priority via the alert level. Enum options - ALERT\_LOW, ALERT\_MEDIUM, ALERT\_HIGH. Default value when not specified in API or module is interpreted by Avi Controller as ALERT\_LOW. |
| **name** string / required | | Name of the object. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **snmp\_trap\_profile\_ref** string | | Select the snmp trap notification to use when sending alerts via snmp trap. It is a reference to an object of type snmptrapprofile. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **syslog\_config\_ref** string | | Select the syslog notification configuration to use when sending alerts via syslog. It is a reference to an object of type alertsyslogconfig. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create ActionGroupConfig object
community.network.avi_actiongroupconfig:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_actiongroupconfig
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | ActionGroupConfig (api/actiongroupconfig) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#cea9bcafbdbaa1a9a7e8edfdf9f5e8edfbfcf5e8edfaf6f5afb8a7a0abbab9a1bca5bde8edfaf8f5ada1a3)>
ansible community.network.cnos_lldp β Manage LLDP configuration on Lenovo CNOS network devices. community.network.cnos\_lldp β Manage LLDP configuration on Lenovo CNOS network devices.
========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_lldp`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of LLDP service on Lenovc CNOS network devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **state** string | **Choices:*** **present** β
* absent
| State of the LLDP configuration. If value is *present* lldp will be enabled else if it is *absent* it will be disabled. |
Notes
-----
Note
* Tested against CNOS 10.9.1
Examples
--------
```
- name: Enable LLDP service
community.network.cnos_lldp:
state: present
- name: Disable LLDP service
community.network.cnos_lldp:
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device **Sample:** ['lldp timer 1024', 'lldp trap-interval 330'] |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
ansible community.network.avi_sslkeyandcertificate β Module for setup of SSLKeyAndCertificate Avi RESTful Object community.network.avi\_sslkeyandcertificate β Module for setup of SSLKeyAndCertificate Avi RESTful Object
=========================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_sslkeyandcertificate`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure SSLKeyAndCertificate object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **ca\_certs** string | | Ca certificates in certificate chain. |
| **certificate** string / required | | Sslcertificate settings for sslkeyandcertificate. |
| **certificate\_base64** boolean | **Choices:*** no
* yes
| States if the certificate is base64 encoded. Field introduced in 18.1.2, 18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **certificate\_management\_profile\_ref** string | | It is a reference to an object of type certificatemanagementprofile. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **created\_by** string | | Creator name. |
| **dynamic\_params** string | | Dynamic parameters needed for certificate management profile. |
| **enckey\_base64** string | | Encrypted private key corresponding to the private key (e.g. Those generated by an hsm such as thales nshield). |
| **enckey\_name** string | | Name of the encrypted private key (e.g. Those generated by an hsm such as thales nshield). |
| **format** string | | Format of the key/certificate file. Enum options - SSL\_PEM, SSL\_PKCS12. Field introduced in 18.1.2, 18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as SSL\_PEM. |
| **hardwaresecuritymodulegroup\_ref** string | | It is a reference to an object of type hardwaresecuritymodulegroup. |
| **key** string | | Private key. |
| **key\_base64** boolean | **Choices:*** no
* yes
| States if the private key is base64 encoded. Field introduced in 18.1.2, 18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **key\_params** string | | Sslkeyparams settings for sslkeyandcertificate. |
| **key\_passphrase** string | | Passphrase used to encrypt the private key. Field introduced in 18.1.2, 18.2.1. |
| **name** string / required | | Name of the object. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **status** string | | Enum options - ssl\_certificate\_finished, ssl\_certificate\_pending. Default value when not specified in API or module is interpreted by Avi Controller as SSL\_CERTIFICATE\_FINISHED. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **type** string | | Enum options - ssl\_certificate\_type\_virtualservice, ssl\_certificate\_type\_system, ssl\_certificate\_type\_ca. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create a SSL Key and Certificate
community.network.avi_sslkeyandcertificate:
controller: 10.10.27.90
username: admin
password: AviNetworks123!
key: |
-----BEGIN PRIVATE KEY-----
....
-----END PRIVATE KEY-----
certificate:
self_signed: true
certificate: |
-----BEGIN CERTIFICATE-----
....
-----END CERTIFICATE-----
type: SSL_CERTIFICATE_TYPE_VIRTUALSERVICE
name: MyTestCert
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | SSLKeyAndCertificate (api/sslkeyandcertificate) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#dcbbaebdafa8b3bbb5faffefebe7faffe9eee7faffe8e4e7bdaab5b2b9a8abb3aeb7affaffe8eae7bfb3b1)>
ansible community.network.netscaler_server β Manage server configuration community.network.netscaler\_server β Manage server configuration
=================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.netscaler_server`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage server entities configuration.
* This module is intended to run either on the ansible control node or a bastion (jumpserver) with access to the actual netscaler instance.
Requirements
------------
The below requirements are needed on the host that executes this module.
* nitro python sdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **comment** string | | Any information about the server. |
| **delay** string | | Time, in seconds, after which all the services configured on the server are disabled. This option is meaningful only when setting the *disabled* option to `true`
|
| **disabled** boolean | **Choices:*** **no** β
* yes
| When set to `true` the server state will be set to `disabled`. When set to `false` the server state will be set to `enabled`. Note that due to limitations of the underlying NITRO API a `disabled` state change alone does not cause the module result to report a changed status. |
| **domain** string | | Domain name of the server. For a domain based configuration, you must create the server first. Minimum length = 1 |
| **domainresolveretry** string | **Default:**5 | Time, in seconds, for which the NetScaler appliance must wait, after DNS resolution fails, before sending the next DNS query to resolve the domain name. Minimum value = `5`
Maximum value = `20939`
|
| **graceful** boolean | **Choices:*** no
* yes
| Shut down gracefully, without accepting any new connections, and disabling each service when all of its connections are closed. This option is meaningful only when setting the *disabled* option to `true`
|
| **ipaddress** string | | IPv4 or IPv6 address of the server. If you create an IP address based server, you can specify the name of the server, instead of its IP address, when creating a service. Note: If you do not create a server entry, the server IP address that you enter when you create a service becomes the name of the server. |
| **ipv6address** boolean | **Choices:*** **no** β
* yes
| Support IPv6 addressing mode. If you configure a server with the IPv6 addressing mode, you cannot use the server in the IPv4 addressing mode. |
| **name** string | | Name for the server. Must begin with an ASCII alphabetic or underscore `_` character, and must contain only ASCII alphanumeric, underscore `_`, hash `#`, period `.`, space , colon `:`, at `@`, equals `=`, and hyphen `-` characters. Can be changed after the name is created. Minimum length = 1 |
| **nitro\_pass** string / required | | The password with which to authenticate to the netscaler node. |
| **nitro\_protocol** string | **Choices:*** **http** β
* https
| Which protocol to use when accessing the nitro API objects. |
| **nitro\_timeout** float | **Default:**310 | Time in seconds until a timeout error is thrown when establishing a new session with Netscaler |
| **nitro\_user** string / required | | The username with which to authenticate to the netscaler node. |
| **nsip** string / required | | The ip address of the netscaler appliance where the nitro API calls will be made. The port can be specified with the colon (:). E.g. 192.168.1.1:555. |
| **save\_config** boolean | **Choices:*** no
* **yes** β
| If `yes` the module will save the configuration on the netscaler node if it makes any changes. The module will not save the configuration on the netscaler node if it made no changes. |
| **state** string | **Choices:*** absent
* **present** β
| The state of the resource being configured by the module on the netscaler node. When present the resource will be created if needed and configured according to the module's parameters. When absent the resource will be deleted from the netscaler node. |
| **td** string | | Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Minimum value = `0`
Maximum value = `4094`
|
| **translationip** string | | IP address used to transform the server's DNS-resolved IP address. |
| **translationmask** string | | The netmask of the translation ip. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* For more information on using Ansible to manage Citrix NetScaler Network devices see <https://www.ansible.com/ansible-netscaler>.
Examples
--------
```
- name: Setup server
delegate_to: localhost
community.network.netscaler_server:
nsip: 172.18.0.2
nitro_user: nsroot
nitro_pass: nsroot
state: present
name: server-1
ipaddress: 192.168.1.1
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **diff** dictionary | failure | List of differences between the actual configured object and the configuration specified in the module **Sample:** {'targetlbvserver': 'difference. ours: (str) server1 other: (str) server2'} |
| **loglines** list / elements=string | always | list of logged messages by the module **Sample:** ['message 1', 'message 2'] |
| **msg** string | failure | Message detailing the failure reason **Sample:** Action does not exist |
### Authors
* George Nikolopoulos (@giorgos-nikolopoulos)
| programming_docs |
ansible community.network.avi_controllerproperties β Module for setup of ControllerProperties Avi RESTful Object community.network.avi\_controllerproperties β Module for setup of ControllerProperties Avi RESTful Object
=========================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_controllerproperties`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure ControllerProperties object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_ip\_forwarding** boolean | **Choices:*** no
* yes
| Field introduced in 17.1.1. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **allow\_unauthenticated\_apis** boolean | **Choices:*** no
* yes
| Allow unauthenticated access for special apis. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **allow\_unauthenticated\_nodes** boolean | **Choices:*** no
* yes
| Boolean flag to set allow\_unauthenticated\_nodes. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_idle\_timeout** string | | Allowed values are 0-1440. Default value when not specified in API or module is interpreted by Avi Controller as 15. |
| **api\_perf\_logging\_threshold** string | | Threshold to log request timing in portal\_performance.log and server-timing response header. Any stage taking longer than 1% of the threshold will be included in the server-timing header. Field introduced in 18.1.4, 18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as 10000. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **appviewx\_compat\_mode** boolean | **Choices:*** no
* yes
| Export configuration in appviewx compatibility mode. Field introduced in 17.1.1. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **attach\_ip\_retry\_interval** string | | Number of attach\_ip\_retry\_interval. Default value when not specified in API or module is interpreted by Avi Controller as 360. |
| **attach\_ip\_retry\_limit** string | | Number of attach\_ip\_retry\_limit. Default value when not specified in API or module is interpreted by Avi Controller as 4. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **bm\_use\_ansible** boolean | **Choices:*** no
* yes
| Use ansible for se creation in baremetal. Field introduced in 17.2.2. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **cleanup\_expired\_authtoken\_timeout\_period** string | | Period for auth token cleanup job. Field introduced in 18.1.1. Default value when not specified in API or module is interpreted by Avi Controller as 60. |
| **cleanup\_sessions\_timeout\_period** string | | Period for sessions cleanup job. Field introduced in 18.1.1. Default value when not specified in API or module is interpreted by Avi Controller as 60. |
| **cloud\_reconcile** boolean | **Choices:*** no
* yes
| Enable/disable periodic reconcile for all the clouds. Field introduced in 17.2.14,18.1.5,18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **cluster\_ip\_gratuitous\_arp\_period** string | | Period for cluster ip gratuitous arp job. Default value when not specified in API or module is interpreted by Avi Controller as 60. |
| **consistency\_check\_timeout\_period** string | | Period for consistency check job. Field introduced in 18.1.1. Default value when not specified in API or module is interpreted by Avi Controller as 60. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **crashed\_se\_reboot** string | | Number of crashed\_se\_reboot. Default value when not specified in API or module is interpreted by Avi Controller as 900. |
| **dead\_se\_detection\_timer** string | | Number of dead\_se\_detection\_timer. Default value when not specified in API or module is interpreted by Avi Controller as 360. |
| **dns\_refresh\_period** string | | Period for refresh pool and gslb dns job. Default value when not specified in API or module is interpreted by Avi Controller as 60. |
| **dummy** string | | Number of dummy. |
| **enable\_api\_sharding** boolean | **Choices:*** no
* yes
| This setting enables the controller leader to shard api requests to the followers (if any). Field introduced in 18.1.5, 18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **enable\_memory\_balancer** boolean | **Choices:*** no
* yes
| Enable/disable memory balancer. Field introduced in 17.2.8. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **fatal\_error\_lease\_time** string | | Number of fatal\_error\_lease\_time. Default value when not specified in API or module is interpreted by Avi Controller as 120. |
| **max\_dead\_se\_in\_grp** string | | Number of max\_dead\_se\_in\_grp. Default value when not specified in API or module is interpreted by Avi Controller as 1. |
| **max\_pcap\_per\_tenant** string | | Maximum number of pcap files stored per tenant. Default value when not specified in API or module is interpreted by Avi Controller as 4. |
| **max\_seq\_attach\_ip\_failures** string | | Maximum number of consecutive attach ip failures that halts vs placement. Field introduced in 17.2.2. Default value when not specified in API or module is interpreted by Avi Controller as 3. |
| **max\_seq\_vnic\_failures** string | | Number of max\_seq\_vnic\_failures. Default value when not specified in API or module is interpreted by Avi Controller as 3. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **persistence\_key\_rotate\_period** string | | Period for rotate app persistence keys job. Allowed values are 1-1051200. Special values are 0 - 'disabled'. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **portal\_token** string | | Token used for uploading tech-support to portal. Field introduced in 16.4.6,17.1.2. |
| **process\_locked\_useraccounts\_timeout\_period** string | | Period for process locked user accounts job. Field introduced in 18.1.1. Default value when not specified in API or module is interpreted by Avi Controller as 1. |
| **process\_pki\_profile\_timeout\_period** string | | Period for process pki profile job. Field introduced in 18.1.1. Default value when not specified in API or module is interpreted by Avi Controller as 1440. |
| **query\_host\_fail** string | | Number of query\_host\_fail. Default value when not specified in API or module is interpreted by Avi Controller as 180. |
| **safenet\_hsm\_version** string | | Version of the safenet package installed on the controller. Field introduced in 16.5.2,17.2.3. |
| **se\_create\_timeout** string | | Number of se\_create\_timeout. Default value when not specified in API or module is interpreted by Avi Controller as 900. |
| **se\_failover\_attempt\_interval** string | | Interval between attempting failovers to an se. Default value when not specified in API or module is interpreted by Avi Controller as 300. |
| **se\_from\_marketplace** string | | This setting decides whether se is to be deployed from the cloud marketplace or to be created by the controller. The setting is applicable only when byol license is selected. Enum options - MARKETPLACE, IMAGE. Field introduced in 18.1.4, 18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as IMAGE. |
| **se\_offline\_del** string | | Number of se\_offline\_del. Default value when not specified in API or module is interpreted by Avi Controller as 172000. |
| **se\_vnic\_cooldown** string | | Number of se\_vnic\_cooldown. Default value when not specified in API or module is interpreted by Avi Controller as 120. |
| **secure\_channel\_cleanup\_timeout** string | | Period for secure channel cleanup job. Default value when not specified in API or module is interpreted by Avi Controller as 60. |
| **secure\_channel\_controller\_token\_timeout** string | | Number of secure\_channel\_controller\_token\_timeout. Default value when not specified in API or module is interpreted by Avi Controller as 60. |
| **secure\_channel\_se\_token\_timeout** string | | Number of secure\_channel\_se\_token\_timeout. Default value when not specified in API or module is interpreted by Avi Controller as 60. |
| **seupgrade\_fabric\_pool\_size** string | | Pool size used for all fabric commands during se upgrade. Default value when not specified in API or module is interpreted by Avi Controller as 20. |
| **seupgrade\_segroup\_min\_dead\_timeout** string | | Time to wait before marking segroup upgrade as stuck. Default value when not specified in API or module is interpreted by Avi Controller as 360. |
| **ssl\_certificate\_expiry\_warning\_days** string | | Number of days for ssl certificate expiry warning. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **unresponsive\_se\_reboot** string | | Number of unresponsive\_se\_reboot. Default value when not specified in API or module is interpreted by Avi Controller as 300. |
| **upgrade\_dns\_ttl** string | | Time to account for dns ttl during upgrade. This is in addition to vs\_scalein\_timeout\_for\_upgrade in se\_group. Field introduced in 17.1.1. Default value when not specified in API or module is interpreted by Avi Controller as 5. |
| **upgrade\_lease\_time** string | | Number of upgrade\_lease\_time. Default value when not specified in API or module is interpreted by Avi Controller as 360. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
| **vnic\_op\_fail\_time** string | | Number of vnic\_op\_fail\_time. Default value when not specified in API or module is interpreted by Avi Controller as 180. |
| **vs\_apic\_scaleout\_timeout** string | | Time to wait for the scaled out se to become ready before marking the scaleout done, applies to apic configuration only. Default value when not specified in API or module is interpreted by Avi Controller as 360. |
| **vs\_awaiting\_se\_timeout** string | | Number of vs\_awaiting\_se\_timeout. Default value when not specified in API or module is interpreted by Avi Controller as 60. |
| **vs\_key\_rotate\_period** string | | Period for rotate vs keys job. Allowed values are 1-1051200. Special values are 0 - 'disabled'. Default value when not specified in API or module is interpreted by Avi Controller as 360. |
| **vs\_scaleout\_ready\_check\_interval** string | | Interval for checking scaleout\_ready status while controller is waiting for scaleoutready rpc from the service engine. Field introduced in 18.2.2. Default value when not specified in API or module is interpreted by Avi Controller as 60. |
| **vs\_se\_attach\_ip\_fail** string | | Time to wait before marking attach ip operation on an se as failed. Field introduced in 17.2.2. Default value when not specified in API or module is interpreted by Avi Controller as 600. |
| **vs\_se\_bootup\_fail** string | | Number of vs\_se\_bootup\_fail. Default value when not specified in API or module is interpreted by Avi Controller as 480. |
| **vs\_se\_create\_fail** string | | Number of vs\_se\_create\_fail. Default value when not specified in API or module is interpreted by Avi Controller as 1500. |
| **vs\_se\_ping\_fail** string | | Number of vs\_se\_ping\_fail. Default value when not specified in API or module is interpreted by Avi Controller as 60. |
| **vs\_se\_vnic\_fail** string | | Number of vs\_se\_vnic\_fail. Default value when not specified in API or module is interpreted by Avi Controller as 300. |
| **vs\_se\_vnic\_ip\_fail** string | | Number of vs\_se\_vnic\_ip\_fail. Default value when not specified in API or module is interpreted by Avi Controller as 120. |
| **warmstart\_se\_reconnect\_wait\_time** string | | Number of warmstart\_se\_reconnect\_wait\_time. Default value when not specified in API or module is interpreted by Avi Controller as 480. |
| **warmstart\_vs\_resync\_wait\_time** string | | Timeout for warmstart vs resync. Field introduced in 18.1.4, 18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as 300. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create ControllerProperties object
community.network.avi_controllerproperties:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_controllerproperties
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | ControllerProperties (api/controllerproperties) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#88effae9fbfce7efe1aeabbbbfb3aeabbdbab3aeabbcb0b3e9fee1e6edfcffe7fae3fbaeabbcbeb3ebe7e5)>
ansible community.network.enos β Use enos cliconf to run command on Lenovo ENOS platform community.network.enos β Use enos cliconf to run command on Lenovo ENOS platform
================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.enos`.
Synopsis
--------
* This enos plugin provides low level abstraction apis for sending and receiving CLI commands from Lenovo ENOS network devices.
### Authors
* Unknown (!UNKNOWN)
ansible community.network.cnos_static_route β Manage static IP routes on Lenovo CNOS network devices community.network.cnos\_static\_route β Manage static IP routes on Lenovo CNOS network devices
==============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_static_route`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of static IP routes on Lenovo CNOS network devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **admin\_distance** string | **Default:**1 | Admin distance of the static route. |
| **aggregate** string | | List of static route definitions. |
| **description** string | | Name of the static route
aliases: description |
| **interface** string | | Interface of the static route. |
| **mask** string | | Network prefix mask of the static route. |
| **next\_hop** string | | Next hop IP of the static route. |
| **prefix** string | | Network prefix of the static route. |
| **state** string | **Choices:*** **present** β
* absent
| State of the static route configuration. |
| **tag** string | | Set tag of the static route. |
Notes
-----
Note
* Tested against CNOS 10.10.1
Examples
--------
```
- name: Configure static route
community.network.cnos_static_route:
prefix: 10.241.107.0
mask: 255.255.255.0
next_hop: 10.241.106.1
- name: Configure ultimate route with name and tag
community.network.cnos_static_route:
prefix: 10.241.107.0
mask: 255.255.255.0
interface: Ethernet1/13
description: hello world
tag: 100
- name: Remove configuration
community.network.cnos_static_route:
prefix: 10.241.107.0
mask: 255.255.255.0
next_hop: 10.241.106.0
state: absent
- name: Add static route aggregates
community.network.cnos_static_route:
aggregate:
- { prefix: 10.241.107.0, mask: 255.255.255.0, next_hop: 10.241.105.0 }
- { prefix: 10.241.106.0, mask: 255.255.255.0, next_hop: 10.241.104.0 }
- name: Remove static route aggregates
community.network.cnos_static_route:
aggregate:
- { prefix: 10.241.107.0, mask: 255.255.255.0, next_hop: 10.241.105.0 }
- { prefix: 10.241.106.0, mask: 255.255.255.0, next_hop: 10.241.104.0 }
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always | The list of configuration mode commands to send to the device **Sample:** ['ip route 10.241.107.0 255.255.255.0 10.241.106.0'] |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
| programming_docs |
ansible community.network.aireos β Use aireos cliconf to run command on Cisco WLC platform community.network.aireos β Use aireos cliconf to run command on Cisco WLC platform
==================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.aireos`.
Synopsis
--------
* This aireos plugin provides low level abstraction apis for sending and receiving CLI commands from Cisco WLC network devices.
### Authors
* Unknown (!UNKNOWN)
ansible community.network.icx_vlan β Manage VLANs on Ruckus ICX 7000 series switches community.network.icx\_vlan β Manage VLANs on Ruckus ICX 7000 series switches
=============================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.icx_vlan`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of VLANs on ICX network devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate** list / elements=string | | List of VLANs definitions. |
| | **associated\_interfaces** list / elements=string | | This is a intent option and checks the operational state of the for given vlan `name` for associated interfaces. If the value in the `associated_interfaces` does not match with the operational state of vlan interfaces on device it will result in failure. |
| | **associated\_tagged** list / elements=string | | This is a intent option and checks the operational state of given vlan `name` for associated tagged ports and lags. If the value in the `associated_tagged` does not match with the operational state of vlan interfaces on device it will result in failure. |
| | **check\_running\_config** boolean | **Choices:*** no
* yes
| Check running configuration. This can be set as environment variable. Module will use environment variable value(default:True), unless it is overridden, by specifying it as module parameter. |
| | **delay** integer | | Delay the play should wait to check for declarative intent params values. |
| | **interfaces** dictionary | | List of ethernet ports or LAGS to be added as access(untagged) ports to the vlan. To add a range of ports use 'to' keyword. See the example. |
| | | **name** list / elements=string | | Name of the interface or lag |
| | | **purge** boolean | **Choices:*** no
* yes
| Purge interfaces not defined in the *name*
|
| | **ip\_arp\_inspection** boolean | **Choices:*** no
* yes
| Enables dynamic ARP inspection on a VLAN. |
| | **ip\_dhcp\_snooping** boolean | **Choices:*** no
* yes
| Enables DHCP snooping on a VLAN. |
| | **name** string | | Name of the VLAN. |
| | **state** string | **Choices:*** present
* absent
| State of the VLAN configuration. |
| | **stp** dictionary | | Enable spanning-tree 802-1w/rstp for this vlan. |
| | | **enabled** boolean | **Choices:*** no
* yes
| Manage the state(Enable/Disable) of the spanning\_tree\_802\_1w in the current vlan |
| | | **priority** string | | Configures the priority of the bridge. The value ranges from 0 through 65535. A lower numerical value means the bridge has a higher priority. Thus, the highest priority is 0. The default is 32768. |
| | | **type** string | **Choices:*** **802-1w** β
* rstp
| Specify the type of spanning-tree |
| | **tagged** dictionary | | List of ethernet ports or LAGS to be added as trunk(tagged) ports to the vlan. To add a range of ports use 'to' keyword. See the example. |
| | | **name** list / elements=string | | Name of the interface or lag |
| | | **purge** boolean | **Choices:*** no
* yes
| Purge interfaces not defined in the *name*
|
| | **vlan\_id** string / required | | ID of the VLAN. Range 1-4094. |
| **associated\_interfaces** list / elements=string | | This is a intent option and checks the operational state of the for given vlan `name` for associated interfaces. If the value in the `associated_interfaces` does not match with the operational state of vlan interfaces on device it will result in failure. |
| **associated\_tagged** list / elements=string | | This is a intent option and checks the operational state of given vlan `name` for associated tagged ports and lags. If the value in the `associated_tagged` does not match with the operational state of vlan interfaces on device it will result in failure. |
| **check\_running\_config** boolean | **Choices:*** no
* **yes** β
| Check running configuration. This can be set as environment variable. Module will use environment variable value(default:True), unless it is overridden, by specifying it as module parameter. |
| **delay** integer | **Default:**10 | Delay the play should wait to check for declarative intent params values. |
| **interfaces** dictionary | | List of ethernet ports or LAGS to be added as access(untagged) ports to the vlan. To add a range of ports use 'to' keyword. See the example. |
| | **name** list / elements=string | | Name of the interface or lag |
| | **purge** boolean | **Choices:*** no
* yes
| Purge interfaces not defined in the *name*
|
| **ip\_arp\_inspection** boolean | **Choices:*** no
* yes
| Enables dynamic ARP inspection on a VLAN. |
| **ip\_dhcp\_snooping** boolean | **Choices:*** no
* yes
| Enables DHCP snooping on a VLAN. |
| **name** string | | Name of the VLAN. |
| **purge** boolean | **Choices:*** **no** β
* yes
| Purge VLANs not defined in the *aggregate* parameter. |
| **state** string | **Choices:*** **present** β
* absent
| State of the VLAN configuration. |
| **stp** dictionary | | Enable spanning-tree 802-1w/rstp for this vlan. |
| | **enabled** boolean | **Choices:*** no
* yes
| Manage the state(Enable/Disable) of the spanning\_tree\_802\_1w in the current vlan |
| | **priority** string | | Configures the priority of the bridge. The value ranges from 0 through 65535. A lower numerical value means the bridge has a higher priority. Thus, the highest priority is 0. The default is 32768. |
| | **type** string | **Choices:*** **802-1w** β
* rstp
| Specify the type of spanning-tree |
| **tagged** dictionary | | List of ethernet ports or LAGS to be added as trunk(tagged) ports to the vlan. To add a range of ports use 'to' keyword. See the example. |
| | **name** list / elements=string | | Name of the interface or lag |
| | **purge** boolean | **Choices:*** no
* yes
| Purge interfaces not defined in the *name*
|
| **vlan\_id** integer / required | | ID of the VLAN. Range 1-4094. |
Notes
-----
Note
* Tested against ICX 10.1.
* For information on using ICX platform, see [the ICX OS Platform Options guide](user_guide/platform_icx).
Examples
--------
```
- name: Add a single ethernet 1/1/48 as access(untagged) port to vlan 20
community.network.icx_vlan:
name: test-vlan
vlan_id: 20
interfaces:
name:
- ethernet 1/1/48
- name: Add a single LAG 10 as access(untagged) port to vlan 20
community.network.icx_vlan:
vlan_id: 20
interfaces:
name:
- lag 10
- name: Add a range of ethernet ports as trunk(tagged) ports to vlan 20 by port
community.network.icx_vlan:
vlan_id: 20
tagged:
name:
- ethernet 1/1/40 to 1/1/48
- name: Add discontinuous lags, ethernet ports as access(untagged) and trunk(tagged) port to vlan 20.
community.network.icx_vlan:
vlan_id: 20
interfaces:
name:
- ethernet 1/1/40 to 1/1/48
- ethernet 2/1/1
- lag 1
- lag 3 to 5
tagged:
name:
- ethernet 1/1/20 to 1/1/25
- lag 1 to 3
- name: Remove an access and range of trunk ports from vlan
community.network.icx_vlan:
vlan_id: 20
interfaces:
name:
- ethernet 1/1/40
tagged:
name:
- ethernet 1/1/39 to 1/1/70
- name: Enable dhcp snooping, disable arp inspection in vlan
community.network.icx_vlan:
vlan_id: 20
ip_dhcp_snooping: present
ip_arp_inspection: absent
- name: Create vlan 20. Enable arp inspection in vlan. Purge all other vlans.
community.network.icx_vlan:
vlan_id: 20
ip_arp_inspection: present
purge: present
- name: Remove vlan 20.
community.network.icx_vlan:
vlan_id: 20
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always | The list of configuration mode commands to send to the device **Sample:** ['vlan 100', 'name test-vlan'] |
### Authors
* Ruckus Wireless (@Commscope)
ansible community.network.pn_igmp_snooping β CLI command to modify igmp-snooping community.network.pn\_igmp\_snooping β CLI command to modify igmp-snooping
==========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_igmp_snooping`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to modify Internet Group Management Protocol (IGMP) snooping.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_enable** boolean | **Choices:*** no
* yes
| enable or disable IGMP snooping. |
| **pn\_enable\_vlans** string | | enable per VLAN IGMP snooping. |
| **pn\_igmpv2\_vlans** string | | VLANs on which to use IGMPv2 protocol. |
| **pn\_igmpv3\_vlans** string | | VLANs on which to use IGMPv3 protocol. |
| **pn\_no\_snoop\_linklocal\_vlans** string | | Remove snooping of link-local groups(224.0.0.0/24) on these vlans. |
| **pn\_query\_interval** string | | IGMP query interval in seconds. |
| **pn\_query\_max\_response\_time** string | | maximum response time, in seconds, advertised in IGMP queries. |
| **pn\_scope** string | **Choices:*** local
* fabric
| IGMP snooping scope - fabric or local. |
| **pn\_snoop\_linklocal\_vlans** string | | Allow snooping of link-local groups(224.0.0.0/24) on these vlans. |
| **pn\_vxlan** boolean | **Choices:*** no
* yes
| enable or disable IGMP snooping on vxlans. |
| **state** string / required | **Choices:*** update
| State the action to perform. Use `update` to modify the igmp-snooping. |
Examples
--------
```
- name: 'Modify IGMP Snooping'
community.network.pn_igmp_snooping:
pn_cliswitch: 'sw01'
state: 'update'
pn_vxlan: True
pn_enable_vlans: '1-399,401-4092'
pn_no_snoop_linklocal_vlans: 'none'
pn_igmpv3_vlans: '1-399,401-4092'
- name: 'Modify IGMP Snooping'
community.network.pn_igmp_snooping:
pn_cliswitch: 'sw01'
state: 'update'
pn_vxlan: False
pn_enable_vlans: '1-399'
pn_no_snoop_linklocal_vlans: 'none'
pn_igmpv3_vlans: '1-399'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the igmp-snooping command. |
| **stdout** list / elements=string | always | set of responses from the igmp-snooping command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.ipadm_addrprop β Manage IP address properties on Solaris/illumos systems. community.network.ipadm\_addrprop β Manage IP address properties on Solaris/illumos systems.
============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ipadm_addrprop`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Modify IP address properties on Solaris/illumos systems.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **addrobj** string / required | | Specifies the address object we want to manage.
aliases: nic, interface |
| **property** string / required | | Specifies the name of the address property we want to manage.
aliases: name |
| **state** string | **Choices:*** **present** β
* absent
* reset
| Set or reset the property value. |
| **temporary** boolean | **Choices:*** **no** β
* yes
| Specifies that the address property value is temporary. Temporary values do not persist across reboots. |
| **value** string | | Specifies the value we want to set for the address property. |
Examples
--------
```
- name: Mark address on addrobj as deprecated
community.network.ipadm_addrprop: property=deprecated value=on addrobj=e1000g0/v6
- name: Set network prefix length for addrobj
community.network.ipadm_addrprop: addrobj=bge0/v4 name=prefixlen value=26
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **addrobj** string | always | address object name **Sample:** bge0/v4 |
| **property** string | always | property name **Sample:** deprecated |
| **state** string | always | state of the target **Sample:** present |
| **temporary** boolean | always | specifies if operation will persist across reboots **Sample:** True |
| **value** string | when value is provided | property value **Sample:** 26 |
### Authors
* Adam Ε tevko (@xen0l)
ansible community.network.ce_evpn_bd_vni β Manages EVPN VXLAN Network Identifier (VNI) on HUAWEI CloudEngine switches. community.network.ce\_evpn\_bd\_vni β Manages EVPN VXLAN Network Identifier (VNI) on HUAWEI CloudEngine switches.
=================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_evpn_bd_vni`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages Ethernet Virtual Private Network (EVPN) VXLAN Network Identifier (VNI) configurations on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bridge\_domain\_id** string / required | | Specify an existed bridge domain (BD).The value is an integer ranging from 1 to 16777215. |
| **evpn** string | **Choices:*** **enable** β
* disable
| Create or delete an EVPN instance for a VXLAN in BD view. |
| **route\_distinguisher** string | | Configures a route distinguisher (RD) for a BD EVPN instance. The format of an RD can be as follows 1) 2-byte AS number:4-byte user-defined number, for example, 1:3. An AS number is an integer ranging from 0 to 65535, and a user-defined number is an integer ranging from 0 to 4294967295. The AS and user-defined numbers cannot be both 0s. This means that an RD cannot be 0:0. 2) Integral 4-byte AS number:2-byte user-defined number, for example, 65537:3. An AS number is an integer ranging from 65536 to 4294967295, and a user-defined number is an integer ranging from 0 to 65535. 3) 4-byte AS number in dotted notation:2-byte user-defined number, for example, 0.0:3 or 0.1:0. A 4-byte AS number in dotted notation is in the format of x.y, where x and y are integers ranging from 0 to 65535. 4) A user-defined number is an integer ranging from 0 to 65535. The AS and user-defined numbers cannot be both 0s. This means that an RD cannot be 0.0:0. 5) 32-bit IP address:2-byte user-defined number. For example, 192.168.122.15:1. An IP address ranges from 0.0.0.0 to 255.255.255.255, and a user-defined number is an integer ranging from 0 to 65535. 6) 'auto' specifies the RD that is automatically generated. |
| **state** string | **Choices:*** **present** β
* absent
| Manage the state of the resource. |
| **vpn\_target\_both** string | | Add VPN targets to both the import and export VPN target lists of a BD EVPN instance. The format is the same as route\_distinguisher. |
| **vpn\_target\_export** string | | Add VPN targets to the export VPN target list of a BD EVPN instance. The format is the same as route\_distinguisher. |
| **vpn\_target\_import** string / required | | Add VPN targets to the import VPN target list of a BD EVPN instance. The format is the same as route\_distinguisher. |
Notes
-----
Note
* Ensure that EVPN has been configured to serve as the VXLAN control plane when state is present.
* Ensure that a bridge domain (BD) has existed when state is present.
* Ensure that a VNI has been created and associated with a broadcast domain (BD) when state is present.
* If you configure evpn:false to delete an EVPN instance, all configurations in the EVPN instance are deleted.
* After an EVPN instance has been created in the BD view, you can configure an RD using route\_distinguisher parameter in BD-EVPN instance view.
* Before configuring VPN targets for a BD EVPN instance, ensure that an RD has been configured for the BD EVPN instance
* If you unconfigure route\_distinguisher, all VPN target attributes for the BD EVPN instance will be removed at the same time.
* When using state:absent, evpn is not supported and it will be ignored.
* When using state:absent to delete VPN target attributes, ensure the configuration of VPN target attributes has existed and otherwise it will report an error.
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: EVPN BD VNI test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Configure an EVPN instance for a VXLAN in BD view"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
evpn: enable
provider: "{{ cli }}"
- name: "Configure a route distinguisher (RD) for a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
route_distinguisher: '22:22'
provider: "{{ cli }}"
- name: "Configure VPN targets to both the import and export VPN target lists of a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
vpn_target_both: 22:100,22:101
provider: "{{ cli }}"
- name: "Configure VPN targets to the import VPN target list of a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
vpn_target_import: 22:22,22:23
provider: "{{ cli }}"
- name: "Configure VPN targets to the export VPN target list of a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
vpn_target_export: 22:38,22:39
provider: "{{ cli }}"
- name: "Unconfigure VPN targets to both the import and export VPN target lists of a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
vpn_target_both: '22:100'
state: absent
provider: "{{ cli }}"
- name: "Unconfigure VPN targets to the import VPN target list of a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
vpn_target_import: '22:22'
state: absent
provider: "{{ cli }}"
- name: "Unconfigure VPN targets to the export VPN target list of a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
vpn_target_export: '22:38'
state: absent
provider: "{{ cli }}"
- name: "Unconfigure a route distinguisher (RD) of a BD EVPN instance"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
route_distinguisher: '22:22'
state: absent
provider: "{{ cli }}"
- name: "Unconfigure an EVPN instance for a VXLAN in BD view"
community.network.ce_evpn_bd_vni:
bridge_domain_id: 20
evpn: disable
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of end attributes on the device **Sample:** {'bridge\_domain\_id': '2', 'evpn': 'enable', 'route\_distinguisher': '22:22', 'vpn\_target\_both': ['22:100', '22:101'], 'vpn\_target\_export': ['22:38', '22:39'], 'vpn\_target\_import': ['22:22', '22:23']} |
| **existing** dictionary | always | k/v pairs of existing attributes on the device **Sample:** {'bridge\_domain\_id': '2', 'evpn': 'disable', 'route\_distinguisher': None, 'vpn\_target\_both': [], 'vpn\_target\_export': [], 'vpn\_target\_import': []} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'bridge\_domain\_id': '2', 'evpn': 'enable', 'route\_distinguisher': '22:22', 'state': 'present', 'vpn\_target\_both': ['22:100', '22:101'], 'vpn\_target\_export': ['22:38', '22:39'], 'vpn\_target\_import': ['22:22', '22:23']} |
| **updates** list / elements=string | always | command list sent to the device **Sample:** ['bridge-domain 2', ' evpn', ' route-distinguisher 22:22', ' vpn-target 22:38 export-extcommunity', ' vpn-target 22:39 export-extcommunity', ' vpn-target 22:100 export-extcommunity', ' vpn-target 22:101 export-extcommunity', ' vpn-target 22:22 import-extcommunity', ' vpn-target 22:23 import-extcommunity', ' vpn-target 22:100 import-extcommunity', ' vpn-target 22:101 import-extcommunity'] |
### Authors
* Zhijin Zhou (@QijunPan)
| programming_docs |
ansible community.network.ce_acl_advance β Manages advanced ACL configuration on HUAWEI CloudEngine switches. community.network.ce\_acl\_advance β Manages advanced ACL configuration on HUAWEI CloudEngine switches.
=======================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_acl_advance`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages advanced ACL configurations on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **acl\_description** string | | ACL description. The value is a string of 1 to 127 characters. |
| **acl\_name** string / required | | ACL number or name. For a numbered rule group, the value ranging from 3000 to 3999 indicates a advance ACL. For a named rule group, the value is a string of 1 to 32 case-sensitive characters starting with a letter, spaces not supported. |
| **acl\_num** string | | ACL number. The value is an integer ranging from 3000 to 3999. |
| **acl\_step** string | | ACL step. The value is an integer ranging from 1 to 20. The default value is 5. |
| **dest\_ip** string | | Destination IP address. The value is a string of 0 to 255 characters.The default value is 0.0.0.0. The value is in dotted decimal notation. |
| **dest\_mask** string | | Destination IP address mask. The value is an integer ranging from 1 to 32. |
| **dest\_pool\_name** string | | Name of a destination pool. The value is a string of 1 to 32 characters. |
| **dest\_port\_begin** string | | Start port number of the destination port. The value is an integer ranging from 0 to 65535. |
| **dest\_port\_end** string | | End port number of the destination port. The value is an integer ranging from 0 to 65535. |
| **dest\_port\_op** string | **Choices:*** lt
* eq
* gt
* range
| Range type of the destination port. |
| **dest\_port\_pool\_name** string | | Name of a destination port pool. The value is a string of 1 to 32 characters. |
| **dscp** string | | Differentiated Services Code Point. The value is an integer ranging from 0 to 63. |
| **established** boolean | **Choices:*** **no** β
* yes
| Match established connections. |
| **frag\_type** string | **Choices:*** fragment
* clear\_fragment
| Type of packet fragmentation. |
| **icmp\_code** string | | ICMP message code. Data packets can be filtered based on the ICMP message code. The value is an integer ranging from 0 to 255. |
| **icmp\_name** string | **Choices:*** unconfiged
* echo
* echo-reply
* fragmentneed-DFset
* host-redirect
* host-tos-redirect
* host-unreachable
* information-reply
* information-request
* net-redirect
* net-tos-redirect
* net-unreachable
* parameter-problem
* port-unreachable
* protocol-unreachable
* reassembly-timeout
* source-quench
* source-route-failed
* timestamp-reply
* timestamp-request
* ttl-exceeded
* address-mask-reply
* address-mask-request
* custom
| ICMP name. |
| **icmp\_type** string | | ICMP type. This parameter is available only when the packet protocol is ICMP. The value is an integer ranging from 0 to 255. |
| **igmp\_type** string | **Choices:*** host-query
* mrouter-adver
* mrouter-solic
* mrouter-termi
* mtrace-resp
* mtrace-route
* v1host-report
* v2host-report
* v2leave-group
* v3host-report
| Internet Group Management Protocol. |
| **log\_flag** boolean | **Choices:*** **no** β
* yes
| Flag of logging matched data packets. |
| **precedence** string | | Data packets can be filtered based on the priority field. The value is an integer ranging from 0 to 7. |
| **protocol** string | **Choices:*** ip
* icmp
* igmp
* ipinip
* tcp
* udp
* gre
* ospf
| Protocol type. |
| **rule\_action** string | **Choices:*** permit
* deny
| Matching mode of basic ACL rules. |
| **rule\_description** string | | Description about an ACL rule. |
| **rule\_id** string | | ID of a basic ACL rule in configuration mode. The value is an integer ranging from 0 to 4294967294. |
| **rule\_name** string | | Name of a basic ACL rule. The value is a string of 1 to 32 characters. |
| **source\_ip** string | | Source IP address. The value is a string of 0 to 255 characters.The default value is 0.0.0.0. The value is in dotted decimal notation. |
| **src\_mask** string | | Source IP address mask. The value is an integer ranging from 1 to 32. |
| **src\_pool\_name** string | | Name of a source pool. The value is a string of 1 to 32 characters. |
| **src\_port\_begin** string | | Start port number of the source port. The value is an integer ranging from 0 to 65535. |
| **src\_port\_end** string | | End port number of the source port. The value is an integer ranging from 0 to 65535. |
| **src\_port\_op** string | **Choices:*** lt
* eq
* gt
* range
| Range type of the source port. |
| **src\_port\_pool\_name** string | | Name of a source port pool. The value is a string of 1 to 32 characters. |
| **state** string | **Choices:*** **present** β
* absent
* delete\_acl
| Specify desired state of the resource. |
| **syn\_flag** string | | TCP flag value. The value is an integer ranging from 0 to 63. |
| **tcp\_flag\_mask** string | | TCP flag mask value. The value is an integer ranging from 0 to 63. |
| **time\_range** string | | Name of a time range in which an ACL rule takes effect. |
| **tos** string | | ToS value on which data packet filtering is based. The value is an integer ranging from 0 to 15. |
| **ttl\_expired** boolean | **Choices:*** **no** β
* yes
| Whether TTL Expired is matched, with the TTL value of 1. |
| **vrf\_name** string | | VPN instance name. The value is a string of 1 to 31 characters.The default value is \_public\_. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: CloudEngine advance acl test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Config ACL"
community.network.ce_acl_advance:
state: present
acl_name: 3200
provider: "{{ cli }}"
- name: "Undo ACL"
community.network.ce_acl_advance:
state: delete_acl
acl_name: 3200
provider: "{{ cli }}"
- name: "Config ACL advance rule"
community.network.ce_acl_advance:
state: present
acl_name: test
rule_name: test_rule
rule_id: 111
rule_action: permit
protocol: tcp
source_ip: 10.10.10.10
src_mask: 24
frag_type: fragment
provider: "{{ cli }}"
- name: "Undo ACL advance rule"
community.network.ce_acl_advance:
state: absent
acl_name: test
rule_name: test_rule
rule_id: 111
rule_action: permit
protocol: tcp
source_ip: 10.10.10.10
src_mask: 24
frag_type: fragment
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution |
| **existing** dictionary | always | k/v pairs of existing aaa server **Sample:** {'aclNumOrName': 'test', 'aclType': 'Advance'} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'acl\_name': 'test', 'state': 'delete\_acl'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['undo acl name test'] |
### Authors
* wangdezhuang (@QijunPan)
ansible community.network.ce_evpn_bgp_rr β Manages RR for the VXLAN Network on HUAWEI CloudEngine switches. community.network.ce\_evpn\_bgp\_rr β Manages RR for the VXLAN Network on HUAWEI CloudEngine switches.
======================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_evpn_bgp_rr`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Configure an RR in BGP-EVPN address family view on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **as\_number** string / required | | Specifies the number of the AS, in integer format. The value is an integer that ranges from 1 to 4294967295. |
| **bgp\_evpn\_enable** string | **Choices:*** **enable** β
* disable
| Enable or disable the BGP-EVPN address family. |
| **bgp\_instance** string | | Specifies the name of a BGP instance. The value of instance-name can be an integer 1 or a string of 1 to 31. |
| **peer** string | | Specifies the IPv4 address or the group name of a peer. |
| **peer\_type** string | **Choices:*** group\_name
* ipv4\_address
| Specify the peer type. |
| **policy\_vpn\_target** string | **Choices:*** enable
* disable
| Enable or disable the VPN-Target filtering. |
| **reflect\_client** string | **Choices:*** enable
* disable
| Configure the local device as the route reflector and the peer or peer group as the client of the route reflector. |
Notes
-----
Note
* Ensure that BGP view is existed.
* The peer, peer\_type, and reflect\_client arguments must all exist or not exist.
* Recommended connection is `network_cli`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: BGP RR test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Configure BGP-EVPN address family view and ensure that BGP view has existed."
community.network.ce_evpn_bgp_rr:
as_number: 20
bgp_evpn_enable: enable
provider: "{{ cli }}"
- name: "Configure reflect client and ensure peer has existed."
community.network.ce_evpn_bgp_rr:
as_number: 20
peer_type: ipv4_address
peer: 192.8.3.3
reflect_client: enable
provider: "{{ cli }}"
- name: "Configure the VPN-Target filtering."
community.network.ce_evpn_bgp_rr:
as_number: 20
policy_vpn_target: enable
provider: "{{ cli }}"
- name: "Configure an RR in BGP-EVPN address family view."
community.network.ce_evpn_bgp_rr:
as_number: 20
bgp_evpn_enable: enable
peer_type: ipv4_address
peer: 192.8.3.3
reflect_client: enable
policy_vpn_target: disable
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of end attributes on the device **Sample:** {'as\_number': '20', 'bgp\_evpn\_enable': 'enable', 'bgp\_instance': None, 'peer': '192.8.3.3', 'peer\_type': 'ipv4\_address', 'policy\_vpn\_target': 'disable', 'reflect\_client': 'enable'} |
| **existing** dictionary | always | k/v pairs of existing attributes on the device **Sample:** {'as\_number': '20', 'bgp\_evpn\_enable': 'disable', 'bgp\_instance': None, 'peer': None, 'peer\_type': None, 'policy\_vpn\_target': 'disable', 'reflect\_client': 'disable'} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'as\_number': '20', 'bgp\_evpn\_enable': 'enable', 'bgp\_instance': None, 'peer': '192.8.3.3', 'peer\_type': 'ipv4\_address', 'policy\_vpn\_target': 'disable', 'reflect\_client': 'enable'} |
| **updates** list / elements=string | always | command list sent to the device **Sample:** ['bgp 20', ' l2vpn-family evpn', ' peer 192.8.3.3 enable', ' peer 192.8.3.3 reflect-client', ' undo policy vpn-target'] |
### Authors
* Zhijin Zhou (@QijunPan)
ansible community.network.cnos_rollback β Roll back the running or startup configuration from a remote server on devices running Lenovo CNOS community.network.cnos\_rollback β Roll back the running or startup configuration from a remote server on devices running Lenovo CNOS
=====================================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_rollback`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module allows you to work with switch configurations. It provides a way to roll back configurations of a switch from a remote server. This is achieved by using startup or running configurations of the target device that were previously backed up to a remote server using FTP, SFTP, TFTP, or SCP. The first step is to create a directory from where the remote server can be reached. The next step is to provide the full file path of he backup configurationβs location. Authentication details required by the remote server must be provided as well. By default, this method overwrites the switchβs configuration file with the newly downloaded file. This module uses SSH to manage network device configuration. The results of the operation will be placed in a directory named βresultsβ that must be created by the user in their local directory to where the playbook is run.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **configType** string / required | **Choices:*** running-config
* startup-config
| This refers to the type of configuration which will be used for the rolling back process. The choices are the running or startup configurations. There is no default value, so it will result in an error if the input is incorrect. |
| **deviceType** string / required | **Choices:*** g8272\_cnos
* g8296\_cnos
* g8332\_cnos
* NE0152T
* NE1072T
* NE1032
* NE1032T
* NE10032
* NE2572
| This specifies the type of device where the method is executed. The choices NE1072T,NE1032,NE1032T,NE10032,NE2572 are added since Ansible 2.4. The choice NE0152T is added since 2.8 |
| **enablePassword** string | | Configures the password used to enter Global Configuration command mode on the switch. If the switch does not request this password, the parameter is ignored.While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **host** string / required | | This is the variable used to search the hosts file at /etc/ansible/hosts and identify the IP address of the device on which the template is going to be applied. Usually the Ansible keyword {{ inventory\_hostname }} is specified in the playbook as an abstraction of the group of network elements that need to be configured. |
| **outputfile** string / required | | This specifies the file path where the output of each command execution is saved. Each command that is specified in the merged template file and each response from the device are saved here. Usually the location is the results folder, but you can choose another location based on your write permission. |
| **password** string / required | | Configures the password used to authenticate the connection to the remote device. The value of the password parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **protocol** string / required | **Choices:*** SFTP
* SCP
* FTP
* TFTP
| This refers to the protocol used by the network device to interact with the remote server from where to download the backup configuration. The choices are FTP, SFTP, TFTP, or SCP. Any other protocols will result in error. If this parameter is not specified, there is no default value to be used. |
| **rcpath** string / required | | This specifies the full file path of the configuration file located on the remote server. In case the relative path is used as the variable value, the root folder for the user of the server needs to be specified. |
| **rcserverip** string / required | | This specifies the IP Address of the remote server from where the backup configuration will be downloaded. |
| **serverpassword** string / required | | Specify password for the server relating to the protocol used. |
| **serverusername** string / required | | Specify username for the server relating to the protocol used. |
| **username** string / required | | Configures the username used to authenticate the connection to the remote device. The value of the username parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
Notes
-----
Note
* For more information on using Ansible to manage Lenovo Network devices see <https://www.ansible.com/ansible-lenovo>.
Examples
--------
```
Tasks : The following are examples of using the module cnos_rollback.
These are written in the main.yml file of the tasks directory.
---
- name: Test Rollback of config - Running config
cnos_rolback:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_rollback_{{ inventory_hostname }}_output.txt"
configType: running-config
protocol: "sftp"
serverip: "10.241.106.118"
rcpath: "/root/cnos/G8272-running-config.txt"
serverusername: "root"
serverpassword: "root123"
- name: Test Rollback of config - Startup config
cnos_rolback:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_rollback_{{ inventory_hostname }}_output.txt"
configType: startup-config
protocol: "sftp"
serverip: "10.241.106.118"
rcpath: "/root/cnos/G8272-startup-config.txt"
serverusername: "root"
serverpassword: "root123"
- name: Test Rollback of config - Running config - TFTP
cnos_rolback:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_rollback_{{ inventory_hostname }}_output.txt"
configType: running-config
protocol: "tftp"
serverip: "10.241.106.118"
rcpath: "/anil/G8272-running-config.txt"
serverusername: "root"
serverpassword: "root123"
- name: Test Rollback of config - Startup config - TFTP
cnos_rolback:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_rollback_{{ inventory_hostname }}_output.txt"
configType: startup-config
protocol: "tftp"
serverip: "10.241.106.118"
rcpath: "/anil/G8272-startup-config.txt"
serverusername: "root"
serverpassword: "root123"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | always | Success or failure message **Sample:** Config file transferred to Device |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
| programming_docs |
ansible community.network.slxos_config β Manage Extreme Networks SLX-OS configuration sections community.network.slxos\_config β Manage Extreme Networks SLX-OS configuration sections
=======================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.slxos_config`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Extreme SLX-OS configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with SLX-OS configuration sections in a deterministic way.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **after** string | | The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with *before* this allows the playbook designer to append a set of commands to be executed after the command set. |
| **backup** boolean | **Choices:*** **no** β
* yes
| This argument will cause the module to create a full backup of the current `running-config` from the remote device before any changes are made. If the `backup_options` value is not given, the backup file is written to the `backup` folder in the playbook root directory. If the directory does not exist, it is created. |
| **backup\_options** dictionary | | This is a dict object containing configurable options related to backup file path. The value of this option is read only when `backup` is set to *yes*, if `backup` is set to *no* this option will be silently ignored. |
| | **dir\_path** path | | This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of `filename` or default filename as described in `filename` options description. If the path value is not given in that case a *backup* directory will be created in the current working directory and backup configuration will be copied in `filename` within *backup* directory. |
| | **filename** string | | The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by <hostname>\_config.<current-date>@<current-time> |
| **before** string | | The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system. |
| **defaults** boolean | **Choices:*** **no** β
* yes
| This argument specifies whether or not to collect all defaults when getting the remote device running config. When enabled, the module will get the current config by issuing the command `show running-config all`. |
| **diff\_against** string | **Choices:*** running
* startup
* intended
| When using the `ansible-playbook --diff` command line argument the module can generate diffs against different sources. When this option is configure as *startup*, the module will return the diff of the running-config against the startup-config. When this option is configured as *intended*, the module will return the diff of the running-config against the configuration provided in the `intended_config` argument. When this option is configured as *running*, the module will return the before and after diff of the running-config with respect to any changes made to the device configuration. |
| **diff\_ignore\_lines** string | | Use this argument to specify one or more lines that should be ignored during the diff. This is used for lines in the configuration that are automatically updated by the system. This argument takes a list of regular expressions or exact line matches. |
| **intended\_config** string | | The `intended_config` provides the master configuration that the node should conform to and is used to check the final running-config against. This argument will not modify any settings on the remote device and is strictly used to check the compliance of the current device's configuration against. When specifying this argument, the task should also modify the `diff_against` value and set it to *intended*. |
| **lines** string | | The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser.
aliases: commands |
| **match** string | **Choices:*** **line** β
* strict
* exact
* none
| Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to *line*, commands are matched line by line. If match is set to *strict*, command lines are matched with respect to position. If match is set to *exact*, command lines must be an equal match. Finally, if match is set to *none*, the module will not attempt to compare the source configuration with the running configuration on the remote device. |
| **multiline\_delimiter** string | **Default:**"@" | This argument is used when pushing a multiline configuration element to the SLX-OS device. It specifies the character to use as the delimiting character. This only applies to the configuration action. |
| **parents** string | | The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. |
| **replace** string | **Choices:*** **line** β
* block
| Instructs the module on the way to perform the configuration on the device. If the replace argument is set to *line* then the modified lines are pushed to the device in configuration mode. If the replace argument is set to *block* then the entire command block is pushed to the device in configuration mode if any line is not correct. |
| **running\_config** string | | The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The *running\_config* argument allows the implementer to pass in the configuration to use as the base config for comparison.
aliases: config |
| **save\_when** string | **Choices:*** always
* **never** β
* modified
* changed
| When changes are made to the device running-configuration, the changes are not copied to non-volatile storage by default. Using this argument will change that before. If the argument is set to *always*, then the running-config will always be copied to the startup-config and the *modified* flag will always be set to True. If the argument is set to *modified*, then the running-config will only be copied to the startup-config if it has changed since the last save to startup-config. If the argument is set to *never*, the running-config will never be copied to the startup-config. If the argument is set to *changed*, then the running-config will only be copied to the startup-config if the task has made a change. |
| **src** string | | Specifies the source path to the file that contains the configuration or configuration template to load. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. This argument is mutually exclusive with *lines*, *parents*. |
Notes
-----
Note
* Tested against SLX-OS 17s.1.02
Examples
--------
```
- name: Configure top level configuration
community.network.slxos_config:
lines: hostname {{ inventory_hostname }}
- name: Configure interface settings
community.network.slxos_config:
lines:
- description test interface
- ip address 172.31.1.1/24
parents: interface Ethernet 0/1
- name: Configure multiple interfaces
community.network.slxos_config:
lines:
- lacp timeout long
parents: "{{ item }}"
with_items:
- interface Ethernet 0/1
- interface Ethernet 0/2
- name: Load new acl into device
community.network.slxos_config:
lines:
- seq 10 permit ip host 1.1.1.1 any log
- seq 20 permit ip host 2.2.2.2 any log
- seq 30 permit ip host 3.3.3.3 any log
- seq 40 permit ip host 4.4.4.4 any log
- seq 50 permit ip host 5.5.5.5 any log
parents: ip access-list extended test
before: no ip access-list extended test
match: exact
- name: Check the running-config against master config
community.network.slxos_config:
diff_against: intended
intended_config: "{{ lookup('file', 'master.cfg') }}"
- name: Check the startup-config against the running-config
community.network.slxos_config:
diff_against: startup
diff_ignore_lines:
- ntp clock .*
- name: Save running to startup when modified
community.network.slxos_config:
save_when: modified
- name: Configurable backup path
community.network.slxos_config:
lines: hostname {{ inventory_hostname }}
backup: yes
backup_options:
filename: backup.cfg
dir_path: /home/user
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **backup\_path** string | when backup is yes | The full path to the backup file **Sample:** /playbooks/ansible/backup/slxos\_config.2018-02-12@18:26:34 |
| **commands** list / elements=string | always | The set of commands that will be pushed to the remote device **Sample:** ['switch-attributes hostname foo', 'router ospf', 'area 0'] |
| **updates** list / elements=string | always | The set of commands that will be pushed to the remote device **Sample:** ['switch-attributes hostname foo', 'router ospf', 'area 0'] |
### Authors
* Lindsay Hill (@LindsayHill)
ansible community.network.avi_backupconfiguration β Module for setup of BackupConfiguration Avi RESTful Object community.network.avi\_backupconfiguration β Module for setup of BackupConfiguration Avi RESTful Object
=======================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_backupconfiguration`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure BackupConfiguration object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **aws\_access\_key** string | | Aws access key id. Field introduced in 18.2.3. |
| **aws\_bucket\_id** string | | Aws bucket. Field introduced in 18.2.3. |
| **aws\_secret\_access** string | | Aws secret access key. Field introduced in 18.2.3. |
| **backup\_file\_prefix** string | | Prefix of the exported configuration file. Field introduced in 17.1.1. |
| **backup\_passphrase** string | | Passphrase of backup configuration. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **maximum\_backups\_stored** string | | Rotate the backup files based on this count. Allowed values are 1-20. Default value when not specified in API or module is interpreted by Avi Controller as 4. |
| **name** string / required | | Name of backup configuration. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **remote\_directory** string | | Directory at remote destination with write permission for ssh user. |
| **remote\_hostname** string | | Remote destination. |
| **save\_local** boolean | **Choices:*** no
* yes
| Local backup. |
| **ssh\_user\_ref** string | | Access credentials for remote destination. It is a reference to an object of type cloudconnectoruser. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **upload\_to\_remote\_host** boolean | **Choices:*** no
* yes
| Remote backup. |
| **upload\_to\_s3** boolean | **Choices:*** no
* yes
| Cloud backup. Field introduced in 18.2.3. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create BackupConfiguration object
community.network.avi_backupconfiguration:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_backupconfiguration
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | BackupConfiguration (api/backupconfiguration) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#9ff8edfeecebf0f8f6b9bcaca8a4b9bcaaada4b9bcaba7a4fee9f6f1faebe8f0edf4ecb9bcaba9a4fcf0f2)>
ansible community.network.cnos_vrf β Manage VRFs on Lenovo CNOS network devices community.network.cnos\_vrf β Manage VRFs on Lenovo CNOS network devices
========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_vrf`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of VRFs on Lenovo CNOS network devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate** string | | List of VRFs contexts |
| **associated\_interfaces** string | | This is a intent option and checks the operational state of the for given vrf `name` for associated interfaces. If the value in the `associated_interfaces` does not match with the operational state of vrf interfaces on device it will result in failure. |
| **delay** string | **Default:**10 | Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state arguments. |
| **interfaces** string | | Identifies the set of interfaces that should be configured in the VRF. Interfaces must be routed interfaces in order to be placed into a VRF. The name of interface should be in expanded format and not abbreviated. |
| **name** string / required | | Name of the VRF. |
| **purge** boolean | **Choices:*** **no** β
* yes
| Purge VRFs not defined in the *aggregate* parameter. |
| **rd** string | | Route distinguisher of the VRF |
| **state** string | **Choices:*** **present** β
* absent
| State of the VRF configuration. |
Notes
-----
Note
* Tested against CNOS 10.9.1
Examples
--------
```
- name: Create vrf
community.network.cnos_vrf:
name: test
rd: 1:200
interfaces:
- Ethernet1/33
state: present
- name: Delete VRFs
community.network.cnos_vrf:
name: test
state: absent
- name: Create aggregate of VRFs with purge
community.network.cnos_vrf:
aggregate:
- { name: test4, rd: "1:204" }
- { name: test5, rd: "1:205" }
state: present
purge: yes
- name: Delete aggregate of VRFs
community.network.cnos_vrf:
aggregate:
- name: test2
- name: test3
- name: test4
- name: test5
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always | The list of configuration mode commands to send to the device **Sample:** ['vrf context test', 'rd 1:100', 'interface Ethernet1/44', 'vrf member test'] |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
| programming_docs |
ansible community.network.bigmon_policy β Create and remove a bigmon out-of-band policy. community.network.bigmon\_policy β Create and remove a bigmon out-of-band policy.
=================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.bigmon_policy`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Create and remove a bigmon out-of-band policy.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access\_token** string | | Bigmon access token. If this isn't set, the environment variable `BIGSWITCH_ACCESS_TOKEN` is used. |
| **action** string | **Choices:*** **forward** β
* drop
* flow-gen
| Forward matching packets to delivery interfaces, Drop is for measure rate of matching packets, but do not forward to delivery interfaces, capture packets and write to a PCAP file, or enable NetFlow generation. |
| **controller** string / required | | The controller address. |
| **delivery\_packet\_count** string | **Default:**0 | Run policy until delivery\_packet\_count packets are delivered. |
| **duration** string | **Default:**0 | Run policy for duration duration or until delivery\_packet\_count packets are delivered, whichever comes first. |
| **name** string / required | | The name of the policy. |
| **policy\_description** string | | Description of policy. |
| **priority** string | **Default:**100 | A priority associated with this policy. The higher priority policy takes precedence over a lower priority. |
| **start\_time** string | **Default:**"ansible\_date\_time.iso8601" | Date the policy becomes active |
| **state** string | **Choices:*** **present** β
* absent
| Whether the policy should be present or absent. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `false`, SSL certificates will not be validated. This should only be used on personally controlled devices using self-signed certificates. |
Examples
--------
```
- name: Policy to aggregate filter and deliver data center (DC) 1 traffic
community.network.bigmon_policy:
name: policy1
policy_description: DC 1 traffic policy
action: drop
controller: '{{ inventory_hostname }}'
state: present
validate_certs: false
```
### Authors
* Ted (@tedelhourani)
ansible community.network.cnos_l3_interface β Manage Layer-3 interfaces on Lenovo CNOS network devices. community.network.cnos\_l3\_interface β Manage Layer-3 interfaces on Lenovo CNOS network devices.
=================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_l3_interface`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of Layer-3 interfaces on CNOS network devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate** string | | List of Layer-3 interfaces definitions. Each of the entry in aggregate list should define name of interface `name` and a optional `ipv4` or `ipv6` address. |
| **ipv4** string | | IPv4 address to be set for the Layer-3 interface mentioned in *name* option. The address format is <ipv4 address>/<mask>, the mask is number in range 0-32 eg. 10.241.107.1/24 |
| **ipv6** string | | IPv6 address to be set for the Layer-3 interface mentioned in *name* option. The address format is <ipv6 address>/<mask>, the mask is number in range 0-128 eg. fd5d:12c9:2201:1::1/64 |
| **name** string | | Name of the Layer-3 interface to be configured eg. Ethernet1/2 |
| **provider** string | | **Deprecated** Starting with Ansible 2.5 we recommend using `connection: network_cli`. For more information please see the [CNOS Platform Options guide](user_guide/platform_cnos). A dict object containing connection details. |
| | **auth\_pass** string | | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
| | **authorize** boolean | **Choices:*** **no** β
* yes
| Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
| | **host** string / required | | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
| | **port** string | **Default:**22 | Specifies the port to use when building the connection to the remote device. |
| | **ssh\_keyfile** string | | Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE`will be used instead. |
| | **timeout** string | **Default:**10 | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
| | **username** string | | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
| **state** string | **Choices:*** **present** β
* absent
| State of the Layer-3 interface configuration. It indicates if the configuration should be present or absent on remote device. |
Notes
-----
Note
* Tested against CNOS 10.8.1
Examples
--------
```
- name: Remove Ethernet1/33 IPv4 and IPv6 address
community.network.cnos_l3_interface:
name: Ethernet1/33
state: absent
- name: Set Ethernet1/33 IPv4 address
community.network.cnos_l3_interface:
name: Ethernet1/33
ipv4: 10.241.107.1/24
- name: Set Ethernet1/33 IPv6 address
community.network.cnos_l3_interface:
name: Ethernet1/33
ipv6: "fd5d:12c9:2201:1::1/64"
- name: Set Ethernet1/33 in dhcp
community.network.cnos_l3_interface:
name: Ethernet1/33
ipv4: dhcp
ipv6: dhcp
- name: Set interface Vlan1 (SVI) IPv4 address
community.network.cnos_l3_interface:
name: Vlan1
ipv4: 192.168.0.5/24
- name: Set IP addresses on aggregate
community.network.cnos_l3_interface:
aggregate:
- { name: Ethernet1/33, ipv4: 10.241.107.1/24 }
- { name: Ethernet1/44, ipv4: 10.240.106.1/24,
ipv6: "fd5d:12c9:2201:1::1/64" }
- name: Remove IP addresses on aggregate
community.network.cnos_l3_interface:
aggregate:
- { name: Ethernet1/33, ipv4: 10.241.107.1/24 }
- { name: Ethernet1/44, ipv4: 10.240.106.1/24,
ipv6: "fd5d:12c9:2201:1::1/64" }
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device **Sample:** ['interface Ethernet1/33', 'ip address 10.241.107.1 255.255.255.0', 'ipv6 address fd5d:12c9:2201:1::1/64'] |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
ansible community.network.edgeswitch_facts β Collect facts from remote devices running Edgeswitch community.network.edgeswitch\_facts β Collect facts from remote devices running Edgeswitch
==========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.edgeswitch_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Collects a base set of device facts from a remote device that is running Ubiquiti Edgeswitch. This module prepends all of the base network fact keys with `ansible_net_<fact>`. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **gather\_subset** string | **Default:**"!config" | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, config, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial `!` to specify that a specific subset should not be collected. |
Notes
-----
Note
* Tested against Edgeswitch 1.7.4
Examples
--------
```
- name: Collect all facts from the device
community.network.edgeswitch_facts:
gather_subset: all
- name: Collect only the running config and default facts
community.network.edgeswitch_facts:
gather_subset:
- config
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ansible\_net\_config** string | when config is configured | The current active config from the device |
| **ansible\_net\_gather\_subset** list / elements=string | always | The list of fact subsets collected from the device |
| **ansible\_net\_hostname** string | always | The configured hostname of the device |
| **ansible\_net\_interfaces** dictionary | when interfaces is configured | A hash of all interfaces running on the system |
| **ansible\_net\_model** string | always | The model name returned from the device |
| **ansible\_net\_serialnum** string | always | The serial number of the remote device |
| **ansible\_net\_startupconfig** string added in 1.2.0 of community.network | when config is configured | The startup config from the device |
| **ansible\_net\_version** string | always | The operating system version running on the remote device |
### Authors
* Frederic Bor (@f-bor)
ansible community.network.cv_server_provision β Provision server port by applying or removing template configuration to an Arista CloudVision Portal configlet that is applied to a switch. community.network.cv\_server\_provision β Provision server port by applying or removing template configuration to an Arista CloudVision Portal configlet that is applied to a switch.
=====================================================================================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cv_server_provision`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module allows a server team to provision server network ports for new servers without having to access Arista CVP or asking the network team to do it for them. Provide the information for connecting to CVP, switch rack, port the new server is connected to, optional vlan, and an action and the module will apply the configuration to the switch port via CVP. Actions are add (applies template config to port), remove (defaults the interface config) and show (returns the current port config).
Requirements
------------
The below requirements are needed on the host that executes this module.
* Jinja2
* cvprac >= 0.7.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string | **Choices:*** **show** β
* add
* remove
| The action for the module to take. The actions are add, which applies the specified template config to port, remove, which defaults the specified interface configuration, and show, which will return the current port configuration with no changes. |
| **auto\_run** boolean | **Choices:*** **no** β
* yes
| Flag that determines whether or not the module will execute the CVP task spawned as a result of changes to a switch configlet. When an add or remove action is taken which results in a change to a switch configlet, CVP will spawn a task that needs to be executed for the configuration to be applied to the switch. If this option is True then the module will determined the task number created by the configuration change, execute it and wait for the task to complete. If the option is False then the task will remain in the Pending state in CVP for a network administrator to review and execute. |
| **host** string / required | | The hostname or IP address of the CVP node being connected to. |
| **password** string / required | | The password of the user that will be used to connect to CVP for API calls. |
| **port** string | | The port number to use when making API calls to the CVP node. This will default to the default port for the specified protocol. Port 80 for http and port 443 for https. |
| **port\_vlan** string | | The vlan that should be applied to the port for this server. This parameter is dependent on a proper template that supports single vlan provisioning with it. If a port vlan is specified by the template specified does not support this the module will exit out with no changes. If a template is specified that requires a port vlan but no port vlan is specified the module will exit out with no changes. |
| **protocol** string | **Choices:*** **https** β
* http
| The protocol to use when making API calls to CVP. CVP defaults to https and newer versions of CVP no longer support http. |
| **server\_name** string / required | | The hostname or identifier for the server that is having it's switch port provisioned. |
| **switch\_name** string / required | | The hostname of the switch is being configured for the server being provisioned. |
| **switch\_port** string / required | | The physical port number on the switch that the new server is connected to. |
| **template** string / required | | A path to a Jinja formatted template file that contains the configuration block that will be applied to the specified switch port. This template will have variable fields replaced by the module before being applied to the switch configuration. |
| **username** string / required | | The user that will be used to connect to CVP for making API calls. |
Examples
--------
```
- name: Get current configuration for interface Ethernet2
community.network.cv_server_provision:
host: cvp_node
username: cvp_user
password: cvp_pass
protocol: https
server_name: new_server
switch_name: eos_switch_1
switch_port: 2
template: template_file.j2
action: show
- name: Remove existing configuration from interface Ethernet2. Run task.
community.network.cv_server_provision:
host: cvp_node
username: cvp_user
password: cvp_pass
protocol: https
server_name: new_server
switch_name: eos_switch_1
switch_port: 2
template: template_file.j2
action: remove
auto_run: True
- name: Add template configuration to interface Ethernet2. No VLAN. Run task.
community.network.cv_server_provision:
host: cvp_node
username: cvp_user
password: cvp_pass
protocol: https
server_name: new_server
switch_name: eos_switch_1
switch_port: 2
template: single_attached_trunk.j2
action: add
auto_run: True
- name: Add template with VLAN configuration to interface Ethernet2. Run task.
community.network.cv_server_provision:
host: cvp_node
username: cvp_user
password: cvp_pass
protocol: https
server_name: new_server
switch_name: eos_switch_1
switch_port: 2
port_vlan: 22
template: single_attached_vlan.j2
action: add
auto_run: True
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | success | Signifies if a change was made to the configlet **Sample:** True |
| **currentConfigBlock** string | when action = show | The current config block for the user specified interface **Sample:** interface Ethernet4 ! |
| **fullConfig** string | when action = add or remove | The full config of the configlet after being updated **Sample:** ! interface Ethernet3 ! interface Ethernet4 ! |
| **newConfigBlock** string | when action = add or remove | The new config block for the user specified interface **Sample:** interface Ethernet3 description example no switchport ! |
| **oldConfigBlock** string | when action = add or remove | The current config block for the user specified interface before any changes are made **Sample:** interface Ethernet3 ! |
| **portConfigurable** boolean | success | Signifies if the user specified port has an entry in the configlet that Ansible has access to **Sample:** True |
| **switchConfigurable** boolean | success | Signifies if the user specified switch has a configlet applied to it that CVP is allowed to edit **Sample:** True |
| **switchInfo** dictionary | success | Information from CVP describing the switch being configured **Sample:** {'architecture': 'i386', 'bootupTimeStamp': 1491264298.21, 'complianceCode': '0000', 'complianceIndication': 'NONE', 'deviceInfo': 'Registered', 'deviceStatus': 'Registered', 'fqdn': 'veos1', 'hardwareRevision': '', 'internalBuildId': '12-12', 'internalVersion': '4.17.1F-11111.4171F', 'ipAddress': '192.168.1.20', 'isDANZEnabled': 'no', 'isMLAGEnabled': 'no', 'key': '00:50:56:5d:e5:e0', 'lastSyncUp': 1496432895799, 'memFree': 472976, 'memTotal': 1893460, 'modelName': 'vEOS', 'parentContainerId': 'container\_13\_5776759195930', 'serialNumber': '', 'systemMacAddress': '00:50:56:5d:e5:e0', 'taskIdList': [], 'tempAction': None, 'type': 'netelement', 'unAuthorized': False, 'version': '4.17.1F', 'ztpMode': 'false'} |
| **taskCompleted** boolean | when action = add or remove, and auto\_run = true, and configuration changes | Signifies if the task created and executed has completed successfully **Sample:** True |
| **taskCreated** boolean | when action = add or remove, and auto\_run = true or false, and configuration changes | Signifies if a task was created due to configlet changes **Sample:** True |
| **taskExecuted** boolean | when action = add or remove, and auto\_run = true, and configuration changes | Signifies if the automation executed the spawned task **Sample:** True |
| **taskId** string | when action = add or remove, and auto\_run = true or false, and configuration changes | The task ID created by CVP because of changes to configlet **Sample:** 500 |
| **updateConfigletResponse** string | when action = add or remove and configuration changes | Response returned from CVP when configlet update is triggered **Sample:** Configlet veos1-server successfully updated and task initiated. |
### Authors
* EOS+ CS ([[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#abcac5d8c2c9c7ce86cfcedd8d88989c908d889e99908d889f9390cad9c2d8dfca8d889f9d90c8c4c6)) (@mharista)
| programming_docs |
ansible community.network.netscaler_cs_policy β Manage content switching policy community.network.netscaler\_cs\_policy β Manage content switching policy
=========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.netscaler_cs_policy`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage content switching policy.
* This module is intended to run either on the ansible control node or a bastion (jumpserver) with access to the actual netscaler instance.
Requirements
------------
The below requirements are needed on the host that executes this module.
* nitro python sdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string | | Content switching action that names the target load balancing virtual server to which the traffic is switched. |
| **domain** string | | The domain name. The string value can range to 63 characters. Minimum length = 1 |
| **nitro\_pass** string / required | | The password with which to authenticate to the netscaler node. |
| **nitro\_protocol** string | **Choices:*** **http** β
* https
| Which protocol to use when accessing the nitro API objects. |
| **nitro\_timeout** float | **Default:**310 | Time in seconds until a timeout error is thrown when establishing a new session with Netscaler |
| **nitro\_user** string / required | | The username with which to authenticate to the netscaler node. |
| **nsip** string / required | | The ip address of the netscaler appliance where the nitro API calls will be made. The port can be specified with the colon (:). E.g. 192.168.1.1:555. |
| **policyname** string | | Name for the content switching policy. Must begin with an ASCII alphanumeric or underscore `_` character, and must contain only ASCII alphanumeric, underscore, hash `#`, period `.`, space , colon `:`, at sign `@`, equal sign `=`, and hyphen `-` characters. Cannot be changed after a policy is created. The following requirement applies only to the NetScaler CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, my policy or my policy). Minimum length = 1 |
| **rule** string | | Expression, or name of a named expression, against which traffic is evaluated. Written in the classic or default syntax. Note: Maximum length of a string literal in the expression is 255 characters. A longer string can be split into smaller strings of up to 255 characters each, and the smaller strings concatenated with the + operator. For example, you can create a 500-character string as follows: '"<string of 255 characters>" + "<string of 245 characters>"' |
| **save\_config** boolean | **Choices:*** no
* **yes** β
| If `yes` the module will save the configuration on the netscaler node if it makes any changes. The module will not save the configuration on the netscaler node if it made no changes. |
| **state** string | **Choices:*** absent
* **present** β
| The state of the resource being configured by the module on the netscaler node. When present the resource will be created if needed and configured according to the module's parameters. When absent the resource will be deleted from the netscaler node. |
| **url** string | | URL string that is matched with the URL of a request. Can contain a wildcard character. Specify the string value in the following format: `[[prefix] [*]] [.suffix]`. Minimum length = 1 Maximum length = 208 |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* For more information on using Ansible to manage Citrix NetScaler Network devices see <https://www.ansible.com/ansible-netscaler>.
Examples
--------
```
- name: Create url cs policy
delegate_to: localhost
community.network.netscaler_cs_policy:
nsip: 172.18.0.2
nitro_user: nsroot
nitro_pass: nsroot
validate_certs: no
state: present
policyname: policy_1
url: /example/
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **diff** dictionary | failure | List of differences between the actual configured object and the configuration specified in the module **Sample:** {'url': 'difference. ours: (str) example1 other: (str) /example1'} |
| **loglines** list / elements=string | always | list of logged messages by the module **Sample:** ['message 1', 'message 2'] |
| **msg** string | failure | Message detailing the failure reason **Sample:** Could not load nitro python sdk |
### Authors
* George Nikolopoulos (@giorgos-nikolopoulos)
ansible community.network.ce_bgp_neighbor_af β Manages BGP neighbor Address-family configuration on HUAWEI CloudEngine switches. community.network.ce\_bgp\_neighbor\_af β Manages BGP neighbor Address-family configuration on HUAWEI CloudEngine switches.
===========================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_bgp_neighbor_af`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages BGP neighbor Address-family configurations on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **add\_path\_mode** string | **Choices:*** null
* receive
* send
* both
| null, Null. receive, Support receiving Add-Path routes. send, Support sending Add-Path routes. both, Support receiving and sending Add-Path routes. |
| **adv\_add\_path\_num** string | | The number of addPath advertise route. The value is an integer ranging from 2 to 64. |
| **advertise\_arp** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, advertised ARP routes are distinguished. If the value is false, advertised ARP routes are not distinguished. |
| **advertise\_community** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, the community attribute is advertised to peers. If the value is false, the community attribute is not advertised to peers. |
| **advertise\_ext\_community** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, the extended community attribute is advertised to peers. If the value is false, the extended community attribute is not advertised to peers. |
| **advertise\_irb** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, advertised IRB routes are distinguished. If the value is false, advertised IRB routes are not distinguished. |
| **advertise\_remote\_nexthop** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, the remote next-hop attribute is advertised to peers. If the value is false, the remote next-hop attribute is not advertised to any peers. |
| **af\_type** string / required | **Choices:*** ipv4uni
* ipv4multi
* ipv4vpn
* ipv6uni
* ipv6vpn
* evpn
| Address family type of a BGP instance. |
| **allow\_as\_loop\_enable** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, repetitive local AS numbers are allowed. If the value is false, repetitive local AS numbers are not allowed. |
| **allow\_as\_loop\_limit** string | | Set the maximum number of repetitive local AS number. The value is an integer ranging from 1 to 10. |
| **default\_rt\_adv\_enable** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, the function to advertise default routes to peers is enabled. If the value is false, the function to advertise default routes to peers is disabled. |
| **default\_rt\_adv\_policy** string | | Specify the name of a used policy. The value is a string. The value is a string of 1 to 40 characters. |
| **default\_rt\_match\_mode** string | **Choices:*** null
* matchall
* matchany
| null, Null. matchall, Advertise the default route if all matching conditions are met. matchany, Advertise the default route if any matching condition is met. |
| **discard\_ext\_community** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, the extended community attribute in the peer route information is discarded. If the value is false, the extended community attribute in the peer route information is not discarded. |
| **export\_acl\_name\_or\_num** string | | Apply an IPv4 ACL-based filtering policy to the routes to be advertised to a specified peer. The value is a string of 1 to 32 characters. |
| **export\_as\_path\_filter** string | | Apply an AS\_Path-based filtering policy to the routes to be advertised to a specified peer. The value is an integer ranging from 1 to 256. |
| **export\_as\_path\_name\_or\_num** string | | Application of a AS path list based filtering policy to the routing of a specified peer. |
| **export\_pref\_filt\_name** string | | Specify the IPv4 filtering policy applied to the routes to be advertised to a specified peer. The value is a string of 1 to 169 characters. |
| **export\_rt\_policy\_name** string | | Specify the filtering policy applied to the routes to be advertised to a peer. The value is a string of 1 to 40 characters. |
| **import\_acl\_name\_or\_num** string | | Apply an IPv4 ACL-based filtering policy to the routes received from a specified peer. The value is a string of 1 to 32 characters. |
| **import\_as\_path\_filter** string | | Apply an AS\_Path-based filtering policy to the routes received from a specified peer. The value is an integer ranging from 1 to 256. |
| **import\_as\_path\_name\_or\_num** string | | A routing strategy based on the AS path list for routing received by a designated peer. |
| **import\_pref\_filt\_name** string | | Specify the IPv4 filtering policy applied to the routes received from a specified peer. The value is a string of 1 to 169 characters. |
| **import\_rt\_policy\_name** string | | Specify the filtering policy applied to the routes learned from a peer. The value is a string of 1 to 40 characters. |
| **ipprefix\_orf\_enable** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, the address prefix-based Outbound Route Filter (ORF) capability is enabled for peers. If the value is false, the address prefix-based Outbound Route Filter (ORF) capability is disabled for peers. |
| **is\_nonstd\_ipprefix\_mod** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, Non-standard capability codes are used during capability negotiation. If the value is false, RFC-defined standard ORF capability codes are used during capability negotiation. |
| **keep\_all\_routes** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, the system stores all route update messages received from all peers (groups) after BGP connection setup. If the value is false, the system stores only BGP update messages that are received from peers and pass the configured import policy. |
| **nexthop\_configure** string | **Choices:*** null
* local
* invariable
| null, The next hop is not changed. local, The next hop is changed to the local IP address. invariable, Prevent the device from changing the next hop of each imported IGP route when advertising it to its BGP peers. |
| **orf\_mode** string | **Choices:*** null
* receive
* send
* both
| ORF mode. null, Default value. receive, ORF for incoming packets. send, ORF for outgoing packets. both, ORF for incoming and outgoing packets. |
| **orftype** string | | ORF Type. The value is an integer ranging from 0 to 65535. |
| **origin\_as\_valid** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, Application results of route announcement. If the value is false, Routing application results are not notified. |
| **preferred\_value** string | | Assign a preferred value for the routes learned from a specified peer. The value is an integer ranging from 0 to 65535. |
| **public\_as\_only** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, sent BGP update messages carry only the public AS number but do not carry private AS numbers. If the value is false, sent BGP update messages can carry private AS numbers. |
| **public\_as\_only\_force** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, sent BGP update messages carry only the public AS number but do not carry private AS numbers. If the value is false, sent BGP update messages can carry private AS numbers. |
| **public\_as\_only\_limited** string | **Choices:*** **no\_use** β
* true
* false
| Limited use public as number. |
| **public\_as\_only\_replace** string | **Choices:*** **no\_use** β
* true
* false
| Private as replaced by public as number. |
| **public\_as\_only\_skip\_peer\_as** string | **Choices:*** **no\_use** β
* true
* false
| Public as only skip peer as. |
| **redirect\_ip** string | **Choices:*** **no\_use** β
* true
* false
| Redirect ip. |
| **redirect\_ip\_validation** string | **Choices:*** **no\_use** β
* true
* false
| Redirect ip validation.
aliases: redirect\_ip\_vaildation |
| **reflect\_client** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, the local device functions as the route reflector and a peer functions as a client of the route reflector. If the value is false, the route reflector and client functions are not configured. |
| **remote\_address** string / required | | IPv4 or IPv6 peer connection address. |
| **route\_limit** string | | Configure the maximum number of routes that can be accepted from a peer. The value is an integer ranging from 1 to 4294967295. |
| **route\_limit\_idle\_timeout** string | | Specify the value of the idle-timeout timer to automatically reestablish the connections after they are cut off when the number of routes exceeds the set threshold. The value is an integer ranging from 1 to 1200. |
| **route\_limit\_percent** string | | Specify the percentage of routes when a router starts to generate an alarm. The value is an integer ranging from 1 to 100. |
| **route\_limit\_type** string | **Choices:*** noparameter
* alertOnly
* idleForever
* idleTimeout
| Noparameter, After the number of received routes exceeds the threshold and the timeout timer expires,no action. AlertOnly, An alarm is generated and no additional routes will be accepted if the maximum number of routes allowed have been received. IdleForever, The connection that is interrupted is not automatically re-established if the maximum number of routes allowed have been received. IdleTimeout, After the number of received routes exceeds the threshold and the timeout timer expires, the connection that is interrupted is automatically re-established. |
| **rt\_updt\_interval** string | | Specify the minimum interval at which Update packets are sent. The value is an integer, in seconds. The value is an integer ranging from 0 to 600. |
| **soostring** string | | Configure the Site-of-Origin (SoO) extended community attribute. The value is a string of 3 to 21 characters. |
| **substitute\_as\_enable** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, the function to replace a specified peer's AS number in the AS-Path attribute with the local AS number is enabled. If the value is false, the function to replace a specified peer's AS number in the AS-Path attribute with the local AS number is disabled. |
| **update\_pkt\_standard\_compatible** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, When the vpnv4 multicast neighbor receives and updates the message, the message has no label. If the value is false, When the vpnv4 multicast neighbor receives and updates the message, the message has label. |
| **vpls\_ad\_disable** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, enable vpls-ad. If the value is false, disable vpls-ad. |
| **vpls\_enable** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, vpls enable. If the value is false, vpls disable. |
| **vrf\_name** string / required | | Name of a BGP instance. The name is a case-sensitive string of characters. The BGP instance can be used only after the corresponding VPN instance is created. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: CloudEngine BGP neighbor address family test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Config BGP peer Address_Family"
community.network.ce_bgp_neighbor_af:
state: present
vrf_name: js
af_type: ipv4uni
remote_address: 192.168.10.10
nexthop_configure: local
provider: "{{ cli }}"
- name: "Undo BGP peer Address_Family"
community.network.ce_bgp_neighbor_af:
state: absent
vrf_name: js
af_type: ipv4uni
remote_address: 192.168.10.10
nexthop_configure: local
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution **Sample:** {'bgp neighbor af': {'af\_type': 'ipv4uni', 'remote\_address': '192.168.10.10', 'vrf\_name': 'js'}, 'bgp neighbor af other': {'af\_type': 'ipv4uni', 'nexthop\_configure': 'local', 'vrf\_name': 'js'}} |
| **existing** dictionary | always | k/v pairs of existing aaa server **Sample:** {'bgp neighbor af': {'af\_type': 'ipv4uni', 'remote\_address': '192.168.10.10', 'vrf\_name': 'js'}, 'bgp neighbor af other': {'af\_type': 'ipv4uni', 'nexthop\_configure': 'null', 'vrf\_name': 'js'}} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'af\_type': 'ipv4uni', 'nexthop\_configure': 'local', 'remote\_address': '192.168.10.10', 'state': 'present', 'vrf\_name': 'js'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['peer 192.168.10.10 next-hop-local'] |
### Authors
* wangdezhuang (@QijunPan)
| programming_docs |
ansible community.network.netscaler_servicegroup β Manage service group configuration in Netscaler community.network.netscaler\_servicegroup β Manage service group configuration in Netscaler
===========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.netscaler_servicegroup`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage service group configuration in Netscaler.
* This module is intended to run either on the ansible control node or a bastion (jumpserver) with access to the actual netscaler instance.
Requirements
------------
The below requirements are needed on the host that executes this module.
* nitro python sdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **appflowlog** string | **Choices:*** enabled
* disabled
| Enable logging of AppFlow information for the specified service group. |
| **autoscale** string | **Choices:*** DISABLED
* DNS
* POLICY
| Auto scale option for a servicegroup. |
| **cacheable** boolean | **Choices:*** no
* yes
| Use the transparent cache redirection virtual server to forward the request to the cache server. Note: Do not set this parameter if you set the Cache Type. |
| **cachetype** string | **Choices:*** TRANSPARENT
* REVERSE
* FORWARD
| Cache type supported by the cache server. |
| **cip** string | **Choices:*** enabled
* disabled
| Insert the Client IP header in requests forwarded to the service. |
| **cipheader** string | | Name of the HTTP header whose value must be set to the IP address of the client. Used with the Client IP parameter. If client IP insertion is enabled, and the client IP header is not specified, the value of Client IP Header parameter or the value set by the set ns config command is used as client's IP header name. Minimum length = 1 |
| **cka** boolean | **Choices:*** no
* yes
| Enable client keep-alive for the service group. |
| **clttimeout** string | | Time, in seconds, after which to terminate an idle client connection. Minimum value = `0`
Maximum value = `31536000`
|
| **cmp** boolean | **Choices:*** no
* yes
| Enable compression for the specified service. |
| **comment** string | | Any information about the service group. |
| **disabled** boolean | **Choices:*** **no** β
* yes
| When set to `yes` the service group state will be set to DISABLED. When set to `no` the service group state will be set to ENABLED. Note that due to limitations of the underlying NITRO API a `disabled` state change alone does not cause the module result to report a changed status. |
| **downstateflush** string | **Choices:*** enabled
* disabled
| Flush all active transactions associated with all the services in the service group whose state transitions from UP to DOWN. Do not enable this option for applications that must complete their transactions. |
| **graceful** boolean | **Choices:*** no
* yes
| Wait for all existing connections to the service to terminate before shutting down the service. |
| **healthmonitor** boolean | **Choices:*** no
* yes
| Monitor the health of this service. Available settings function as follows:
`yes` - Send probes to check the health of the service.
`no` - Do not send probes to check the health of the service. With the NO option, the appliance shows the service as UP at all times. |
| **httpprofilename** string | | Name of the HTTP profile that contains HTTP configuration settings for the service group. Minimum length = 1 Maximum length = 127 |
| **maxbandwidth** string | | Maximum bandwidth, in Kbps, allocated for all the services in the service group. Minimum value = `0`
Maximum value = `4294967287`
|
| **maxclient** string | | Maximum number of simultaneous open connections for the service group. Minimum value = `0`
Maximum value = `4294967294`
|
| **maxreq** string | | Maximum number of requests that can be sent on a persistent connection to the service group. Note: Connection requests beyond this value are rejected. Minimum value = `0`
Maximum value = `65535`
|
| **memberport** string | | member port. |
| **monitorbindings** string | | A list of monitornames to bind to this service Note that the monitors must have already been setup possibly using the [community.network.netscaler\_lb\_monitor](netscaler_lb_monitor_module) module or some other method |
| | **monitorname** string | | The monitor name to bind to this servicegroup. |
| | **weight** string | | Weight to assign to the binding between the monitor and servicegroup. |
| **monthreshold** string | | Minimum sum of weights of the monitors that are bound to this service. Used to determine whether to mark a service as UP or DOWN. Minimum value = `0`
Maximum value = `65535`
|
| **netprofile** string | | Network profile for the service group. Minimum length = 1 Maximum length = 127 |
| **nitro\_pass** string / required | | The password with which to authenticate to the netscaler node. |
| **nitro\_protocol** string | **Choices:*** **http** β
* https
| Which protocol to use when accessing the nitro API objects. |
| **nitro\_timeout** float | **Default:**310 | Time in seconds until a timeout error is thrown when establishing a new session with Netscaler |
| **nitro\_user** string / required | | The username with which to authenticate to the netscaler node. |
| **nsip** string / required | | The ip address of the netscaler appliance where the nitro API calls will be made. The port can be specified with the colon (:). E.g. 192.168.1.1:555. |
| **pathmonitor** boolean | **Choices:*** no
* yes
| Path monitoring for clustering. |
| **pathmonitorindv** boolean | **Choices:*** no
* yes
| Individual Path monitoring decisions. |
| **rtspsessionidremap** boolean | **Choices:*** no
* yes
| Enable RTSP session ID mapping for the service group. |
| **save\_config** boolean | **Choices:*** no
* **yes** β
| If `yes` the module will save the configuration on the netscaler node if it makes any changes. The module will not save the configuration on the netscaler node if it made no changes. |
| **servicegroupname** string | | Name of the service group. Must begin with an ASCII alphabetic or underscore `_` character, and must contain only ASCII alphanumeric, underscore `_`, hash `#`, period `.`, space , colon `:`, at `@`, equals `=`, and hyphen `-` characters. Can be changed after the name is created. Minimum length = 1 |
| **servicemembers** string | | A list of dictionaries describing each service member of the service group. |
| | **customserverid** string | | The identifier for this IP:Port pair. Used when the persistency type is set to Custom Server ID. |
| | **hashid** string | | The hash identifier for the service. This must be unique for each service. This parameter is used by hash based load balancing methods. Minimum value = `1`
|
| | **ip** string | | IP address of the service. Must not overlap with an existing server entity defined by name. |
| | **port** string | | Server port number. Range `1` - `65535`
\* in CLI is represented as 65535 in NITRO API |
| | **serverid** string | | The identifier for the service. This is used when the persistency type is set to Custom Server ID. |
| | **servername** string | | Name of the server to which to bind the service group. The server must already be configured as a named server. Minimum length = 1 |
| | **state** string | **Choices:*** enabled
* disabled
| Initial state of the service after binding. |
| | **weight** string | | Weight to assign to the servers in the service group. Specifies the capacity of the servers relative to the other servers in the load balancing configuration. The higher the weight, the higher the percentage of requests sent to the service. Minimum value = `1`
Maximum value = `100`
|
| **servicetype** string | **Choices:*** HTTP
* FTP
* TCP
* UDP
* SSL
* SSL\_BRIDGE
* SSL\_TCP
* DTLS
* NNTP
* RPCSVR
* DNS
* ADNS
* SNMP
* RTSP
* DHCPRA
* ANY
* SIP\_UDP
* SIP\_TCP
* SIP\_SSL
* DNS\_TCP
* ADNS\_TCP
* MYSQL
* MSSQL
* ORACLE
* RADIUS
* RADIUSListener
* RDP
* DIAMETER
* SSL\_DIAMETER
* TFTP
* SMPP
* PPTP
* GRE
* SYSLOGTCP
* SYSLOGUDP
* FIX
* SSL\_FIX
| Protocol used to exchange data with the service. |
| **sp** boolean | **Choices:*** no
* yes
| Enable surge protection for the service group. |
| **state** string | **Choices:*** absent
* **present** β
| The state of the resource being configured by the module on the netscaler node. When present the resource will be created if needed and configured according to the module's parameters. When absent the resource will be deleted from the netscaler node. |
| **svrtimeout** string | | Time, in seconds, after which to terminate an idle server connection. Minimum value = `0`
Maximum value = `31536000`
|
| **tcpb** boolean | **Choices:*** no
* yes
| Enable TCP buffering for the service group. |
| **tcpprofilename** string | | Name of the TCP profile that contains TCP configuration settings for the service group. Minimum length = 1 Maximum length = 127 |
| **useproxyport** boolean | **Choices:*** no
* yes
| Use the proxy port as the source port when initiating connections with the server. With the NO setting, the client-side connection port is used as the source port for the server-side connection. Note: This parameter is available only when the Use Source IP `usip` parameter is set to `yes`. |
| **usip** boolean | **Choices:*** no
* yes
| Use client's IP address as the source IP address when initiating connection to the server. With the NO setting, which is the default, a mapped IP (MIP) address or subnet IP (SNIP) address is used as the source IP address to initiate server side connections. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* For more information on using Ansible to manage Citrix NetScaler Network devices see <https://www.ansible.com/ansible-netscaler>.
Examples
--------
```
# The LB Monitors monitor-1 and monitor-2 must already exist
# Service members defined by C(ip) must not redefine an existing server's ip address.
# Service members defined by C(servername) must already exist.
- name: Setup http service with ip members
delegate_to: localhost
community.network.netscaler_servicegroup:
nsip: 172.18.0.2
nitro_user: nsroot
nitro_pass: nsroot
state: present
servicegroupname: service-group-1
servicetype: HTTP
servicemembers:
- ip: 10.78.78.78
port: 80
weight: 50
- ip: 10.79.79.79
port: 80
weight: 40
- servername: server-1
port: 80
weight: 10
monitorbindings:
- monitorname: monitor-1
weight: 50
- monitorname: monitor-2
weight: 50
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **diff** dictionary | failure | List of differences between the actual configured object and the configuration specified in the module **Sample:** {'clttimeout': 'difference. ours: (float) 10.0 other: (float) 20.0'} |
| **loglines** list / elements=string | always | list of logged messages by the module **Sample:** ['message 1', 'message 2'] |
| **msg** string | failure | Message detailing the failure reason **Sample:** Action does not exist |
### Authors
* George Nikolopoulos (@giorgos-nikolopoulos)
ansible community.network.edgeos_command β Run one or more commands on EdgeOS devices community.network.edgeos\_command β Run one or more commands on EdgeOS devices
==============================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.edgeos_command`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This command module allows running one or more commands on a remote device running EdgeOS, such as the Ubiquiti EdgeRouter.
* This module does not support running commands in configuration mode.
* Certain `show` commands in EdgeOS produce many lines of output and use a custom pager that can cause this module to hang. If the value of the environment variable `ANSIBLE_EDGEOS_TERMINAL_LENGTH` is not set, the default number of 10000 is used.
* This is a network module and requires `connection: network_cli` in order to work properly.
* For more information please see the [Network Guide](getting_started/index).
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **commands** string / required | | The commands or ordered set of commands that should be run against the remote device. The output of the command is returned to the playbook. If the `wait_for` argument is provided, the module is not returned until the condition is met or the number of retries is exceeded. |
| **interval** string | **Default:**1 | The number of seconds to wait between `retries` of the command. |
| **match** string | **Choices:*** any
* **all** β
| Used in conjunction with `wait_for` to create match policy. If set to `all`, then all conditions in `wait_for` must be met. If set to `any`, then only one condition must match. |
| **retries** string | **Default:**10 | Number of times a command should be tried before it is considered failed. The command is run on the target device and evaluated against the `wait_for` conditionals. |
| **wait\_for** string | | Causes the task to wait for a specific condition to be met before moving forward. If the condition is not met before the specified number of retries is exceeded, the task will fail. |
Notes
-----
Note
* Tested against EdgeOS 1.9.7
* Running `show system boot-messages all` will cause the module to hang since EdgeOS is using a custom pager setting to display the output of that command.
Examples
--------
```
tasks:
- name: Reboot the device
community.network.edgeos_command:
commands: reboot now
- name: Show the configuration for eth0 and eth1
community.network.edgeos_command:
commands: show interfaces ethernet {{ item }}
loop:
- eth0
- eth1
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **stdout** list / elements=string | always apart from low level errors (such as action plugin) | The set of responses from the commands **Sample:** ['...', '...'] |
| **stdout\_lines** list / elements=string | always | The value of stdout split into a list **Sample:** [['...', '...'], ['...'], ['...']] |
### Authors
* Chad Norgan (@beardymcbeards)
* Sam Doran (@samdoran)
ansible community.network.icx β Use icx cliconf to run command on Ruckus ICX platform community.network.icx β Use icx cliconf to run command on Ruckus ICX platform
=============================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.icx`.
Synopsis
--------
* This icx plugin provides low level abstraction APIs for sending and receiving CLI commands from Ruckus ICX network devices.
### Authors
* Ruckus Wireless (@Commscope)
ansible community.network.avi_serviceenginegroup β Module for setup of ServiceEngineGroup Avi RESTful Object community.network.avi\_serviceenginegroup β Module for setup of ServiceEngineGroup Avi RESTful Object
=====================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_serviceenginegroup`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure ServiceEngineGroup object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **accelerated\_networking** boolean | **Choices:*** no
* yes
| Enable accelerated networking option for azure se. Accelerated networking enables single root i/o virtualization (sr-iov) to a se vm. This improves networking performance. Field introduced in 17.2.14,18.1.5,18.2.1. |
| **active\_standby** boolean | **Choices:*** no
* yes
| 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. |
| **additional\_config\_memory** string | | Indicates the percent of config memory used for config updates. Allowed values are 0-90. Field deprecated in 18.1.2. Field introduced in 18.1.1. |
| **advertise\_backend\_networks** boolean | **Choices:*** no
* yes
| 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** boolean | **Choices:*** no
* yes
| Enable aggressive failover configuration for ha. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **algo** string | | 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. |
| **allow\_burst** boolean | **Choices:*** no
* yes
| Allow ses to be created using burst license. Field introduced in 17.2.5. |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **app\_cache\_percent** string | | A percent value of total se memory reserved for application caching. This is an se bootup property and requires se restart. Allowed values are 0 - 100. Special values are 0- 'disable'. Field introduced in 18.2.3. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **app\_learning\_memory\_percent** string | | A percent value of total se memory reserved for application learning. This is an se bootup property and requires se restart. Allowed values are 0 - 10. Field introduced in 18.2.3. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **archive\_shm\_limit** string | | Amount of se memory in gb until which shared memory is collected in core archive. Field introduced in 17.1.3. Default value when not specified in API or module is interpreted by Avi Controller as 8. |
| **async\_ssl** boolean | **Choices:*** no
* yes
| Ssl handshakes will be handled by dedicated ssl threads. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **async\_ssl\_threads** string | | Number of async ssl threads per se\_dp. Allowed values are 1-16. Default value when not specified in API or module is interpreted by Avi Controller as 1. |
| **auto\_rebalance** boolean | **Choices:*** no
* yes
| 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\_capacity\_per\_se** string | | Capacities of se for auto rebalance for each criteria. Field introduced in 17.2.4. |
| **auto\_rebalance\_criteria** string | | Set of criteria for se auto rebalance. Enum options - SE\_AUTO\_REBALANCE\_CPU, SE\_AUTO\_REBALANCE\_PPS, SE\_AUTO\_REBALANCE\_MBPS, SE\_AUTO\_REBALANCE\_OPEN\_CONNS, SE\_AUTO\_REBALANCE\_CPS. Field introduced in 17.2.3. |
| **auto\_rebalance\_interval** string | | 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** boolean | **Choices:*** no
* yes
| 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. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **bgp\_state\_update\_interval** string | | Bgp peer state update interval. Allowed values are 5-100. Field introduced in 17.2.14,18.1.5,18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as 10. |
| **buffer\_se** string | | 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** string | | It is a reference to an object of type cloud. |
| **config\_debugs\_on\_all\_cores** boolean | **Choices:*** no
* yes
| Enable config debugs on all cores of se. Field introduced in 17.2.13,18.1.5,18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **connection\_memory\_percentage** string | | 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. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **cpu\_reserve** boolean | **Choices:*** no
* yes
| 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** boolean | **Choices:*** no
* yes
| 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\_securitygroups\_data** string | | Custom security groups to be associated with data vnics for se instances in openstack and aws clouds. Field introduced in 17.1.3. |
| **custom\_securitygroups\_mgmt** string | | Custom security groups to be associated with management vnic for se instances in openstack and aws clouds. Field introduced in 17.1.3. |
| **custom\_tag** string | | 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. |
| **data\_network\_id** string | | Subnet used to spin up the data nic for service engines, used only for azure cloud. Overrides the cloud level setting for service engine subnet. Field introduced in 18.2.3. |
| **datascript\_timeout** string | | Number of instructions before datascript times out. Allowed values are 0-100000000. Field introduced in 18.2.3. Default value when not specified in API or module is interpreted by Avi Controller as 1000000. |
| **dedicated\_dispatcher\_core** boolean | **Choices:*** no
* yes
| 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** string | | User defined description for the object. |
| **disable\_avi\_securitygroups** boolean | **Choices:*** no
* yes
| By default, avi creates and manages security groups along with custom sg provided by user. Set this to true to disallow avi to create and manage new security groups. Avi will only make use of custom security groups provided by user. This option is only supported for aws cloud type. Field introduced in 17.2.13,18.1.4,18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **disable\_csum\_offloads** boolean | **Choices:*** no
* yes
| Stop using tcp/udp and ip checksum offload features of nics. Field introduced in 17.1.14, 17.2.5, 18.1.1. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **disable\_gro** boolean | **Choices:*** no
* yes
| Disable generic receive offload (gro) in dpdk poll-mode driver packet receive path. Gro is on by default on nics that do not support lro (large receive offload) or do not gain performance boost from lro. Field introduced in 17.2.5, 18.1.1. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **disable\_se\_memory\_check** boolean | **Choices:*** no
* yes
| If set, disable the config memory check done in service engine. Field introduced in 18.1.2. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **disable\_tso** boolean | **Choices:*** no
* yes
| Disable tcp segmentation offload (tso) in dpdk poll-mode driver packet transmit path. Tso is on by default on nics that support it. Field introduced in 17.2.5, 18.1.1. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **disk\_per\_se** string | | 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** boolean | **Choices:*** no
* yes
| 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. |
| **distribute\_queues** boolean | **Choices:*** no
* yes
| Distributes queue ownership among cores so multiple cores handle dispatcher duties. Field introduced in 17.2.8. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **enable\_hsm\_priming** boolean | **Choices:*** no
* yes
| (this is a beta feature). Enable hsm key priming. If enabled, key handles on the hsm will be synced to se before processing client connections. Field introduced in 17.2.7, 18.1.1. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **enable\_multi\_lb** boolean | **Choices:*** no
* yes
| Applicable only for azure cloud with basic sku lb. If set, additional azure lbs will be automatically created if resources in existing lb are exhausted. Field introduced in 17.2.10, 18.1.2. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **enable\_routing** boolean | **Choices:*** no
* yes
| 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** boolean | **Choices:*** no
* yes
| 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** boolean | **Choices:*** no
* yes
| 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. |
| **ephemeral\_portrange\_end** string | | End local ephemeral port number for outbound connections. Field introduced in 17.2.13, 18.1.5, 18.2.1. |
| **ephemeral\_portrange\_start** string | | Start local ephemeral port number for outbound connections. Field introduced in 17.2.13, 18.1.5, 18.2.1. |
| **extra\_config\_multiplier** string | | 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** string | | 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** string | | 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** string | | 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. |
| **flow\_table\_new\_syn\_max\_entries** string | | Maximum number of flow table entries that have not completed tcp three-way handshake yet. Field introduced in 17.2.5. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **free\_list\_size** string | | Number of entries in the free list. Field introduced in 17.2.10, 18.1.2. Default value when not specified in API or module is interpreted by Avi Controller as 1024. |
| **ha\_mode** string | | 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** string | | It is a reference to an object of type hardwaresecuritymodulegroup. |
| **heap\_minimum\_config\_memory** string | | Minimum required heap memory to apply any configuration. Allowed values are 0-100. Field introduced in 18.1.2. Default value when not specified in API or module is interpreted by Avi Controller as 8. |
| **hm\_on\_standby** boolean | **Choices:*** no
* yes
| 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** string | | Key of a (key, value) pair identifying a label for a set of nodes usually in container clouds. Needs to be specified together with host\_attribute\_value. Ses can be configured differently including ha modes across different se groups. May also be used for isolation between different classes of virtualservices. Virtualservices' se group may be specified via annotations/labels. A openshift/kubernetes namespace maybe annotated with a matching se group label as openshift.io/node-selector apptype=prod. When multiple se groups are used in a cloud with host attributes specified,just a single se group can exist as a match-all se group without a host\_attribute\_key. |
| **host\_attribute\_value** string | | Value of a (key, value) pair identifying a label for a set of nodes usually in container clouds. Needs to be specified together with host\_attribute\_key. |
| **host\_gateway\_monitor** boolean | **Choices:*** no
* yes
| Enable the host gateway monitor when service engine is deployed as docker container. Disabled by default. Field introduced in 17.2.4. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **hypervisor** string | | Override default hypervisor. Enum options - DEFAULT, VMWARE\_ESX, KVM, VMWARE\_VSAN, XEN. |
| **ignore\_rtt\_threshold** string | | Ignore rtt samples if it is above threshold. Field introduced in 17.1.6,17.2.2. Default value when not specified in API or module is interpreted by Avi Controller as 5000. |
| **ingress\_access\_data** string | | Program se security group ingress rules to allow vip data access from remote cidr type. Enum options - SG\_INGRESS\_ACCESS\_NONE, SG\_INGRESS\_ACCESS\_ALL, SG\_INGRESS\_ACCESS\_VPC. Field introduced in 17.1.5. Default value when not specified in API or module is interpreted by Avi Controller as SG\_INGRESS\_ACCESS\_ALL. |
| **ingress\_access\_mgmt** string | | Program se security group ingress rules to allow ssh/icmp management access from remote cidr type. Enum options - SG\_INGRESS\_ACCESS\_NONE, SG\_INGRESS\_ACCESS\_ALL, SG\_INGRESS\_ACCESS\_VPC. Field introduced in 17.1.5. Default value when not specified in API or module is interpreted by Avi Controller as SG\_INGRESS\_ACCESS\_ALL. |
| **instance\_flavor** string | | Instance/flavor name for se instance. |
| **iptables** string | | Iptables rules. |
| **least\_load\_core\_selection** boolean | **Choices:*** no
* yes
| Select core with least load for new flow. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **license\_tier** string | | Specifies the license tier which would be used. This field by default inherits the value from cloud. Enum options - ENTERPRISE\_16, ENTERPRISE\_18. Field introduced in 17.2.5. |
| **license\_type** string | | If no license type is specified then default license enforcement for the cloud type is chosen. Enum options - LIC\_BACKEND\_SERVERS, LIC\_SOCKETS, LIC\_CORES, LIC\_HOSTS, LIC\_SE\_BANDWIDTH, LIC\_METERED\_SE\_BANDWIDTH. Field introduced in 17.2.5. |
| **log\_disksz** string | | 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** string | | 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\_memory\_per\_mempool** string | | Max bytes that can be allocated in a single mempool. Field introduced in 18.1.5. Default value when not specified in API or module is interpreted by Avi Controller as 64. |
| **max\_public\_ips\_per\_lb** string | | Applicable to azure platform only. Maximum number of public ips per azure lb. Field introduced in 17.2.12, 18.1.2. Default value when not specified in API or module is interpreted by Avi Controller as 30. |
| **max\_rules\_per\_lb** string | | Applicable to azure platform only. Maximum number of rules per azure lb. Field introduced in 17.2.12, 18.1.2. Default value when not specified in API or module is interpreted by Avi Controller as 150. |
| **max\_scaleout\_per\_vs** string | | 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** string | | 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** string | | Maximum number of virtual services that can be placed on a single service engine. East west virtual services are excluded from this limit. Allowed values are 1-1000. Default value when not specified in API or module is interpreted by Avi Controller as 10. |
| **mem\_reserve** boolean | **Choices:*** no
* yes
| Boolean flag to set mem\_reserve. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **memory\_for\_config\_update** string | | Indicates the percent of memory reserved for config updates. Allowed values are 0-100. Field introduced in 18.1.2. Default value when not specified in API or module is interpreted by Avi Controller as 15. |
| **memory\_per\_se** string | | 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** string | | Management network to use for avi service engines. It is a reference to an object of type network. |
| **mgmt\_subnet** string | | Management subnet to use for avi service engines. |
| **min\_cpu\_usage** string | | 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** string | | 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. |
| **min\_se** string | | Minimum number of services engines in this group (relevant for se autorebalance only). Allowed values are 0-1000. Field introduced in 17.2.13,18.1.3,18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as 1. |
| **minimum\_connection\_memory** string | | Indicates the percent of memory reserved for connections. Allowed values are 0-100. Field introduced in 18.1.2. Default value when not specified in API or module is interpreted by Avi Controller as 20. |
| **minimum\_required\_config\_memory** string | | Required available config memory to apply any configuration. Allowed values are 0-90. Field deprecated in 18.1.2. Field introduced in 18.1.1. |
| **n\_log\_streaming\_threads** string | | Number of threads to use for log streaming. Allowed values are 1-100. Field introduced in 17.2.12, 18.1.2. Default value when not specified in API or module is interpreted by Avi Controller as 1. |
| **name** string / required | | Name of the object. |
| **non\_significant\_log\_throttle** string | | This setting limits the number of non-significant logs generated per second per core on this se. Default is 100 logs per second. Set it to zero (0) to disable throttling. Field introduced in 17.1.3. Default value when not specified in API or module is interpreted by Avi Controller as 100. |
| **num\_dispatcher\_cores** string | | Number of dispatcher cores (0,1,2,4,8 or 16). If set to 0, then number of dispatcher cores is deduced automatically. Allowed values are 0,1,2,4,8,16. Field introduced in 17.2.12, 18.1.3, 18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **num\_flow\_cores\_sum\_changes\_to\_ignore** string | | 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** string | | Field deprecated in 17.1.1. |
| **openstack\_availability\_zones** string | | Field introduced in 17.1.1. |
| **openstack\_mgmt\_network\_name** string | | Avi management network name. |
| **openstack\_mgmt\_network\_uuid** string | | Management network uuid. |
| **os\_reserved\_memory** string | | 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. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **per\_app** boolean | **Choices:*** no
* yes
| 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** string | | 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** string | | Enable or disable real time se metrics. |
| **reboot\_on\_stop** boolean | **Choices:*** no
* yes
| Reboot the system if the se is stopped. Field introduced in 17.2.16,18.2.3. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **se\_bandwidth\_type** string | | Select the se bandwidth for the bandwidth license. Enum options - SE\_BANDWIDTH\_UNLIMITED, SE\_BANDWIDTH\_25M, SE\_BANDWIDTH\_200M, SE\_BANDWIDTH\_1000M, SE\_BANDWIDTH\_10000M. Field introduced in 17.2.5. |
| **se\_deprovision\_delay** string | | 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** string | | Dosthresholdprofile settings for serviceenginegroup. |
| **se\_dpdk\_pmd** string | | Determines if dpdk pool mode driver should be used or not 0 automatically determine based on hypervisor/nic type 1 unconditionally use dpdk poll mode driver 2 don't use dpdk poll mode driver. Allowed values are 0-2. Field introduced in 18.1.3. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **se\_flow\_probe\_retries** string | | Flow probe retry count if no replies are received. Allowed values are 0-5. Field introduced in 18.1.4, 18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as 2. |
| **se\_flow\_probe\_timer** string | | Timeout in milliseconds for flow probe entries. Allowed values are 10-200. Field introduced in 18.1.4, 18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as 100. |
| **se\_ipc\_udp\_port** string | | Udp port for se\_dp ipc in docker bridge mode. Field introduced in 17.1.2. Default value when not specified in API or module is interpreted by Avi Controller as 1500. |
| **se\_name\_prefix** string | | 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\_pcap\_lookahead** boolean | **Choices:*** no
* yes
| Enables lookahead mode of packet receive in pcap mode. Introduced to overcome an issue with hv\_netvsc driver. Lookahead mode attempts to ensure that application and kernel's view of the receive rings are consistent. Field introduced in 18.2.3. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **se\_pcap\_reinit\_frequency** string | | Frequency in seconds at which periodically a pcap reinit check is triggered. May be used in conjunction with the configuration pcap\_reinit\_threshold. (valid range 15 mins - 12 hours, 0 - disables). Allowed values are 900-43200. Special values are 0- 'disable'. Field introduced in 17.2.13, 18.1.3, 18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **se\_pcap\_reinit\_threshold** string | | Threshold for input packet receive errors in pcap mode exceeding which a pcap reinit is triggered. If not set, an unconditional reinit is performed. This value is checked every pcap\_reinit\_frequency interval. Field introduced in 17.2.13, 18.1.3, 18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **se\_probe\_port** string | | Tcp port on se where echo service will be run. Field introduced in 17.2.2. Default value when not specified in API or module is interpreted by Avi Controller as 7. |
| **se\_remote\_punt\_udp\_port** string | | Udp port for punted packets in docker bridge mode. Field introduced in 17.1.2. Default value when not specified in API or module is interpreted by Avi Controller as 1501. |
| **se\_routing** boolean | **Choices:*** no
* yes
| Enable routing via service engine datapath. When disabled, routing is done by the linux kernel. Ip routing needs to be enabled in service engine group for se routing to be effective. Field introduced in 18.2.3. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **se\_sb\_dedicated\_core** boolean | **Choices:*** no
* yes
| Sideband traffic will be handled by a dedicated core. Field introduced in 16.5.2, 17.1.9, 17.2.3. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **se\_sb\_threads** string | | Number of sideband threads per se. Allowed values are 1-128. Field introduced in 16.5.2, 17.1.9, 17.2.3. Default value when not specified in API or module is interpreted by Avi Controller as 1. |
| **se\_thread\_multiplier** string | | 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\_tracert\_port\_range** string | | Traceroute port range. Field introduced in 17.2.8. |
| **se\_tunnel\_mode** string | | Determines if dsr from secondary se is active or not 0 automatically determine based on hypervisor type. 1 disable dsr unconditionally. 2 enable dsr unconditionally. Allowed values are 0-2. Field introduced in 17.1.1. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **se\_tunnel\_udp\_port** string | | Udp port for tunneled packets from secondary to primary se in docker bridge mode. Field introduced in 17.1.3. Default value when not specified in API or module is interpreted by Avi Controller as 1550. |
| **se\_udp\_encap\_ipc** string | | Determines if se-se ipc messages are encapsulated in a udp header 0 automatically determine based on hypervisor type. 1 use udp encap unconditionally. Allowed values are 0-1. Field introduced in 17.1.2. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **se\_use\_dpdk** string | | Determines if dpdk library should be used or not 0 automatically determine based on hypervisor type 1 use dpdk if pcap is not enabled 2 don't use dpdk. Allowed values are 0-2. Field introduced in 18.1.3. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **se\_vs\_hb\_max\_pkts\_in\_batch** string | | 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 64. |
| **se\_vs\_hb\_max\_vs\_in\_pkt** string | | 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. |
| **self\_se\_election** boolean | **Choices:*** no
* yes
| Enable ses to elect a primary amongst themselves in the absence of a connectivity to controller. Field introduced in 18.1.2. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **service\_ip6\_subnets** string | | Ipv6 subnets assigned to the se group. Required for vs group placement. Field introduced in 18.1.1. |
| **service\_ip\_subnets** string | | Subnets assigned to the se group. Required for vs group placement. Field introduced in 17.1.1. |
| **shm\_minimum\_config\_memory** string | | Minimum required shared memory to apply any configuration. Allowed values are 0-100. Field introduced in 18.1.2. Default value when not specified in API or module is interpreted by Avi Controller as 4. |
| **significant\_log\_throttle** string | | This setting limits the number of significant logs generated per second per core on this se. Default is 100 logs per second. Set it to zero (0) to disable throttling. Field introduced in 17.1.3. Default value when not specified in API or module is interpreted by Avi Controller as 100. |
| **ssl\_preprocess\_sni\_hostname** boolean | **Choices:*** no
* yes
| (beta) preprocess ssl client hello for sni hostname extension.if set to true, this will apply sni child's ssl protocol(s), if they are different from sni parent's allowed ssl protocol(s). Field introduced in 17.2.12, 18.1.3. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **udf\_log\_throttle** string | | This setting limits the number of udf logs generated per second per core on this se. Udf logs are generated due to the configured client log filters or the rules with logging enabled. Default is 100 logs per second. Set it to zero (0) to disable throttling. Field introduced in 17.1.3. Default value when not specified in API or module is interpreted by Avi Controller as 100. |
| **url** string | | Avi controller URL of the object. |
| **use\_standard\_alb** boolean | **Choices:*** no
* yes
| Use standard sku azure load balancer. By default cloud level flag is set. If not set, it inherits/uses the use\_standard\_alb flag from the cloud. Field introduced in 18.2.3. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
| **vcenter\_clusters** string | | Vcenterclusters settings for serviceenginegroup. |
| **vcenter\_datastore\_mode** string | | 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** string | | List of vcenterdatastore. |
| **vcenter\_datastores\_include** boolean | **Choices:*** no
* yes
| 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** string | | 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** string | | Vcenterhosts settings for serviceenginegroup. |
| **vcpus\_per\_se** string | | 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. |
| **vip\_asg** string | | When vip\_asg is set, vip configuration will be managed by avi.user will be able to configure vip\_asg or vips individually at the time of create. Field introduced in 17.2.12, 18.1.2. |
| **vs\_host\_redundancy** boolean | **Choices:*** no
* yes
| 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** string | | 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** string | | 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** string | | 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 600. |
| **vs\_se\_scaleout\_additional\_wait\_time** string | | Wait time for sending scaleout ready notification after virtual service is marked up. In certain deployments, there may be an additional delay to accept traffic. For example, for bgp, some time is needed for route advertisement. Allowed values are 0-20. Field introduced in 18.1.5,18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **vs\_se\_scaleout\_ready\_timeout** string | | Timeout in seconds for service engine to sendscaleout ready notification of a virtual service. Allowed values are 0-60. Field introduced in 18.1.5,18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as 25. |
| **vs\_switchover\_timeout** string | | During se upgrade in a legacy active/standby segroup, time to wait for the new primary se to accept flows before marking the switchover done. Field introduced in 17.2.13,18.1.4,18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as 300. |
| **vss\_placement** string | | Parameters to place virtual services on only a subset of the cores of an se. Field introduced in 17.2.5. |
| **vss\_placement\_enabled** boolean | **Choices:*** no
* yes
| If set, virtual services will be placed on only a subset of the cores of an se. Field introduced in 18.1.1. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **waf\_learning\_interval** string | | Frequency with which se publishes waf learning. Allowed values are 1-43200. Field deprecated in 18.2.3. Field introduced in 18.1.2. Default value when not specified in API or module is interpreted by Avi Controller as 10. |
| **waf\_learning\_memory** string | | Amount of memory reserved on se for waf learning. Cannot exceed 5% of se memory. Field deprecated in 18.2.3. Field introduced in 18.1.2. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **waf\_mempool** boolean | **Choices:*** no
* yes
| Enable memory pool for waf. Field introduced in 17.2.3. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **waf\_mempool\_size** string | | Memory pool size used for waf. Field introduced in 17.2.3. Default value when not specified in API or module is interpreted by Avi Controller as 64. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create ServiceEngineGroup object
community.network.avi_serviceenginegroup:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_serviceenginegroup
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | ServiceEngineGroup (api/serviceenginegroup) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#a5c2d7c4d6d1cac2cc838696929e838690979e8386919d9ec4d3cccbc0d1d2cad7ced6838691939ec6cac8)>
| programming_docs |
ansible community.network.pn_port_config β CLI command to modify port-config community.network.pn\_port\_config β CLI command to modify port-config
======================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_port_config`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to modify a port configuration.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_allowed\_tpid** string | **Choices:*** vlan
* q-in-q
* q-in-q-old
| Allowed TPID in addition to 0x8100 on Vlan header. |
| **pn\_autoneg** boolean | **Choices:*** no
* yes
| physical port autonegotiation. |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_crc\_check\_enable** boolean | **Choices:*** no
* yes
| CRC check on ingress and rewrite on egress. |
| **pn\_defer\_bringup** boolean | **Choices:*** no
* yes
| defer port bringup. |
| **pn\_description** string | | physical port description. |
| **pn\_dscp\_map** string | | DSCP map name to enable on port. |
| **pn\_edge\_switch** boolean | **Choices:*** no
* yes
| physical port edge switch. |
| **pn\_egress\_rate\_limit** string | | max egress port data rate limit. |
| **pn\_enable** boolean | **Choices:*** no
* yes
| physical port enable. |
| **pn\_eth\_mode** string | **Choices:*** 1000base-x
* sgmii
* disabled
* GMII
| physical Ethernet mode. |
| **pn\_fabric\_guard** boolean | **Choices:*** no
* yes
| Fabric guard configuration. |
| **pn\_host\_enable** boolean | **Choices:*** no
* yes
| Host facing port control setting. |
| **pn\_intf** string | | physical interface. |
| **pn\_jumbo** boolean | **Choices:*** no
* yes
| jumbo frames on physical port. |
| **pn\_lacp\_priority** string | | LACP priority from 1 to 65535. |
| **pn\_local\_switching** boolean | **Choices:*** no
* yes
| no-local-switching port cannot bridge traffic to another no-local-switching port. |
| **pn\_loop\_vlans** string | | looping vlans. |
| **pn\_loopback** boolean | **Choices:*** no
* yes
| physical port loopback. |
| **pn\_mirror\_only** boolean | **Choices:*** no
* yes
| physical port mirror only. |
| **pn\_pause** boolean | **Choices:*** no
* yes
| physical port pause. |
| **pn\_port** string | | physical port. |
| **pn\_port\_mac\_address** string | | physical port MAC Address. |
| **pn\_reflect** boolean | **Choices:*** no
* yes
| physical port reflection. |
| **pn\_routing** boolean | **Choices:*** no
* yes
| routing. |
| **pn\_send\_port** string | | send port. |
| **pn\_speed** string | **Choices:*** disable
* 10m
* 100m
* 1g
* 2.5g
* 10g
* 25g
* 40g
* 50g
* 100g
| physical port speed. |
| **pn\_vxlan\_termination** boolean | **Choices:*** no
* yes
| physical port vxlan termination setting. |
| **state** string / required | **Choices:*** update
| State the action to perform. Use `update` to modify the port-config. |
Examples
--------
```
- name: Port config modify
community.network.pn_port_config:
pn_cliswitch: "sw01"
state: "update"
pn_port: "all"
pn_dscp_map: "foo"
- name: Port config modify
community.network.pn_port_config:
pn_cliswitch: "sw01"
state: "update"
pn_port: "all"
pn_host_enable: true
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the port-config command. |
| **stdout** list / elements=string | always | set of responses from the port-config command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.cnos_system β Manage the system attributes on Lenovo CNOS devices community.network.cnos\_system β Manage the system attributes on Lenovo CNOS devices
====================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_system`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of node system attributes on Lenovo CNOS devices. It provides an option to configure host system parameters or remove those parameters from the device active configuration.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **domain\_name** string | | Configures the default domain name suffix to be used when referencing this node by its FQDN. This argument accepts either a list of domain names or a list of dicts that configure the domain name and VRF name or keyword 'default'. See examples. |
| **domain\_search** string | | Configures a list of domain name suffixes to search when performing DNS name resolution. This argument accepts either a list of domain names or a list of dicts that configure the domain name and VRF name or keyword 'default'. See examples. |
| **hostname** string | | Configure the device hostname parameter. This option takes an ASCII string value or keyword 'default' |
| **lookup\_enabled** boolean | **Choices:*** no
* yes
| Administrative control for enabling or disabling DNS lookups. When this argument is set to True, lookups are performed and when it is set to False, lookups are not performed. |
| **lookup\_source** string | | Provides one or more source interfaces to use for performing DNS lookups. The interface must be a valid interface configured. on the device. |
| **name\_servers** string | | List of DNS name servers by IP address to use to perform name resolution lookups. This argument accepts either a list of DNS servers or a list of hashes that configure the name server and VRF name or keyword 'default'. See examples. |
| **state** string | **Choices:*** **present** β
* absent
| State of the configuration values in the device's current active configuration. When set to *present*, the values should be configured in the device active configuration and when set to *absent* the values should not be in the device active configuration |
Examples
--------
```
- name: Configure hostname and domain-name
community.network.cnos_system:
hostname: cnos01
domain_name: test.example.com
- name: Remove configuration
community.network.cnos_system:
state: absent
- name: Configure name servers
community.network.cnos_system:
name_servers:
- 8.8.8.8
- 8.8.4.4
- name: Configure DNS Lookup sources
community.network.cnos_system:
lookup_source: MgmtEth0/0/CPU0/0
lookup_enabled: yes
- name: Configure name servers with VRF support
nxos_system:
name_servers:
- { server: 8.8.8.8, vrf: mgmt }
- { server: 8.8.4.4, vrf: mgmt }
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always | The list of configuration mode commands to send to the device **Sample:** ['hostname cnos01', 'ip domain-name test.example.com vrf default'] |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
ansible community.network.enos_facts β Collect facts from remote devices running Lenovo ENOS community.network.enos\_facts β Collect facts from remote devices running Lenovo ENOS
=====================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.enos_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Collects a base set of device facts from a remote Lenovo device running on ENOS. This module prepends all of the base network fact keys with `ansible_net_<fact>`. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_pass** string | | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
| **authorize** boolean | **Choices:*** **no** β
* yes
| Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
| **gather\_subset** string | **Default:**"!config" | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, hardware, config, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial `!` to specify that a specific subset should not be collected. |
| **provider** dictionary | | A dict object containing connection details. |
| | **auth\_pass** string | | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
| | **authorize** boolean | **Choices:*** **no** β
* yes
| Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
| | **host** string / required | | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
| | **port** integer | **Default:**22 | Specifies the port to use when building the connection to the remote device. |
| | **ssh\_keyfile** path | | Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
| | **timeout** integer | **Default:**10 | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
| | **username** string | | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
Notes
-----
Note
* Tested against ENOS 8.4.1
Examples
--------
```
Tasks: The following are examples of using the module enos_facts.
---
- name: Test Enos Facts
community.network.enos_facts:
provider={{ cli }}
vars:
cli:
host: "{{ inventory_hostname }}"
port: 22
username: admin
password: admin
transport: cli
timeout: 30
authorize: True
auth_pass:
---
# Collect all facts from the device
- community.network.enos_facts:
gather_subset: all
provider: "{{ cli }}"
# Collect only the config and default facts
- community.network.enos_facts:
gather_subset:
- config
provider: "{{ cli }}"
# Do not collect hardware facts
- community.network.enos_facts:
gather_subset:
- "!hardware"
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ansible\_net\_all\_ipv4\_addresses** list / elements=string | when interfaces is configured | All IPv4 addresses configured on the device |
| **ansible\_net\_all\_ipv6\_addresses** list / elements=string | when interfaces is configured | All IPv6 addresses configured on the device |
| **ansible\_net\_config** string | when config is configured | The current active config from the device |
| **ansible\_net\_gather\_subset** list / elements=string | always | The list of fact subsets collected from the device |
| **ansible\_net\_hostname** string | always | The configured hostname of the device |
| **ansible\_net\_image** string | always | Indicates the active image for the device |
| **ansible\_net\_interfaces** dictionary | when interfaces is configured | A hash of all interfaces running on the system. This gives information on description, mac address, mtu, speed, duplex and operstatus |
| **ansible\_net\_memfree\_mb** integer | when hardware is configured | The available free memory on the remote device in MB |
| **ansible\_net\_model** string | always | The model name returned from the Lenovo ENOS device |
| **ansible\_net\_neighbors** dictionary | when interfaces is configured | The list of LLDP neighbors from the remote device |
| **ansible\_net\_serialnum** string | always | The serial number of the Lenovo ENOS device |
| **ansible\_net\_version** string | always | The ENOS operating system version running on the remote device |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
ansible community.network.cnos_interface β Manage Interface on Lenovo CNOS network devices community.network.cnos\_interface β Manage Interface on Lenovo CNOS network devices
===================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_interface`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of Interfaces on Lenovo CNOS network devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate** string | | List of Interfaces definitions. |
| **delay** string | **Default:**20 | Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state argument which are *state* with values `up`/`down`, *tx\_rate* and *rx\_rate*
|
| **description** string | | Description of Interface. |
| **duplex** string | **Choices:*** full
* half
* **auto** β
| Interface link status |
| **enabled** boolean | **Choices:*** no
* **yes** β
| Interface link status. |
| **mtu** string | | Maximum size of transmit packet. |
| **name** string / required | | Name of the Interface. |
| **neighbors** string | | Check operational state of given interface `name` for LLDP neighbor. The following suboptions are available. |
| | **host** string | | LLDP neighbor host for given interface `name`. |
| | **port** string | | LLDP neighbor port to which interface `name` is connected. |
| **provider** string | | **Deprecated** Starting with Ansible 2.5 we recommend using `connection: network_cli`. For more information please see the [CNOS Platform Options guide](user_guide/platform_cnos). A dict object containing connection details. |
| | **auth\_pass** string | | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
| | **authorize** boolean | **Choices:*** **no** β
* yes
| Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
| | **host** string / required | | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
| | **port** string | **Default:**22 | Specifies the port to use when building the connection to the remote device. |
| | **ssh\_keyfile** string | | Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
| | **timeout** string | **Default:**10 | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
| | **username** string | | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
| **rx\_rate** string | | Receiver rate in bits per second (bps). This is state check parameter only. Supports conditionals, see [Conditionals in Networking Modules](user_guide/network_working_with_command_output)
|
| **speed** string | | Interface link speed. |
| **state** string | **Choices:*** **present** β
* absent
* up
* down
| State of the Interface configuration, `up` means present and operationally up and `down` means present and operationally `down`
|
| **tx\_rate** string | | Transmit rate in bits per second (bps). This is state check parameter only. Supports conditionals, see [Conditionals in Networking Modules](user_guide/network_working_with_command_output)
|
Notes
-----
Note
* Tested against CNOS 10.8.1
Examples
--------
```
- name: Configure interface
community.network.cnos_interface:
name: Ethernet1/33
description: test-interface
speed: 100
duplex: half
mtu: 999
- name: Remove interface
community.network.cnos_interface:
name: loopback3
state: absent
- name: Make interface up
community.network.cnos_interface:
name: Ethernet1/33
enabled: True
- name: Make interface down
community.network.cnos_interface:
name: Ethernet1/33
enabled: False
- name: Check intent arguments
community.network.cnos_interface:
name: Ethernet1/33
state: up
tx_rate: ge(0)
rx_rate: le(0)
- name: Check neighbors intent arguments
community.network.cnos_interface:
name: Ethernet1/33
neighbors:
- port: eth0
host: netdev
- name: Config + intent
community.network.cnos_interface:
name: Ethernet1/33
enabled: False
state: down
- name: Add interface using aggregate
community.network.cnos_interface:
aggregate:
- { name: Ethernet1/33, mtu: 256, description: test-interface-1 }
- { name: Ethernet1/44, mtu: 516, description: test-interface-2 }
duplex: full
speed: 100
state: present
- name: Delete interface using aggregate
community.network.cnos_interface:
aggregate:
- name: loopback3
- name: loopback6
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device. **Sample:** ['interface Ethernet1/33', 'description test-interface', 'duplex half', 'mtu 512'] |
### Authors
* Anil Kumar Muraleedharan(@amuraleedhar)
| programming_docs |
ansible community.network.ce_bgp β Manages BGP configuration on HUAWEI CloudEngine switches. community.network.ce\_bgp β Manages BGP configuration on HUAWEI CloudEngine switches.
=====================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_bgp`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages BGP configurations on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **as\_number** string | | Local AS number. The value is a string of 1 to 11 characters. |
| **as\_path\_limit** string | | Maximum number of AS numbers in the AS\_Path attribute. The default value is 255. |
| **bgp\_rid\_auto\_sel** string | **Choices:*** **no\_use** β
* true
* false
| The function to automatically select router IDs for all VPN BGP instances is enabled. |
| **check\_first\_as** string | **Choices:*** **no\_use** β
* true
* false
| Check the first AS in the AS\_Path of the update messages from EBGP peers. |
| **clear\_interval** string | | Clear interval. |
| **confed\_id\_number** string | | Confederation ID. The value is a string of 1 to 11 characters. |
| **confed\_nonstanded** string | **Choices:*** **no\_use** β
* true
* false
| Configure the device to be compatible with devices in a nonstandard confederation. |
| **confed\_peer\_as\_num** string | | Confederation AS number, in two-byte or four-byte format. The value is a string of 1 to 11 characters. |
| **conn\_retry\_time** string | | ConnectRetry interval. The value is an integer, in seconds. The default value is 32s. |
| **default\_af\_type** string | **Choices:*** ipv4uni
* ipv6uni
| Type of a created address family, which can be IPv4 unicast or IPv6 unicast. The default type is IPv4 unicast. |
| **ebgp\_if\_sensitive** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, After the fast EBGP interface awareness function is enabled, EBGP sessions on an interface are deleted immediately when the interface goes Down. If the value is false, After the fast EBGP interface awareness function is enabled, EBGP sessions on an interface are not deleted immediately when the interface goes Down. |
| **gr\_peer\_reset** string | **Choices:*** **no\_use** β
* true
* false
| Peer disconnection through GR. |
| **graceful\_restart** string | **Choices:*** **no\_use** β
* true
* false
| Enable GR of the BGP speaker in the specified address family, peer address, or peer group. |
| **hold\_interval** string | | Hold interval. |
| **hold\_time** string | | Hold time, in seconds. The value of the hold time can be 0 or range from 3 to 65535. |
| **is\_shutdown** string | **Choices:*** **no\_use** β
* true
* false
| Interrupt BGP all neighbor. |
| **keep\_all\_routes** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, the system stores all route update messages received from all peers (groups) after BGP connection setup. If the value is false, the system stores only BGP update messages that are received from peers and pass the configured import policy. |
| **keepalive\_time** string | | If the value of a timer changes, the BGP peer relationship between the routers is disconnected. The value is an integer ranging from 0 to 21845. The default value is 60. |
| **memory\_limit** string | **Choices:*** **no\_use** β
* true
* false
| Support BGP RIB memory protection. |
| **min\_hold\_time** string | | Min hold time, in seconds. The value of the hold time can be 0 or range from 20 to 65535. |
| **router\_id** string | | ID of a router that is in IPv4 address format. |
| **state** string | **Choices:*** **present** β
* absent
| Specify desired state of the resource. |
| **suppress\_interval** string | | Suppress interval. |
| **time\_wait\_for\_rib** string | | Period of waiting for the End-Of-RIB flag. The value is an integer ranging from 3 to 3000. The default value is 600. |
| **vrf\_name** string | | Name of a BGP instance. The name is a case-sensitive string of characters. |
| **vrf\_rid\_auto\_sel** string | **Choices:*** **no\_use** β
* true
* false
| If the value is true, VPN BGP instances are enabled to automatically select router IDs. If the value is false, VPN BGP instances are disabled from automatically selecting router IDs. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: CloudEngine BGP test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Enable BGP"
community.network.ce_bgp:
state: present
as_number: 100
confed_id_number: 250
provider: "{{ cli }}"
- name: "Disable BGP"
community.network.ce_bgp:
state: absent
as_number: 100
confed_id_number: 250
provider: "{{ cli }}"
- name: "Create confederation peer AS num"
community.network.ce_bgp:
state: present
confed_peer_as_num: 260
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution **Sample:** {'bgp\_enable': [['100'], ['true']]} |
| **existing** dictionary | always | k/v pairs of existing aaa server **Sample:** {'bgp\_enable': [['100'], ['true']]} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'as\_number': '100', 'state"': 'present'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['bgp 100'] |
### Authors
* wangdezhuang (@QijunPan)
ansible community.network.ce_switchport β Manages Layer 2 switchport interfaces on HUAWEI CloudEngine switches. community.network.ce\_switchport β Manages Layer 2 switchport interfaces on HUAWEI CloudEngine switches.
========================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_switchport`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages Layer 2 switchport interfaces on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **default\_vlan** string | | If `mode=access, or mode=dot1qtunnel`, used as the access VLAN ID, in the range from 1 to 4094. |
| **interface** string / required | | Full name of the interface, i.e. 40GE1/0/22. |
| **mode** string | **Choices:*** access
* trunk
* hybrid
* dot1qtunnel
| The link type of an interface. |
| **pvid\_vlan** string | | If `mode=trunk, or mode=hybrid`, used as the trunk native VLAN ID, in the range from 1 to 4094. |
| **state** string | **Choices:*** **present** β
* absent
* unconfigured
| Manage the state of the resource. |
| **tagged\_vlans** string | | If `mode=hybrid`, used as the VLAN range to ADD or REMOVE from the trunk, such as 2-10 or 2,5,10-15, etc. |
| **trunk\_vlans** string | | If `mode=trunk`, used as the VLAN range to ADD or REMOVE from the trunk, such as 2-10 or 2,5,10-15, etc. |
| **untagged\_vlans** string | | If `mode=hybrid`, used as the VLAN range to ADD or REMOVE from the trunk, such as 2-10 or 2,5,10-15, etc. |
Notes
-----
Note
* When `state=absent`, VLANs can be added/removed from trunk links and the existing access VLAN can be βunconfiguredβ to just having VLAN 1 on that interface.
* When working with trunks VLANs the keywords add/remove are always sent in the `port trunk allow-pass vlan` command. Use verbose mode to see commands sent.
* When `state=unconfigured`, the interface will result with having a default Layer 2 interface, i.e. vlan 1 in access mode.
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Switchport module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Ensure 10GE1/0/22 is in its default switchport state
community.network.ce_switchport:
interface: 10GE1/0/22
state: unconfigured
provider: '{{ cli }}'
- name: Ensure 10GE1/0/22 is configured for access vlan 20
community.network.ce_switchport:
interface: 10GE1/0/22
mode: access
default_vlan: 20
provider: '{{ cli }}'
- name: Ensure 10GE1/0/22 only has vlans 5-10 as trunk vlans
community.network.ce_switchport:
interface: 10GE1/0/22
mode: trunk
pvid_vlan: 10
trunk_vlans: 5-10
provider: '{{ cli }}'
- name: Ensure 10GE1/0/22 is a trunk port and ensure 2-50 are being tagged (doesn't mean others aren't also being tagged)
community.network.ce_switchport:
interface: 10GE1/0/22
mode: trunk
pvid_vlan: 10
trunk_vlans: 2-50
provider: '{{ cli }}'
- name: Ensure these VLANs are not being tagged on the trunk
community.network.ce_switchport:
interface: 10GE1/0/22
mode: trunk
trunk_vlans: 51-4000
state: absent
provider: '{{ cli }}'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of switchport after module execution **Sample:** {'default\_vlan': '20', 'interface': '10GE1/0/22', 'mode': 'access', 'switchport': 'enable'} |
| **existing** dictionary | always | k/v pairs of existing switchport **Sample:** {'default\_vlan': '10', 'interface': '10GE1/0/22', 'mode': 'access', 'switchport': 'enable'} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'default\_vlan': '20', 'interface': '10GE1/0/22', 'mode': 'access'} |
| **updates** list / elements=string | always | command string sent to the device **Sample:** ['10GE1/0/22', 'port default vlan 20'] |
### Authors
* QijunPan (@QijunPan)
ansible community.network.icx_command β Run arbitrary commands on remote Ruckus ICX 7000 series switches community.network.icx\_command β Run arbitrary commands on remote Ruckus ICX 7000 series switches
=================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.icx_command`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Sends arbitrary commands to an ICX node and returns the results read from the device. This module includes an argument that will cause the module to wait for a specific condition before returning or timing out if the condition is not met.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **commands** list / elements=string / required | | List of commands to send to the remote ICX device over the configured provider. The resulting output from the command is returned. If the *wait\_for* argument is provided, the module is not returned until the condition is satisfied or the number of retries has expired. If a command sent to the device requires answering a prompt, checkall and newline if multiple prompts, it is possible to pass a dict containing *command*, *answer*, *prompt*, *check\_all* and *newline*.Common answers are 'y' or "\r" (carriage return, must be double quotes). See examples. |
| **interval** integer | **Default:**1 | Configures the interval in seconds to wait between retries of the command. If the command does not pass the specified conditions, the interval indicates how long to wait before trying the command again. |
| **match** string | **Choices:*** any
* **all** β
| The *match* argument is used in conjunction with the *wait\_for* argument to specify the match policy. Valid values are `all` or `any`. If the value is set to `all` then all conditionals in the wait\_for must be satisfied. If the value is set to `any` then only one of the values must be satisfied. |
| **retries** integer | **Default:**10 | Specifies the number of times a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the *wait\_for* conditions. |
| **wait\_for** list / elements=string | | List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples.
aliases: waitfor |
Notes
-----
Note
* Tested against ICX 10.1
Examples
--------
```
tasks:
- name: Run show version on remote devices
community.network.icx_command:
commands: show version
- name: Run show version and check to see if output contains ICX
community.network.icx_command:
commands: show version
wait_for: result[0] contains ICX
- name: Run multiple commands on remote nodes
community.network.icx_command:
commands:
- show version
- show interfaces
- name: Run multiple commands and evaluate the output
community.network.icx_command:
commands:
- show version
- show interfaces
wait_for:
- result[0] contains ICX
- result[1] contains GigabitEthernet1/1/1
- name: Run commands that require answering a prompt
community.network.icx_command:
commands:
- command: 'service password-encryption sha1'
prompt: 'Warning: Moving to higher password-encryption type,.*'
answer: 'y'
- name: Run commands that require answering multiple prompt
community.network.icx_command:
commands:
- command: 'username qqq password qqq'
prompt:
- 'User already exists. Do you want to modify:.*'
- 'To modify or remove user, enter current password:'
answer:
- 'y'
- 'qqq\
'
check_all: True
newline: False
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **failed\_conditions** list / elements=string | failed | The list of conditionals that have failed **Sample:** ['...', '...'] |
| **stdout** list / elements=string | always apart from low level errors | The set of responses from the commands **Sample:** ['...', '...'] |
| **stdout\_lines** list / elements=string | always apart from low level errors | The value of stdout split into a list **Sample:** [['...', '...'], ['...'], ['...']] |
### Authors
* Ruckus Wireless (@Commscope)
ansible community.network.icx_facts β Collect facts from remote Ruckus ICX 7000 series switches community.network.icx\_facts β Collect facts from remote Ruckus ICX 7000 series switches
========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.icx_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Collects a base set of device facts from a remote device that is running ICX. This module prepends all of the base network fact keys with `ansible_net_<fact>`. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **gather\_subset** list / elements=string | **Default:**"!config" | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, hardware, config, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial `!` to specify that a specific subset should not be collected. |
Notes
-----
Note
* Tested against ICX 10.1.
* For information on using ICX platform, see [the ICX OS Platform Options guide](user_guide/platform_icx).
Examples
--------
```
- name: Collect all facts from the device
community.network.icx_facts:
gather_subset: all
- name: Collect only the config and default facts
community.network.icx_facts:
gather_subset:
- config
- name: Do not collect hardware facts
community.network.icx_facts:
gather_subset:
- "!hardware"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ansible\_net\_all\_ipv4\_addresses** list / elements=string | when interfaces is configured | All IPv4 addresses configured on the device |
| **ansible\_net\_all\_ipv6\_addresses** list / elements=string | when interfaces is configured | All IPv6 addresses configured on the device |
| **ansible\_net\_config** string | when config is configured | The current active config from the device |
| **ansible\_net\_filesystems** list / elements=string | when hardware is configured | All file system names available on the device |
| **ansible\_net\_filesystems\_info** dictionary | when hardware is configured | A hash of all file systems containing info about each file system (e.g. free and total space) |
| **ansible\_net\_gather\_subset** list / elements=string | always | The list of fact subsets collected from the device |
| **ansible\_net\_hostname** string | always | The configured hostname of the device |
| **ansible\_net\_image** string | always | The image file the device is running |
| **ansible\_net\_interfaces** dictionary | when interfaces is configured | A hash of all interfaces running on the system |
| **ansible\_net\_memfree\_mb** integer | when hardware is configured | The available free memory on the remote device in Mb |
| **ansible\_net\_memtotal\_mb** integer | when hardware is configured | The total memory on the remote device in Mb |
| **ansible\_net\_model** string | always | The model name returned from the device |
| **ansible\_net\_neighbors** dictionary | when interfaces is configured | The list of LLDP neighbors from the remote device |
| **ansible\_net\_serialnum** string | always | The serial number of the remote device |
| **ansible\_net\_stacked\_models** list / elements=string | when multiple devices are configured in a stack | The model names of each device in the stack |
| **ansible\_net\_stacked\_serialnums** list / elements=string | when multiple devices are configured in a stack | The serial numbers of each device in the stack |
| **ansible\_net\_version** string | always | The operating system version running on the remote device |
### Authors
* Ruckus Wireless (@Commscope)
| programming_docs |
ansible community.network.cnos_reload β Perform switch restart on devices running Lenovo CNOS community.network.cnos\_reload β Perform switch restart on devices running Lenovo CNOS
======================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_reload`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module allows you to restart the switch using the current startup configuration. The module is usually invoked after the running configuration has been saved over the startup configuration. This module uses SSH to manage network device configuration. The results of the operation can be viewed in results directory.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **deviceType** string / required | **Choices:*** g8272\_cnos
* g8296\_cnos
* g8332\_cnos
* NE0152T
* NE1072T
* NE1032
* NE1032T
* NE10032
* NE2572
| This specifies the type of device where the method is executed. The choices NE1072T,NE1032,NE1032T,NE10032,NE2572 are added since Ansible 2.4. The choice NE0152T is added since 2.8 |
| **enablePassword** string | | Configures the password used to enter Global Configuration command mode on the switch. If the switch does not request this password, the parameter is ignored.While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **host** string / required | | This is the variable used to search the hosts file at /etc/ansible/hosts and identify the IP address of the device on which the template is going to be applied. Usually the Ansible keyword {{ inventory\_hostname }} is specified in the playbook as an abstraction of the group of network elements that need to be configured. |
| **outputfile** string / required | | This specifies the file path where the output of each command execution is saved. Each command that is specified in the merged template file and each response from the device are saved here. Usually the location is the results folder, but you can choose another location based on your write permission. |
| **password** string / required | | Configures the password used to authenticate the connection to the remote device. The value of the password parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **username** string / required | | Configures the username used to authenticate the connection to the remote device. The value of the username parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
Notes
-----
Note
* For more information on using Ansible to manage Lenovo Network devices see <https://www.ansible.com/ansible-lenovo>.
Examples
--------
```
Tasks : The following are examples of using the module cnos_reload. These are
written in the main.yml file of the tasks directory.
---
- name: Test Reload
community.network.cnos_reload:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_reload_{{ inventory_hostname }}_output.txt"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | always | Success or failure message **Sample:** Device is Reloading. Please wait... |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
ansible community.network.aireos_command β Run commands on remote devices running Cisco WLC community.network.aireos\_command β Run commands on remote devices running Cisco WLC
====================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.aireos_command`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Sends arbitrary commands to an aireos node and returns the results read from the device. This module includes an argument that will cause the module to wait for a specific condition before returning or timing out if the condition is not met.
* Commands run in configuration mode with this module are not idempotent. Please use [community.network.aireos\_config](aireos_config_module#ansible-collections-community-network-aireos-config-module) to configure WLC devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **commands** string / required | | List of commands to send to the remote aireos device over the configured provider. The resulting output from the command is returned. If the *wait\_for* argument is provided, the module is not returned until the condition is satisfied or the number of retries has expired. |
| **interval** string | **Default:**1 | Configures the interval in seconds to wait between retries of the command. If the command does not pass the specified conditions, the interval indicates how long to wait before trying the command again. |
| **match** string | **Choices:*** any
* **all** β
| The *match* argument is used in conjunction with the *wait\_for* argument to specify the match policy. Valid values are `all` or `any`. If the value is set to `all` then all conditionals in the wait\_for must be satisfied. If the value is set to `any` then only one of the values must be satisfied. |
| **provider** string | | A dict object containing connection details. |
| | **host** string / required | | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
| | **port** integer | **Default:**22 | Specifies the port to use when building the connection to the remote device. |
| | **ssh\_keyfile** path | | Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
| | **timeout** integer | **Default:**10 | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
| | **username** string | | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
| **retries** string | **Default:**10 | Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the *wait\_for* conditions. |
| **wait\_for** string | | List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples.
aliases: waitfor |
Examples
--------
```
tasks:
- name: Run show sysinfo on remote devices
community.network.aireos_command:
commands: show sysinfo
- name: Run show sysinfo and check to see if output contains Cisco Controller
community.network.aireos_command:
commands: show sysinfo
wait_for: result[0] contains 'Cisco Controller'
- name: Run multiple commands on remote nodes
community.network.aireos_command:
commands:
- show sysinfo
- show interface summary
- name: Run multiple commands and evaluate the output
community.network.aireos_command:
commands:
- show sysinfo
- show interface summary
wait_for:
- result[0] contains Cisco Controller
- result[1] contains Loopback0
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **failed\_conditions** list / elements=string | failed | The list of conditionals that have failed **Sample:** ['...', '...'] |
| **stdout** list / elements=string | always apart from low level errors (such as action plugin) | The set of responses from the commands **Sample:** ['...', '...'] |
| **stdout\_lines** list / elements=string | always apart from low level errors (such as action plugin) | The value of stdout split into a list **Sample:** [['...', '...'], ['...'], ['...']] |
### Authors
* James Mighion (@jmighion)
ansible community.network.pn_log_audit_exception β CLI command to create/delete an audit exception community.network.pn\_log\_audit\_exception β CLI command to create/delete an audit exception
=============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_log_audit_exception`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to create an audit exception and delete an audit exception.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_access** string / required | **Choices:*** any
* read-only
* read-write
| Specify the access type to match exceptions. |
| **pn\_audit\_type** string | **Choices:*** cli
* shell
* vtysh
| Specify the type of audit exception. |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_pattern** string | | Specify a regular expression to match exceptions. |
| **pn\_scope** string | **Choices:*** local
* fabric
| scope - local or fabric. |
| **state** string | **Choices:*** **present** β
* absent
| State the action to perform. Use 'present' to create audit-exception and 'absent' to delete audit-exception. |
Examples
--------
```
- name: Create a log-audit-exception
community.network.pn_log_audit_exception:
pn_audit_type: "cli"
pn_pattern: "test"
state: "present"
pn_access: "any"
pn_scope: "local"
- name: Delete a log-audit-exception
community.network.pn_log_audit_exception:
pn_audit_type: "shell"
pn_pattern: "test"
state: "absent"
pn_access: "any"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the log\_audit\_exceptions command. |
| **stdout** list / elements=string | always | set of responses from the pn\_log\_audit\_exceptions command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.ordnance_facts β Collect facts from Ordnance Virtual Routers over SSH community.network.ordnance\_facts β Collect facts from Ordnance Virtual Routers over SSH
========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ordnance_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Collects a base set of device facts from an Ordnance Virtual router over SSH. This module prepends all of the base network fact keys with `ansible_net_<fact>`. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **gather\_subset** string | **Default:**"!config" | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, hardware, config, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial `!` to specify that a specific subset should not be collected. |
Examples
--------
```
---
# Note: examples below use the following provider dict to handle
# transport and authentication to the node.
vars:
cli:
host: "{{ inventory_hostname }}"
username: RouterName
password: ordnance
transport: cli
---
- name: Collect all facts from the device
community.network.ordnance_facts:
gather_subset: all
provider: "{{ cli }}"
- name: Collect only the config and default facts
community.network.ordnance_facts:
gather_subset:
- config
provider: "{{ cli }}"
- name: Do not collect hardware facts
community.network.ordnance_facts:
gather_subset:
- "!hardware"
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ansible\_net\_all\_ipv4\_addresses** list / elements=string | when interfaces is configured | All IPv4 addresses configured on the virtual router |
| **ansible\_net\_all\_ipv6\_addresses** list / elements=string | when interfaces is configured | All IPv6 addresses configured on the virtual router |
| **ansible\_net\_config** string | when config is configured | The current active config from the virtual router |
| **ansible\_net\_gather\_subset** list / elements=string | always | The list of fact subsets collected from the virtual router |
| **ansible\_net\_interfaces** dictionary | when interfaces is configured | A hash of all interfaces running on the virtual router |
### Authors
* Alexander Turner (@alexanderturner) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#442528213c626770727f3031362a2136626777737f626771767f6267707c7f2b36202a252a2721626770727f2d2b)>
ansible community.network.icx_config β Manage configuration sections of Ruckus ICX 7000 series switches community.network.icx\_config β Manage configuration sections of Ruckus ICX 7000 series switches
================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.icx_config`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Ruckus ICX configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with ICX configuration sections in a deterministic way.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **after** list / elements=string | | The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with *before* this allows the playbook designer to append a set of commands to be executed after the command set. |
| **backup** boolean | **Choices:*** **no** β
* yes
| This argument will cause the module to create a full backup of the current `running-config` from the remote device before any changes are made. The backup file is written to the `backup` folder in the playbook root directory or role root directory, if playbook is part of an ansible role. If the directory does not exist, it is created. |
| **before** list / elements=string | | The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system. |
| **defaults** boolean | **Choices:*** **no** β
* yes
| This argument specifies whether or not to collect all defaults when getting the remote device running config. When enabled, the module will get the current config by issuing the command `show running-config all`. |
| **diff\_against** string | **Choices:*** running
* startup
* intended
| When using the `ansible-playbook --diff` command line argument the module can generate diffs against different sources. When this option is configure as *startup*, the module will return the diff of the running-config against the configuration. When this option is configured as *intended*, the module will return the diff of the running-config against the configuration provided in the `intended_config` argument. When this option is configured as *running*, the module will return the before and after diff of the running-config with respect to any changes made to the device configuration. |
| **diff\_ignore\_lines** list / elements=string | | Use this argument to specify one or more lines that should be ignored during the diff. This is used for lines in the configuration that are automatically updated by the system. This argument takes a list of regular expressions or exact line matches. |
| **intended\_config** string | | The `intended_config` provides the master configuration that the node should conform to and is used to check the final running-config against. This argument will not modify any settings on the remote device and is strictly used to check the compliance of the current device's configuration against. When specifying this argument, the task should also modify the `diff_against` value and set it to *intended*. |
| **lines** list / elements=string | | The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser.
aliases: commands |
| **match** string | **Choices:*** **line** β
* strict
* exact
* none
| Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to *line*, commands are matched line by line. If match is set to *strict*, command lines are matched with respect to position. If match is set to *exact*, command lines must be an equal match. Finally, if match is set to *none*, the module will not attempt to compare the source configuration with the running configuration on the remote device. |
| **multiline\_delimiter** string | **Default:**"@" | This argument is used when pushing a multiline configuration element to the ICX device. It specifies the character to use as the delimiting character. This only applies to the configuration action. |
| **parents** list / elements=string | | The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. |
| **replace** string | **Choices:*** **line** β
* block
| Instructs the module on the way to perform the configuration on the device. If the replace argument is set to *line* then the modified lines are pushed to the device in configuration mode. If the replace argument is set to *block* then the entire command block is pushed to the device in configuration mode if any line is not correct. |
| **running\_config** string | | The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The *running\_config* argument allows the implementer to pass in the configuration to use as the base config for comparison.
aliases: config |
| **save\_when** string | **Choices:*** always
* **never** β
* modified
* changed
| When changes are made to the device running-configuration, the changes are not copied to non-volatile storage by default. Using this argument will change that before. If the argument is set to *always*, then the running-config will always be copied to the start-up configuration and the *modified* flag will always be set to True. If the argument is set to *modified*, then the running-config will only be copied to the start-up configuration if it has changed since the last save to configuration. If the argument is set to *never*, the running-config will never be copied to the configuration. If the argument is set to *changed*, then the running-config will only be copied to the configuration if the task has made a change. |
| **src** string | | Specifies the source path to the file that contains the configuration or configuration template to load. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. This argument is mutually exclusive with *lines*, *parents*. |
Notes
-----
Note
* Tested against ICX 10.1.
* For information on using ICX platform, see [the ICX OS Platform Options guide](user_guide/platform_icx).
Examples
--------
```
- name: Configure top level configuration
community.network.icx_config:
lines: hostname {{ inventory_hostname }}
- name: Configure interface settings
community.network.icx_config:
lines:
- port-name test string
- ip address 172.31.1.1 255.255.255.0
parents: interface ethernet 1/1/2
- name: Configure ip helpers on multiple interfaces
community.network.icx_config:
lines:
- ip helper-address 172.26.1.10
- ip helper-address 172.26.3.8
parents: "{{ item }}"
with_items:
- interface ethernet 1/1/2
- interface ethernet 1/1/3
- name: Load new acl into device
community.network.icx_config:
lines:
- permit ip host 192.0.2.1 any log
- permit ip host 192.0.2.2 any log
- permit ip host 192.0.2.3 any log
- permit ip host 192.0.2.4 any log
parents: ip access-list extended test
before: no ip access-list extended test
match: exact
- name: Check the running-config against master config
community.network.icx_config:
diff_against: intended
intended_config: "{{ lookup('file', 'master.cfg') }}"
- name: Check the configuration against the running-config
community.network.icx_config:
diff_against: startup
diff_ignore_lines:
- ntp clock .*
- name: For idempotency, use full-form commands
community.network.icx_config:
lines:
# - en
- enable
# parents: int eth1/0/11
parents: interface ethernet 1/1/2
# Set boot image based on comparison to a group_var (version) and the version
# that is returned from the `icx_facts` module
- name: SETTING BOOT IMAGE
community.network.icx_config:
lines:
- no boot system
- boot system flash bootflash:{{new_image}}
host: "{{ inventory_hostname }}"
when: ansible_net_version != version
- name: Render template onto an ICX device
community.network.icx_config:
backup: yes
src: "{{ lookup('file', 'config.j2') }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **backup\_path** string | when backup is yes | The full path to the backup file **Sample:** /playbooks/ansible/backup/icx\_config.2016-07-16@22:28:34 |
| **commands** list / elements=string | always | The set of commands that will be pushed to the remote device **Sample:** ['hostname foo', 'router ospf 1', 'router-id 192.0.2.1'] |
| **updates** list / elements=string | always | The set of commands that will be pushed to the remote device **Sample:** ['hostname foo', 'router ospf 1', 'router-id 192.0.2.1'] |
### Authors
* Ruckus Wireless (@Commscope)
| programming_docs |
ansible community.network.ce_bfd_view β Manages BFD session view configuration on HUAWEI CloudEngine devices. community.network.ce\_bfd\_view β Manages BFD session view configuration on HUAWEI CloudEngine devices.
=======================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_bfd_view`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages BFD session view configuration on HUAWEI CloudEngine devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **admin\_down** boolean | **Choices:*** **no** β
* yes
| Enables the BFD session to enter the AdminDown state. By default, a BFD session is enabled. The default value is bool type. |
| **description** string | | Specifies the description of a BFD session. The value is a string of 1 to 51 case-sensitive characters with spaces. |
| **detect\_multi** string | | Specifies the local detection multiplier of a BFD session. The value is an integer that ranges from 3 to 50. |
| **local\_discr** string | | Specifies the local discriminator of a BFD session. The value is an integer that ranges from 1 to 16384. |
| **min\_rx\_interval** string | | Specifies the minimum interval for sending BFD packets. The value is an integer that ranges from 50 to 1000, in milliseconds. |
| **min\_tx\_interval** string | | Specifies the minimum interval for receiving BFD packets. The value is an integer that ranges from 50 to 1000, in milliseconds. |
| **provider** string | | A dict object containing connection details. |
| | **host** string / required | | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for cli transports. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
| | **port** integer | **Default:**"0 (use common port)" | Specifies the port to use when building the connection to the remote device. This value applies to either *cli* or *netconf*. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, netconf=22). |
| | **ssh\_keyfile** path | | Specifies the SSH key to use to authenticate the connection to the remote device. This argument is used for the *cli* transport. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
| | **transport** string / required | **Choices:*** **cli** β
* netconf
| Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh). |
| | **username** string | | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the CLI login. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
| **remote\_discr** string | | Specifies the remote discriminator of a BFD session. The value is an integer that ranges from 1 to 4294967295. |
| **session\_name** string / required | | Specifies the name of a BFD session. The value is a string of 1 to 15 case-sensitive characters without spaces. |
| **state** string | **Choices:*** **present** β
* absent
| Determines whether the config should be present or not on the device. |
| **tos\_exp** string | | Specifies a priority for BFD control packets. The value is an integer ranging from 0 to 7. The default value is 7, which is the highest priority. |
| **wtr\_interval** string | | Specifies the WTR time of a BFD session. The value is an integer that ranges from 1 to 60, in minutes. The default value is 0. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Bfd view module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Set the local discriminator of a BFD session to 80 and the remote discriminator to 800
community.network.ce_bfd_view:
session_name: atob
local_discr: 80
remote_discr: 800
state: present
provider: '{{ cli }}'
- name: Set the minimum interval for receiving BFD packets to 500 ms
community.network.ce_bfd_view:
session_name: atob
min_rx_interval: 500
state: present
provider: '{{ cli }}'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of configuration after module execution **Sample:** {'session': {'adminDown': 'false', 'createType': 'SESS\_STATIC', 'description': None, 'detectMulti': '3', 'localDiscr': '80', 'minRxInt': None, 'minTxInt': None, 'remoteDiscr': '800', 'sessName': 'atob', 'tosExp': None, 'wtrTimerInt': None}} |
| **existing** dictionary | always | k/v pairs of existing configuration **Sample:** {'session': {'adminDown': 'false', 'createType': 'SESS\_STATIC', 'description': None, 'detectMulti': '3', 'localDiscr': None, 'minRxInt': None, 'minTxInt': None, 'remoteDiscr': None, 'sessName': 'atob', 'tosExp': None, 'wtrTimerInt': None}} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'admin\_down': False, 'description': None, 'detect\_multi': None, 'local\_discr': 80, 'min\_rx\_interval': None, 'min\_tx\_interval': None, 'remote\_discr': 800, 'session\_name': 'atob', 'state': 'present', 'tos\_exp': None, 'wtr\_interval': None} |
| **updates** list / elements=string | always | commands sent to the device **Sample:** ['bfd atob', 'discriminator local 80', 'discriminator remote 800'] |
### Authors
* QijunPan (@QijunPan)
ansible community.network.flowadm β Manage bandwidth resource control and priority for protocols, services and zones on Solaris/illumos systems community.network.flowadm β Manage bandwidth resource control and priority for protocols, services and zones on Solaris/illumos systems
=======================================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.flowadm`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create/modify/remove networking bandwidth and associated resources for a type of traffic on a particular link.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dsfield** string | | - Identifies the 8-bit differentiated services field (as defined in RFC 2474). The optional dsfield\_mask is used to state the bits of interest in the differentiated services field when comparing with the dsfield value. Both values must be in hexadecimal. |
| **link** string | | Specifiies a link to configure flow on. |
| **local\_ip** string | | Identifies a network flow by the local IP address. |
| **local\_port** string | | Identifies a service specified by the local port. |
| **maxbw** string | | - Sets the full duplex bandwidth for the flow. The bandwidth is specified as an integer with one of the scale suffixes(K, M, or G for Kbps, Mbps, and Gbps). If no units are specified, the input value will be read as Mbps. |
| **name** string / required | | - A flow is defined as a set of attributes based on Layer 3 and Layer 4 headers, which can be used to identify a protocol, service, or a zone.
aliases: flow |
| **priority** string | **Choices:*** low
* **medium** β
* high
| Sets the relative priority for the flow. |
| **remote\_ip** string | | Identifies a network flow by the remote IP address. |
| **state** string | **Choices:*** absent
* **present** β
* resetted
| Create/delete/enable/disable an IP address on the network interface. |
| **temporary** boolean | **Choices:*** **no** β
* yes
| Specifies that the configured flow is temporary. Temporary flows do not persist across reboots. |
| **transport** string | | - Specifies a Layer 4 protocol to be used. It is typically used in combination with *local\_port* to identify the service that needs special attention. |
Examples
--------
```
- name: Limit SSH traffic to 100M via vnic0 interface
community.network.flowadm:
link: vnic0
flow: ssh_out
transport: tcp
local_port: 22
maxbw: 100M
state: present
- name: Reset flow properties
community.network.flowadm:
name: dns
state: resetted
- name: Configure policy for EF PHB (DSCP value of 101110 from RFC 2598) with a bandwidth of 500 Mbps and a high priority
community.network.flowadm:
link: bge0
dsfield: '0x2e:0xfc'
maxbw: 500M
priority: high
flow: efphb-flow
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **dsfield** string | if dsfield is defined | flow's differentiated services value **Sample:** 0x2e:0xfc |
| **link** string | if link is defined | flow's link **Sample:** vnic0 |
| **local\_Ip** string | if local\_ip is defined | flow's local IP address **Sample:** 10.0.0.42 |
| **local\_port** integer | if local\_port is defined | flow's local port **Sample:** 1337 |
| **maxbw** string | if maxbw is defined | flow's maximum bandwidth **Sample:** 100M |
| **name** string | always | flow name **Sample:** http\_drop |
| **priority** string | if priority is defined | flow's priority **Sample:** low |
| **remote\_Ip** string | if remote\_ip is defined | flow's remote IP address **Sample:** 10.0.0.42 |
| **state** string | always | state of the target **Sample:** present |
| **temporary** boolean | always | flow's persistence **Sample:** True |
| **transport** string | if transport is defined | flow's transport **Sample:** tcp |
### Authors
* Adam Ε tevko (@xen0l)
ansible community.network.ce_evpn_bgp β Manages BGP EVPN configuration on HUAWEI CloudEngine switches. community.network.ce\_evpn\_bgp β Manages BGP EVPN configuration on HUAWEI CloudEngine switches.
================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_evpn_bgp`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module offers the ability to configure a BGP EVPN peer relationship on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **advertise\_l2vpn\_evpn** string | **Choices:*** enable
* disable
| Enable or disable a device to advertise IP routes imported to a VPN instance to its EVPN instance. |
| **advertise\_router\_type** string | **Choices:*** arp
* irb
| Configures a device to advertise routes to its BGP EVPN peers. |
| **as\_number** string | | Specifies integral AS number. The value is an integer ranging from 1 to 4294967295. |
| **bgp\_instance** string / required | | Name of a BGP instance. The value is a string of 1 to 31 case-sensitive characters, spaces not supported. |
| **peer\_address** string | | Specifies the IPv4 address of a BGP EVPN peer. The value is in dotted decimal notation. |
| **peer\_enable** string | **Choices:*** true
* false
| Enable or disable a BGP device to exchange routes with a specified peer or peer group in the address family view. |
| **peer\_group\_name** string | | Specify the name of a peer group that BGP peers need to join. The value is a string of 1 to 47 case-sensitive characters, spaces not supported. |
| **state** string | **Choices:*** **present** β
* absent
| Manage the state of the resource. |
| **vpn\_name** string | | Associates a specified VPN instance with the IPv4 address family. The value is a string of 1 to 31 case-sensitive characters, spaces not supported. |
Notes
-----
Note
* Recommended connection is `network_cli`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Evpn bgp module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Enable peer address.
community.network.ce_evpn_bgp:
bgp_instance: 100
peer_address: 1.1.1.1
as_number: 100
peer_enable: true
provider: "{{ cli }}"
- name: Enable peer group arp.
community.network.ce_evpn_bgp:
bgp_instance: 100
peer_group_name: aaa
advertise_router_type: arp
provider: "{{ cli }}"
- name: Enable advertise l2vpn evpn.
community.network.ce_evpn_bgp:
bgp_instance: 100
vpn_name: aaa
advertise_l2vpn_evpn: enable
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | verbose mode | k/v pairs of configuration after module execution **Sample:** {'advertise\_l2vpn\_evpn': 'enable', 'bgp\_instance': '100', 'vpn\_name': 'aaa'} |
| **existing** dictionary | always | k/v pairs of existing rollback **Sample:** {'bgp\_instance': '100', 'peer\_group\_advertise\_type': []} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'advertise\_router\_type': 'arp', 'bgp\_instance': '100', 'peer\_group\_name': 'aaa', 'state': 'present'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['peer 1.1.1.1 enable', 'peer aaa advertise arp'] |
### Authors
* Li Yanfeng (@QijunPan)
ansible community.network.avi_errorpageprofile β Module for setup of ErrorPageProfile Avi RESTful Object community.network.avi\_errorpageprofile β Module for setup of ErrorPageProfile Avi RESTful Object
=================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_errorpageprofile`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure ErrorPageProfile object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **app\_name** string | | Name of the virtual service which generated the error page. Field deprecated in 18.1.1. Field introduced in 17.2.4. Default value when not specified in API or module is interpreted by Avi Controller as VS Name. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **company\_name** string | | Name of the company to show in error page. Field deprecated in 18.1.1. Field introduced in 17.2.4. Default value when not specified in API or module is interpreted by Avi Controller as Avi Networks. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **error\_pages** string | | Defined error pages for http status codes. Field introduced in 17.2.4. |
| **host\_name** string | | Fully qualified domain name for which the error page is generated. Field deprecated in 18.1.1. Field introduced in 17.2.4. Default value when not specified in API or module is interpreted by Avi Controller as Host Header. |
| **name** string / required | | Field introduced in 17.2.4. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. Field introduced in 17.2.4. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Field introduced in 17.2.4. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create ErrorPageProfile object
community.network.avi_errorpageprofile:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_errorpageprofile
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | ErrorPageProfile (api/errorpageprofile) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#3057425143445f5759161303070b161305020b161304080b5146595e5544475f425b43161304060b535f5d)>
| programming_docs |
ansible community.network.avi_alertscriptconfig β Module for setup of AlertScriptConfig Avi RESTful Object community.network.avi\_alertscriptconfig β Module for setup of AlertScriptConfig Avi RESTful Object
===================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_alertscriptconfig`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure AlertScriptConfig object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action\_script** string | | User defined alert action script. Please refer to kb.avinetworks.com for more information. |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **name** string / required | | A user-friendly name of the script. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create Alert Script to perform AWS server autoscaling
community.network.avi_alertscriptconfig:
username: '{{ username }}'
controller: '{{ controller }}'
password: '{{ password }}'
action_script: "echo Hello"
name: AWS-Launch-Script
tenant_ref: Demo
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | AlertScriptConfig (api/alertscriptconfig) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#e384918290978c848ac5c0d0d4d8c5c0d6d1d8c5c0d7dbd882958a8d8697948c918890c5c0d7d5d8808c8e)>
ansible community.network.ce_lacp β Manages Eth-Trunk interfaces on HUAWEI CloudEngine switches community.network.ce\_lacp β Manages Eth-Trunk interfaces on HUAWEI CloudEngine switches
========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_lacp`.
New in version 0.2.0: of community.network
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages Eth-Trunk specific configuration parameters on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **collector\_delay** integer | | Value of delay time in units of 10 microseconds. |
| **fast\_timeout** integer | | When lacp timeout type is 'Fast', user-defined time can be a number(3~90). |
| **global\_priority** integer | | Configure lacp priority on system-view. |
| **max\_active\_linknumber** integer | | Max active linknumber in link aggregation group. |
| **mixed\_rate\_link\_enable** boolean | **Choices:*** no
* yes
| Value of max active linknumber. |
| **mode** string | **Choices:*** Manual
* Dynamic
* Static
| Specifies the working mode of an Eth-Trunk interface. |
| **port\_id\_extension\_enable** boolean | **Choices:*** no
* yes
| Enable the function of extending the LACP negotiation port number. |
| **preempt\_delay** integer | | Value of preemption delay time. |
| **preempt\_enable** boolean | **Choices:*** no
* yes
| Specifies lacp preempt enable of Eth-Trunk lacp. The value is an boolean 'true' or 'false'. |
| **priority** integer | | The priority of eth-trunk member interface. |
| **select** string | **Choices:*** Speed
* Prority
| Select priority or speed to preempt. |
| **state** string | **Choices:*** **present** β
* absent
| Manage the state of the resource. |
| **state\_flapping** boolean | **Choices:*** no
* yes
| Lacp dampening state-flapping. |
| **system\_id** string | | Link Aggregation Control Protocol System ID,interface Eth-Trunk View. Formate 'X-X-X',X is hex(a,aa,aaa, or aaaa) |
| **timeout\_type** string | **Choices:*** Slow
* Fast
| Lacp timeout type,that may be 'Fast' or 'Slow'. |
| **trunk\_id** integer | | Eth-Trunk interface number. The value is an integer. The value range depends on the assign forward eth-trunk mode command. When 256 is specified, the value ranges from 0 to 255. When 512 is specified, the value ranges from 0 to 511. When 1024 is specified, the value ranges from 0 to 1023. |
| **unexpected\_mac\_disable** boolean | **Choices:*** no
* yes
| Lacp dampening unexpected-mac disable. |
Notes
-----
Note
* `state=absent` removes the Eth-Trunk config and interface if it already exists. If members to be removed are not explicitly passed, all existing members (if any), are removed, and Eth-Trunk removed.
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Ensure Eth-Trunk100 is created, and set to mode lacp-static
community.network.ce_lacp:
trunk_id: 100
mode: 'lacp-static'
state: present
- name: Ensure Eth-Trunk100 is created, add two members, and set global priority to 1231
community.network.ce_lacp:
trunk_id: 100
global_priority: 1231
state: present
- name: Ensure Eth-Trunk100 is created, and set mode to Dynamic and configure other options
community.network.ce_lacp:
trunk_id: 100
mode: Dynamic
preempt_enable: True,
state_flapping: True,
port_id_extension_enable: True,
unexpected_mac_disable: True,
timeout_type: Fast,
fast_timeout: 123,
mixed_rate_link_enable: True,
preempt_delay: 23,
collector_delay: 33,
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **end\_state** dictionary | always | k/v pairs of Eth-Trunk info after module execution **Sample:** {'hash\_type': 'mac', 'members\_detail': [{'memberIfName': '10GE1/0/24', 'memberIfState': 'Down'}, {'memberIfName': '10GE1/0/25', 'memberIfState': 'Down'}], 'min\_links': '1', 'mode': 'lacp-static', 'trunk\_id': '100'} |
| **existing** dictionary | always | k/v pairs of existing Eth-Trunk **Sample:** {'hash\_type': 'mac', 'members\_detail': [{'memberIfName': '10GE1/0/25', 'memberIfState': 'Down'}], 'min\_links': '1', 'mode': 'manual', 'trunk\_id': '100'} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'members': ['10GE1/0/24', '10GE1/0/25'], 'mode': 'lacp-static', 'trunk\_id': '100'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['interface Eth-Trunk 100', 'mode lacp-static', 'interface 10GE1/0/25', 'eth-trunk 100'] |
### Authors
* xuxiaowei0512 (@CloudEngine-Ansible)
ansible community.network.ce_netconf β Run an arbitrary netconf command on HUAWEI CloudEngine switches. community.network.ce\_netconf β Run an arbitrary netconf command on HUAWEI CloudEngine switches.
================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_netconf`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Sends an arbitrary netconf command on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cfg\_xml** string / required | | The config xml string. |
| **rpc** string / required | **Choices:*** get
* edit-config
* execute-action
* execute-cli
| The type of rpc. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: CloudEngine netconf test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Netconf get operation"
community.network.ce_netconf:
rpc: get
cfg_xml: '<filter type="subtree">
<vlan xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0" format-version="1.0">
<vlans>
<vlan>
<vlanId>10</vlanId>
<vlanif>
<ifName></ifName>
<cfgBand></cfgBand>
<dampTime></dampTime>
</vlanif>
</vlan>
</vlans>
</vlan>
</filter>'
provider: "{{ cli }}"
- name: "Netconf edit-config operation"
community.network.ce_netconf:
rpc: edit-config
cfg_xml: '<config>
<aaa xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0" format-version="1.0">
<authenticationSchemes>
<authenticationScheme operation="create">
<authenSchemeName>default_wdz</authenSchemeName>
<firstAuthenMode>local</firstAuthenMode>
<secondAuthenMode>invalid</secondAuthenMode>
</authenticationScheme>
</authenticationSchemes>
</aaa>
</config>'
provider: "{{ cli }}"
- name: "Netconf execute-action operation"
community.network.ce_netconf:
rpc: execute-action
cfg_xml: '<action>
<l2mc xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0" format-version="1.0">
<l2McResetAllVlanStatis>
<addrFamily>ipv4unicast</addrFamily>
</l2McResetAllVlanStatis>
</l2mc>
</action>'
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution **Sample:** {'result': ['ok']} |
### Authors
* wangdezhuang (@QijunPan)
ansible community.network.pn_vrouter_bgp_network β CLI command to add/remove vrouter-bgp-network community.network.pn\_vrouter\_bgp\_network β CLI command to add/remove vrouter-bgp-network
===========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_vrouter_bgp_network`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to add Border Gateway Protocol network to a vRouter and remove Border Gateway Protocol network from a vRouter.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_netmask** string | | BGP network mask. |
| **pn\_network** string | | IP address for BGP network. |
| **pn\_vrouter\_name** string | | name of service config. |
| **state** string / required | **Choices:*** present
* absent
| State the action to perform. Use `present` to add bgp network and `absent` to remove bgp network. |
Examples
--------
```
- name: Add network to bgp
community.network.pn_vrouter_bgp_network:
pn_cliswitch: "sw01"
state: "present"
pn_vrouter_name: "foo-vrouter"
pn_network: '10.10.10.10'
pn_netmask: '31'
- name: Remove network from bgp
community.network.pn_vrouter_bgp_network:
pn_cliswitch: "sw01"
state: "absent"
pn_vrouter_name: "foo-vrouter"
pn_network: '10.10.10.10'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the vrouter-bgp-network command. |
| **stdout** list / elements=string | always | set of responses from the vrouter-bgp-network command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.avi_analyticsprofile β Module for setup of AnalyticsProfile Avi RESTful Object community.network.avi\_analyticsprofile β Module for setup of AnalyticsProfile Avi RESTful Object
=================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_analyticsprofile`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure AnalyticsProfile object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **apdex\_response\_threshold** string | | If a client receives an http response in less than the satisfactory latency threshold, the request is considered satisfied. It is considered tolerated if it is not satisfied and less than tolerated latency factor multiplied by the satisfactory latency threshold. Greater than this number and the client's request is considered frustrated. Allowed values are 1-30000. Default value when not specified in API or module is interpreted by Avi Controller as 500. |
| **apdex\_response\_tolerated\_factor** string | | Client tolerated response latency factor. Client must receive a response within this factor times the satisfactory threshold (apdex\_response\_threshold) to be considered tolerated. Allowed values are 1-1000. Default value when not specified in API or module is interpreted by Avi Controller as 4.0. |
| **apdex\_rtt\_threshold** string | | Satisfactory client to avi round trip time(rtt). Allowed values are 1-2000. Default value when not specified in API or module is interpreted by Avi Controller as 250. |
| **apdex\_rtt\_tolerated\_factor** string | | Tolerated client to avi round trip time(rtt) factor. It is a multiple of apdex\_rtt\_tolerated\_factor. Allowed values are 1-1000. Default value when not specified in API or module is interpreted by Avi Controller as 4.0. |
| **apdex\_rum\_threshold** string | | If a client is able to load a page in less than the satisfactory latency threshold, the pageload is considered satisfied. It is considered tolerated if it is greater than satisfied but less than the tolerated latency multiplied by satisfied latency. Greater than this number and the client's request is considered frustrated. A pageload includes the time for dns lookup, download of all http objects, and page render time. Allowed values are 1-30000. Default value when not specified in API or module is interpreted by Avi Controller as 5000. |
| **apdex\_rum\_tolerated\_factor** string | | Virtual service threshold factor for tolerated page load time (plt) as multiple of apdex\_rum\_threshold. Allowed values are 1-1000. Default value when not specified in API or module is interpreted by Avi Controller as 4.0. |
| **apdex\_server\_response\_threshold** string | | A server http response is considered satisfied if latency is less than the satisfactory latency threshold. The response is considered tolerated when it is greater than satisfied but less than the tolerated latency factor \* s\_latency. Greater than this number and the server response is considered frustrated. Allowed values are 1-30000. Default value when not specified in API or module is interpreted by Avi Controller as 400. |
| **apdex\_server\_response\_tolerated\_factor** string | | Server tolerated response latency factor. Servermust response within this factor times the satisfactory threshold (apdex\_server\_response\_threshold) to be considered tolerated. Allowed values are 1-1000. Default value when not specified in API or module is interpreted by Avi Controller as 4.0. |
| **apdex\_server\_rtt\_threshold** string | | Satisfactory client to avi round trip time(rtt). Allowed values are 1-2000. Default value when not specified in API or module is interpreted by Avi Controller as 125. |
| **apdex\_server\_rtt\_tolerated\_factor** string | | Tolerated client to avi round trip time(rtt) factor. It is a multiple of apdex\_rtt\_tolerated\_factor. Allowed values are 1-1000. Default value when not specified in API or module is interpreted by Avi Controller as 4.0. |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **client\_log\_config** string | | Configure which logs are sent to the avi controller from ses and how they are processed. |
| **client\_log\_streaming\_config** string | | Configure to stream logs to an external server. Field introduced in 17.1.1. |
| **conn\_lossy\_ooo\_threshold** string | | A connection between client and avi is considered lossy when more than this percentage of out of order packets are received. Allowed values are 1-100. Default value when not specified in API or module is interpreted by Avi Controller as 50. |
| **conn\_lossy\_timeo\_rexmt\_threshold** string | | A connection between client and avi is considered lossy when more than this percentage of packets are retransmitted due to timeout. Allowed values are 1-100. Default value when not specified in API or module is interpreted by Avi Controller as 20. |
| **conn\_lossy\_total\_rexmt\_threshold** string | | A connection between client and avi is considered lossy when more than this percentage of packets are retransmitted. Allowed values are 1-100. Default value when not specified in API or module is interpreted by Avi Controller as 50. |
| **conn\_lossy\_zero\_win\_size\_event\_threshold** string | | A client connection is considered lossy when percentage of times a packet could not be transmitted due to tcp zero window is above this threshold. Allowed values are 0-100. Default value when not specified in API or module is interpreted by Avi Controller as 2. |
| **conn\_server\_lossy\_ooo\_threshold** string | | A connection between avi and server is considered lossy when more than this percentage of out of order packets are received. Allowed values are 1-100. Default value when not specified in API or module is interpreted by Avi Controller as 50. |
| **conn\_server\_lossy\_timeo\_rexmt\_threshold** string | | A connection between avi and server is considered lossy when more than this percentage of packets are retransmitted due to timeout. Allowed values are 1-100. Default value when not specified in API or module is interpreted by Avi Controller as 20. |
| **conn\_server\_lossy\_total\_rexmt\_threshold** string | | A connection between avi and server is considered lossy when more than this percentage of packets are retransmitted. Allowed values are 1-100. Default value when not specified in API or module is interpreted by Avi Controller as 50. |
| **conn\_server\_lossy\_zero\_win\_size\_event\_threshold** string | | A server connection is considered lossy when percentage of times a packet could not be transmitted due to tcp zero window is above this threshold. Allowed values are 0-100. Default value when not specified in API or module is interpreted by Avi Controller as 2. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **description** string | | User defined description for the object. |
| **disable\_ondemand\_metrics** boolean | **Choices:*** no
* yes
| Virtual service (vs) metrics are processed only when there is live data traffic on the vs. In case, vs is idle for a period of time as specified by ondemand\_metrics\_idle\_timeout then metrics processing is suspended for that vs. Field introduced in 18.1.1. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **disable\_se\_analytics** boolean | **Choices:*** no
* yes
| Disable node (service engine) level analytics forvs metrics. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **disable\_server\_analytics** boolean | **Choices:*** no
* yes
| Disable analytics on backend servers. This may be desired in container environment when there are large number of ephemeral servers. Additionally, no healthscore of servers is computed when server analytics is disabled. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **disable\_vs\_analytics** boolean | **Choices:*** no
* yes
| Disable virtualservice (frontend) analytics. This flag disables metrics and healthscore for virtualservice. Field introduced in 18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **enable\_advanced\_analytics** boolean | **Choices:*** no
* yes
| Enables advanced analytics features like anomaly detection. If set to false, anomaly computation (and associated rules/events) for vs, pool and server metrics will be disabled. However, setting it to false reduces cpu and memory requirements for analytics subsystem. Field introduced in 17.2.13, 18.1.5, 18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **exclude\_client\_close\_before\_request\_as\_error** boolean | **Choices:*** no
* yes
| Exclude client closed connection before an http request could be completed from being classified as an error. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **exclude\_dns\_policy\_drop\_as\_significant** boolean | **Choices:*** no
* yes
| Exclude dns policy drops from the list of errors. Field introduced in 17.2.2. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **exclude\_gs\_down\_as\_error** boolean | **Choices:*** no
* yes
| Exclude queries to gslb services that are operationally down from the list of errors. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **exclude\_http\_error\_codes** string | | List of http status codes to be excluded from being classified as an error. Error connections or responses impacts health score, are included as significant logs, and may be classified as part of a dos attack. |
| **exclude\_invalid\_dns\_domain\_as\_error** boolean | **Choices:*** no
* yes
| Exclude dns queries to domains outside the domains configured in the dns application profile from the list of errors. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **exclude\_invalid\_dns\_query\_as\_error** boolean | **Choices:*** no
* yes
| Exclude invalid dns queries from the list of errors. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **exclude\_no\_dns\_record\_as\_error** boolean | **Choices:*** no
* yes
| Exclude queries to domains that did not have configured services/records from the list of errors. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **exclude\_no\_valid\_gs\_member\_as\_error** boolean | **Choices:*** no
* yes
| Exclude queries to gslb services that have no available members from the list of errors. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **exclude\_persistence\_change\_as\_error** boolean | **Choices:*** no
* yes
| Exclude persistence server changed while load balancing' from the list of errors. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **exclude\_server\_dns\_error\_as\_error** boolean | **Choices:*** no
* yes
| Exclude server dns error response from the list of errors. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **exclude\_server\_tcp\_reset\_as\_error** boolean | **Choices:*** no
* yes
| Exclude server tcp reset from errors. It is common for applications like ms exchange. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **exclude\_sip\_error\_codes** string | | List of sip status codes to be excluded from being classified as an error. Field introduced in 17.2.13, 18.1.5, 18.2.1. |
| **exclude\_syn\_retransmit\_as\_error** boolean | **Choices:*** no
* yes
| Exclude 'server unanswered syns' from the list of errors. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **exclude\_tcp\_reset\_as\_error** boolean | **Choices:*** no
* yes
| Exclude tcp resets by client from the list of potential errors. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **exclude\_unsupported\_dns\_query\_as\_error** boolean | **Choices:*** no
* yes
| Exclude unsupported dns queries from the list of errors. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **healthscore\_max\_server\_limit** string | | Skips health score computation of pool servers when number of servers in a pool is more than this setting. Allowed values are 0-5000. Special values are 0- 'server health score is disabled'. Field introduced in 17.2.13, 18.1.4. Default value when not specified in API or module is interpreted by Avi Controller as 20. |
| **hs\_event\_throttle\_window** string | | Time window (in secs) within which only unique health change events should occur. Default value when not specified in API or module is interpreted by Avi Controller as 1209600. |
| **hs\_max\_anomaly\_penalty** string | | Maximum penalty that may be deducted from health score for anomalies. Allowed values are 0-100. Default value when not specified in API or module is interpreted by Avi Controller as 10. |
| **hs\_max\_resources\_penalty** string | | Maximum penalty that may be deducted from health score for high resource utilization. Allowed values are 0-100. Default value when not specified in API or module is interpreted by Avi Controller as 25. |
| **hs\_max\_security\_penalty** string | | Maximum penalty that may be deducted from health score based on security assessment. Allowed values are 0-100. Default value when not specified in API or module is interpreted by Avi Controller as 100. |
| **hs\_min\_dos\_rate** string | | Dos connection rate below which the dos security assessment will not kick in. Default value when not specified in API or module is interpreted by Avi Controller as 1000. |
| **hs\_performance\_boost** string | | Adds free performance score credits to health score. It can be used for compensating health score for known slow applications. Allowed values are 0-100. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **hs\_pscore\_traffic\_threshold\_l4\_client** string | | Threshold number of connections in 5min, below which apdexr, apdexc, rum\_apdex, and other network quality metrics are not computed. Default value when not specified in API or module is interpreted by Avi Controller as 10.0. |
| **hs\_pscore\_traffic\_threshold\_l4\_server** string | | Threshold number of connections in 5min, below which apdexr, apdexc, rum\_apdex, and other network quality metrics are not computed. Default value when not specified in API or module is interpreted by Avi Controller as 10.0. |
| **hs\_security\_certscore\_expired** string | | Score assigned when the certificate has expired. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 0.0. |
| **hs\_security\_certscore\_gt30d** string | | Score assigned when the certificate expires in more than 30 days. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 5.0. |
| **hs\_security\_certscore\_le07d** string | | Score assigned when the certificate expires in less than or equal to 7 days. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 2.0. |
| **hs\_security\_certscore\_le30d** string | | Score assigned when the certificate expires in less than or equal to 30 days. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 4.0. |
| **hs\_security\_chain\_invalidity\_penalty** string | | Penalty for allowing certificates with invalid chain. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 1.0. |
| **hs\_security\_cipherscore\_eq000b** string | | Score assigned when the minimum cipher strength is 0 bits. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 0.0. |
| **hs\_security\_cipherscore\_ge128b** string | | Score assigned when the minimum cipher strength is greater than equal to 128 bits. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 5.0. |
| **hs\_security\_cipherscore\_lt128b** string | | Score assigned when the minimum cipher strength is less than 128 bits. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 3.5. |
| **hs\_security\_encalgo\_score\_none** string | | Score assigned when no algorithm is used for encryption. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 0.0. |
| **hs\_security\_encalgo\_score\_rc4** string | | Score assigned when rc4 algorithm is used for encryption. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 2.5. |
| **hs\_security\_hsts\_penalty** string | | Penalty for not enabling hsts. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 1.0. |
| **hs\_security\_nonpfs\_penalty** string | | Penalty for allowing non-pfs handshakes. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 1.0. |
| **hs\_security\_selfsignedcert\_penalty** string | | Deprecated. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 1.0. |
| **hs\_security\_ssl30\_score** string | | Score assigned when supporting ssl3.0 encryption protocol. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 3.5. |
| **hs\_security\_tls10\_score** string | | Score assigned when supporting tls1.0 encryption protocol. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 5.0. |
| **hs\_security\_tls11\_score** string | | Score assigned when supporting tls1.1 encryption protocol. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 5.0. |
| **hs\_security\_tls12\_score** string | | Score assigned when supporting tls1.2 encryption protocol. Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 5.0. |
| **hs\_security\_weak\_signature\_algo\_penalty** string | | Penalty for allowing weak signature algorithm(s). Allowed values are 0-5. Default value when not specified in API or module is interpreted by Avi Controller as 1.0. |
| **name** string / required | | The name of the analytics profile. |
| **ondemand\_metrics\_idle\_timeout** string | | This flag sets the time duration of no live data traffic after which virtual service metrics processing is suspended. It is applicable only when disable\_ondemand\_metrics is set to false. Field introduced in 18.1.1. Default value when not specified in API or module is interpreted by Avi Controller as 1800. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **ranges** string | | List of http status code ranges to be excluded from being classified as an error. |
| **resp\_code\_block** string | | Block of http response codes to be excluded from being classified as an error. Enum options - AP\_HTTP\_RSP\_4XX, AP\_HTTP\_RSP\_5XX. |
| **sensitive\_log\_profile** string | | Rules applied to the http application log for filtering sensitive information. Field introduced in 17.2.10, 18.1.2. |
| **sip\_log\_depth** string | | Maximum number of sip messages added in logs for a sip transaction. By default, this value is 20. Allowed values are 1-1000. Field introduced in 17.2.13, 18.1.5, 18.2.1. Default value when not specified in API or module is interpreted by Avi Controller as 20. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the analytics profile. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create a custom Analytics profile object
community.network.avi_analyticsprofile:
controller: '{{ controller }}'
username: '{{ username }}'
password: '{{ password }}'
apdex_response_threshold: 500
apdex_response_tolerated_factor: 4.0
apdex_rtt_threshold: 250
apdex_rtt_tolerated_factor: 4.0
apdex_rum_threshold: 5000
apdex_rum_tolerated_factor: 4.0
apdex_server_response_threshold: 400
apdex_server_response_tolerated_factor: 4.0
apdex_server_rtt_threshold: 125
apdex_server_rtt_tolerated_factor: 4.0
conn_lossy_ooo_threshold: 50
conn_lossy_timeo_rexmt_threshold: 20
conn_lossy_total_rexmt_threshold: 50
conn_lossy_zero_win_size_event_threshold: 2
conn_server_lossy_ooo_threshold: 50
conn_server_lossy_timeo_rexmt_threshold: 20
conn_server_lossy_total_rexmt_threshold: 50
conn_server_lossy_zero_win_size_event_threshold: 2
disable_se_analytics: false
disable_server_analytics: false
exclude_client_close_before_request_as_error: false
exclude_persistence_change_as_error: false
exclude_server_tcp_reset_as_error: false
exclude_syn_retransmit_as_error: false
exclude_tcp_reset_as_error: false
hs_event_throttle_window: 1209600
hs_max_anomaly_penalty: 10
hs_max_resources_penalty: 25
hs_max_security_penalty: 100
hs_min_dos_rate: 1000
hs_performance_boost: 20
hs_pscore_traffic_threshold_l4_client: 10.0
hs_pscore_traffic_threshold_l4_server: 10.0
hs_security_certscore_expired: 0.0
hs_security_certscore_gt30d: 5.0
hs_security_certscore_le07d: 2.0
hs_security_certscore_le30d: 4.0
hs_security_chain_invalidity_penalty: 1.0
hs_security_cipherscore_eq000b: 0.0
hs_security_cipherscore_ge128b: 5.0
hs_security_cipherscore_lt128b: 3.5
hs_security_encalgo_score_none: 0.0
hs_security_encalgo_score_rc4: 2.5
hs_security_hsts_penalty: 0.0
hs_security_nonpfs_penalty: 1.0
hs_security_selfsignedcert_penalty: 1.0
hs_security_ssl30_score: 3.5
hs_security_tls10_score: 5.0
hs_security_tls11_score: 5.0
hs_security_tls12_score: 5.0
hs_security_weak_signature_algo_penalty: 1.0
name: jason-analytics-profile
tenant_ref: Demo
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | AnalyticsProfile (api/analyticsprofile) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#37504556444358505e111404000c111402050c1114030f0c56415e5952434058455c44111403010c54585a)>
| programming_docs |
ansible community.network.ce_config β Manage Huawei CloudEngine configuration sections. community.network.ce\_config β Manage Huawei CloudEngine configuration sections.
================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_config`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Huawei CloudEngine configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with CloudEngine configuration sections in a deterministic way. This module works with CLI transports.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **after** string | | The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with *before* this allows the playbook designer to append a set of commands to be executed after the command set. |
| **backup** boolean | **Choices:*** **no** β
* yes
| This argument will cause the module to create a full backup of the current `current-configuration` from the remote device before any changes are made. If the `backup_options` value is not given, the backup file is written to the `backup` folder in the playbook root directory. If the directory does not exist, it is created. |
| **backup\_options** dictionary | | This is a dict object containing configurable options related to backup file path. The value of this option is read only when `backup` is set to *yes*, if `backup` is set to *no* this option will be silently ignored. |
| | **dir\_path** path | | This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of `filename` or default filename as described in `filename` options description. If the path value is not given in that case a *backup* directory will be created in the current working directory and backup configuration will be copied in `filename` within *backup* directory. |
| | **filename** string | | The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by <hostname>\_config.<current-date>@<current-time> |
| **before** string | | The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system. |
| **config** string | | The module, by default, will connect to the remote device and retrieve the current current-configuration to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current-configuration for every task in a playbook. The *config* argument allows the implementer to pass in the configuration to use as the base config for comparison. |
| **defaults** boolean | **Choices:*** **no** β
* yes
| The *defaults* argument will influence how the current-configuration is collected from the device. When the value is set to true, the command used to collect the current-configuration is append with the all keyword. When the value is set to false, the command is issued without the all keyword. |
| **lines** string | | The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device current-configuration. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser. |
| **match** string | **Choices:*** **line** β
* strict
* exact
* none
| Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to *line*, commands are matched line by line. If match is set to *strict*, command lines are matched with respect to position. If match is set to *exact*, command lines must be an equal match. Finally, if match is set to *none*, the module will not attempt to compare the source configuration with the current-configuration on the remote device. |
| **parents** string | | The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. |
| **replace** string | **Choices:*** **line** β
* block
| Instructs the module on the way to perform the configuration on the device. If the replace argument is set to *line* then the modified lines are pushed to the device in configuration mode. If the replace argument is set to *block* then the entire command block is pushed to the device in configuration mode if any line is not correct. |
| **save** boolean | **Choices:*** **no** β
* yes
| The `save` argument instructs the module to save the current-configuration to saved-configuration. This operation is performed after any changes are made to the current running config. If no changes are made, the configuration is still saved to the startup config. This option will always cause the module to return changed. |
| **src** string | | The *src* argument provides a path to the configuration file to load into the remote system. The path can either be a full system path to the configuration file if the value starts with / or relative to the root of the implemented role or playbook. This argument is mutually exclusive with the *lines* and *parents* arguments. |
Notes
-----
Note
* Recommended connection is `network_cli`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
# Note: examples below use the following provider dict to handle
# transport and authentication to the node.
- name: CloudEngine config test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Configure top level configuration and save it"
community.network.ce_config:
lines: sysname {{ inventory_hostname }}
save: yes
provider: "{{ cli }}"
- name: "Configure acl configuration and save it"
community.network.ce_config:
lines:
- rule 10 permit source 1.1.1.1 32
- rule 20 permit source 2.2.2.2 32
- rule 30 permit source 3.3.3.3 32
- rule 40 permit source 4.4.4.4 32
- rule 50 permit source 5.5.5.5 32
parents: acl 2000
before: undo acl 2000
match: exact
provider: "{{ cli }}"
- name: "Configure acl configuration and save it"
community.network.ce_config:
lines:
- rule 10 permit source 1.1.1.1 32
- rule 20 permit source 2.2.2.2 32
- rule 30 permit source 3.3.3.3 32
- rule 40 permit source 4.4.4.4 32
parents: acl 2000
before: undo acl 2000
replace: block
provider: "{{ cli }}"
- name: Configurable backup path
community.network.ce_config:
lines: sysname {{ inventory_hostname }}
provider: "{{ cli }}"
backup: yes
backup_options:
filename: backup.cfg
dir_path: /home/user
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **backup\_path** string | when backup is yes | The full path to the backup file **Sample:** /playbooks/ansible/backup/ce\_config.2016-07-16@22:28:34 |
| **updates** list / elements=string | Only when lines is specified. | The set of commands that will be pushed to the remote device **Sample:** ['...', '...'] |
### Authors
* QijunPan (@QijunPan)
ansible community.network.ce_netstream_template β Manages NetStream template configuration on HUAWEI CloudEngine switches. community.network.ce\_netstream\_template β Manages NetStream template configuration on HUAWEI CloudEngine switches.
====================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_netstream_template`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages NetStream template configuration on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **collect\_counter** string | **Choices:*** bytes
* packets
| Configure the number of packets and bytes that are included in the flexible flow statistics sent to NSC. |
| **collect\_interface** string | **Choices:*** input
* output
| Configure the input or output interface that are included in the flexible flow statistics sent to NSC. |
| **description** string | | Configure the description of netstream record. The value is a string of 1 to 80 case-insensitive characters. |
| **match** string | **Choices:*** destination-address
* destination-port
* tos
* protocol
* source-address
* source-port
| Configure flexible flow statistics template keywords. |
| **record\_name** string | | Configure the name of netstream record. The value is a string of 1 to 32 case-insensitive characters. |
| **state** string | **Choices:*** **present** β
* absent
| Specify desired state of the resource. |
| **type** string / required | **Choices:*** ip
* vxlan
| Configure the type of netstream record. |
Notes
-----
Note
* Recommended connection is `network_cli`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Netstream template module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Config ipv4 netstream record
community.network.ce_netstream_template:
state: present
type: ip
record_name: test
provider: "{{ cli }}"
- name: Undo ipv4 netstream record
community.network.ce_netstream_template:
state: absent
type: ip
record_name: test
provider: "{{ cli }}"
- name: Config ipv4 netstream record collect_counter
community.network.ce_netstream_template:
state: present
type: ip
record_name: test
collect_counter: bytes
provider: "{{ cli }}"
- name: Undo ipv4 netstream record collect_counter
community.network.ce_netstream_template:
state: absent
type: ip
record_name: test
collect_counter: bytes
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution **Sample:** {'record\_name': 'test', 'type': 'ip'} |
| **existing** dictionary | always | k/v pairs of existing aaa server |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'record\_name': 'test', 'state': 'present', 'type': 'ip'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['netstream record test ip'] |
### Authors
* wangdezhuang (@QijunPan)
ansible community.network.avi_stringgroup β Module for setup of StringGroup Avi RESTful Object community.network.avi\_stringgroup β Module for setup of StringGroup Avi RESTful Object
=======================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_stringgroup`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure StringGroup object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **description** string | | User defined description for the object. |
| **kv** string | | Configure key value in the string group. |
| **name** string / required | | Name of the string group. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **type** string / required | | Type of stringgroup. Enum options - SG\_TYPE\_STRING, SG\_TYPE\_KEYVAL. Default value when not specified in API or module is interpreted by Avi Controller as SG\_TYPE\_STRING. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the string group. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create a string group configuration
community.network.avi_stringgroup:
controller: '{{ controller }}'
password: '{{ password }}'
username: '{{ username }}'
kv:
- key: text/html
- key: text/xml
- key: text/plain
- key: text/css
- key: text/javascript
- key: application/javascript
- key: application/x-javascript
- key: application/xml
- key: application/pdf
name: System-Compressible-Content-Types
tenant_ref: admin
type: SG_TYPE_STRING
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | StringGroup (api/stringgroup) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#baddc8dbc9ced5ddd39c99898d819c998f88819c998e8281dbccd3d4dfcecdd5c8d1c99c998e8c81d9d5d7)>
ansible community.network.ce_netstream_global β Manages global parameters of NetStream on HUAWEI CloudEngine switches. community.network.ce\_netstream\_global β Manages global parameters of NetStream on HUAWEI CloudEngine switches.
================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_netstream_global`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages global parameters of NetStream on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **index\_switch** string | **Choices:*** **16** β
* 32
| Specifies the netstream index-switch. |
| **interface** string / required | | Netstream global interface. |
| **sampler\_direction** string | **Choices:*** inbound
* outbound
| Specifies the netstream sampler direction. |
| **sampler\_interval** string | | Specifies the netstream sampler interval, length is 1 - 65535. |
| **state** string | **Choices:*** **present** β
* absent
| Specify desired state of the resource. |
| **statistics\_direction** string | **Choices:*** inbound
* outbound
| Specifies the netstream statistic direction. |
| **statistics\_record** string | | Specifies the flexible netstream statistic record, length is 1 - 32. |
| **type** string | **Choices:*** **ip** β
* vxlan
| Specifies the type of netstream global. |
Notes
-----
Note
* Recommended connection is `network_cli`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Netstream global module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Configure a netstream sampler at interface 10ge1/0/2, direction is outbound,interval is 30.
community.network.ce_netstream_global:
interface: 10ge1/0/2
type: ip
sampler_interval: 30
sampler_direction: outbound
state: present
provider: "{{ cli }}"
- name: Configure a netstream flexible statistic at interface 10ge1/0/2, record is test1, type is ip.
community.network.ce_netstream_global:
type: ip
interface: 10ge1/0/2
statistics_record: test1
provider: "{{ cli }}"
- name: Set the vxlan index-switch to 32.
community.network.ce_netstream_global:
type: vxlan
interface: all
index_switch: 32
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | verbose mode | k/v pairs of configuration after module execution **Sample:** {'flexible\_statistic': [{'interface': '10ge1/0/2', 'statistics\_record': [], 'type': 'ip'}, {'interface': '10ge1/0/2', 'statistics\_record': ['test'], 'type': 'vxlan'}], 'index-switch': [{'index-switch': '16', 'type': 'ip'}, {'index-switch': '16', 'type': 'vxlan'}], 'sampler': [{'interface': 'all', 'sampler\_direction': 'null', 'sampler\_interval': 'null'}], 'statistic': [{'interface': '10ge1/0/2', 'statistics\_direction': [], 'type': 'null'}]} |
| **existing** dictionary | verbose mode | k/v pairs of existing configuration **Sample:** {'flexible\_statistic': [{'interface': '10ge1/0/2', 'statistics\_record': [], 'type': 'ip'}, {'interface': '10ge1/0/2', 'statistics\_record': [], 'type': 'vxlan'}], 'index-switch': [{'index-switch': '16', 'type': 'ip'}, {'index-switch': '16', 'type': 'vxlan'}], 'ip\_record': ['test', 'test1'], 'sampler': [{'interface': 'all', 'sampler\_direction': 'null', 'sampler\_interval': 'null'}], 'statistic': [{'interface': '10ge1/0/2', 'statistics\_direction': [], 'type': 'null'}], 'vxlan\_record': ['test']} |
| **proposed** dictionary | verbose mode | k/v pairs of parameters passed into module **Sample:** {'index\_switch': '16', 'interface': '10ge1/0/2', 'state': 'present', 'statistics\_record': 'test', 'type': 'vxlan'} |
| **updates** list / elements=string | always | commands sent to the device **Sample:** ['interface 10ge1/0/2', 'netstream record test vxlan inner-ip'] |
### Authors
* YangYang (@QijunPan)
| programming_docs |
ansible community.network.netscaler_save_config β Save Netscaler configuration. community.network.netscaler\_save\_config β Save Netscaler configuration.
=========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.netscaler_save_config`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module unconditionally saves the configuration on the target netscaler node.
* This module does not support check mode.
* This module is intended to run either on the ansible control node or a bastion (jumpserver) with access to the actual netscaler instance.
Requirements
------------
The below requirements are needed on the host that executes this module.
* nitro python sdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **nitro\_pass** string / required | | The password with which to authenticate to the netscaler node. |
| **nitro\_protocol** string | **Choices:*** **http** β
* https
| Which protocol to use when accessing the nitro API objects. |
| **nitro\_timeout** string | **Default:**310 | Time in seconds until a timeout error is thrown when establishing a new session with Netscaler. |
| **nitro\_user** string / required | | The username with which to authenticate to the netscaler node. |
| **nsip** string / required | | The ip address of the netscaler appliance where the nitro API calls will be made. The port can be specified with the colon (:). E.g. `192.168.1.1:555`. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Examples
--------
```
---
- name: Save netscaler configuration
delegate_to: localhost
community.network.netscaler_save_config:
nsip: 172.18.0.2
nitro_user: nsroot
nitro_pass: nsroot
- name: Setup server without saving configuration
delegate_to: localhost
notify: Save configuration
netscaler_server:
nsip: 172.18.0.2
nitro_user: nsroot
nitro_pass: nsroot
save_config: no
name: server-1
ipaddress: 192.168.1.1
# Under playbook's handlers
- name: Save configuration
delegate_to: localhost
community.network.netscaler_save_config:
nsip: 172.18.0.2
nitro_user: nsroot
nitro_pass: nsroot
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **loglines** list / elements=string | always | list of logged messages by the module **Sample:** ['message 1', 'message 2'] |
| **msg** string | failure | Message detailing the failure reason **Sample:** Action does not exist |
### Authors
* George Nikolopoulos (@giorgos-nikolopoulos)
ansible community.network.a10_service_group β Manage A10 Networks AX/SoftAX/Thunder/vThunder devicesβ service groups. community.network.a10\_service\_group β Manage A10 Networks AX/SoftAX/Thunder/vThunder devicesβ service groups.
===============================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.a10_service_group`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage SLB (Server Load Balancing) service-group objects on A10 Networks devices via aXAPIv2.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **client\_cert** path | | PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, `client_key` is not required. |
| **client\_key** path | | PEM formatted file that contains your private key to be used for SSL client authentication. If `client_cert` contains both the certificate and key, this option is not required. |
| **force** boolean | **Choices:*** **no** β
* yes
| If `yes` do not get a cached copy. Alias `thirsty` has been deprecated and will be removed in 2.13.
aliases: thirsty |
| **force\_basic\_auth** boolean | **Choices:*** **no** β
* yes
| Credentials specified with *url\_username* and *url\_password* should be passed in HTTP Header. |
| **host** string / required | | Hostname or IP of the A10 Networks device. |
| **http\_agent** string | **Default:**"ansible-httpget" | Header to identify as, generally appears in web server logs. |
| **partition** string | | set active-partition |
| **password** string / required | | Password for the `username` account.
aliases: pass, pwd |
| **servers** string | | A list of servers to add to the service group. Each list item should be a dictionary which specifies the `server:` and `port:`, but can also optionally specify the `status:`. See the examples below for details.
aliases: server, member |
| **service\_group** string / required | | The SLB (Server Load Balancing) service-group name
aliases: service, pool, group |
| **service\_group\_method** string | **Choices:*** **round-robin** β
* weighted-rr
* least-connection
* weighted-least-connection
* service-least-connection
* service-weighted-least-connection
* fastest-response
* least-request
* round-robin-strict
* src-ip-only-hash
* src-ip-hash
| The SLB service-group load balancing method, such as round-robin or weighted-rr.
aliases: method |
| **service\_group\_protocol** string | **Choices:*** **tcp** β
* udp
| The SLB service-group protocol of TCP or UDP.
aliases: proto, protocol |
| **state** string | **Choices:*** **present** β
* absent
| If the specified service group should exists. |
| **url** string | | HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path |
| **url\_password** string | | The password for use in HTTP basic authentication. If the *url\_username* parameter is not specified, the *url\_password* parameter will not be used. |
| **url\_username** string | | The username for use in HTTP basic authentication. This parameter can be used without *url\_password* for sites that allow empty passwords |
| **use\_gssapi** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication. Requires the Python library [gssapi](https://github.com/pythongssapi/python-gssapi) to be installed. Credentials for GSSAPI can be specified with *url\_username*/*url\_password* or with the GSSAPI env var `KRB5CCNAME` that specified a custom Kerberos credential cache. NTLM authentication is `not` supported even if the GSSAPI mech for NTLM has been installed. |
| **use\_proxy** boolean | **Choices:*** no
* **yes** β
| If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. |
| **username** string / required | | An account with administrator privileges.
aliases: admin, user |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled devices using self-signed certificates. |
| **write\_config** boolean | **Choices:*** **no** β
* yes
| If `yes`, any changes will cause a write of the running configuration to non-volatile memory. This will save *all* configuration changes, including those that may have been made manually or through other modules, so care should be taken when specifying `yes`. |
Notes
-----
Note
* Requires A10 Networks aXAPI 2.1.
* When a server doesnβt exist and is added to the service-group the server will be created.
* Requires A10 Networks aXAPI 2.1.
Examples
--------
```
- name: Create a new service-group
community.network.a10_service_group:
host: a10.mydomain.com
username: myadmin
password: mypassword
partition: mypartition
service_group: sg-80-tcp
servers:
- server: foo1.mydomain.com
port: 8080
- server: foo2.mydomain.com
port: 8080
- server: foo3.mydomain.com
port: 8080
- server: foo4.mydomain.com
port: 8080
status: disabled
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **content** string | success | the full info regarding the slb\_service\_group **Sample:** mynewservicegroup |
### Authors
* Eric Chou (@ericchou1)
* Mischa Peters (@mischapeters)
ansible community.network.pn_vrouter_packet_relay β CLI command to add/remove vrouter-packet-relay community.network.pn\_vrouter\_packet\_relay β CLI command to add/remove vrouter-packet-relay
=============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_vrouter_packet_relay`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to add packet relay configuration for DHCP on vrouter and remove packet relay configuration for DHCP on vrouter.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_forward\_ip** string / required | | forwarding IP address. |
| **pn\_forward\_proto** string | **Choices:*** **dhcp** β
| protocol type to forward packets. |
| **pn\_nic** string / required | | NIC. |
| **pn\_vrouter\_name** string / required | | name of service config. |
| **state** string | **Choices:*** **present** β
* absent
| vrouter-packet-relay configuration command. |
Examples
--------
```
- name: VRouter packet relay add
community.network.pn_vrouter_packet_relay:
pn_cliswitch: "sw01"
pn_forward_ip: "192.168.10.1"
pn_nic: "eth0.4092"
pn_vrouter_name: "sw01-vrouter"
- name: VRouter packet relay remove
community.network.pn_vrouter_packet_relay:
pn_cliswitch: "sw01"
state: "absent"
pn_forward_ip: "192.168.10.1"
pn_nic: "eth0.4092"
pn_vrouter_name: "sw01-vrouter"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the vrouter-packet-relay command. |
| **stdout** list / elements=string | always | set of responses from the vrouter-packet-relay command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.ce_aaa_server β Manages AAA server global configuration on HUAWEI CloudEngine switches. community.network.ce\_aaa\_server β Manages AAA server global configuration on HUAWEI CloudEngine switches.
===========================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_aaa_server`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages AAA server global configuration on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **accounting\_mode** string | **Choices:*** invalid
* hwtacacs
* radius
* **none** β
| Accounting Mode. |
| **acct\_scheme\_name** string | | Accounting scheme name. The value is a string of 1 to 32 characters. |
| **authen\_scheme\_name** string | | Name of an authentication scheme. The value is a string of 1 to 32 characters. |
| **author\_scheme\_name** string | | Name of an authorization scheme. The value is a string of 1 to 32 characters. |
| **domain\_name** string | | Name of a domain. The value is a string of 1 to 64 characters. |
| **first\_authen\_mode** string | **Choices:*** invalid
* **local** β
* hwtacacs
* radius
* none
| Preferred authentication mode. |
| **first\_author\_mode** string | **Choices:*** invalid
* **local** β
* hwtacacs
* if-authenticated
* none
| Preferred authorization mode. |
| **hwtacas\_template** string | | Name of a HWTACACS template. The value is a string of 1 to 32 case-insensitive characters. |
| **local\_user\_group** string | | Name of the user group where the user belongs. The user inherits all the rights of the user group. The value is a string of 1 to 32 characters. |
| **radius\_server\_group** string | | RADIUS server group's name. The value is a string of 1 to 32 case-insensitive characters. |
| **state** string | **Choices:*** absent
* **present** β
| Specify desired state of the resource. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: AAA server test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Radius authentication Server Basic settings"
community.network.ce_aaa_server:
state: present
authen_scheme_name: test1
first_authen_mode: radius
radius_server_group: test2
provider: "{{ cli }}"
- name: "Undo radius authentication Server Basic settings"
community.network.ce_aaa_server:
state: absent
authen_scheme_name: test1
first_authen_mode: radius
radius_server_group: test2
provider: "{{ cli }}"
- name: "Hwtacacs accounting Server Basic settings"
community.network.ce_aaa_server:
state: present
acct_scheme_name: test1
accounting_mode: hwtacacs
hwtacas_template: test2
provider: "{{ cli }}"
- name: "Undo hwtacacs accounting Server Basic settings"
community.network.ce_aaa_server:
state: absent
acct_scheme_name: test1
accounting_mode: hwtacacs
hwtacas_template: test2
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution **Sample:** {'accounting scheme': [['hwtacacs', 'test1']], 'hwtacacs template': ['huawei', 'test2']} |
| **existing** dictionary | always | k/v pairs of existing aaa server **Sample:** {'accounting scheme': [['hwtacacs'], ['default']], 'hwtacacs template': ['huawei']} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'accounting\_mode': 'hwtacacs', 'acct\_scheme\_name': 'test1', 'hwtacas\_template': 'test2', 'state': 'present'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['accounting-scheme test1', 'accounting-mode hwtacacs', 'hwtacacs server template test2', 'hwtacacs enable'] |
### Authors
* wangdezhuang (@QijunPan)
ansible community.network.cnos_factory β Reset the switch startup configuration to default (factory) on devices running Lenovo CNOS. community.network.cnos\_factory β Reset the switch startup configuration to default (factory) on devices running Lenovo CNOS.
=============================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_factory`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module allows you to reset a switchβs startup configuration. The method provides a way to reset the startup configuration to its factory settings. This is helpful when you want to move the switch to another topology as a new network device. This module uses SSH to manage network device configuration. The result of the operation can be viewed in results directory.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **deviceType** string / required | **Choices:*** g8272\_cnos
* g8296\_cnos
* g8332\_cnos
* NE0152T
* NE1072T
* NE1032
* NE1032T
* NE10032
* NE2572
| This specifies the type of device where the method is executed. The choices NE1072T,NE1032,NE1032T,NE10032,NE2572 are added since Ansible 2.4. The choice NE0152T is added since 2.8 |
| **enablePassword** string | | Configures the password used to enter Global Configuration command mode on the switch. If the switch does not request this password, the parameter is ignored.While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **host** string / required | | This is the variable used to search the hosts file at /etc/ansible/hosts and identify the IP address of the device on which the template is going to be applied. Usually the Ansible keyword {{ inventory\_hostname }} is specified in the playbook as an abstraction of the group of network elements that need to be configured. |
| **outputfile** string / required | | This specifies the file path where the output of each command execution is saved. Each command that is specified in the merged template file and each response from the device are saved here. Usually the location is the results folder, but you can choose another location based on your write permission. |
| **password** string / required | | Configures the password used to authenticate the connection to the remote device. The value of the password parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **username** string / required | | Configures the username used to authenticate the connection to the remote device. The value of the username parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
Notes
-----
Note
* For more information on using Ansible to manage Lenovo Network devices see <https://www.ansible.com/ansible-lenovo>.
Examples
--------
```
Tasks : The following are examples of using the module cnos_reload. These are
written in the main.yml file of the tasks directory.
---
- name: Test Reset to factory
community.network.cnos_factory:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_factory_{{ inventory_hostname }}_output.txt"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | always | Success or failure message **Sample:** Switch Startup Config is Reset to factory settings |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
| programming_docs |
ansible community.network.ce_sflow β Manages sFlow configuration on HUAWEI CloudEngine switches. community.network.ce\_sflow β Manages sFlow configuration on HUAWEI CloudEngine switches.
=========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_sflow`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Configure Sampled Flow (sFlow) to monitor traffic on an interface in real time, detect abnormal traffic, and locate the source of attack traffic, ensuring stable running of the network.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **agent\_ip** string | | Specifies the IPv4/IPv6 address of an sFlow agent. |
| **collector\_datagram\_size** string | | Specifies the maximum length of sFlow packets sent from an sFlow agent to an sFlow collector. The value is an integer, in bytes. It ranges from 1024 to 8100. The default value is 1400. |
| **collector\_description** string | | Specifies the description of an sFlow collector. The value is a string of 1 to 255 case-sensitive characters without spaces. |
| **collector\_id** string | **Choices:*** 1
* 2
| Specifies the ID of an sFlow collector. This ID is used when you specify the collector in subsequent sFlow configuration. |
| **collector\_ip** string | | Specifies the IPv4/IPv6 address of the sFlow collector. |
| **collector\_ip\_vpn** string | | Specifies the name of a VPN instance. The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. The value `_public_` is reserved and cannot be used as the VPN instance name. |
| **collector\_meth** string | **Choices:*** meth
* enhanced
| Configures the device to send sFlow packets through service interfaces, enhancing the sFlow packet forwarding capability. The enhanced parameter is optional. No matter whether you configure the enhanced mode, the switch determines to send sFlow packets through service cards or management port based on the routing information on the collector. When the value is meth, the device forwards sFlow packets at the control plane. When the value is enhanced, the device forwards sFlow packets at the forwarding plane to enhance the sFlow packet forwarding capacity. |
| **collector\_udp\_port** string | | Specifies the UDP destination port number of sFlow packets. The value is an integer that ranges from 1 to 65535. The default value is 6343. |
| **counter\_collector** string | | Indicates the ID list of the counter collector. |
| **counter\_interval** string | | Indicates the counter sampling interval. The value is an integer that ranges from 10 to 4294967295, in seconds. The default value is 20. |
| **export\_route** string | **Choices:*** enable
* disable
| Configures the sFlow packets sent by the switch not to carry routing information. |
| **sample\_collector** string | | Indicates the ID list of the collector. |
| **sample\_direction** string | **Choices:*** inbound
* outbound
* both
| Enables flow sampling in the inbound or outbound direction. |
| **sample\_length** string | | Specifies the maximum length of sampled packets. The value is an integer and ranges from 18 to 512, in bytes. The default value is 128. |
| **sample\_rate** string | | Specifies the flow sampling rate in the format 1/rate. The value is an integer and ranges from 1 to 4294967295. The default value is 8192. |
| **sflow\_interface** string | | Full name of interface for Flow Sampling or Counter. It must be a physical interface, Eth-Trunk, or Layer 2 subinterface. |
| **source\_ip** string | | Specifies the source IPv4/IPv6 address of sFlow packets. |
| **state** string | **Choices:*** **present** β
* absent
| Determines whether the config should be present or not on the device. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
---
- name: Sflow module test
hosts: ce128
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Configuring sFlow Agent
community.network.ce_sflow:
agent_ip: 6.6.6.6
provider: '{{ cli }}'
- name: Configuring sFlow Collector
community.network.ce_sflow:
collector_id: 1
collector_ip: 7.7.7.7
collector_ip_vpn: vpn1
collector_description: Collector1
provider: '{{ cli }}'
- name: Configure flow sampling.
community.network.ce_sflow:
sflow_interface: 10GE2/0/2
sample_collector: 1
sample_direction: inbound
provider: '{{ cli }}'
- name: Configure counter sampling.
community.network.ce_sflow:
sflow_interface: 10GE2/0/2
counter_collector: 1
counter_interval: 1000
provider: '{{ cli }}'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | verbose mode | k/v pairs of configuration after module execution **Sample:** {'agent': {'family': 'ipv4', 'ipv4Addr': '1.2.3.4', 'ipv6Addr': None}} |
| **existing** dictionary | verbose mode | k/v pairs of existing configuration **Sample:** {'agent': {}} |
| **proposed** dictionary | verbose mode | k/v pairs of parameters passed into module **Sample:** {'agent\_ip': '6.6.6.6', 'state': 'present'} |
| **updates** list / elements=string | always | commands sent to the device **Sample:** ['sflow agent ip 6.6.6.6'] |
### Authors
* QijunPan (@QijunPan)
ansible community.network.slxos_lldp β Manage LLDP configuration on Extreme Networks SLX-OS network devices. community.network.slxos\_lldp β Manage LLDP configuration on Extreme Networks SLX-OS network devices.
=====================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.slxos_lldp`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of LLDP service on Extreme SLX-OS network devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **state** string | **Choices:*** **present** β
* absent
| State of the LLDP configuration. If value is *present* lldp will be enabled else if it is *absent* it will be disabled. |
Notes
-----
Note
* Tested against SLX-OS 17s.1.02
Examples
--------
```
- name: Enable LLDP service
community.network.slxos_lldp:
state: present
- name: Disable LLDP service
community.network.slxos_lldp:
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device **Sample:** ['lldp run'] |
### Authors
* Matthew Stone (@bigmstone)
ansible community.network.bcf_switch β Create and remove a bcf switch. community.network.bcf\_switch β Create and remove a bcf switch.
===============================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.bcf_switch`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Create and remove a Big Cloud Fabric switch.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access\_token** string | | Big Cloud Fabric access token. If this isn't set then the environment variable `BIGSWITCH_ACCESS_TOKEN` is used. |
| **controller** string / required | | The controller IP address. |
| **fabric\_role** string / required | **Choices:*** spine
* leaf
| Fabric role of the switch. |
| **leaf\_group** string | | The leaf group of the switch if the switch is a leaf. |
| **mac** string / required | | The MAC address of the switch. |
| **name** string / required | | The name of the switch. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the switch should be present or absent. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `false`, SSL certificates will not be validated. This should only be used on personally controlled devices using self-signed certificates. |
Examples
--------
```
- name: Bcf leaf switch
community.network.bcf_switch:
name: Rack1Leaf1
fabric_role: leaf
leaf_group: R1
mac: 00:00:00:02:00:02
controller: '{{ inventory_hostname }}'
state: present
validate_certs: false
```
### Authors
* Ted (@tedelhourani)
ansible community.network.ce_vrf_af β Manages VPN instance address family on HUAWEI CloudEngine switches. community.network.ce\_vrf\_af β Manages VPN instance address family on HUAWEI CloudEngine switches.
===================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_vrf_af`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages VPN instance address family of HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **evpn** boolean | **Choices:*** **no** β
* yes
| Is extend vpn or normal vpn. |
| **route\_distinguisher** string | | VPN instance route distinguisher,the RD used to distinguish same route prefix from different vpn. The RD must be setted before setting vpn\_target\_value. |
| **state** string | **Choices:*** **present** β
* absent
| Manage the state of the af. |
| **vpn\_target\_state** string | **Choices:*** present
* absent
| Manage the state of the vpn target. |
| **vpn\_target\_type** string | **Choices:*** export\_extcommunity
* import\_extcommunity
| VPN instance vpn target type. |
| **vpn\_target\_value** string | | VPN instance target value. Such as X.X.X.X:number<0-65535> or number<0-65535>:number<0-4294967295> or number<0-65535>.number<0-65535>:number<0-65535> or number<65536-4294967295>:number<0-65535> but not support 0:0 and 0.0:0. |
| **vrf** string / required | | VPN instance. |
| **vrf\_aftype** string | **Choices:*** **v4** β
* v6
| VPN instance address family. |
Notes
-----
Note
* If *state=absent*, the vrf will be removed, regardless of the non-required parameters.
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Vrf af module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Config vpna, set address family is ipv4
community.network.ce_vrf_af:
vrf: vpna
vrf_aftype: v4
state: present
provider: "{{ cli }}"
- name: Config vpna, delete address family is ipv4
community.network.ce_vrf_af:
vrf: vpna
vrf_aftype: v4
state: absent
provider: "{{ cli }}"
- name: Config vpna, set address family is ipv4,rd=1:1,set vpn_target_type=export_extcommunity,vpn_target_value=2:2
community.network.ce_vrf_af:
vrf: vpna
vrf_aftype: v4
route_distinguisher: 1:1
vpn_target_type: export_extcommunity
vpn_target_value: 2:2
vpn_target_state: present
state: present
provider: "{{ cli }}"
- name: Config vpna, set address family is ipv4,rd=1:1,delete vpn_target_type=export_extcommunity,vpn_target_value=2:2
community.network.ce_vrf_af:
vrf: vpna
vrf_aftype: v4
route_distinguisher: 1:1
vpn_target_type: export_extcommunity
vpn_target_value: 2:2
vpn_target_state: absent
state: present
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of switchport after module execution **Sample:** {'route\_distinguisher': ['1:1', '2:2'], 'vpn\_target\_type': ['import\_extcommunity', '3:3'], 'vpn\_target\_value': [], 'vrf': 'vpna', 'vrf\_aftype': ['ipv4uni', 'ipv6uni']} |
| **existing** dictionary | always | k/v pairs of existing switchport **Sample:** {'route\_distinguisher': ['1:1', '2:2'], 'vpn\_target\_type': [], 'vpn\_target\_value': [], 'vrf': 'vpna', 'vrf\_aftype': ['ipv4uni', 'ipv6uni']} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'evpn': 'none', 'state': 'present', 'vpn\_targe\_state': 'absent', 'vpn\_target\_type': 'none', 'vpn\_target\_value': 'none', 'vrf': 'vpna', 'vrf\_aftype': 'v4'} |
| **updates** list / elements=string | always | command list sent to the device **Sample:** ['ip vpn-instance vpna', 'vpn-target 3:3 import\_extcommunity'] |
### Authors
* Yang yang (@QijunPan)
ansible community.network.avi_ipaddrgroup β Module for setup of IpAddrGroup Avi RESTful Object community.network.avi\_ipaddrgroup β Module for setup of IpAddrGroup Avi RESTful Object
=======================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_ipaddrgroup`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure IpAddrGroup object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **addrs** string | | Configure ip address(es). |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **apic\_epg\_name** string | | Populate ip addresses from members of this cisco apic epg. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **country\_codes** string | | Populate the ip address ranges from the geo database for this country. |
| **description** string | | User defined description for the object. |
| **ip\_ports** string | | Configure (ip address, port) tuple(s). |
| **marathon\_app\_name** string | | Populate ip addresses from tasks of this marathon app. |
| **marathon\_service\_port** string | | 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** string / required | | Name of the ip address group. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **prefixes** string | | Configure ip address prefix(es). |
| **ranges** string | | Configure ip address range(s). |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the ip address group. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create an IP Address Group configuration
community.network.avi_ipaddrgroup:
controller: '{{ controller }}'
username: '{{ username }}'
password: '{{ 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 Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | IpAddrGroup (api/ipaddrgroup) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#3453465547405b535d121707030f121701060f1217000c0f55425d5a5140435b465f47121700020f575b59)>
| programming_docs |
ansible community.network.sros_rollback β Configure Nokia SR OS rollback community.network.sros\_rollback β Configure Nokia SR OS rollback
=================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.sros_rollback`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Configure the rollback feature on remote Nokia devices running the SR OS operating system. this module provides a stateful implementation for managing the configuration of the rollback feature
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **local\_max\_checkpoints** string | | The *local\_max\_checkpoints* argument configures the maximum number of rollback files that can be saved on the devices local compact flash. Valid values for this argument are in the range of 1 to 50 |
| **provider** dictionary | | A dict object containing connection details. |
| | **host** string / required | | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
| | **port** integer | **Default:**22 | Specifies the port to use when building the connection to the remote device. |
| | **ssh\_keyfile** path | | Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
| | **timeout** integer | **Default:**10 | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
| | **username** string | | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
| **remote\_max\_checkpoints** string | | The *remote\_max\_checkpoints* argument configures the maximum number of rollback files that can be transferred and saved to a remote location. Valid values for this argument are in the range of 1 to 50 |
| **rescue\_location** string | | The *rescue\_location* specifies the location of the rescue file. This argument supports any valid local or remote URL as specified in SR OS |
| **rollback\_location** string | | The *rollback\_location* specifies the location and filename of the rollback checkpoint files. This argument supports any valid local or remote URL as specified in SR OS |
| **state** string | **Choices:*** **present** β
* absent
| The *state* argument specifies the state of the configuration entries in the devices active configuration. When the state value is set to `true` the configuration is present in the devices active configuration. When the state value is set to `false` the configuration values are removed from the devices active configuration. |
Notes
-----
Note
* For more information on using Ansible to manage Nokia SR OS Network devices see <https://www.ansible.com/ansible-nokia>.
Examples
--------
```
# Note: examples below use the following provider dict to handle
# transport and authentication to the node.
---
vars:
cli:
host: "{{ inventory_hostname }}"
username: admin
password: admin
transport: cli
---
- name: Configure rollback location
community.network.sros_rollback:
rollback_location: "cb3:/ansible"
provider: "{{ cli }}"
- name: Remove all rollback configuration
community.network.sros_rollback:
state: absent
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **updates** list / elements=string | always | The set of commands that will be pushed to the remote device **Sample:** ['...', '...'] |
### Authors
* Peter Sprygada (@privateip)
ansible community.network.avi_poolgroup β Module for setup of PoolGroup Avi RESTful Object community.network.avi\_poolgroup β Module for setup of PoolGroup Avi RESTful Object
===================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_poolgroup`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure PoolGroup object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **cloud\_config\_cksum** string | | Checksum of cloud configuration for poolgroup. Internally set by cloud connector. |
| **cloud\_ref** string | | It is a reference to an object of type cloud. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **created\_by** string | | Name of the user who created the object. |
| **deployment\_policy\_ref** string | | When setup autoscale manager will automatically promote new pools into production when deployment goals are met. It is a reference to an object of type poolgroupdeploymentpolicy. |
| **description** string | | Description of pool group. |
| **fail\_action** string | | Enable an action - close connection, http redirect, or local http response - when a pool group failure happens. By default, a connection will be closed, in case the pool group experiences a failure. |
| **implicit\_priority\_labels** boolean | **Choices:*** no
* yes
| Whether an implicit set of priority labels is generated. Field introduced in 17.1.9,17.2.3. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **members** string | | List of pool group members object of type poolgroupmember. |
| **min\_servers** string | | The minimum number of servers to distribute traffic to. Allowed values are 1-65535. Special values are 0 - 'disable'. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **name** string / required | | The name of the pool group. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **priority\_labels\_ref** string | | Uuid of the priority labels. If not provided, pool group member priority label will be interpreted as a number with a larger number considered higher priority. It is a reference to an object of type prioritylabels. |
| **service\_metadata** string | | Metadata pertaining to the service provided by this poolgroup. In openshift/kubernetes environments, app metadata info is stored. Any user input to this field will be overwritten by avi vantage. Field introduced in 17.2.14,18.1.5,18.2.1. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the pool group. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create PoolGroup object
community.network.avi_poolgroup:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_poolgroup
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | PoolGroup (api/poolgroup) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#385f4a594b4c575f511e1b0b0f031e1b0d0a031e1b0c0003594e51565d4c4f574a534b1e1b0c0e035b5755)>
ansible community.network.ce_ospf β Manages configuration of an OSPF instance on HUAWEI CloudEngine switches. community.network.ce\_ospf β Manages configuration of an OSPF instance on HUAWEI CloudEngine switches.
======================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_ospf`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages configuration of an OSPF instance on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **addr** string | | Specifies the address of the network segment where the interface resides. The value is in dotted decimal notation. |
| **area** string | | Specifies the area ID. The area with the area-id being 0 is a backbone area. Valid values are a string, formatted as an IP address (i.e. "0.0.0.0") or as an integer between 1 and 4294967295. |
| **auth\_key\_id** string | | Authentication key id when `auth_mode` is 'hmac-sha256', 'md5' or 'hmac-md5. Valid value is an integer is in the range from 1 to 255. |
| **auth\_mode** string | **Choices:*** none
* hmac-sha256
* md5
* hmac-md5
* simple
| Specifies the authentication type. |
| **auth\_text\_md5** string | | Specifies a password for MD5, HMAC-MD5, or HMAC-SHA256 authentication. The value is a string of 1 to 255 case-sensitive characters, spaces not supported. |
| **auth\_text\_simple** string | | Specifies a password for simple authentication. The value is a string of 1 to 8 characters. |
| **mask** string | | IP network wildcard bits in decimal format between 0 and 32. |
| **max\_load\_balance** string | | The maximum number of paths for forward packets over multiple paths. Valid value is an integer in the range from 1 to 64. |
| **nexthop\_addr** string | | IPv4 address for configure next-hop address's weight. Valid values are a string, formatted as an IP address. |
| **nexthop\_weight** string | | Indicates the weight of the next hop. The smaller the value is, the higher the preference of the route is. It is an integer that ranges from 1 to 254. |
| **process\_id** string / required | | Specifies a process ID. The value is an integer ranging from 1 to 4294967295. |
| **state** string | **Choices:*** **present** β
* absent
| Determines whether the config should be present or not on the device. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Ospf module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Configure ospf
community.network.ce_ospf:
process_id: 1
area: 100
state: present
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | verbose mode | k/v pairs of configuration after module execution **Sample:** {'areas': [{'areaId': '0.0.0.100', 'areaType': 'Normal'}], 'max\_load\_balance': '32', 'nexthops': [], 'process\_id': '1'} |
| **existing** dictionary | verbose mode | k/v pairs of existing configuration **Sample:** {'areas': [], 'max\_load\_balance': '32', 'nexthops': [], 'process\_id': '1'} |
| **proposed** dictionary | verbose mode | k/v pairs of parameters passed into module **Sample:** {'area': '100', 'process\_id': '1'} |
| **updates** list / elements=string | always | commands sent to the device **Sample:** ['ospf 1', 'area 0.0.0.100'] |
### Authors
* QijunPan (@QijunPan)
ansible community.network.ce_interface_ospf β Manages configuration of an OSPF interface instanceon HUAWEI CloudEngine switches. community.network.ce\_interface\_ospf β Manages configuration of an OSPF interface instanceon HUAWEI CloudEngine switches.
==========================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_interface_ospf`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages configuration of an OSPF interface instanceon HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **area** string / required | | Ospf area associated with this ospf process. Valid values are a string, formatted as an IP address (i.e. "0.0.0.0") or as an integer between 1 and 4294967295. |
| **auth\_key\_id** string | | Authentication key id when `auth_mode` is 'hmac-sha256', 'md5' or 'hmac-md5. Valid value is an integer is in the range from 1 to 255. |
| **auth\_mode** string | **Choices:*** none
* null
* hmac-sha256
* md5
* hmac-md5
* simple
| Specifies the authentication type. |
| **auth\_text\_md5** string | | Specifies a password for MD5, HMAC-MD5, or HMAC-SHA256 authentication. The value is a string of 1 to 255 case-sensitive characters, spaces not supported. |
| **auth\_text\_simple** string | | Specifies a password for simple authentication. The value is a string of 1 to 8 characters. |
| **cost** string | | The cost associated with this interface. Valid values are an integer in the range from 1 to 65535. |
| **dead\_interval** string | | Time interval an ospf neighbor waits for a hello packet before tearing down adjacencies. Valid values are an integer in the range from 1 to 235926000. |
| **hello\_interval** string | | Time between sending successive hello packets. Valid values are an integer in the range from 1 to 65535. |
| **interface** string / required | | Full name of interface, i.e. 40GE1/0/10. |
| **process\_id** string / required | | Specifies a process ID. The value is an integer ranging from 1 to 4294967295. |
| **silent\_interface** boolean | **Choices:*** **no** β
* yes
| Setting to true will prevent this interface from receiving HELLO packets. Valid values are 'true' and 'false'. |
| **state** string | **Choices:*** **present** β
* absent
| Determines whether the config should be present or not on the device. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Eth_trunk module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Enables OSPF and sets the cost on an interface
community.network.ce_interface_ospf:
interface: 10GE1/0/30
process_id: 1
area: 100
cost: 100
provider: '{{ cli }}'
- name: Sets the dead interval of the OSPF neighbor
community.network.ce_interface_ospf:
interface: 10GE1/0/30
process_id: 1
area: 100
dead_interval: 100
provider: '{{ cli }}'
- name: Sets the interval for sending Hello packets on an interface
community.network.ce_interface_ospf:
interface: 10GE1/0/30
process_id: 1
area: 100
hello_interval: 2
provider: '{{ cli }}'
- name: Disables an interface from receiving and sending OSPF packets
community.network.ce_interface_ospf:
interface: 10GE1/0/30
process_id: 1
area: 100
silent_interface: true
provider: '{{ cli }}'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | verbose mode | k/v pairs of configuration after module execution **Sample:** {'area': '0.0.0.100', 'auth\_mode': 'none', 'cost': '100', 'dead\_interval': '40', 'hello\_interval': '10', 'interface': '10GE1/0/30', 'process\_id': '1', 'silent\_interface': 'false'} |
| **existing** dictionary | verbose mode | k/v pairs of existing configuration **Sample:** {'area': '0.0.0.100', 'process\_id': '1'} |
| **proposed** dictionary | verbose mode | k/v pairs of parameters passed into module **Sample:** {'area': '0.0.0.100', 'cost': '100', 'interface': '10GE1/0/30', 'process\_id': '1'} |
| **updates** list / elements=string | always | commands sent to the device **Sample:** ['interface 10GE1/0/30', 'ospf enable 1 area 0.0.0.100', 'ospf cost 100'] |
### Authors
* QijunPan (@QijunPan)
| programming_docs |
ansible community.network.cnos_logging β Manage logging on network devices community.network.cnos\_logging β Manage logging on network devices
===================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_logging`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of logging on Cisco Cnos devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate** string | | List of logging definitions. |
| **dest** string | **Choices:*** server
* console
* monitor
* logfile
| Destination of the logs. Lenovo uses the term server instead of host in its CLI. |
| **facility** string | | Set logging facility. This is applicable only for server logging |
| **level** string | **Default:**5 | Set logging severity levels. 0-emerg;1-alert;2-crit;3-err;4-warn; 5-notif;6-inform;7-debug |
| **name** string | | If value of `dest` is *file* it indicates file-name and for *server* indicates the server name to be notified. |
| **size** string | **Default:**10485760 | Size of buffer. The acceptable value is in range from 4096 to 4294967295 bytes. |
| **state** string | **Choices:*** **present** β
* absent
| State of the logging configuration. |
Notes
-----
Note
* Tested against CNOS 10.9.1
Examples
--------
```
- name: Configure server logging
community.network.cnos_logging:
dest: server
name: 10.241.107.224
facility: local7
state: present
- name: Remove server logging configuration
community.network.cnos_logging:
dest: server
name: 10.241.107.224
state: absent
- name: Configure console logging level and facility
community.network.cnos_logging:
dest: console
level: 7
state: present
- name: Configure buffer size
community.network.cnos_logging:
dest: logfile
level: 5
name: testfile
size: 5000
- name: Configure logging using aggregate
community.network.cnos_logging:
aggregate:
- { dest: console, level: 6 }
- { dest: logfile, size: 9000 }
- name: Remove logging using aggregate
community.network.cnos_logging:
aggregate:
- { dest: console, level: 6 }
- { dest: logfile, name: anil, size: 9000 }
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always | The list of configuration mode commands to send to the device **Sample:** ['logging console 7', 'logging server 10.241.107.224'] |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
ansible community.network.avi_useraccount β Avi UserAccount Module community.network.avi\_useraccount β Avi UserAccount Module
===========================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_useraccount`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used for updating the password of a user.
* This module is useful for setting up admin password for Controller bootstrap.
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **force\_change** string | **Default:**"no" | If specifically set to true then old password is tried first for controller and then the new password is tried. If not specified this flag then the new password is tried first. |
| **old\_password** string | | Old password for update password or default password for bootstrap. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Update user password
community.network.avi_useraccount:
controller: ""
username: ""
password: new_password
old_password: ""
api_version: ""
force_change: false
- name: Update user password using avi_credentials
community.network.avi_useraccount:
avi_credentials: ""
old_password: ""
force_change: false
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | Avi REST resource |
### Authors
* Chaitanya Deshpande (@chaitanyaavi) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#b8dbd0d9d1ccd9d6c1d99e9b8c8e83dcddcbd0c8d9d6dcdd9e9b8b8f839e9b8d8a839e9b8c8083d9ced1d6ddcccfd7cad3cb9e9b8c8e83dbd7d5)>
ansible community.network.ce_vxlan_arp β Manages ARP attributes of VXLAN on HUAWEI CloudEngine devices. community.network.ce\_vxlan\_arp β Manages ARP attributes of VXLAN on HUAWEI CloudEngine devices.
=================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_vxlan_arp`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages ARP attributes of VXLAN on HUAWEI CloudEngine devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **arp\_collect\_host** string | **Choices:*** enable
* disable
| Enables EVN BGP or BGP EVPN to collect host information. |
| **arp\_suppress** string | **Choices:*** enable
* disable
| Enables ARP broadcast suppression in a BD. |
| **bridge\_domain\_id** string | | Specifies a BD(bridge domain) ID. The value is an integer ranging from 1 to 16777215. |
| **evn\_bgp** string | **Choices:*** enable
* disable
| Enables EVN BGP. |
| **evn\_peer\_ip** string | | Specifies the IP address of an EVN BGP peer. The value is in dotted decimal notation. |
| **evn\_reflect\_client** string | **Choices:*** enable
* disable
| Configures the local device as the route reflector (RR) and its peer as the client. |
| **evn\_server** string | **Choices:*** enable
* disable
| Configures the local device as the router reflector (RR) on the EVN network. |
| **evn\_source\_ip** string | | Specifies the source address of an EVN BGP peer. The value is in dotted decimal notation. |
| **host\_collect\_protocol** string | **Choices:*** bgp
* none
| Enables EVN BGP or BGP EVPN to advertise host information. |
| **state** string | **Choices:*** **present** β
* absent
| Determines whether the config should be present or not on the device. |
| **vbdif\_name** string | | Full name of VBDIF interface, i.e. Vbdif100. |
Notes
-----
Note
* Recommended connection is `network_cli`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Vxlan arp module test
hosts: ce128
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Configure EVN BGP on Layer 2 and Layer 3 VXLAN gateways to establish EVN BGP peer relationships.
community.network.ce_vxlan_arp:
evn_bgp: enable
evn_source_ip: 6.6.6.6
evn_peer_ip: 7.7.7.7
provider: "{{ cli }}"
- name: Configure a Layer 3 VXLAN gateway as a BGP RR.
community.network.ce_vxlan_arp:
evn_bgp: enable
evn_server: enable
provider: "{{ cli }}"
- name: Enable EVN BGP on a Layer 3 VXLAN gateway to collect host information.
community.network.ce_vxlan_arp:
vbdif_name: Vbdif100
arp_collect_host: enable
provider: "{{ cli }}"
- name: Enable Layer 2 and Layer 3 VXLAN gateways to use EVN BGP to advertise host information.
community.network.ce_vxlan_arp:
host_collect_protocol: bgp
provider: "{{ cli }}"
- name: Enable ARP broadcast suppression on a Layer 2 VXLAN gateway.
community.network.ce_vxlan_arp:
bridge_domain_id: 100
arp_suppress: enable
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | verbose mode | k/v pairs of configuration after module execution **Sample:** {'evn\_bgp': 'enable', 'evn\_peer\_ip': ['7.7.7.7'], 'evn\_source\_ip': '6.6.6.6'} |
| **existing** dictionary | verbose mode | k/v pairs of existing configuration **Sample:** {'evn\_bgp': 'disable', 'evn\_peer\_ip': [], 'evn\_source\_ip': None} |
| **proposed** dictionary | verbose mode | k/v pairs of parameters passed into module **Sample:** {'evn\_bgp': 'enable', 'evn\_peer\_ip': '7.7.7.7', 'evn\_source\_ip': '6.6.6.6', 'state': 'present'} |
| **updates** list / elements=string | always | commands sent to the device **Sample:** ['evn bgp', 'source-address 6.6.6.6', 'peer 7.7.7.7'] |
### Authors
* QijunPan (@QijunPan)
ansible community.network.avi_trafficcloneprofile β Module for setup of TrafficCloneProfile Avi RESTful Object community.network.avi\_trafficcloneprofile β Module for setup of TrafficCloneProfile Avi RESTful Object
=======================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_trafficcloneprofile`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure TrafficCloneProfile object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **clone\_servers** string | | Field introduced in 17.1.1. |
| **cloud\_ref** string | | It is a reference to an object of type cloud. Field introduced in 17.1.1. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **name** string / required | | Name for the traffic clone profile. Field introduced in 17.1.1. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **preserve\_client\_ip** boolean | **Choices:*** no
* yes
| Specifies if client ip needs to be preserved to clone destination. Field introduced in 17.1.1. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. Field introduced in 17.1.1. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the traffic clone profile. Field introduced in 17.1.1. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create TrafficCloneProfile object
community.network.avi_trafficcloneprofile:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_trafficcloneprofile
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | TrafficCloneProfile (api/trafficcloneprofile) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#ea8d988b999e858d83ccc9d9ddd1ccc9dfd8d1ccc9ded2d18b9c83848f9e9d85988199ccc9dedcd1898587)>
ansible community.network.pn_access_list β CLI command to create/delete access-list community.network.pn\_access\_list β CLI command to create/delete access-list
=============================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_access_list`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to create and delete an access list.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_name** string | | Access List Name. |
| **pn\_scope** string | **Choices:*** local
* fabric
| scope. Available valid values - local or fabric. |
| **state** string / required | **Choices:*** present
* absent
| State the action to perform. Use 'present' to create access-list and 'absent' to delete access-list. |
Examples
--------
```
- name: Access list functionality
community.network.pn_access_list:
pn_cliswitch: "sw01"
pn_name: "foo"
pn_scope: "local"
state: "present"
- name: Access list functionality
community.network.pn_access_list:
pn_cliswitch: "sw01"
pn_name: "foo"
pn_scope: "local"
state: "absent"
- name: Access list functionality
community.network.pn_access_list:
pn_cliswitch: "sw01"
pn_name: "foo"
pn_scope: "fabric"
state: "present"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the access-list command. |
| **stdout** list / elements=string | always | set of responses from the access-list command. |
### Authors
* Pluribus Networks (@amitsi)
| programming_docs |
ansible community.network.pn_vrouter_bgp β CLI command to add/modify/remove vrouter-bgp community.network.pn\_vrouter\_bgp β CLI command to add/modify/remove vrouter-bgp
=================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_vrouter_bgp`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to add Border Gateway Protocol neighbor to a vRouter modify Border Gateway Protocol neighbor to a vRouter and remove Border Gateway Protocol neighbor from a vRouter.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_advertisement\_interval** string | | Minimum interval between sending BGP routing updates. |
| **pn\_allowas\_in** boolean | **Choices:*** no
* yes
| Allow/reject routes with local AS in AS\_PATH. |
| **pn\_bfd** boolean | **Choices:*** **no** β
* yes
| BFD protocol support for fault detection. |
| **pn\_bfd\_multihop** boolean | **Choices:*** no
* yes
| always use BFD multi-hop port for fault detection. |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_connect\_retry\_interval** string | | BGP Connect retry interval (seconds). |
| **pn\_default\_originate** boolean | **Choices:*** no
* yes
| announce default routes to the neighbor or not. |
| **pn\_ebgp\_multihop** string | | value for external BGP from 1 to 255. |
| **pn\_interface** string | | Interface to reach the neighbor. |
| **pn\_max\_prefix** string | | maximum number of prefixes. |
| **pn\_max\_prefix\_warn\_only** boolean | **Choices:*** no
* yes
| warn if the maximum number of prefixes is exceeded. |
| **pn\_multi\_protocol** string | **Choices:*** ipv4-unicast
* ipv6-unicast
| Multi-protocol features. |
| **pn\_neighbor** string / required | | IP address for BGP neighbor. |
| **pn\_neighbor\_holdtime** string | | BGP Holdtime (seconds). |
| **pn\_neighbor\_keepalive\_interval** string | | BGP Keepalive interval (seconds). |
| **pn\_next\_hop\_self** boolean | **Choices:*** no
* yes
| BGP next hop is self or not. |
| **pn\_no\_route\_map\_in** string | | Remove ingress route-map from BGP neighbor. |
| **pn\_no\_route\_map\_out** string | | Remove egress route-map from BGP neighbor. |
| **pn\_override\_capability** boolean | **Choices:*** no
* yes
| override capability. |
| **pn\_password** string | | password for MD5 BGP. |
| **pn\_prefix\_list\_in** string | | prefixes used for filtering. |
| **pn\_prefix\_list\_out** string | | prefixes used for filtering outgoing packets. |
| **pn\_remote\_as** string | | BGP remote AS from 1 to 4294967295. |
| **pn\_route\_map\_in** string | | route map in for nbr. |
| **pn\_route\_map\_out** string | | route map out for nbr. |
| **pn\_route\_reflector\_client** boolean | **Choices:*** no
* yes
| set as route reflector client. |
| **pn\_send\_community** boolean | **Choices:*** no
* yes
| send any community attribute to neighbor. |
| **pn\_soft\_reconfig\_inbound** boolean | **Choices:*** no
* yes
| soft reset to reconfigure inbound traffic. |
| **pn\_update\_source** string | | IP address of BGP packets required for peering over loopback interface. |
| **pn\_vrouter\_name** string / required | | name of service config. |
| **pn\_weight** string | | default weight value between 0 and 65535 for the neighbor's routes. |
| **state** string | **Choices:*** **present** β
* absent
* update
| vrouter-bgp configuration command. |
Examples
--------
```
- name: "Add BGP to vRouter"
community.network.pn_vrouter_bgp:
state: 'present'
pn_vrouter_name: 'sw01-vrouter'
pn_neighbor: '105.104.104.1'
pn_remote_as: 65000
pn_bfd: true
- name: "Remove BGP to vRouter"
community.network.pn_vrouter_bgp:
state: 'absent'
pn_vrouter_name: 'sw01-vrouter'
pn_neighbor: '105.104.104.1'
- name: "Modify BGP to vRouter"
community.network.pn_vrouter_bgp:
state: 'update'
pn_vrouter_name: 'sw01-vrouter'
pn_neighbor: '105.104.104.1'
pn_remote_as: 65000
pn_bfd: false
pn_allowas_in: true
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the vrouter-bgp command. |
| **stdout** list / elements=string | always | set of responses from the vrouter-bgp command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.edgeos_facts β Collect facts from remote devices running EdgeOS community.network.edgeos\_facts β Collect facts from remote devices running EdgeOS
==================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.edgeos_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Collects a base set of device facts from a remote device that is running EdgeOS. This module prepends all of the base network fact keys with ansible\_net\_<fact>. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **gather\_subset** string | **Default:**"!config" | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, default, config, and neighbors. Can specify a list of values to include a larger subset. Values can also be used with an initial `!` to specify that a specific subset should not be collected. |
Notes
-----
Note
* Tested against EdgeOS 1.9.7
Examples
--------
```
- name: Collect all facts from the device
community.network.edgeos_facts:
gather_subset: all
- name: Collect only the config and default facts
community.network.edgeos_facts:
gather_subset: config
- name: Collect everything exception the config
community.network.edgeos_facts:
gather_subset: "!config"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ansible\_net\_commits** list / elements=string | when present | The set of available configuration revisions |
| **ansible\_net\_config** string | when config is configured | The running-config from the device |
| **ansible\_net\_gather\_subset** list / elements=string | always | The list of subsets gathered by the module |
| **ansible\_net\_hostname** string | always | The configured system hostname |
| **ansible\_net\_model** string | always | The device model string |
| **ansible\_net\_neighbors** list / elements=string | when interface is configured | The set of LLDP neighbors |
| **ansible\_net\_serialnum** string | always | The serial number of the device |
| **ansible\_net\_version** string | always | The version of the software running |
### Authors
* Nathaniel Case (@Qalthos)
* Sam Doran (@samdoran)
ansible community.network.avi_cloudproperties β Module for setup of CloudProperties Avi RESTful Object community.network.avi\_cloudproperties β Module for setup of CloudProperties Avi RESTful Object
===============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_cloudproperties`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure CloudProperties object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **cc\_props** string | | Cloudconnector properties. |
| **cc\_vtypes** string | | 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, CLOUD\_AZURE, CLOUD\_GCP. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **hyp\_props** string | | Hypervisor properties. |
| **info** string | | Properties specific to a cloud type. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create CloudProperties object
community.network.avi_cloudproperties:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_cloudproperties
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | CloudProperties (api/cloudproperties) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#4324312230372c242a656070747865607671786560777b7822352a2d2637342c3128306560777578202c2e)>
ansible community.network.ce_snmp_user β Manages SNMP user configuration on HUAWEI CloudEngine switches. community.network.ce\_snmp\_user β Manages SNMP user configuration on HUAWEI CloudEngine switches.
==================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_snmp_user`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages SNMP user configurations on CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aaa\_local\_user** string | | Unique name to identify the local user. |
| **acl\_number** string | | Access control list number. |
| **auth\_key** string | | The authentication password. Password length, 8-255 characters. |
| **auth\_protocol** string | **Choices:*** noAuth
* md5
* sha
| Authentication protocol. |
| **priv\_key** string | | The encryption password. Password length 8-255 characters. |
| **priv\_protocol** string | **Choices:*** noPriv
* des56
* 3des168
* aes128
* aes192
* aes256
| Encryption protocol. |
| **remote\_engine\_id** string | | Remote engine id of the USM user. |
| **user\_group** string | | Name of the group where user belongs to. |
| **usm\_user\_name** string | | Unique name to identify the USM user. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: CloudEngine snmp user test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Config SNMP usm user"
community.network.ce_snmp_user:
state: present
usm_user_name: wdz_snmp
remote_engine_id: 800007DB03389222111200
acl_number: 2000
user_group: wdz_group
provider: "{{ cli }}"
- name: "Undo SNMP usm user"
community.network.ce_snmp_user:
state: absent
usm_user_name: wdz_snmp
remote_engine_id: 800007DB03389222111200
acl_number: 2000
user_group: wdz_group
provider: "{{ cli }}"
- name: "Config SNMP local user"
community.network.ce_snmp_user:
state: present
aaa_local_user: wdz_user
auth_protocol: md5
auth_key: huawei123
priv_protocol: des56
priv_key: huawei123
provider: "{{ cli }}"
- name: "Config SNMP local user"
community.network.ce_snmp_user:
state: absent
aaa_local_user: wdz_user
auth_protocol: md5
auth_key: huawei123
priv_protocol: des56
priv_key: huawei123
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution **Sample:** {'snmp local user': {'local\_user\_info': []}, 'snmp usm user': {'usm\_user\_info': [{'aclNumber': '2000', 'engineID': '800007DB03389222111200', 'groupName': 'wdz\_group', 'userName': 'wdz\_snmp'}]}} |
| **existing** dictionary | always | k/v pairs of existing aaa server **Sample:** {'snmp local user': {'local\_user\_info': []}, 'snmp usm user': {'usm\_user\_info': []}} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'acl\_number': '2000', 'remote\_engine\_id': '800007DB03389222111200', 'state': 'present', 'user\_group': 'wdz\_group', 'usm\_user\_name': 'wdz\_snmp'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['snmp-agent remote-engineid 800007DB03389222111200 usm-user v3 wdz\_snmp wdz\_group acl 2000'] |
### Authors
* wangdezhuang (@QijunPan)
ansible community.network.cnos β Use cnos cliconf to run command on Lenovo CNOS platform community.network.cnos β Use cnos cliconf to run command on Lenovo CNOS platform
================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos`.
Synopsis
--------
* This cnos plugin provides low level abstraction apis for sending and receiving CLI commands from Lenovo CNOS network devices.
### Authors
* Unknown (!UNKNOWN)
ansible community.network.cnos_backup β Backup the current running or startup configuration to a remote server on devices running Lenovo CNOS community.network.cnos\_backup β Backup the current running or startup configuration to a remote server on devices running Lenovo CNOS
======================================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_backup`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module allows you to work with switch configurations. It provides a way to back up the running or startup configurations of a switch to a remote server. This is achieved by periodically saving a copy of the startup or running configuration of the network device to a remote server using FTP, SFTP, TFTP, or SCP. The first step is to create a directory from where the remote server can be reached. The next step is to provide the full file path of the location where the configuration will be backed up. Authentication details required by the remote server must be provided as well. This module uses SSH to manage network device configuration. The results of the operation will be placed in a directory named βresultsβ that must be created by the user in their local directory to where the playbook is run.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **configType** string / required | **Choices:*** running-config
* startup-config
| This specifies what type of configuration will be backed up. The choices are the running or startup configurations. There is no default value, so it will result in an error if the input is incorrect. |
| **deviceType** string / required | **Choices:*** g8272\_cnos
* g8296\_cnos
* g8332\_cnos
* NE0152T
* NE1072T
* NE1032
* NE1032T
* NE10032
* NE2572
| This specifies the type of device where the method is executed. The choices NE1072T,NE1032,NE1032T,NE10032,NE2572 are added since Ansible 2.4. The choice NE0152T is added since 2.8 |
| **enablePassword** string | | Configures the password used to enter Global Configuration command mode on the switch. If the switch does not request this password, the parameter is ignored.While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **host** string / required | | This is the variable used to search the hosts file at /etc/ansible/hosts and identify the IP address of the device on which the template is going to be applied. Usually the Ansible keyword {{ inventory\_hostname }} is specified in the playbook as an abstraction of the group of network elements that need to be configured. |
| **outputfile** string / required | | This specifies the file path where the output of each command execution is saved. Each command that is specified in the merged template file and each response from the device are saved here. Usually the location is the results folder, but you can choose another location based on your write permission. |
| **password** string / required | | Configures the password used to authenticate the connection to the remote device. The value of the password parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **protocol** string / required | **Choices:*** SFTP
* SCP
* FTP
* TFTP
| This refers to the protocol used by the network device to interact with the remote server to where to upload the backup configuration. The choices are FTP, SFTP, TFTP, or SCP. Any other protocols will result in error. If this parameter is not specified, there is no default value to be used. |
| **rcpath** string / required | | This specifies the full file path where the configuration file will be copied on the remote server. In case the relative path is used as the variable value, the root folder for the user of the server needs to be specified. |
| **rcserverip** string / required | | -This specifies the IP Address of the remote server to where the configuration will be backed up. |
| **serverpassword** string / required | | Specify the password for the server relating to the protocol used. |
| **serverusername** string / required | | Specify the username for the server relating to the protocol used. |
| **username** string / required | | Configures the username used to authenticate the connection to the remote device. The value of the username parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
Notes
-----
Note
* For more information on using Ansible to manage Lenovo Network devices see <https://www.ansible.com/ansible-lenovo>.
Examples
--------
```
Tasks : The following are examples of using the module cnos_backup.
These are written in the main.yml file of the tasks directory.
---
- name: Test Running Config Backup
community.network.cnos_backup:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_backup_{{ inventory_hostname }}_output.txt"
configType: running-config
protocol: "sftp"
serverip: "10.241.106.118"
rcpath: "/root/cnos/G8272-running-config.txt"
serverusername: "root"
serverpassword: "root123"
- name: Test Startup Config Backup
community.network.cnos_backup:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_backup_{{ inventory_hostname }}_output.txt"
configType: startup-config
protocol: "sftp"
serverip: "10.241.106.118"
rcpath: "/root/cnos/G8272-startup-config.txt"
serverusername: "root"
serverpassword: "root123"
- name: Test Running Config Backup -TFTP
community.network.cnos_backup:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_backup_{{ inventory_hostname }}_output.txt"
configType: running-config
protocol: "tftp"
serverip: "10.241.106.118"
rcpath: "/anil/G8272-running-config.txt"
serverusername: "root"
serverpassword: "root123"
- name: Test Startup Config Backup - TFTP
community.network.cnos_backup:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_backup_{{ inventory_hostname }}_output.txt"
configType: startup-config
protocol: "tftp"
serverip: "10.241.106.118"
rcpath: "/anil/G8272-startup-config.txt"
serverusername: "root"
serverpassword: "root123"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | always | Success or failure message **Sample:** Config file transferred to server |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
| programming_docs |
ansible community.network.pn_prefix_list β CLI command to create/delete prefix-list community.network.pn\_prefix\_list β CLI command to create/delete prefix-list
=============================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_prefix_list`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to create or delete prefix list.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_name** string / required | | Prefix List Name. |
| **pn\_scope** string | **Choices:*** local
* fabric
| scope of prefix-list. |
| **state** string | **Choices:*** **present** β
* absent
| State the action to perform. Use `present` to create prefix-list and `absent` to delete prefix-list. |
Examples
--------
```
- name: Create prefix list
community.network.pn_prefix_list:
pn_cliswitch: "sw01"
pn_name: "foo"
pn_scope: "local"
state: "present"
- name: Delete prefix list
community.network.pn_prefix_list:
pn_cliswitch: "sw01"
pn_name: "foo"
state: "absent"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the prefix-list command. |
| **stdout** list / elements=string | always | set of responses from the prefix-list command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.voss_command β Run commands on remote devices running Extreme VOSS community.network.voss\_command β Run commands on remote devices running Extreme VOSS
=====================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.voss_command`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Sends arbitrary commands to an Extreme VSP device running VOSS, and returns the results read from the device. This module includes an argument that will cause the module to wait for a specific condition before returning or timing out if the condition is not met.
* This module does not support running commands in configuration mode. Please use [community.network.voss\_config](voss_config_module#ansible-collections-community-network-voss-config-module) to configure VOSS devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **commands** string / required | | List of commands to send to the remote VOSS device. The resulting output from the command is returned. If the *wait\_for* argument is provided, the module is not returned until the condition is satisfied or the number of retries has expired. If a command sent to the device requires answering a prompt, it is possible to pass a dict containing *command*, *answer* and *prompt*. Common answers are 'y' or "\r" (carriage return, must be double quotes). See examples. |
| **interval** string | **Default:**1 | Configures the interval in seconds to wait between retries of the command. If the command does not pass the specified conditions, the interval indicates how long to wait before trying the command again. |
| **match** string | **Choices:*** any
* **all** β
| The *match* argument is used in conjunction with the *wait\_for* argument to specify the match policy. Valid values are `all` or `any`. If the value is set to `all` then all conditionals in the wait\_for must be satisfied. If the value is set to `any` then only one of the values must be satisfied. |
| **retries** string | **Default:**10 | Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the *wait\_for* conditions. |
| **wait\_for** string | | List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples. |
Notes
-----
Note
* Tested against VOSS 7.0.0
Examples
--------
```
tasks:
- name: Run show sys software on remote devices
community.network.voss_command:
commands: show sys software
- name: Run show sys software and check to see if output contains VOSS
community.network.voss_command:
commands: show sys software
wait_for: result[0] contains VOSS
- name: Run multiple commands on remote nodes
community.network.voss_command:
commands:
- show sys software
- show interfaces vlan
- name: Run multiple commands and evaluate the output
community.network.voss_command:
commands:
- show sys software
- show interfaces vlan
wait_for:
- result[0] contains Version
- result[1] contains Basic
- name: Run command that requires answering a prompt
community.network.voss_command:
commands:
- command: 'reset'
prompt: 'Are you sure you want to reset the switch? (y/n)'
answer: 'y'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **failed\_conditions** list / elements=string | failed | The list of conditionals that have failed **Sample:** ['...', '...'] |
| **stdout** list / elements=string | always apart from low level errors (such as action plugin) | The set of responses from the commands **Sample:** ['...', '...'] |
| **stdout\_lines** list / elements=string | always apart from low level errors (such as action plugin) | The value of stdout split into a list **Sample:** [['...', '...'], ['...'], ['...']] |
### Authors
* Lindsay Hill (@LindsayHill)
ansible community.network.netscaler_lb_vserver β Manage load balancing vserver configuration community.network.netscaler\_lb\_vserver β Manage load balancing vserver configuration
======================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.netscaler_lb_vserver`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage load balancing vserver configuration
* This module is intended to run either on the ansible control node or a bastion (jumpserver) with access to the actual netscaler instance
Requirements
------------
The below requirements are needed on the host that executes this module.
* nitro python sdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **appflowlog** string | **Choices:*** enabled
* disabled
| Apply AppFlow logging to the virtual server. |
| **authentication** boolean | **Choices:*** no
* yes
| Enable or disable user authentication. |
| **authenticationhost** string | | Fully qualified domain name (FQDN) of the authentication virtual server to which the user must be redirected for authentication. Make sure that the Authentication parameter is set to `yes`. Minimum length = 3 Maximum length = 252 |
| **authn401** boolean | **Choices:*** no
* yes
| Enable or disable user authentication with HTTP 401 responses. |
| **authnprofile** string | | Name of the authentication profile to be used when authentication is turned on. |
| **authnvsname** string | | Name of an authentication virtual server with which to authenticate users. Minimum length = 1 Maximum length = 252 |
| **backuplbmethod** string | **Choices:*** ROUNDROBIN
* LEASTCONNECTION
* LEASTRESPONSETIME
* SOURCEIPHASH
* LEASTBANDWIDTH
* LEASTPACKETS
* CUSTOMLOAD
| Backup load balancing method. Becomes operational if the primary load balancing me thod fails or cannot be used. Valid only if the primary method is based on static proximity. |
| **backuppersistencetimeout** string | | Time period for which backup persistence is in effect. Minimum value = `2`
Maximum value = `1440`
|
| **bypassaaaa** boolean | **Choices:*** no
* yes
| If this option is enabled while resolving DNS64 query AAAA queries are not sent to back end dns server. |
| **cacheable** boolean | **Choices:*** no
* yes
| Route cacheable requests to a cache redirection virtual server. The load balancing virtual server can forward requests only to a transparent cache redirection virtual server that has an IP address and port combination of \*:80, so such a cache redirection virtual server must be configured on the appliance. |
| **clttimeout** string | | Idle time, in seconds, after which a client connection is terminated. Minimum value = `0`
Maximum value = `31536000`
|
| **comment** string | | Any comments that you might want to associate with the virtual server. |
| **connfailover** string | **Choices:*** DISABLED
* STATEFUL
* STATELESS
| Mode in which the connection failover feature must operate for the virtual server. After a failover, established TCP connections and UDP packet flows are kept active and resumed on the secondary appliance. Clients remain connected to the same servers. Available settings function as follows: \* `STATEFUL` - The primary appliance shares state information with the secondary appliance, in real time, resulting in some runtime processing overhead. \* `STATELESS` - State information is not shared, and the new primary appliance tries to re-create the packet flow on the basis of the information contained in the packets it receives. \* `DISABLED` - Connection failover does not occur. |
| **cookiename** string | | Use this parameter to specify the cookie name for `COOKIE` persistence type. It specifies the name of cookie with a maximum of 32 characters. If not specified, cookie name is internally generated. |
| **datalength** string | | Length of the token to be extracted from the data segment of an incoming packet, for use in the token method of load balancing. The length of the token, specified in bytes, must not be greater than 24 KB. Applicable to virtual servers of type TCP. Minimum value = `1`
Maximum value = `100`
|
| **dataoffset** string | | Offset to be considered when extracting a token from the TCP payload. Applicable to virtual servers, of type TCP, using the token method of load balancing. Must be within the first 24 KB of the TCP payload. Minimum value = `0`
Maximum value = `25400`
|
| **dbprofilename** string | | Name of the DB profile whose settings are to be applied to the virtual server. Minimum length = 1 Maximum length = 127 |
| **dbslb** string | **Choices:*** enabled
* disabled
| Enable database specific load balancing for MySQL and MSSQL service types. |
| **disabled** boolean | **Choices:*** **no** β
* yes
| When set to `yes` the lb vserver will be disabled. When set to `no` the lb vserver will be enabled. Note that due to limitations of the underlying NITRO API a `disabled` state change alone does not cause the module result to report a changed status. |
| **disableprimaryondown** string | **Choices:*** enabled
* disabled
| If the primary virtual server goes down, do not allow it to return to primary status until manually enabled. |
| **dns64** string | **Choices:*** enabled
* disabled
| This argument is for enabling/disabling the `dns64` on lbvserver. |
| **dnsprofilename** string | | Name of the DNS profile to be associated with the VServer. DNS profile properties will be applied to the transactions processed by a VServer. This parameter is valid only for DNS and DNS-TCP VServers. Minimum length = 1 Maximum length = 127 |
| **downstateflush** string | **Choices:*** enabled
* disabled
| Flush all active transactions associated with a virtual server whose state transitions from UP to DOWN. Do not enable this option for applications that must complete their transactions. |
| **hashlength** string | | Number of bytes to consider for the hash value used in the URLHASH and DOMAINHASH load balancing methods. Minimum value = `1`
Maximum value = `4096`
|
| **healththreshold** string | | Threshold in percent of active services below which vserver state is made down. If this threshold is 0, vserver state will be up even if one bound service is up. Minimum value = `0`
Maximum value = `100`
|
| **httpprofilename** string | | Name of the HTTP profile whose settings are to be applied to the virtual server. Minimum length = 1 Maximum length = 127 |
| **icmpvsrresponse** string | **Choices:*** PASSIVE
* ACTIVE
| How the NetScaler appliance responds to ping requests received for an IP address that is common to one or more virtual servers. Available settings function as follows: \* If set to `PASSIVE` on all the virtual servers that share the IP address, the appliance always responds to the ping requests. \* If set to `ACTIVE` on all the virtual servers that share the IP address, the appliance responds to the ping requests if at least one of the virtual servers is UP. Otherwise, the appliance does not respond. \* If set to `ACTIVE` on some virtual servers and PASSIVE on the others, the appliance responds if at least one virtual server with the ACTIVE setting is UP. Otherwise, the appliance does not respond. Note: This parameter is available at the virtual server level. A similar parameter, ICMP Response, is available at the IP address level, for IPv4 addresses of type VIP. To set that parameter, use the add ip command in the CLI or the Create IP dialog box in the GUI. |
| **insertvserveripport** string | **Choices:*** OFF
* VIPADDR
* V6TOV4MAPPING
| Insert an HTTP header, whose value is the IP address and port number of the virtual server, before forwarding a request to the server. The format of the header is <vipHeader>: <virtual server IP address>\_<port number >, where vipHeader is the name that you specify for the header. If the virtual server has an IPv6 address, the address in the header is enclosed in brackets ([ and ]) to separate it from the port number. If you have mapped an IPv4 address to a virtual server's IPv6 address, the value of this parameter determines which IP address is inserted in the header, as follows: \* `VIPADDR` - Insert the IP address of the virtual server in the HTTP header regardless of whether the virtual server has an IPv4 address or an IPv6 address. A mapped IPv4 address, if configured, is ignored. \* `V6TOV4MAPPING` - Insert the IPv4 address that is mapped to the virtual server's IPv6 address. If a mapped IPv4 address is not configured, insert the IPv6 address. \* `OFF` - Disable header insertion. |
| **ipmask** string | | IP mask, in dotted decimal notation, for the IP Pattern parameter. Can have leading or trailing non-zero octets (for example, `255.255.240.0` or `0.0.255.255`). Accordingly, the mask specifies whether the first n bits or the last n bits of the destination IP address in a client request are to be matched with the corresponding bits in the IP pattern. The former is called a forward mask. The latter is called a reverse mask. |
| **ippattern** string | | IP address pattern, in dotted decimal notation, for identifying packets to be accepted by the virtual server. The IP Mask parameter specifies which part of the destination IP address is matched against the pattern. Mutually exclusive with the IP Address parameter. For example, if the IP pattern assigned to the virtual server is `198.51.100.0` and the IP mask is `255.255.240.0` (a forward mask), the first 20 bits in the destination IP addresses are matched with the first 20 bits in the pattern. The virtual server accepts requests with IP addresses that range from `198.51.96.1` to `198.51.111.254`. You can also use a pattern such as `0.0.2.2` and a mask such as `0.0.255.255` (a reverse mask). If a destination IP address matches more than one IP pattern, the pattern with the longest match is selected, and the associated virtual server processes the request. For example, if virtual servers `vs1` and `vs2` have the same IP pattern, `0.0.100.128`, but different IP masks of `0.0.255.255` and `0.0.224.255`, a destination IP address of `198.51.100.128` has the longest match with the IP pattern of vs1. If a destination IP address matches two or more virtual servers to the same extent, the request is processed by the virtual server whose port number matches the port number in the request. |
| **ipv46** string | | IPv4 or IPv6 address to assign to the virtual server. |
| **l2conn** boolean | **Choices:*** no
* yes
| Use Layer 2 parameters (channel number, MAC address, and VLAN ID) in addition to the 4-tuple (<source IP>:<source port>::<destination IP>:<destination port>) that is used to identify a connection. Allows multiple TCP and non-TCP connections with the same 4-tuple to co-exist on the NetScaler appliance. |
| **lbmethod** string | **Choices:*** ROUNDROBIN
* LEASTCONNECTION
* LEASTRESPONSETIME
* URLHASH
* DOMAINHASH
* DESTINATIONIPHASH
* SOURCEIPHASH
* SRCIPDESTIPHASH
* LEASTBANDWIDTH
* LEASTPACKETS
* TOKEN
* SRCIPSRCPORTHASH
* LRTM
* CALLIDHASH
* CUSTOMLOAD
* LEASTREQUEST
* AUDITLOGHASH
* STATICPROXIMITY
| Load balancing method. The available settings function as follows: \* `ROUNDROBIN` - Distribute requests in rotation, regardless of the load. Weights can be assigned to services to enforce weighted round robin distribution. \* `LEASTCONNECTION` (default) - Select the service with the fewest connections. \* `LEASTRESPONSETIME` - Select the service with the lowest average response time. \* `LEASTBANDWIDTH` - Select the service currently handling the least traffic. \* `LEASTPACKETS` - Select the service currently serving the lowest number of packets per second. \* `CUSTOMLOAD` - Base service selection on the SNMP metrics obtained by custom load monitors. \* `LRTM` - Select the service with the lowest response time. Response times are learned through monitoring probes. This method also takes the number of active connections into account. Also available are a number of hashing methods, in which the appliance extracts a predetermined portion of the request, creates a hash of the portion, and then checks whether any previous requests had the same hash value. If it finds a match, it forwards the request to the service that served those previous requests. Following are the hashing methods: \* `URLHASH` - Create a hash of the request URL (or part of the URL). \* `DOMAINHASH` - Create a hash of the domain name in the request (or part of the domain name). The domain name is taken from either the URL or the Host header. If the domain name appears in both locations, the URL is preferred. If the request does not contain a domain name, the load balancing method defaults to `LEASTCONNECTION`. \* `DESTINATIONIPHASH` - Create a hash of the destination IP address in the IP header. \* `SOURCEIPHASH` - Create a hash of the source IP address in the IP header. \* `TOKEN` - Extract a token from the request, create a hash of the token, and then select the service to which any previous requests with the same token hash value were sent. \* `SRCIPDESTIPHASH` - Create a hash of the string obtained by concatenating the source IP address and destination IP address in the IP header. \* `SRCIPSRCPORTHASH` - Create a hash of the source IP address and source port in the IP header. \* `CALLIDHASH` - Create a hash of the SIP Call-ID header. |
| **listenpolicy** string | | Default syntax expression identifying traffic accepted by the virtual server. Can be either an expression (for example, `CLIENT.IP.DST.IN_SUBNET(192.0.2.0/24`) or the name of a named expression. In the above example, the virtual server accepts all requests whose destination IP address is in the 192.0.2.0/24 subnet. |
| **listenpriority** string | | Integer specifying the priority of the listen policy. A higher number specifies a lower priority. If a request matches the listen policies of more than one virtual server the virtual server whose listen policy has the highest priority (the lowest priority number) accepts the request. Minimum value = `0`
Maximum value = `101`
|
| **m** string | **Choices:*** IP
* MAC
* IPTUNNEL
* TOS
| Redirection mode for load balancing. Available settings function as follows: \* `IP` - Before forwarding a request to a server, change the destination IP address to the server's IP address. \* `MAC` - Before forwarding a request to a server, change the destination MAC address to the server's MAC address. The destination IP address is not changed. MAC-based redirection mode is used mostly in firewall load balancing deployments. \* `IPTUNNEL` - Perform IP-in-IP encapsulation for client IP packets. In the outer IP headers, set the destination IP address to the IP address of the server and the source IP address to the subnet IP (SNIP). The client IP packets are not modified. Applicable to both IPv4 and IPv6 packets. \* `TOS` - Encode the virtual server's TOS ID in the TOS field of the IP header. You can use either the `IPTUNNEL` or the `TOS` option to implement Direct Server Return (DSR). |
| **macmoderetainvlan** string | **Choices:*** enabled
* disabled
| This option is used to retain vlan information of incoming packet when macmode is enabled. |
| **maxautoscalemembers** string | | Maximum number of members expected to be present when vserver is used in Autoscale. Minimum value = `0`
Maximum value = `5000`
|
| **minautoscalemembers** string | | Minimum number of members expected to be present when vserver is used in Autoscale. Minimum value = `0`
Maximum value = `5000`
|
| **mssqlserverversion** string | **Choices:*** 70
* 2000
* 2000SP1
* 2005
* 2008
* 2008R2
* 2012
* 2014
| For a load balancing virtual server of type `MSSQL`, the Microsoft SQL Server version. Set this parameter if you expect some clients to run a version different from the version of the database. This setting provides compatibility between the client-side and server-side connections by ensuring that all communication conforms to the server's version. |
| **mysqlcharacterset** string | | Character set that the virtual server advertises to clients. |
| **mysqlprotocolversion** string | | MySQL protocol version that the virtual server advertises to clients. |
| **mysqlservercapabilities** string | | Server capabilities that the virtual server advertises to clients. |
| **mysqlserverversion** string | | MySQL server version string that the virtual server advertises to clients. Minimum length = 1 Maximum length = 31 |
| **name** string | | Name for the virtual server. Must begin with an ASCII alphanumeric or underscore `_` character, and must contain only ASCII alphanumeric, underscore, hash `#`, period `.`, space , colon `:`, at sign `@`, equal sign `=`, and hyphen `-` characters. Can be changed after the virtual server is created. Minimum length = 1 |
| **netmask** string | | IPv4 subnet mask to apply to the destination IP address or source IP address when the load balancing method is `DESTINATIONIPHASH` or `SOURCEIPHASH`. Minimum length = 1 |
| **netprofile** string | | Name of the network profile to associate with the virtual server. If you set this parameter, the virtual server uses only the IP addresses in the network profile as source IP addresses when initiating connections with servers. Minimum length = 1 Maximum length = 127 |
| **newservicerequest** string | | Number of requests, or percentage of the load on existing services, by which to increase the load on a new service at each interval in slow-start mode. A non-zero value indicates that slow-start is applicable. A zero value indicates that the global RR startup parameter is applied. Changing the value to zero will cause services currently in slow start to take the full traffic as determined by the LB method. Subsequently, any new services added will use the global RR factor. |
| **newservicerequestincrementinterval** string | | Interval, in seconds, between successive increments in the load on a new service or a service whose state has just changed from DOWN to UP. A value of 0 (zero) specifies manual slow start. Minimum value = `0`
Maximum value = `3600`
|
| **newservicerequestunit** string | **Choices:*** PER\_SECOND
* PERCENT
| Units in which to increment load at each interval in slow-start mode. |
| **nitro\_pass** string / required | | The password with which to authenticate to the netscaler node. |
| **nitro\_protocol** string | **Choices:*** **http** β
* https
| Which protocol to use when accessing the nitro API objects. |
| **nitro\_timeout** float | **Default:**310 | Time in seconds until a timeout error is thrown when establishing a new session with Netscaler |
| **nitro\_user** string / required | | The username with which to authenticate to the netscaler node. |
| **nsip** string / required | | The ip address of the netscaler appliance where the nitro API calls will be made. The port can be specified with the colon (:). E.g. 192.168.1.1:555. |
| **oracleserverversion** string | **Choices:*** 10G
* 11G
| Oracle server version. |
| **persistavpno** string | | Persist AVP number for Diameter Persistency. In case this AVP is not defined in Base RFC 3588 and it is nested inside a Grouped AVP, define a sequence of AVP numbers (max 3) in order of parent to child. So say persist AVP number X is nested inside AVP Y which is nested in Z, then define the list as Z Y X. Minimum value = `1`
|
| **persistencebackup** string | **Choices:*** SOURCEIP
* NONE
| Backup persistence type for the virtual server. Becomes operational if the primary persistence mechanism fails. |
| **persistencetype** string | **Choices:*** SOURCEIP
* COOKIEINSERT
* SSLSESSION
* RULE
* URLPASSIVE
* CUSTOMSERVERID
* DESTIP
* SRCIPDESTIP
* CALLID
* RTSPSID
* DIAMETER
* FIXSESSION
* NONE
| Type of persistence for the virtual server. Available settings function as follows: \* `SOURCEIP` - Connections from the same client IP address belong to the same persistence session. \* `COOKIEINSERT` - Connections that have the same HTTP Cookie, inserted by a Set-Cookie directive from a server, belong to the same persistence session. \* `SSLSESSION` - Connections that have the same SSL Session ID belong to the same persistence session. \* `CUSTOMSERVERID` - Connections with the same server ID form part of the same session. For this persistence type, set the Server ID (CustomServerID) parameter for each service and configure the Rule parameter to identify the server ID in a request. \* `RULE` - All connections that match a user defined rule belong to the same persistence session. \* `URLPASSIVE` - Requests that have the same server ID in the URL query belong to the same persistence session. The server ID is the hexadecimal representation of the IP address and port of the service to which the request must be forwarded. This persistence type requires a rule to identify the server ID in the request. \* `DESTIP` - Connections to the same destination IP address belong to the same persistence session. \* `SRCIPDESTIP` - Connections that have the same source IP address and destination IP address belong to the same persistence session. \* `CALLID` - Connections that have the same CALL-ID SIP header belong to the same persistence session. \* `RTSPSID` - Connections that have the same RTSP Session ID belong to the same persistence session. \* FIXSESSION - Connections that have the same SenderCompID and TargetCompID values belong to the same persistence session. |
| **persistmask** string | | Persistence mask for IP based persistence types, for IPv4 virtual servers. Minimum length = 1 |
| **port** string | | Port number for the virtual server. Range `1` - `65535`
\* in CLI is represented as `65535` in NITRO API |
| **processlocal** string | **Choices:*** enabled
* disabled
| By turning on this option packets destined to a vserver in a cluster will not under go any steering. Turn this option for single packet request response mode or when the upstream device is performing a proper RSS for connection based distribution. |
| **push** string | **Choices:*** enabled
* disabled
| Process traffic with the push virtual server that is bound to this load balancing virtual server. |
| **pushlabel** string | | Expression for extracting a label from the server's response. Can be either an expression or the name of a named expression. |
| **pushmulticlients** boolean | **Choices:*** no
* yes
| Allow multiple Web 2.0 connections from the same client to connect to the virtual server and expect updates. |
| **pushvserver** string | | Name of the load balancing virtual server, of type PUSH or SSL\_PUSH, to which the server pushes updates received on the load balancing virtual server that you are configuring. Minimum length = 1 |
| **range** string | | Number of IP addresses that the appliance must generate and assign to the virtual server. The virtual server then functions as a network virtual server, accepting traffic on any of the generated IP addresses. The IP addresses are generated automatically, as follows: \* For a range of n, the last octet of the address specified by the IP Address parameter increments n-1 times. \* If the last octet exceeds 255, it rolls over to 0 and the third octet increments by 1. Note: The Range parameter assigns multiple IP addresses to one virtual server. To generate an array of virtual servers, each of which owns only one IP address, use brackets in the IP Address and Name parameters to specify the range. For example: add lb vserver my\_vserver[1-3] HTTP 192.0.2.[1-3] 80. Minimum value = `1`
Maximum value = `254`
|
| **recursionavailable** boolean | **Choices:*** no
* yes
| When set to YES, this option causes the DNS replies from this vserver to have the RA bit turned on. Typically one would set this option to YES, when the vserver is load balancing a set of DNS servers thatsupport recursive queries. |
| **redirectportrewrite** string | **Choices:*** enabled
* disabled
| Rewrite the port and change the protocol to ensure successful HTTP redirects from services. |
| **redirurl** string | | URL to which to redirect traffic if the virtual server becomes unavailable. WARNING! Make sure that the domain in the URL does not match the domain specified for a content switching policy. If it does, requests are continuously redirected to the unavailable virtual server. Minimum length = 1 |
| **resrule** string | | Default syntax expression specifying which part of a server's response to use for creating rule based persistence sessions (persistence type RULE). Can be either an expression or the name of a named expression. Example:
`HTTP.RES.HEADER("setcookie"`.VALUE(0).TYPECAST\_NVLIST\_T("=",";").VALUE("server1")). |
| **rhistate** string | **Choices:*** PASSIVE
* ACTIVE
| Route Health Injection (RHI) functionality of the NetSaler appliance for advertising the route of the VIP address associated with the virtual server. When Vserver RHI Level (RHI) parameter is set to VSVR\_CNTRLD, the following are different RHI behaviors for the VIP address on the basis of RHIstate (RHI STATE) settings on the virtual servers associated with the VIP address: \* If you set `rhistate` to `PASSIVE` on all virtual servers, the NetScaler ADC always advertises the route for the VIP address. \* If you set `rhistate` to `ACTIVE` on all virtual servers, the NetScaler ADC advertises the route for the VIP address if at least one of the associated virtual servers is in UP state. \* If you set `rhistate` to `ACTIVE` on some and PASSIVE on others, the NetScaler ADC advertises the route for the VIP address if at least one of the associated virtual servers, whose `rhistate` set to `ACTIVE`, is in UP state. |
| **rtspnat** boolean | **Choices:*** no
* yes
| Use network address translation (NAT) for RTSP data connections. |
| **save\_config** boolean | **Choices:*** no
* **yes** β
| If `yes` the module will save the configuration on the netscaler node if it makes any changes. The module will not save the configuration on the netscaler node if it made no changes. |
| **servicebindings** string | | List of services along with the weights that are load balanced. The following suboptions are available. |
| | **servicename** string | | Service to bind to the virtual server. Minimum length = 1 |
| | **weight** string | | Weight to assign to the specified service. Minimum value = `1`
Maximum value = `100`
|
| **servicegroupbindings** string | | List of service groups along with the weights that are load balanced. The following suboptions are available. |
| | **servicegroupname** string | | The service group name bound to the selected load balancing virtual server. |
| | **weight** string | | Integer specifying the weight of the service. A larger number specifies a greater weight. Defines the capacity of the service relative to the other services in the load balancing configuration. Determines the priority given to the service in load balancing decisions. Minimum value = `1`
Maximum value = `100`
|
| **servicetype** string | **Choices:*** HTTP
* FTP
* TCP
* UDP
* SSL
* SSL\_BRIDGE
* SSL\_TCP
* DTLS
* NNTP
* DNS
* DHCPRA
* ANY
* SIP\_UDP
* SIP\_TCP
* SIP\_SSL
* DNS\_TCP
* RTSP
* PUSH
* SSL\_PUSH
* RADIUS
* RDP
* MYSQL
* MSSQL
* DIAMETER
* SSL\_DIAMETER
* TFTP
* ORACLE
* SMPP
* SYSLOGTCP
* SYSLOGUDP
* FIX
* SSL\_FIX
| Protocol used by the service (also called the service type). |
| **sessionless** string | **Choices:*** enabled
* disabled
| Perform load balancing on a per-packet basis, without establishing sessions. Recommended for load balancing of intrusion detection system (IDS) servers and scenarios involving direct server return (DSR), where session information is unnecessary. |
| **skippersistency** string | **Choices:*** Bypass
* ReLb
* None
| This argument decides the behavior incase the service which is selected from an existing persistence session has reached threshold. |
| **sobackupaction** string | **Choices:*** DROP
* ACCEPT
* REDIRECT
| Action to be performed if spillover is to take effect, but no backup chain to spillover is usable or exists. |
| **somethod** string | **Choices:*** CONNECTION
* DYNAMICCONNECTION
* BANDWIDTH
* HEALTH
* NONE
| Type of threshold that, when exceeded, triggers spillover. Available settings function as follows: \* `CONNECTION` - Spillover occurs when the number of client connections exceeds the threshold. \* DYNAMICCONNECTION - Spillover occurs when the number of client connections at the virtual server exceeds the sum of the maximum client (Max Clients) settings for bound services. Do not specify a spillover threshold for this setting, because the threshold is implied by the Max Clients settings of bound services. \* `BANDWIDTH` - Spillover occurs when the bandwidth consumed by the virtual server's incoming and outgoing traffic exceeds the threshold. \* `HEALTH` - Spillover occurs when the percentage of weights of the services that are UP drops below the threshold. For example, if services svc1, svc2, and svc3 are bound to a virtual server, with weights 1, 2, and 3, and the spillover threshold is 50%, spillover occurs if svc1 and svc3 or svc2 and svc3 transition to DOWN. \* `NONE` - Spillover does not occur. |
| **sopersistence** string | **Choices:*** enabled
* disabled
| If spillover occurs, maintain source IP address based persistence for both primary and backup virtual servers. |
| **sopersistencetimeout** string | | Timeout for spillover persistence, in minutes. Minimum value = `2`
Maximum value = `1440`
|
| **sothreshold** string | | Threshold at which spillover occurs. Specify an integer for the `CONNECTION` spillover method, a bandwidth value in kilobits per second for the `BANDWIDTH` method (do not enter the units), or a percentage for the `HEALTH` method (do not enter the percentage symbol). Minimum value = `1`
Maximum value = `4294967287`
|
| **ssl\_certkey** string | | The name of the ssl certificate that is bound to this service. The ssl certificate must already exist. Creating the certificate can be done with the [community.network.netscaler\_ssl\_certkey](netscaler_ssl_certkey_module) module. This option is only applicable only when `servicetype` is `SSL`. |
| **state** string | **Choices:*** absent
* **present** β
| The state of the resource being configured by the module on the netscaler node. When present the resource will be created if needed and configured according to the module's parameters. When absent the resource will be deleted from the netscaler node. |
| **tcpprofilename** string | | Name of the TCP profile whose settings are to be applied to the virtual server. Minimum length = 1 Maximum length = 127 |
| **td** string | | Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Minimum value = `0`
Maximum value = `4094`
|
| **timeout** string | | Time period for which a persistence session is in effect. Minimum value = `0`
Maximum value = `1440`
|
| **tosid** string | | TOS ID of the virtual server. Applicable only when the load balancing redirection mode is set to TOS. Minimum value = `1`
Maximum value = `63`
|
| **v6netmasklen** string | | Number of bits to consider in an IPv6 destination or source IP address, for creating the hash that is required by the `DESTINATIONIPHASH` and `SOURCEIPHASH` load balancing methods. Minimum value = `1`
Maximum value = `128`
|
| **v6persistmasklen** string | | Persistence mask for IP based persistence types, for IPv6 virtual servers. Minimum value = `1`
Maximum value = `128`
|
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
| **vipheader** string | | Name for the inserted header. The default name is vip-header. Minimum length = 1 |
Notes
-----
Note
* For more information on using Ansible to manage Citrix NetScaler Network devices see <https://www.ansible.com/ansible-netscaler>.
Examples
--------
```
# Netscaler services service-http-1, service-http-2 must have been already created with the netscaler_service module
- name: Create a load balancing vserver bound to services
delegate_to: localhost
community.network.netscaler_lb_vserver:
nsip: 172.18.0.2
nitro_user: nsroot
nitro_pass: nsroot
validate_certs: no
state: present
name: lb_vserver_1
servicetype: HTTP
timeout: 12
ipv46: 6.93.3.3
port: 80
servicebindings:
- servicename: service-http-1
weight: 80
- servicename: service-http-2
weight: 20
# Service group service-group-1 must have been already created with the netscaler_servicegroup module
- name: Create load balancing vserver bound to servicegroup
delegate_to: localhost
community.network.netscaler_lb_vserver:
nsip: 172.18.0.2
nitro_user: nsroot
nitro_pass: nsroot
validate_certs: no
state: present
name: lb_vserver_2
servicetype: HTTP
ipv46: 6.92.2.2
port: 80
timeout: 10
servicegroupbindings:
- servicegroupname: service-group-1
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **diff** dictionary | failure | List of differences between the actual configured object and the configuration specified in the module **Sample:** {'clttimeout': 'difference. ours: (float) 10.0 other: (float) 20.0'} |
| **loglines** list / elements=string | always | list of logged messages by the module **Sample:** ['message 1', 'message 2'] |
| **msg** string | failure | Message detailing the failure reason **Sample:** Action does not exist |
### Authors
* George Nikolopoulos (@giorgos-nikolopoulos)
| programming_docs |
ansible community.network.avi_snmptrapprofile β Module for setup of SnmpTrapProfile Avi RESTful Object community.network.avi\_snmptrapprofile β Module for setup of SnmpTrapProfile Avi RESTful Object
===============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_snmptrapprofile`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure SnmpTrapProfile object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **name** string / required | | A user-friendly name of the snmp trap configuration. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **trap\_servers** string | | The ip address or hostname of the snmp trap destination server. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the snmp trap profile object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create SnmpTrapProfile object
community.network.avi_snmptrapprofile:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_snmptrapprofile
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | SnmpTrapProfile (api/snmptrapprofile) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#2047524153544f4749060313171b060315121b060314181b4156494e4554574f524b53060314161b434f4d)>
ansible community.network.pn_vtep β CLI command to create/delete vtep community.network.pn\_vtep β CLI command to create/delete vtep
==============================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_vtep`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to create a vtep and delete a vtep.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_ip** string | | Primary IP address. |
| **pn\_location** string | | switch name. |
| **pn\_name** string | | vtep name. |
| **pn\_switch\_in\_cluster** boolean | **Choices:*** no
* **yes** β
| Tells whether switch in cluster or not. |
| **pn\_virtual\_ip** string | | Virtual/Secondary IP address. |
| **pn\_vrouter\_name** string | | name of the vrouter service. |
| **state** string | **Choices:*** **present** β
* absent
| vtep configuration command. |
Examples
--------
```
- name: Create vtep
community.network.pn_vtep:
pn_cliswitch: 'sw01'
pn_name: 'foo'
pn_vrouter_name: 'foo-vrouter'
pn_ip: '22.22.22.2'
pn_location: 'sw01'
pn_virtual_ip: "22.22.22.1"
- name: Delete vtep
community.network.pn_vtep:
pn_cliswitch: 'sw01'
state: 'absent'
pn_name: 'foo'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the vtep command. |
| **stdout** list / elements=string | always | set of responses from the vtep command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.eric_eccli β Use eccli cliconf to run command on Ericsson ECCLI platform community.network.eric\_eccli β Use eccli cliconf to run command on Ericsson ECCLI platform
===========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.eric_eccli`.
Synopsis
--------
* This eccli plugin provides low level abstraction APIs for sending and receiving CLI commands from Ericsson ECCLI network devices.
### Authors
* Ericsson IPOS OAM team (!UNKNOWN)
ansible community.network.cnos_image β Perform firmware upgrade/download from a remote server on devices running Lenovo CNOS community.network.cnos\_image β Perform firmware upgrade/download from a remote server on devices running Lenovo CNOS
=====================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_image`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module allows you to work with switch firmware images. It provides a way to download a firmware image to a network device from a remote server using FTP, SFTP, TFTP, or SCP. The first step is to create a directory from where the remote server can be reached. The next step is to provide the full file path of the imageβs location. Authentication details required by the remote server must be provided as well. By default, this method makes the newly downloaded firmware image the active image, which will be used by the switch during the next restart. This module uses SSH to manage network device configuration. The results of the operation will be placed in a directory named βresultsβ that must be created by the user in their local directory to where the playbook is run.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **deviceType** string / required | **Choices:*** g8272\_cnos
* g8296\_cnos
* g8332\_cnos
* NE0152T
* NE1072T
* NE1032
* NE1032T
* NE10032
* NE2572
| This specifies the type of device where the method is executed. The choices NE1072T,NE1032,NE1032T,NE10032,NE2572 are added since Ansible 2.4. The choice NE0152T is added since 2.8 |
| **enablePassword** string | | Configures the password used to enter Global Configuration command mode on the switch. If the switch does not request this password, the parameter is ignored.While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **host** string / required | | This is the variable used to search the hosts file at /etc/ansible/hosts and identify the IP address of the device on which the template is going to be applied. Usually the Ansible keyword {{ inventory\_hostname }} is specified in the playbook as an abstraction of the group of network elements that need to be configured. |
| **imgpath** string / required | | This specifies the full file path of the image located on the remote server. In case the relative path is used as the variable value, the root folder for the user of the server needs to be specified. |
| **imgtype** string / required | **Choices:*** all
* boot
* os
* onie
| This specifies the firmware image type to be downloaded |
| **outputfile** string / required | | This specifies the file path where the output of each command execution is saved. Each command that is specified in the merged template file and each response from the device are saved here. Usually the location is the results folder, but you can choose another location based on your write permission. |
| **password** string / required | | Configures the password used to authenticate the connection to the remote device. The value of the password parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **protocol** string / required | **Choices:*** SFTP
* SCP
* FTP
* TFTP
| This refers to the protocol used by the network device to interact with the remote server from where to download the firmware image. The choices are FTP, SFTP, TFTP, or SCP. Any other protocols will result in error. If this parameter is not specified there is no default value to be used. |
| **serverip** string / required | | This specifies the IP Address of the remote server from where the software image will be downloaded. |
| **serverpassword** string | | Specify the password for the server relating to the protocol used |
| **serverusername** string / required | | Specify the username for the server relating to the protocol used |
| **username** string / required | | Configures the username used to authenticate the connection to the remote device. The value of the username parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
Notes
-----
Note
* For more information on using Ansible to manage Lenovo Network devices see <https://www.ansible.com/ansible-lenovo>.
Examples
--------
```
Tasks : The following are examples of using the module cnos_image. These are
written in the main.yml file of the tasks directory.
---
- name: Test Image transfer
community.network.cnos_image:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_image_{{ inventory_hostname }}_output.txt"
protocol: "sftp"
serverip: "10.241.106.118"
imgpath: "/root/cnos_images/G8272-10.1.0.112.img"
imgtype: "os"
serverusername: "root"
serverpassword: "root123"
- name: Test Image tftp
community.network.cnos_image:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_image_{{ inventory_hostname }}_output.txt"
protocol: "tftp"
serverip: "10.241.106.118"
imgpath: "/anil/G8272-10.2.0.34.img"
imgtype: "os"
serverusername: "root"
serverpassword: "root123"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | always | Success or failure message **Sample:** Image file transferred to device |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
ansible community.network.netscaler_lb_monitor β Manage load balancing monitors community.network.netscaler\_lb\_monitor β Manage load balancing monitors
=========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.netscaler_lb_monitor`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage load balancing monitors.
* This module is intended to run either on the ansible control node or a bastion (jumpserver) with access to the actual netscaler instance.
Requirements
------------
The below requirements are needed on the host that executes this module.
* nitro python sdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **acctapplicationid** string | | List of Acct-Application-Id attribute value pairs (AVPs) for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. A maximum of eight of these AVPs are supported in a monitoring message. Minimum value = `0`
Maximum value = `4294967295`
|
| **action** string | **Choices:*** NONE
* LOG
* DOWN
| Action to perform when the response to an inline monitor (a monitor of type `HTTP-INLINE`) indicates that the service is down. A service monitored by an inline monitor is considered `DOWN` if the response code is not one of the codes that have been specified for the Response Code parameter. Available settings function as follows: \* `NONE` - Do not take any action. However, the show service command and the show lb monitor command indicate the total number of responses that were checked and the number of consecutive error responses received after the last successful probe. \* `LOG` - Log the event in NSLOG or SYSLOG. \* `DOWN` - Mark the service as being down, and then do not direct any traffic to the service until the configured down time has expired. Persistent connections to the service are terminated as soon as the service is marked as `DOWN`. Also, log the event in NSLOG or SYSLOG. |
| **alertretries** string | | Number of consecutive probe failures after which the appliance generates an SNMP trap called monProbeFailed. Minimum value = `0`
Maximum value = `32`
|
| **application** string | | Name of the application used to determine the state of the service. Applicable to monitors of type `CITRIX-XML-SERVICE`. Minimum length = 1 |
| **attribute** string | | Attribute to evaluate when the LDAP server responds to the query. Success or failure of the monitoring probe depends on whether the attribute exists in the response. Optional. Minimum length = 1 |
| **authapplicationid** string | | List of Auth-Application-Id attribute value pairs (AVPs) for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. A maximum of eight of these AVPs are supported in a monitoring CER message. Minimum value = `0`
Maximum value = `4294967295`
|
| **basedn** string | | The base distinguished name of the LDAP service, from where the LDAP server can begin the search for the attributes in the monitoring query. Required for `LDAP` service monitoring. Minimum length = 1 |
| **binddn** string | | The distinguished name with which an LDAP monitor can perform the Bind operation on the LDAP server. Optional. Applicable to `LDAP` monitors. Minimum length = 1 |
| **customheaders** string | | Custom header string to include in the monitoring probes. |
| **database** string | | Name of the database to connect to during authentication. Minimum length = 1 |
| **destip** string | | IP address of the service to which to send probes. If the parameter is set to 0, the IP address of the server to which the monitor is bound is considered the destination IP address. |
| **destport** string | | TCP or UDP port to which to send the probe. If the parameter is set to 0, the port number of the service to which the monitor is bound is considered the destination port. For a monitor of type `USER`, however, the destination port is the port number that is included in the HTTP request sent to the dispatcher. Does not apply to monitors of type `PING`. |
| **deviation** string | | Time value added to the learned average response time in dynamic response time monitoring (DRTM). When a deviation is specified, the appliance learns the average response time of bound services and adds the deviation to the average. The final value is then continually adjusted to accommodate response time variations over time. Specified in milliseconds, seconds, or minutes. Minimum value = `0`
Maximum value = `20939`
|
| **dispatcherip** string | | IP address of the dispatcher to which to send the probe. |
| **dispatcherport** string | | Port number on which the dispatcher listens for the monitoring probe. |
| **domain** string | | Domain in which the XenDesktop Desktop Delivery Controller (DDC) servers or Web Interface servers are present. Required by `CITRIX-XD-DDC` and `CITRIX-WI-EXTENDED` monitors for logging on to the DDC servers and Web Interface servers, respectively. |
| **downtime** string | | Time duration for which to wait before probing a service that has been marked as DOWN. Expressed in milliseconds, seconds, or minutes. Minimum value = `1`
Maximum value = `20939`
|
| **evalrule** string | | Default syntax expression that evaluates the database server's response to a MYSQL-ECV or MSSQL-ECV monitoring query. Must produce a Boolean result. The result determines the state of the server. If the expression returns TRUE, the probe succeeds. For example, if you want the appliance to evaluate the error message to determine the state of the server, use the rule `MYSQL.RES.ROW(10` .TEXT\_ELEM(2).EQ("MySQL")). |
| **failureretries** string | | Number of retries that must fail, out of the number specified for the Retries parameter, for a service to be marked as DOWN. For example, if the Retries parameter is set to 10 and the Failure Retries parameter is set to 6, out of the ten probes sent, at least six probes must fail if the service is to be marked as DOWN. The default value of 0 means that all the retries must fail if the service is to be marked as DOWN. Minimum value = `0`
Maximum value = `32`
|
| **filename** string | | Name of a file on the FTP server. The appliance monitors the FTP service by periodically checking the existence of the file on the server. Applicable to `FTP-EXTENDED` monitors. Minimum length = 1 |
| **filter** string | | Filter criteria for the LDAP query. Optional. Minimum length = 1 |
| **firmwarerevision** string | | Firmware-Revision value for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. |
| **group** string | | Name of a newsgroup available on the NNTP service that is to be monitored. The appliance periodically generates an NNTP query for the name of the newsgroup and evaluates the response. If the newsgroup is found on the server, the service is marked as UP. If the newsgroup does not exist or if the search fails, the service is marked as DOWN. Applicable to NNTP monitors. Minimum length = 1 |
| **hostipaddress** string | | Host-IP-Address value for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. If Host-IP-Address is not specified, the appliance inserts the mapped IP (MIP) address or subnet IP (SNIP) address from which the CER request (the monitoring probe) is sent. Minimum length = 1 |
| **hostname** string | | Hostname in the FQDN format (Example: `porche.cars.org`). Applicable to `STOREFRONT` monitors. Minimum length = 1 |
| **httprequest** string | | HTTP request to send to the server (for example, `"HEAD /file.html"`). |
| **inbandsecurityid** string | **Choices:*** NO\_INBAND\_SECURITY
* TLS
| Inband-Security-Id for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. |
| **interval** string | | Time interval between two successive probes. Must be greater than the value of Response Time-out. Minimum value = `1`
Maximum value = `20940`
|
| **ipaddress** string | | Set of IP addresses expected in the monitoring response from the DNS server, if the record type is A or AAAA. Applicable to `DNS` monitors. Minimum length = 1 |
| **iptunnel** boolean | **Choices:*** no
* yes
| Send the monitoring probe to the service through an IP tunnel. A destination IP address must be specified. |
| **kcdaccount** string | | KCD Account used by `MSSQL` monitor. Minimum length = 1 Maximum length = 32 |
| **lasversion** string | | Version number of the Citrix Advanced Access Control Logon Agent. Required by the `CITRIX-AAC-LAS` monitor. |
| **logonpointname** string | | Name of the logon point that is configured for the Citrix Access Gateway Advanced Access Control software. Required if you want to monitor the associated login page or Logon Agent. Applicable to `CITRIX-AAC-LAS` and `CITRIX-AAC-LOGINPAGE` monitors. |
| **lrtm** string | **Choices:*** enabled
* disabled
| Calculate the least response times for bound services. If this parameter is not enabled, the appliance does not learn the response times of the bound services. Also used for LRTM load balancing. |
| **maxforwards** string | | Maximum number of hops that the SIP request used for monitoring can traverse to reach the server. Applicable only to monitors of type `SIP-UDP`. Minimum value = `0`
Maximum value = `255`
|
| **metrictable** string | | Metric table to which to bind metrics. Minimum length = 1 Maximum length = 99 |
| **monitorname** string | | Name for the monitor. Must begin with an ASCII alphanumeric or underscore `_` character, and must contain only ASCII alphanumeric, underscore, hash `#`, period `.`, space , colon `:`, at `@`, equals `=`, and hyphen `-` characters. Minimum length = 1 |
| **mssqlprotocolversion** string | **Choices:*** 70
* 2000
* 2000SP1
* 2005
* 2008
* 2008R2
* 2012
* 2014
| Version of MSSQL server that is to be monitored. |
| **netprofile** string | | Name of the network profile. Minimum length = 1 Maximum length = 127 |
| **nitro\_pass** string / required | | The password with which to authenticate to the netscaler node. |
| **nitro\_protocol** string | **Choices:*** **http** β
* https
| Which protocol to use when accessing the nitro API objects. |
| **nitro\_timeout** float | **Default:**310 | Time in seconds until a timeout error is thrown when establishing a new session with Netscaler |
| **nitro\_user** string / required | | The username with which to authenticate to the netscaler node. |
| **nsip** string / required | | The ip address of the netscaler appliance where the nitro API calls will be made. The port can be specified with the colon (:). E.g. 192.168.1.1:555. |
| **oraclesid** string | | Name of the service identifier that is used to connect to the Oracle database during authentication. Minimum length = 1 |
| **originhost** string | | Origin-Host value for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. Minimum length = 1 |
| **originrealm** string | | Origin-Realm value for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. Minimum length = 1 |
| **password** string | | Password that is required for logging on to the `RADIUS`, `NNTP`, `FTP`, `FTP-EXTENDED`, `MYSQL`, `MSSQL`, `POP3`, `CITRIX-AG`, `CITRIX-XD-DDC`, `CITRIX-WI-EXTENDED`, `CITRIX-XNC-ECV` or `CITRIX-XDM` server. Used in conjunction with the user name specified for the `username` parameter. Minimum length = 1 |
| **productname** string | | Product-Name value for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. Minimum length = 1 |
| **query** string | | Domain name to resolve as part of monitoring the DNS service (for example, `example.com`). |
| **querytype** string | **Choices:*** Address
* Zone
* AAAA
| Type of DNS record for which to send monitoring queries. Set to `Address` for querying A records, `AAAA` for querying AAAA records, and `Zone` for querying the SOA record. |
| **radaccountsession** string | | Account Session ID to be used in Account Request Packet. Applicable to monitors of type `RADIUS_ACCOUNTING`. Minimum length = 1 |
| **radaccounttype** string | | Account Type to be used in Account Request Packet. Applicable to monitors of type `RADIUS_ACCOUNTING`. Minimum value = 0 Maximum value = 15 |
| **radapn** string | | Called Station Id to be used in Account Request Packet. Applicable to monitors of type `RADIUS_ACCOUNTING`. Minimum length = 1 |
| **radframedip** string | | Source ip with which the packet will go out . Applicable to monitors of type `RADIUS_ACCOUNTING`. |
| **radkey** string | | Authentication key (shared secret text string) for RADIUS clients and servers to exchange. Applicable to monitors of type `RADIUS` and `RADIUS_ACCOUNTING`. Minimum length = 1 |
| **radmsisdn** string | | Calling Stations Id to be used in Account Request Packet. Applicable to monitors of type `RADIUS_ACCOUNTING`. Minimum length = 1 |
| **radnasid** string | | NAS-Identifier to send in the Access-Request packet. Applicable to monitors of type `RADIUS`. Minimum length = 1 |
| **radnasip** string | | Network Access Server (NAS) IP address to use as the source IP address when monitoring a RADIUS server. Applicable to monitors of type `RADIUS` and `RADIUS_ACCOUNTING`. |
| **recv** string | | String expected from the server for the service to be marked as UP. Applicable to `TCP-ECV`, `HTTP-ECV`, and `UDP-ECV` monitors. |
| **respcode** string | | Response codes for which to mark the service as UP. For any other response code, the action performed depends on the monitor type. `HTTP` monitors and `RADIUS` monitors mark the service as `DOWN`, while `HTTP-INLINE` monitors perform the action indicated by the Action parameter. |
| **resptimeout** string | | Amount of time for which the appliance must wait before it marks a probe as FAILED. Must be less than the value specified for the Interval parameter. Note: For `UDP-ECV` monitors for which a receive string is not configured, response timeout does not apply. For `UDP-ECV` monitors with no receive string, probe failure is indicated by an ICMP port unreachable error received from the service. Minimum value = `1`
Maximum value = `20939`
|
| **resptimeoutthresh** string | | Response time threshold, specified as a percentage of the Response Time-out parameter. If the response to a monitor probe has not arrived when the threshold is reached, the appliance generates an SNMP trap called monRespTimeoutAboveThresh. After the response time returns to a value below the threshold, the appliance generates a monRespTimeoutBelowThresh SNMP trap. For the traps to be generated, the "MONITOR-RTO-THRESHOLD" alarm must also be enabled. Minimum value = `0`
Maximum value = `100`
|
| **retries** string | | Maximum number of probes to send to establish the state of a service for which a monitoring probe failed. Minimum value = `1`
Maximum value = `127`
|
| **reverse** boolean | **Choices:*** no
* yes
| Mark a service as DOWN, instead of UP, when probe criteria are satisfied, and as UP instead of DOWN when probe criteria are not satisfied. |
| **rtsprequest** string | | RTSP request to send to the server (for example, `"OPTIONS *"`). |
| **save\_config** boolean | **Choices:*** no
* **yes** β
| If `yes` the module will save the configuration on the netscaler node if it makes any changes. The module will not save the configuration on the netscaler node if it made no changes. |
| **scriptargs** string | | String of arguments for the script. The string is copied verbatim into the request. |
| **scriptname** string | | Path and name of the script to execute. The script must be available on the NetScaler appliance, in the /nsconfig/monitors/ directory. Minimum length = 1 |
| **secondarypassword** string | | Secondary password that users might have to provide to log on to the Access Gateway server. Applicable to `CITRIX-AG` monitors. |
| **secure** boolean | **Choices:*** no
* yes
| Use a secure SSL connection when monitoring a service. Applicable only to TCP based monitors. The secure option cannot be used with a `CITRIX-AG` monitor, because a CITRIX-AG monitor uses a secure connection by default. |
| **send** string | | String to send to the service. Applicable to `TCP-ECV`, `HTTP-ECV`, and `UDP-ECV` monitors. |
| **sipmethod** string | **Choices:*** OPTIONS
* INVITE
* REGISTER
| SIP method to use for the query. Applicable only to monitors of type `SIP-UDP`. |
| **sipreguri** string | | SIP user to be registered. Applicable only if the monitor is of type `SIP-UDP` and the SIP Method parameter is set to `REGISTER`. Minimum length = 1 |
| **sipuri** string | | SIP URI string to send to the service (for example, `sip:sip.test`). Applicable only to monitors of type `SIP-UDP`. Minimum length = 1 |
| **sitepath** string | | URL of the logon page. For monitors of type `CITRIX-WEB-INTERFACE`, to monitor a dynamic page under the site path, terminate the site path with a slash `/`. Applicable to `CITRIX-WEB-INTERFACE`, `CITRIX-WI-EXTENDED` and `CITRIX-XDM` monitors. Minimum length = 1 |
| **snmpcommunity** string | | Community name for `SNMP` monitors. Minimum length = 1 |
| **Snmpoid** string | | SNMP OID for `SNMP` monitors. Minimum length = 1 |
| **snmpthreshold** string | | Threshold for `SNMP` monitors. Minimum length = 1 |
| **snmpversion** string | **Choices:*** V1
* V2
| SNMP version to be used for `SNMP` monitors. |
| **sqlquery** string | | SQL query for a `MYSQL-ECV` or `MSSQL-ECV` monitor. Sent to the database server after the server authenticates the connection. Minimum length = 1 |
| **state** string | **Choices:*** enabled
* disabled
**Default:**"present" | State of the monitor. The `disabled` setting disables not only the monitor being configured, but all monitors of the same type, until the parameter is set to `enabled`. If the monitor is bound to a service, the state of the monitor is not taken into account when the state of the service is determined. |
| **storedb** string | **Choices:*** enabled
* disabled
| Store the database list populated with the responses to monitor probes. Used in database specific load balancing if `MSSQL-ECV`/`MYSQL-ECV` monitor is configured. |
| **storefrontacctservice** boolean | **Choices:*** no
* yes
| Enable/Disable probing for Account Service. Applicable only to Store Front monitors. For multi-tenancy configuration users my skip account service. |
| **storefrontcheckbackendservices** boolean | **Choices:*** no
* yes
| This option will enable monitoring of services running on storefront server. Storefront services are monitored by probing to a Windows service that runs on the Storefront server and exposes details of which storefront services are running. |
| **storename** string | | Store Name. For monitors of type `STOREFRONT`, `storename` is an optional argument defining storefront service store name. Applicable to `STOREFRONT` monitors. Minimum length = 1 |
| **successretries** string | | Number of consecutive successful probes required to transition a service's state from DOWN to UP. Minimum value = `1`
Maximum value = `32`
|
| **supportedvendorids** string | | List of Supported-Vendor-Id attribute value pairs (AVPs) for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. A maximum eight of these AVPs are supported in a monitoring message. Minimum value = `1`
Maximum value = `4294967295`
|
| **tos** boolean | **Choices:*** no
* yes
| Probe the service by encoding the destination IP address in the IP TOS (6) bits. |
| **tosid** string | | The TOS ID of the specified destination IP. Applicable only when the TOS parameter is set. Minimum value = `1`
Maximum value = `63`
|
| **transparent** boolean | **Choices:*** no
* yes
| The monitor is bound to a transparent device such as a firewall or router. The state of a transparent device depends on the responsiveness of the services behind it. If a transparent device is being monitored, a destination IP address must be specified. The probe is sent to the specified IP address by using the MAC address of the transparent device. |
| **trofscode** string | | Code expected when the server is under maintenance. |
| **trofsstring** string | | String expected from the server for the service to be marked as trofs. Applicable to HTTP-ECV/TCP-ECV monitors. |
| **type** string | **Choices:*** PING
* TCP
* HTTP
* TCP-ECV
* HTTP-ECV
* UDP-ECV
* DNS
* FTP
* LDNS-PING
* LDNS-TCP
* LDNS-DNS
* RADIUS
* USER
* HTTP-INLINE
* SIP-UDP
* SIP-TCP
* LOAD
* FTP-EXTENDED
* SMTP
* SNMP
* NNTP
* MYSQL
* MYSQL-ECV
* MSSQL-ECV
* ORACLE-ECV
* LDAP
* POP3
* CITRIX-XML-SERVICE
* CITRIX-WEB-INTERFACE
* DNS-TCP
* RTSP
* ARP
* CITRIX-AG
* CITRIX-AAC-LOGINPAGE
* CITRIX-AAC-LAS
* CITRIX-XD-DDC
* ND6
* CITRIX-WI-EXTENDED
* DIAMETER
* RADIUS\_ACCOUNTING
* STOREFRONT
* APPC
* SMPP
* CITRIX-XNC-ECV
* CITRIX-XDM
* CITRIX-STA-SERVICE
* CITRIX-STA-SERVICE-NHOP
| Type of monitor that you want to create. |
| **units1** string | **Choices:*** SEC
* MSEC
* MIN
| Unit of measurement for the Deviation parameter. Cannot be changed after the monitor is created. |
| **units2** string | **Choices:*** SEC
* MSEC
* MIN
| Unit of measurement for the Down Time parameter. Cannot be changed after the monitor is created. |
| **units3** string | **Choices:*** SEC
* MSEC
* MIN
| monitor interval units. |
| **units4** string | **Choices:*** SEC
* MSEC
* MIN
| monitor response timeout units. |
| **username** string | | User name with which to probe the `RADIUS`, `NNTP`, `FTP`, `FTP-EXTENDED`, `MYSQL`, `MSSQL`, `POP3`, `CITRIX-AG`, `CITRIX-XD-DDC`, `CITRIX-WI-EXTENDED`, `CITRIX-XNC` or `CITRIX-XDM` server. Minimum length = 1 |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
| **validatecred** boolean | **Choices:*** no
* yes
| Validate the credentials of the Xen Desktop DDC server user. Applicable to monitors of type `CITRIX-XD-DDC`. |
| **vendorid** string | | Vendor-Id value for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. |
| **vendorspecificacctapplicationids** string | | List of Vendor-Specific-Acct-Application-Id attribute value pairs (AVPs) to use for monitoring Diameter servers. A maximum of eight of these AVPs are supported in a monitoring message. The specified value is combined with the value of vendorSpecificVendorId to obtain the Vendor-Specific-Application-Id AVP in the CER monitoring message. Minimum value = `0`
Maximum value = `4294967295`
|
| **vendorspecificauthapplicationids** string | | List of Vendor-Specific-Auth-Application-Id attribute value pairs (AVPs) for the Capabilities-Exchange-Request (CER) message to use for monitoring Diameter servers. A maximum of eight of these AVPs are supported in a monitoring message. The specified value is combined with the value of vendorSpecificVendorId to obtain the Vendor-Specific-Application-Id AVP in the CER monitoring message. Minimum value = `0`
Maximum value = `4294967295`
|
| **vendorspecificvendorid** string | | Vendor-Id to use in the Vendor-Specific-Application-Id grouped attribute-value pair (AVP) in the monitoring CER message. To specify Auth-Application-Id or Acct-Application-Id in Vendor-Specific-Application-Id, use vendorSpecificAuthApplicationIds or vendorSpecificAcctApplicationIds, respectively. Only one Vendor-Id is supported for all the Vendor-Specific-Application-Id AVPs in a CER monitoring message. Minimum value = 1 |
Notes
-----
Note
* For more information on using Ansible to manage Citrix NetScaler Network devices see <https://www.ansible.com/ansible-netscaler>.
Examples
--------
```
- name: Set lb monitor
local_action:
nsip: 172.18.0.2
nitro_user: nsroot
nitro_pass: nsroot
validate_certs: no
module: netscaler_lb_monitor
state: present
monitorname: monitor_1
type: HTTP-INLINE
action: DOWN
respcode: ['400']
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **diff** dictionary | failure | List of differences between the actual configured object and the configuration specified in the module **Sample:** {'targetlbvserver': 'difference. ours: (str) server1 other: (str) server2'} |
| **loglines** list / elements=string | always | list of logged messages by the module **Sample:** ['message 1', 'message 2'] |
| **msg** string | failure | Message detailing the failure reason **Sample:** Action does not exist |
### Authors
* George Nikolopoulos (@giorgos-nikolopoulos)
| programming_docs |
ansible community.network.voss_config β Manage Extreme VOSS configuration sections community.network.voss\_config β Manage Extreme VOSS configuration sections
===========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.voss_config`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Extreme VOSS configurations use a simple flat text file syntax. This module provides an implementation for working with EXOS configuration lines in a deterministic way.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **after** string | | The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with *before* this allows the playbook designer to append a set of commands to be executed after the command set. |
| **backup** boolean | **Choices:*** **no** β
* yes
| This argument will cause the module to create a full backup of the current `running-config` from the remote device before any changes are made. If the `backup_options` value is not given, the backup file is written to the `backup` folder in the playbook root directory or role root directory, if playbook is part of an ansible role. If the directory does not exist, it is created. |
| **backup\_options** dictionary | | This is a dict object containing configurable options related to backup file path. The value of this option is read only when `backup` is set to *yes*, if `backup` is set to *no* this option will be silently ignored. |
| | **dir\_path** path | | This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of `filename` or default filename as described in `filename` options description. If the path value is not given in that case a *backup* directory will be created in the current working directory and backup configuration will be copied in `filename` within *backup* directory. |
| | **filename** string | | The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by <hostname>\_config.<current-date>@<current-time> |
| **before** string | | The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system. |
| **defaults** boolean | **Choices:*** **no** β
* yes
| This argument specifies whether or not to collect all defaults when getting the remote device running config. When enabled, the module will get the current config by issuing the command `show running-config verbose`. |
| **diff\_against** string | **Choices:*** running
* startup
* intended
| When using the `ansible-playbook --diff` command line argument the module can generate diffs against different sources. When this option is configure as *startup*, the module will return the diff of the running-config against the startup-config. When this option is configured as *intended*, the module will return the diff of the running-config against the configuration provided in the `intended_config` argument. When this option is configured as *running*, the module will return the before and after diff of the running-config with respect to any changes made to the device configuration. |
| **diff\_ignore\_lines** string | | Use this argument to specify one or more lines that should be ignored during the diff. This is used for lines in the configuration that are automatically updated by the system. This argument takes a list of regular expressions or exact line matches. |
| **intended\_config** string | | The `intended_config` provides the master configuration that the node should conform to and is used to check the final running-config against. This argument will not modify any settings on the remote device and is strictly used to check the compliance of the current device's configuration against. When specifying this argument, the task should also modify the `diff_against` value and set it to *intended*. |
| **lines** string | | The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser.
aliases: commands |
| **match** string | **Choices:*** **line** β
* strict
* exact
* none
| Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to *line*, commands are matched line by line. If match is set to *strict*, command lines are matched with respect to position. If match is set to *exact*, command lines must be an equal match. Finally, if match is set to *none*, the module will not attempt to compare the source configuration with the running configuration on the remote device. |
| **parents** string | | The parent line that uniquely identifies the section the commands should be checked against. If this argument is omitted, the commands are checked against the set of top level or global commands. Note that VOSS configurations only support one level of nested commands. |
| **replace** string | **Choices:*** **line** β
* block
| Instructs the module on the way to perform the configuration on the device. If the replace argument is set to *line* then the modified lines are pushed to the device in configuration mode. If the replace argument is set to *block* then the entire command block is pushed to the device in configuration mode if any line is not correct. |
| **running\_config** string | | The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The *running\_config* argument allows the implementer to pass in the configuration to use as the base config for comparison.
aliases: config |
| **save\_when** string | **Choices:*** always
* **never** β
* modified
* changed
| When changes are made to the device running-configuration, the changes are not copied to non-volatile storage by default. Using this argument will change that behavior. If the argument is set to *always*, then the running-config will always be saved and the *modified* flag will always be set to True. If the argument is set to *modified*, then the running-config will only be saved if it has changed since the last save to startup-config. If the argument is set to *never*, the running-config will never be saved. If the argument is set to *changed*, then the running-config will only be saved if the task has made a change. |
| **src** string | | Specifies the source path to the file that contains the configuration or configuration template to load. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. This argument is mutually exclusive with *lines*, *parents*. |
Notes
-----
Note
* Tested against VOSS 7.0.0
* Abbreviated commands are NOT idempotent, see [Network FAQ](user_guide/faq#why-do-the-config-modules-always-return-changed-true-with-abbreviated-commands).
Examples
--------
```
- name: Configure system name
community.network.voss_config:
lines: prompt "{{ inventory_hostname }}"
- name: Configure interface settings
community.network.voss_config:
lines:
- name "ServerA"
backup: yes
parents: interface GigabitEthernet 1/1
- name: Check the running-config against master config
community.network.voss_config:
diff_against: intended
intended_config: "{{ lookup('file', 'master.cfg') }}"
- name: Check the startup-config against the running-config
community.network.voss_config:
diff_against: startup
diff_ignore_lines:
- qos queue-profile .*
- name: Save running to startup when modified
community.network.voss_config:
save_when: modified
- name: Configurable backup path
community.network.voss_config:
backup: yes
backup_options:
filename: backup.cfg
dir_path: /home/user
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **backup\_path** string | when backup is yes | The full path to the backup file **Sample:** /playbooks/ansible/backup/vsp200\_config.2018-08-21@15:00:21 |
| **commands** list / elements=string | always | The set of commands that will be pushed to the remote device **Sample:** ['interface GigabitEthernet 1/1', 'name "ServerA"', 'exit'] |
| **updates** list / elements=string | always | The set of commands that will be pushed to the remote device **Sample:** ['prompt "VSP200"'] |
### Authors
* Lindsay Hill (@LindsayHill)
ansible community.network.avi_vrfcontext β Module for setup of VrfContext Avi RESTful Object community.network.avi\_vrfcontext β Module for setup of VrfContext Avi RESTful Object
=====================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_vrfcontext`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure VrfContext object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **bgp\_profile** string | | Bgp local and peer info. |
| **cloud\_ref** string | | It is a reference to an object of type cloud. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **debugvrfcontext** string | | Configure debug flags for vrf. Field introduced in 17.1.1. |
| **description** string | | User defined description for the object. |
| **gateway\_mon** string | | Configure ping based heartbeat check for gateway in service engines of vrf. |
| **internal\_gateway\_monitor** string | | Configure ping based heartbeat check for all default gateways in service engines of vrf. Field introduced in 17.1.1. |
| **name** string / required | | Name of the object. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **static\_routes** string | | List of staticroute. |
| **system\_default** boolean | **Choices:*** no
* yes
| Boolean flag to set system\_default. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create VrfContext object
community.network.avi_vrfcontext:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_vrfcontext
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | VrfContext (api/vrfcontext) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#0364716270776c646a252030343825203631382520373b3862756a6d6677746c7168702520373538606c6e)>
ansible community.network.slxos_linkagg β Manage link aggregation groups on Extreme Networks SLX-OS network devices community.network.slxos\_linkagg β Manage link aggregation groups on Extreme Networks SLX-OS network devices
============================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.slxos_linkagg`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of link aggregation groups on Extreme Networks SLX-OS network devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate** string | | List of link aggregation definitions. |
| **group** string | | Channel-group number for the port-channel Link aggregation group. Range 1-1024. |
| **members** string | | List of members of the link aggregation group. |
| **mode** string | **Choices:*** active
* on
* passive
| Mode of the link aggregation group. |
| **purge** boolean | **Choices:*** **no** β
* yes
| Purge links not defined in the *aggregate* parameter. |
| **state** string | **Choices:*** **present** β
* absent
| State of the link aggregation group. |
Notes
-----
Note
* Tested against SLX-OS 17s.1.02
Examples
--------
```
- name: Create link aggregation group
community.network.slxos_linkagg:
group: 10
state: present
- name: Delete link aggregation group
community.network.slxos_linkagg:
group: 10
state: absent
- name: Set link aggregation group to members
community.network.slxos_linkagg:
group: 200
mode: active
members:
- Ethernet 0/1
- Ethernet 0/2
- name: Remove link aggregation group from Ethernet 0/1
community.network.slxos_linkagg:
group: 200
mode: active
members:
- Ethernet 0/1
- name: Create aggregate of linkagg definitions
community.network.slxos_linkagg:
aggregate:
- { group: 3, mode: on, members: [Ethernet 0/1] }
- { group: 100, mode: passive, members: [Ethernet 0/2] }
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device **Sample:** ['interface port-channel 30', 'interface Ethernet 0/3', 'channel-group 30 mode on', 'no interface port-channel 30'] |
### Authors
* Matthew Stone (@bigmstone)
ansible community.network.ftd_configuration β Manages configuration on Cisco FTD devices over REST API community.network.ftd\_configuration β Manages configuration on Cisco FTD devices over REST API
===============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ftd_configuration`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages configuration on Cisco FTD devices including creating, updating, removing configuration objects, scheduling and staring jobs, deploying pending changes, etc. All operations are performed over REST API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **data** dictionary | | Key-value pairs that should be sent as body parameters in a REST API call |
| **filters** dictionary | | Key-value dict that represents equality filters. Every key is a property name and value is its desired value. If multiple filters are present, they are combined with logical operator AND. |
| **operation** string / required | | The name of the operation to execute. Commonly, the operation starts with 'add', 'edit', 'get', 'upsert' or 'delete' verbs, but can have an arbitrary name too. |
| **path\_params** dictionary | | Key-value pairs that should be sent as path parameters in a REST API call. |
| **query\_params** dictionary | | Key-value pairs that should be sent as query parameters in a REST API call. |
| **register\_as** string | | Specifies Ansible fact name that is used to register received response from the FTD device. |
Examples
--------
```
- name: Create a network object
community.network.ftd_configuration:
operation: "addNetworkObject"
data:
name: "Ansible-network-host"
description: "From Ansible with love"
subType: "HOST"
value: "192.168.2.0"
dnsResolution: "IPV4_AND_IPV6"
type: "networkobject"
isSystemDefined: false
register_as: "hostNetwork"
- name: Delete the network object
community.network.ftd_configuration:
operation: "deleteNetworkObject"
path_params:
objId: "{{ hostNetwork['id'] }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **response** dictionary | success | HTTP response returned from the API call. |
### Authors
* Cisco Systems, Inc. (@annikulin)
| programming_docs |
ansible community.network.ce_info_center_debug β Manages information center debug configuration on HUAWEI CloudEngine switches. community.network.ce\_info\_center\_debug β Manages information center debug configuration on HUAWEI CloudEngine switches.
==========================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_info_center_debug`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages information center debug configurations on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **channel\_id** string | | Number of a channel. The value is an integer ranging from 0 to 9. The default value is 0. |
| **debug\_enable** string | **Choices:*** **no\_use** β
* true
* false
| Whether a device is enabled to output debugging information. |
| **debug\_level** string | **Choices:*** emergencies
* alert
* critical
* error
* warning
* notification
* informational
* debugging
| Debug level permitted to output. |
| **debug\_time\_stamp** string | **Choices:*** date\_boot
* date\_second
* date\_tenthsecond
* date\_millisecond
* shortdate\_second
* shortdate\_tenthsecond
* shortdate\_millisecond
* formatdate\_second
* formatdate\_tenthsecond
* formatdate\_millisecond
| Timestamp type of debugging information. |
| **module\_name** string | | Module name of the rule. The value is a string of 1 to 31 case-insensitive characters. The default value is default. Please use lower-case letter, such as [aaa, acl, arp, bfd]. |
| **state** string | **Choices:*** **present** β
* absent
| Specify desired state of the resource. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: CloudEngine info center debug test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Config debug time stamp"
community.network.ce_info_center_debug:
state: present
debug_time_stamp: date_boot
provider: "{{ cli }}"
- name: "Undo debug time stamp"
community.network.ce_info_center_debug:
state: absent
debug_time_stamp: date_boot
provider: "{{ cli }}"
- name: "Config debug module log level"
community.network.ce_info_center_debug:
state: present
module_name: aaa
channel_id: 1
debug_enable: true
debug_level: error
provider: "{{ cli }}"
- name: "Undo debug module log level"
community.network.ce_info_center_debug:
state: absent
module_name: aaa
channel_id: 1
debug_enable: true
debug_level: error
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution **Sample:** {'debugTimeStamp': 'DATE\_BOOT'} |
| **existing** dictionary | always | k/v pairs of existing aaa server **Sample:** {'debugTimeStamp': 'DATE\_MILLISECOND'} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'debug\_time\_stamp': 'date\_boot', 'state': 'present'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['info-center timestamp debugging boot'] |
### Authors
* wangdezhuang (@QijunPan)
ansible community.network.ce_startup β Manages a system startup information on HUAWEI CloudEngine switches. community.network.ce\_startup β Manages a system startup information on HUAWEI CloudEngine switches.
====================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_startup`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages a system startup information on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string | **Choices:*** display
| Display the startup information. |
| **cfg\_file** string | **Default:**"present" | Name of the configuration file that is applied for the next startup. The value is a string of 5 to 255 characters. |
| **patch\_file** string | | Name of the patch file that is applied for the next startup. |
| **slot** string | | Position of the device.The value is a string of 1 to 32 characters. The possible value of slot is all, slave-board, or the specific slotID. |
| **software\_file** string | | File name of the system software that is applied for the next startup. The value is a string of 5 to 255 characters. |
Notes
-----
Note
* Recommended connection is `network_cli`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Startup module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Display startup information
community.network.ce_startup:
action: display
provider: "{{ cli }}"
- name: Set startup patch file
community.network.ce_startup:
patch_file: 2.PAT
slot: all
provider: "{{ cli }}"
- name: Set startup software file
community.network.ce_startup:
software_file: aa.cc
slot: 1
provider: "{{ cli }}"
- name: Set startup cfg file
community.network.ce_startup:
cfg_file: 2.cfg
slot: 1
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution **Sample:** {'StartupInfos': None} |
| **existing** dictionary | always | k/v pairs of existing aaa server **Sample:** {'configSysSoft': 'flash:/CE12800-V200R002C20\_issuB071.cc', 'curentPatchFile': 'NULL', 'curentStartupFile': 'NULL', 'curentSysSoft': 'flash:/CE12800-V200R002C20\_issuB071.cc', 'nextPatchFile': 'flash:/1.PAT', 'nextStartupFile': 'flash:/1.cfg', 'nextSysSoft': 'flash:/CE12800-V200R002C20\_issuB071.cc', 'position': '5'} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'patch\_file': '2.PAT', 'slot': 'all'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** {'startup patch 2.PAT all': None} |
### Authors
* Li Yanfeng (@QijunPan)
ansible community.network.iap_start_workflow β Start a workflow in the Itential Automation Platform community.network.iap\_start\_workflow β Start a workflow in the Itential Automation Platform
=============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.iap_start_workflow`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This will start a specified workflow in the Itential Automation Platform with given arguments.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **description** string / required | | Provide the description for the workflow |
| **https** boolean | **Choices:*** **no** β
* yes
| Use HTTPS to connect By default using http |
| **iap\_fqdn** string / required | | Provide the fqdn for the Itential Automation Platform |
| **iap\_port** string / required | | Provide the port number for the Itential Automation Platform |
| **token\_key** string / required | | Token key generated by iap\_token module for the Itential Automation Platform |
| **validate\_certs** boolean | **Choices:*** **no** β
* yes
| If `no`, SSL certificates for the target url will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
| **variables** dictionary / required | | Provide the values to the job variables |
| **workflow\_name** string / required | | Provide the workflow name |
Examples
--------
```
- name: Start a workflow in the Itential Automation Platform
community.network.iap_start_workflow:
iap_port: 3000
iap_fqdn: localhost
token_key: "DFSFSFHFGFGF[DSFSFAADAFASD%3D"
workflow_name: "RouterUpgradeWorkflow"
description: "OS-Router-Upgrade"
variables: {"deviceName":"ASR9K"}
register: result
- ansible.builtin.debug: var=result
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | always | The msg will contain the error code or status of the workflow |
| **response** dictionary | always | The result contains the response from the call |
### Authors
* Itential (@cma0) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#85eaf5e0ebf6eaf0f7e6e0a3a6b6b2bea3a6b0b7bea3a6b1bdbeecf1e0ebf1ece4e9a3a6b1b3bee6eae8)>
ansible community.network.avi_authprofile β Module for setup of AuthProfile Avi RESTful Object community.network.avi\_authprofile β Module for setup of AuthProfile Avi RESTful Object
=======================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_authprofile`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure AuthProfile object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **description** string | | User defined description for the object. |
| **http** string | | Http user authentication params. |
| **ldap** string | | Ldap server and directory settings. |
| **name** string / required | | Name of the auth profile. |
| **pa\_agent\_ref** string | | Pingaccessagent uuid. It is a reference to an object of type pingaccessagent. Field introduced in 18.2.3. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **saml** string | | Saml settings. Field introduced in 17.2.3. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tacacs\_plus** string | | Tacacs+ settings. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **type** string / required | | Type of the auth profile. Enum options - AUTH\_PROFILE\_LDAP, AUTH\_PROFILE\_TACACS\_PLUS, AUTH\_PROFILE\_SAML, AUTH\_PROFILE\_PINGACCESS. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the auth profile. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create user authorization profile based on the LDAP
community.network.avi_authprofile:
controller: '{{ controller }}'
password: '{{ password }}'
username: '{{ username }}'
http:
cache_expiration_time: 5
group_member_is_full_dn: false
ldap:
base_dn: dc=avi,dc=local
bind_as_administrator: true
port: 389
security_mode: AUTH_LDAP_SECURE_NONE
server:
- 10.10.0.100
settings:
admin_bind_dn: [email protected]
group_filter: (objectClass=*)
group_member_attribute: member
group_member_is_full_dn: true
group_search_dn: dc=avi,dc=local
group_search_scope: AUTH_LDAP_SCOPE_SUBTREE
ignore_referrals: true
password: password
user_id_attribute: samAccountname
user_search_dn: dc=avi,dc=local
user_search_scope: AUTH_LDAP_SCOPE_ONE
name: ProdAuth
tenant_ref: admin
type: AUTH_PROFILE_LDAP
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | AuthProfile (api/authprofile) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#6e091c0f1d1a010907484d5d5955484d5b5c55484d5a56550f1807000b1a19011c051d484d5a58550d0103)>
ansible community.network.ftd_file_upload β Uploads files to Cisco FTD devices over HTTP(S) community.network.ftd\_file\_upload β Uploads files to Cisco FTD devices over HTTP(S)
=====================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ftd_file_upload`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Uploads files to Cisco FTD devices including disk files, backups, and upgrades.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **file\_to\_upload** path / required | | Absolute path to the file that should be uploaded. |
| **operation** string / required | | The name of the operation to execute. Only operations that upload file can be used in this module. |
| **register\_as** string | | Specifies Ansible fact name that is used to register received response from the FTD device. |
Examples
--------
```
- name: Upload disk file
community.network.ftd_file_upload:
operation: 'postuploaddiskfile'
file_to_upload: /tmp/test1.txt
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | error | The error message describing why the module failed. |
### Authors
* Cisco Systems, Inc. (@annikulin)
ansible community.network.enos_config β Manage Lenovo ENOS configuration sections community.network.enos\_config β Manage Lenovo ENOS configuration sections
==========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.enos_config`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Lenovo ENOS configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with ENOS configuration sections in a deterministic way.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **admin** boolean | **Choices:*** **no** β
* yes
| Enters into administration configuration mode for making config changes to the device. |
| **after** string | | The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with *before* this allows the playbook designer to append a set of commands to be executed after the command set. |
| **auth\_pass** string | | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
| **authorize** boolean | **Choices:*** **no** β
* yes
| Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
| **backup** boolean | **Choices:*** **no** β
* yes
| This argument will cause the module to create a full backup of the current `running-config` from the remote device before any changes are made. If the `backup_options` value is not given, the backup file is written to the `backup` folder in the playbook root directory. If the directory does not exist, it is created. |
| **backup\_options** dictionary | | This is a dict object containing configurable options related to backup file path. The value of this option is read only when `backup` is set to *yes*, if `backup` is set to *no* this option will be silently ignored. |
| | **dir\_path** path | | This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of `filename` or default filename as described in `filename` options description. If the path value is not given in that case a *backup* directory will be created in the current working directory and backup configuration will be copied in `filename` within *backup* directory. |
| | **filename** string | | The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by <hostname>\_config.<current-date>@<current-time> |
| **before** string | | The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system. |
| **comment** string | **Default:**"configured by enos\_config" | Allows a commit description to be specified to be included when the configuration is committed. If the configuration is not changed or committed, this argument is ignored. |
| **config** string | | The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The *config* argument allows the implementer to pass in the configuration to use as the base config for comparison. |
| **lines** string | | The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser.
aliases: commands |
| **match** string | **Choices:*** **line** β
* strict
* exact
* none
| Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to *line*, commands are matched line by line. If match is set to *strict*, command lines are matched with respect to position. If match is set to *exact*, command lines must be an equal match. Finally, if match is set to *none*, the module will not attempt to compare the source configuration with the running configuration on the remote device. |
| **parents** string | | The ordered set of parents that uniquely identify the section the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. |
| **provider** dictionary | | A dict object containing connection details. |
| | **auth\_pass** string | | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
| | **authorize** boolean | **Choices:*** **no** β
* yes
| Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
| | **host** string / required | | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
| | **port** integer | **Default:**22 | Specifies the port to use when building the connection to the remote device. |
| | **ssh\_keyfile** path | | Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
| | **timeout** integer | **Default:**10 | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
| | **username** string | | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
| **replace** string | **Choices:*** **line** β
* block
* config
| Instructs the module on the way to perform the configuration on the device. If the replace argument is set to *line* then the modified lines are pushed to the device in configuration mode. If the replace argument is set to *block* then the entire command block is pushed to the device in configuration mode if any line is not correct. |
| **src** string | | Specifies the source path to the file that contains the configuration or configuration template to load. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. This argument is mutually exclusive with *lines*, *parents*. |
Notes
-----
Note
* Tested against ENOS 8.4.1
Examples
--------
```
- name: Configure top level configuration
community.network.enos_config:
"lines: hostname {{ inventory_hostname }}"
- name: Configure interface settings
community.network.enos_config:
lines:
- enable
- ip ospf enable
parents: interface ip 13
- name: Load a config from disk and replace the current config
community.network.enos_config:
src: config.cfg
backup: yes
- name: Configurable backup path
community.network.enos_config:
src: config.cfg
backup: yes
backup_options:
filename: backup.cfg
dir_path: /home/user
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **backup\_path** string | when backup is yes | The full path to the backup file **Sample:** /playbooks/ansible/backup/enos01.2016-07-16@22:28:34 |
| **updates** list / elements=string | Only when lines is specified. | The set of commands that will be pushed to the remote device **Sample:** ['...', '...'] |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
| programming_docs |
ansible community.network.exos_facts β Collect facts from devices running Extreme EXOS community.network.exos\_facts β Collect facts from devices running Extreme EXOS
===============================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.exos_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Collects a base set of device facts from a remote device that is running EXOS. This module prepends all of the base network fact keys with `ansible_net_<fact>`. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **gather\_network\_resources** list / elements=string | | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all and the resources like interfaces, vlans etc. Can specify a list of values to include a larger subset. Values can also be used with an initial `!` to specify that a specific subset should not be collected. Valid subsets are 'all', 'lldp\_global'. |
| **gather\_subset** list / elements=string | **Default:**["!config"] | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, hardware, config, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial `!` to specify that a specific subset should not be collected. |
Notes
-----
Note
* Tested against EXOS 22.5.1.7
Examples
--------
```
- name: Gather all legacy facts
community.network.exos_facts:
gather_subset: all
- name: Gather only the config and default facts
community.network.exos_facts:
gather_subset: config
- name: Do not gather hardware facts
community.network.exos_facts:
gather_subset: "!hardware"
- name: Gather legacy and resource facts
community.network.exos_facts:
gather_subset: all
gather_network_resources: all
- name: Gather only the lldp global resource facts and no legacy facts
community.network.exos_facts:
gather_subset:
- '!all'
- '!min'
gather_network_resource:
- lldp_global
- name: Gather lldp global resource and minimal legacy facts
community.network.exos_facts:
gather_subset: min
gather_network_resource: lldp_global
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ansible\_net\_all\_ipv4\_addresses** list / elements=string | when interfaces is configured | All IPv4 addresses configured on the device |
| **ansible\_net\_all\_ipv6\_addresses** list / elements=string | when interfaces is configured | All Primary IPv6 addresses configured on the device |
| **ansible\_net\_config** string | when config is configured | The current active config from the device |
| **ansible\_net\_gather\_network\_resources** list / elements=string | when the resource is configured | The list of fact for network resource subsets collected from the device |
| **ansible\_net\_gather\_subset** list / elements=string | always | The list of fact subsets collected from the device |
| **ansible\_net\_hostname** string | always | The configured hostname of the device |
| **ansible\_net\_interfaces** dictionary | when interfaces is configured | A hash of all interfaces running on the system |
| **ansible\_net\_memfree\_mb** integer | when hardware is configured | The available free memory on the remote device in Mb |
| **ansible\_net\_memtotal\_mb** integer | when hardware is configured | The total memory on the remote device in Mb |
| **ansible\_net\_model** string | always | The model name returned from the device |
| **ansible\_net\_neighbors** dictionary | when interfaces is configured | The list of LLDP neighbors from the remote device |
| **ansible\_net\_serialnum** string | always | The serial number of the remote device |
| **ansible\_net\_version** string | always | The operating system version running on the remote device |
### Authors
* Lance Richardson (@hlrichardson)
* Ujwal Koamrla (@ujwalkomarla)
ansible community.network.netscaler_gslb_vserver β Configure gslb vserver entities in Netscaler. community.network.netscaler\_gslb\_vserver β Configure gslb vserver entities in Netscaler.
==========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.netscaler_gslb_vserver`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Configure gslb vserver entities in Netscaler.
Requirements
------------
The below requirements are needed on the host that executes this module.
* nitro python sdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **appflowlog** string | **Choices:*** enabled
* disabled
| Enable logging appflow flow information. |
| **backuplbmethod** string | **Choices:*** ROUNDROBIN
* LEASTCONNECTION
* LEASTRESPONSETIME
* SOURCEIPHASH
* LEASTBANDWIDTH
* LEASTPACKETS
* STATICPROXIMITY
* RTT
* CUSTOMLOAD
| Backup load balancing method. Becomes operational if the primary load balancing method fails or cannot be used. Valid only if the primary method is based on either round-trip time (RTT) or static proximity. |
| **comment** string | | Any comments that you might want to associate with the GSLB virtual server. |
| **considereffectivestate** string | **Choices:*** NONE
* STATE\_ONLY
| If the primary state of all bound GSLB services is DOWN, consider the effective states of all the GSLB services, obtained through the Metrics Exchange Protocol (MEP), when determining the state of the GSLB virtual server. To consider the effective state, set the parameter to STATE\_ONLY. To disregard the effective state, set the parameter to NONE. The effective state of a GSLB service is the ability of the corresponding virtual server to serve traffic. The effective state of the load balancing virtual server, which is transferred to the GSLB service, is UP even if only one virtual server in the backup chain of virtual servers is in the UP state. |
| **disabled** boolean | **Choices:*** **no** β
* yes
| When set to `yes` the GSLB Vserver state will be set to `disabled`. When set to `no` the GSLB Vserver state will be set to `enabled`. Note that due to limitations of the underlying NITRO API a `disabled` state change alone does not cause the module result to report a changed status. |
| **disableprimaryondown** string | **Choices:*** enabled
* disabled
| Continue to direct traffic to the backup chain even after the primary GSLB virtual server returns to the UP state. Used when spillover is configured for the virtual server. |
| **dnsrecordtype** string | **Choices:*** A
* AAAA
* CNAME
* NAPTR
| DNS record type to associate with the GSLB virtual server's domain name. Default value: A Possible values = A, AAAA, CNAME, NAPTR |
| **domain\_bindings** string | | List of bindings for domains for this glsb vserver. |
| | **cookietimeout** string | | Timeout, in minutes, for the GSLB site cookie. |
| | **domainname** string | | Domain name for which to change the time to live (TTL) and/or backup service IP address. |
| | **sitedomainttl** string | | TTL, in seconds, for all internally created site domains (created when a site prefix is configured on a GSLB service) that are associated with this virtual server. Minimum value = `1`
|
| | **ttl** string | | Time to live (TTL) for the domain. |
| **dynamicweight** string | **Choices:*** SERVICECOUNT
* SERVICEWEIGHT
* DISABLED
| Specify if the appliance should consider the service count, service weights, or ignore both when using weight-based load balancing methods. The state of the number of services bound to the virtual server help the appliance to select the service. |
| **lbmethod** string | **Choices:*** ROUNDROBIN
* LEASTCONNECTION
* LEASTRESPONSETIME
* SOURCEIPHASH
* LEASTBANDWIDTH
* LEASTPACKETS
* STATICPROXIMITY
* RTT
* CUSTOMLOAD
| Load balancing method for the GSLB virtual server. Default value: LEASTCONNECTION Possible values = ROUNDROBIN, LEASTCONNECTION, LEASTRESPONSETIME, SOURCEIPHASH, LEASTBANDWIDTH, LEASTPACKETS, STATICPROXIMITY, RTT, CUSTOMLOAD |
| **mir** string | **Choices:*** enabled
* disabled
| Include multiple IP addresses in the DNS responses sent to clients. |
| **name** string | | Name for the GSLB virtual server. Must begin with an ASCII alphanumeric or underscore `_` character, and must contain only ASCII alphanumeric, underscore `_`, hash `#`, period `.`, space, colon `:`, at `@`, equals `=`, and hyphen `-` characters. Can be changed after the virtual server is created. Minimum length = 1 |
| **netmask** string | | IPv4 network mask for use in the SOURCEIPHASH load balancing method. Minimum length = 1 |
| **nitro\_pass** string / required | | The password with which to authenticate to the netscaler node. |
| **nitro\_protocol** string | **Choices:*** **http** β
* https
| Which protocol to use when accessing the nitro API objects. |
| **nitro\_timeout** float | **Default:**310 | Time in seconds until a timeout error is thrown when establishing a new session with Netscaler |
| **nitro\_user** string / required | | The username with which to authenticate to the netscaler node. |
| **nsip** string / required | | The ip address of the netscaler appliance where the nitro API calls will be made. The port can be specified with the colon (:). E.g. 192.168.1.1:555. |
| **persistenceid** string | | The persistence ID for the GSLB virtual server. The ID is a positive integer that enables GSLB sites to identify the GSLB virtual server, and is required if source IP address based or spill over based persistence is enabled on the virtual server. Minimum value = `0`
Maximum value = `65535`
|
| **persistencetype** string | **Choices:*** SOURCEIP
* NONE
| Use source IP address based persistence for the virtual server. After the load balancing method selects a service for the first packet, the IP address received in response to the DNS query is used for subsequent requests from the same client. |
| **persistmask** string | | The optional IPv4 network mask applied to IPv4 addresses to establish source IP address based persistence. Minimum length = 1 |
| **save\_config** boolean | **Choices:*** no
* **yes** β
| If `yes` the module will save the configuration on the netscaler node if it makes any changes. The module will not save the configuration on the netscaler node if it made no changes. |
| **service\_bindings** string | | List of bindings for gslb services bound to this gslb virtual server. |
| | **servicename** string | | Name of the GSLB service for which to change the weight. |
| | **weight** string | | Weight to assign to the GSLB service. |
| **servicetype** string | **Choices:*** HTTP
* FTP
* TCP
* UDP
* SSL
* SSL\_BRIDGE
* SSL\_TCP
* NNTP
* ANY
* SIP\_UDP
* SIP\_TCP
* SIP\_SSL
* RADIUS
* RDP
* RTSP
* MYSQL
* MSSQL
* ORACLE
| Protocol used by services bound to the virtual server. |
| **sobackupaction** string | **Choices:*** DROP
* ACCEPT
* REDIRECT
| Action to be performed if spillover is to take effect, but no backup chain to spillover is usable or exists. |
| **somethod** string | **Choices:*** CONNECTION
* DYNAMICCONNECTION
* BANDWIDTH
* HEALTH
* NONE
| Type of threshold that, when exceeded, triggers spillover. Available settings function as follows: \* `CONNECTION` - Spillover occurs when the number of client connections exceeds the threshold. \* `DYNAMICCONNECTION` - Spillover occurs when the number of client connections at the GSLB virtual server exceeds the sum of the maximum client (Max Clients) settings for bound GSLB services. Do not specify a spillover threshold for this setting, because the threshold is implied by the Max Clients settings of the bound GSLB services. \* `BANDWIDTH` - Spillover occurs when the bandwidth consumed by the GSLB virtual server's incoming and outgoing traffic exceeds the threshold. \* `HEALTH` - Spillover occurs when the percentage of weights of the GSLB services that are UP drops below the threshold. For example, if services gslbSvc1, gslbSvc2, and gslbSvc3 are bound to a virtual server, with weights 1, 2, and 3, and the spillover threshold is 50%, spillover occurs if gslbSvc1 and gslbSvc3 or gslbSvc2 and gslbSvc3 transition to DOWN. \* `NONE` - Spillover does not occur. |
| **sopersistence** string | **Choices:*** enabled
* disabled
| If spillover occurs, maintain source IP address based persistence for both primary and backup GSLB virtual servers. |
| **sopersistencetimeout** string | | Timeout for spillover persistence, in minutes. Default value: `2`
Minimum value = `2`
Maximum value = `1440`
|
| **sothreshold** string | | Threshold at which spillover occurs. Specify an integer for the CONNECTION spillover method, a bandwidth value in kilobits per second for the BANDWIDTH method (do not enter the units), or a percentage for the HEALTH method (do not enter the percentage symbol). Minimum value = `1`
Maximum value = `4294967287`
|
| **state** string | **Choices:*** absent
* **present** β
| The state of the resource being configured by the module on the netscaler node. When present the resource will be created if needed and configured according to the module's parameters. When absent the resource will be deleted from the netscaler node. |
| **timeout** string | | Idle time, in minutes, after which a persistence entry is cleared. Default value: `2`
Minimum value = `2`
Maximum value = `1440`
|
| **tolerance** string | | Site selection tolerance, in milliseconds, for implementing the RTT load balancing method. If a site's RTT deviates from the lowest RTT by more than the specified tolerance, the site is not considered when the NetScaler appliance makes a GSLB decision. The appliance implements the round robin method of global server load balancing between sites whose RTT values are within the specified tolerance. If the tolerance is 0 (zero), the appliance always sends clients the IP address of the site with the lowest RTT. Minimum value = `0`
Maximum value = `100`
|
| **v6netmasklen** string | | Number of bits to consider, in an IPv6 source IP address, for creating the hash that is required by the `SOURCEIPHASH` load balancing method. Default value: `128`
Minimum value = `1`
Maximum value = `128`
|
| **v6persistmasklen** string | | Number of bits to consider in an IPv6 source IP address when creating source IP address based persistence sessions. Default value: `128`
Minimum value = `1`
Maximum value = `128`
|
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* For more information on using Ansible to manage Citrix NetScaler Network devices see <https://www.ansible.com/ansible-netscaler>.
Examples
--------
```
# FIXME: Add examples
```
### Authors
* George Nikolopoulos (@giorgos-nikolopoulos)
ansible community.network.avi_seproperties β Module for setup of SeProperties Avi RESTful Object community.network.avi\_seproperties β Module for setup of SeProperties Avi RESTful Object
=========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_seproperties`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure SeProperties object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **se\_agent\_properties** string | | Seagentproperties settings for seproperties. |
| **se\_bootup\_properties** string | | Sebootupproperties settings for seproperties. |
| **se\_runtime\_properties** string | | Seruntimeproperties settings for seproperties. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. Default value when not specified in API or module is interpreted by Avi Controller as default. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create SeProperties object
community.network.avi_seproperties:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_seproperties
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | SeProperties (api/seproperties) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#ef889d8e9c9b808886c9ccdcd8d4c9ccdaddd4c9ccdbd7d48e9986818a9b98809d849cc9ccdbd9d48c8082)>
| programming_docs |
ansible community.network.slxos_interface β Manage Interfaces on Extreme SLX-OS network devices community.network.slxos\_interface β Manage Interfaces on Extreme SLX-OS network devices
========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.slxos_interface`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of Interfaces on Extreme SLX-OS network devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate** string | | List of Interfaces definitions. |
| **delay** string | **Default:**10 | Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state argument which are *state* with values `up`/`down`, *tx\_rate* and *rx\_rate*. |
| **description** string | | Description of Interface. |
| **enabled** boolean | **Choices:*** no
* **yes** β
| Interface link status. |
| **mtu** string | | Maximum size of transmit packet. |
| **name** string / required | | Name of the Interface. |
| **neighbors** string | | Check the operational state of given interface `name` for LLDP neighbor. The following suboptions are available. |
| | **host** string | | LLDP neighbor host for given interface `name`. |
| | **port** string | | LLDP neighbor port to which given interface `name` is connected. |
| **rx\_rate** string | | Receiver rate in bits per second (bps). |
| **speed** string | | Interface link speed. |
| **state** string | **Choices:*** **present** β
* absent
* up
* down
| State of the Interface configuration, `up` means present and operationally up and `down` means present and operationally `down`
|
| **tx\_rate** string | | Transmit rate in bits per second (bps). |
Notes
-----
Note
* Tested against SLX-OS 17s.1.02
Examples
--------
```
- name: Configure interface
community.network.slxos_interface:
name: Ethernet 0/2
description: test-interface
speed: 1000
mtu: 9216
- name: Remove interface
community.network.slxos_interface:
name: Loopback 9
state: absent
- name: Make interface up
community.network.slxos_interface:
name: Ethernet 0/2
enabled: True
- name: Make interface down
community.network.slxos_interface:
name: Ethernet 0/2
enabled: False
- name: Check intent arguments
community.network.slxos_interface:
name: Ethernet 0/2
state: up
tx_rate: ge(0)
rx_rate: le(0)
- name: Check neighbors intent arguments
community.network.slxos_interface:
name: Ethernet 0/41
neighbors:
- port: Ethernet 0/41
host: SLX
- name: Config + intent
community.network.slxos_interface:
name: Ethernet 0/2
enabled: False
state: down
- name: Add interface using aggregate
community.network.slxos_interface:
aggregate:
- { name: Ethernet 0/1, mtu: 1548, description: test-interface-1 }
- { name: Ethernet 0/2, mtu: 1548, description: test-interface-2 }
speed: 10000
state: present
- name: Delete interface using aggregate
community.network.slxos_interface:
aggregate:
- name: Loopback 9
- name: Loopback 10
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always, except for the platforms that use Netconf transport to manage the device. | The list of configuration mode commands to send to the device. **Sample:** ['interface Ethernet 0/2', 'description test-interface', 'mtu 1548'] |
### Authors
* Lindsay Hill (@LindsayHill)
ansible community.network.icx_ping β Tests reachability using ping from Ruckus ICX 7000 series switches community.network.icx\_ping β Tests reachability using ping from Ruckus ICX 7000 series switches
================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.icx_ping`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Tests reachability using ping from switch to a remote destination.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **count** integer | | Number of packets to send. Default is 1. |
| **dest** string / required | | ip-addr | host-name | vrf vrf-name | ipv6 [ ipv6-addr | host-name | vrf vrf-name] (resolvable by switch) of the remote node. |
| **size** integer | | Specifies the size of the ICMP data portion of the packet, in bytes. This is the payload and does not include the header. The value can range from 0 to 10000. The default is 16.. |
| **source** string | | IP address to be used as the origin of the ping packets. |
| **state** string | **Choices:*** absent
* **present** β
| Determines if the expected result is success or fail. |
| **timeout** integer | | Specifies the time, in milliseconds for which the device waits for a reply from the pinged device. The value can range from 1 to 4294967296. The default is 5000 (5 seconds). |
| **ttl** integer | | Specifies the time to live as a maximum number of hops. The value can range from 1 to 255. The default is 64. |
| **vrf** string | | Specifies the Virtual Routing and Forwarding (VRF) instance of the device to be pinged. |
Notes
-----
Note
* Tested against ICX 10.1
Examples
--------
```
- name: Test reachability to 10.10.10.10
community.network.icx_ping:
dest: 10.10.10.10
- name: Test reachability to ipv6 address from source with timeout
community.network.icx_ping:
dest: ipv6 2001:cdba:0000:0000:0000:0000:3257:9652
source: 10.1.1.1
timeout: 100000
- name: Test reachability to 10.1.1.1 through vrf using 5 packets
community.network.icx_ping:
dest: 10.1.1.1
vrf: x.x.x.x
count: 5
- name: Test unreachability to 10.30.30.30
community.network.icx_ping:
dest: 10.40.40.40
state: absent
- name: Test reachability to ipv4 with ttl and packet size
community.network.icx_ping:
dest: 10.10.10.10
ttl: 20
size: 500
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always | Show the command sent. **Sample:** ['ping 10.40.40.40 count 20 source loopback0', 'ping 10.40.40.40'] |
| **packet\_loss** string | always | Percentage of packets lost. **Sample:** 0% |
| **packets\_rx** integer | always | Packets successfully received. **Sample:** 20 |
| **packets\_tx** integer | always | Packets successfully transmitted. **Sample:** 20 |
| **rtt** dictionary | always | Show RTT stats. **Sample:** {'avg': 2, 'max': 8, 'min': 1} |
### Authors
* Ruckus Wireless (@Commscope)
ansible community.network.ironware_facts β Collect facts from devices running Extreme Ironware community.network.ironware\_facts β Collect facts from devices running Extreme Ironware
=======================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ironware_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Collects a base set of device facts from a remote device that is running Ironware. This module prepends all of the base network fact keys with `ansible_net_<fact>`. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **authorize** boolean | **Choices:*** **no** β
* yes
| **Deprecated** Starting with Ansible 2.7 we recommend using `connection: network_cli` and `become: yes`. For more information please see the [IronWare Platform Options guide](user_guide/platform_ironware). Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
| **gather\_subset** string | **Default:**["!config", "!mpls"] | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, hardware, config, mpls and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial `!` to specify that a specific subset should not be collected. |
| **provider** dictionary | | **Deprecated** Starting with Ansible 2.7 we recommend using `connection: network_cli` and `become: yes`. For more information please see the [IronWare Platform Options guide](user_guide/platform_ironware). A dict object containing connection details. |
| | **auth\_pass** string | | Specifies the password to use if required to enter privileged mode on the remote device. If *authorize* is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTH_PASS` will be used instead. |
| | **authorize** boolean | **Choices:*** **no** β
* yes
| Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_AUTHORIZE` will be used instead. |
| | **host** string | | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
| | **port** integer | **Default:**22 | Specifies the port to use when building the connection to the remote device. |
| | **ssh\_keyfile** path | | Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
| | **timeout** integer | **Default:**10 | Specifies idle timeout in seconds for the connection, in seconds. Useful if the console freezes before continuing. For example when saving configurations. |
| | **username** string | | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
Notes
-----
Note
* Tested against Ironware 5.8e
* For more information on using Ansible to manage network devices see the [Ansible Network Guide](../../../network/index#network-guide)
Examples
--------
```
- name: Collect all facts from the device
community.network.ironware_facts:
gather_subset: all
- name: Collect only the config and default facts
community.network.ironware_facts:
gather_subset:
- config
- name: Do not collect hardware facts
community.network.ironware_facts:
gather_subset:
- "!hardware"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ansible\_net\_all\_ipv4\_addresses** list / elements=string | when interfaces is configured | All IPv4 addresses configured on the device |
| **ansible\_net\_all\_ipv6\_addresses** list / elements=string | when interfaces is configured | All IPv6 addresses configured on the device |
| **ansible\_net\_config** string | when config is configured | The current active config from the device |
| **ansible\_net\_filesystems** list / elements=string | when hardware is configured | All file system names available on the device |
| **ansible\_net\_gather\_subset** list / elements=string | always | The list of fact subsets collected from the device |
| **ansible\_net\_interfaces** dictionary | when interfaces is configured | A hash of all interfaces running on the system |
| **ansible\_net\_memfree\_mb** integer | when hardware is configured | The available free memory on the remote device in Mb |
| **ansible\_net\_memtotal\_mb** integer | when hardware is configured | The total memory on the remote device in Mb |
| **ansible\_net\_model** string | always | The model name returned from the device |
| **ansible\_net\_mpls\_lsps** dictionary | When LSP is configured | All MPLS LSPs configured on the device |
| **ansible\_net\_mpls\_vll** dictionary | When MPLS VLL is configured | All VLL instances configured on the device |
| **ansible\_net\_mpls\_vll\_local** dictionary | When MPLS VLL-LOCAL is configured | All VLL-LOCAL instances configured on the device |
| **ansible\_net\_mpls\_vpls** dictionary | When MPLS VPLS is configured | All VPLS instances configured on the device |
| **ansible\_net\_neighbors** dictionary | when interfaces is configured | The list of LLDP neighbors from the remote device |
| **ansible\_net\_serialnum** string | always | The serial number of the remote device |
| **ansible\_net\_version** string | always | The operating system version running on the remote device |
### Authors
* Paul Baker (@paulquack)
ansible community.network.ce_ospf_vrf β Manages configuration of an OSPF VPN instance on HUAWEI CloudEngine switches. community.network.ce\_ospf\_vrf β Manages configuration of an OSPF VPN instance on HUAWEI CloudEngine switches.
===============================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_ospf_vrf`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages configuration of an OSPF VPN instance on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bandwidth** string | | Specifies the reference bandwidth used to assign ospf cost. Valid values are an integer, in Mbps, 1 - 2147483648, the default value is 100. |
| **description** string | | Specifies the description information of ospf process. |
| **lsaaholdinterval** string | | Specifies the hold interval of arrive LSA when use the intelligent timer. Valid value is an integer, in millisecond, from 0 to 10000, the default value is 500. |
| **lsaainterval** string | | Specifies the interval of arrive LSA when use the general timer. Valid value is an integer, in millisecond, from 0 to 10000. |
| **lsaalflag** boolean | **Choices:*** **no** β
* yes
| Specifies the mode of timer to calculate interval of arrive LSA. If set the parameter but not specifies value, the default will be used. If true use general timer. If false use intelligent timer. |
| **lsaamaxinterval** string | | Specifies the max interval of arrive LSA when use the intelligent timer. Valid value is an integer, in millisecond, from 0 to 10000, the default value is 1000. |
| **lsaastartinterval** string | | Specifies the start interval of arrive LSA when use the intelligent timer. Valid value is an integer, in millisecond, from 0 to 10000, the default value is 500. |
| **lsaoholdinterval** string | | Specifies the hold interval of originate LSA . Valid value is an integer, in millisecond, from 0 to 5000, the default value is 1000. |
| **lsaointerval** string | | Specifies the interval of originate LSA . Valid value is an integer, in second, from 0 to 10, the default value is 5. |
| **lsaointervalflag** boolean | **Choices:*** **no** β
* yes
| Specifies whether cancel the interval of LSA originate or not. If set the parameter but noe specifies value, the default will be used. true:cancel the interval of LSA originate, the interval is 0. false:do not cancel the interval of LSA originate. |
| **lsaomaxinterval** string | | Specifies the max interval of originate LSA . Valid value is an integer, in millisecond, from 1 to 10000, the default value is 5000. |
| **lsaostartinterval** string | | Specifies the start interval of originate LSA . Valid value is an integer, in millisecond, from 0 to 1000, the default value is 500. |
| **ospf** string / required | | The ID of the ospf process. Valid values are an integer, 1 - 4294967295, the default value is 1. |
| **route\_id** string | | Specifies the ospf private route id,. Valid values are a string, formatted as an IP address (i.e. "10.1.1.1") the length is 0 - 20. |
| **spfholdinterval** string | | Specifies the hold interval to calculate SPF when use intelligent timer. Valid value is an integer, in millisecond, from 1 to 5000, the default value is 200. |
| **spfinterval** string | | Specifies the interval to calculate SPF when use second level timer. Valid value is an integer, in second, from 1 to 10. |
| **spfintervalmi** string | | Specifies the interval to calculate SPF when use millisecond level timer. Valid value is an integer, in millisecond, from 1 to 10000. |
| **spfintervaltype** string | **Choices:*** **intelligent-timer** β
* timer
* millisecond
| Specifies the mode of timer which used to calculate SPF. If set the parameter but noe specifies value, the default will be used. If is intelligent-timer, then use intelligent timer. If is timer, then use second level timer. If is millisecond, then use millisecond level timer. |
| **spfmaxinterval** string | | Specifies the max interval to calculate SPF when use intelligent timer. Valid value is an integer, in millisecond, from 1 to 20000, the default value is 5000. |
| **spfstartinterval** string | | Specifies the start interval to calculate SPF when use intelligent timer. Valid value is an integer, in millisecond, from 1 to 1000, the default value is 50. |
| **state** string | **Choices:*** **present** β
* absent
| Specify desired state of the resource. |
| **vrf** string | **Default:**"\_public\_" | Specifies the vpn instance which use ospf,length is 1 - 31. Valid values are a string. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Ospf vrf module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Configure ospf route id
community.network.ce_ospf_vrf:
ospf: 2
route_id: 2.2.2.2
lsaointervalflag: False
lsaointerval: 2
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device |
| **end\_state** dictionary | verbose mode | k/v pairs of configuration after module execution **Sample:** {'bandwidthReference': '100', 'description': None, 'lsaArrivalFlag': 'false', 'lsaArrivalHoldInterval': '500', 'lsaArrivalInterval': None, 'lsaArrivalMaxInterval': '1000', 'lsaArrivalStartInterval': '500', 'lsaOriginateHoldInterval': '1000', 'lsaOriginateInterval': '2', 'lsaOriginateIntervalFlag': 'false', 'lsaOriginateMaxInterval': '5000', 'lsaOriginateStartInterval': '500', 'processId': '2', 'routerId': '2.2.2.2', 'spfScheduleHoldInterval': '1000', 'spfScheduleInterval': None, 'spfScheduleIntervalMillisecond': None, 'spfScheduleIntervalType': 'intelligent-timer', 'spfScheduleMaxInterval': '10000', 'spfScheduleStartInterval': '500', 'vrfName': '\_public\_'} |
| **existing** dictionary | verbose mode | k/v pairs of existing configuration **Sample:** {'bandwidthReference': '100', 'description': None, 'lsaArrivalFlag': 'false', 'lsaArrivalHoldInterval': '500', 'lsaArrivalInterval': None, 'lsaArrivalMaxInterval': '1000', 'lsaArrivalStartInterval': '500', 'lsaOriginateHoldInterval': '1000', 'lsaOriginateInterval': '2', 'lsaOriginateIntervalFlag': 'false', 'lsaOriginateMaxInterval': '5000', 'lsaOriginateStartInterval': '500', 'processId': '2', 'routerId': '2.2.2.2', 'spfScheduleHoldInterval': '1000', 'spfScheduleInterval': None, 'spfScheduleIntervalMillisecond': None, 'spfScheduleIntervalType': 'intelligent-timer', 'spfScheduleMaxInterval': '10000', 'spfScheduleStartInterval': '500', 'vrfName': '\_public\_'} |
| **proposed** dictionary | verbose mode | k/v pairs of parameters passed into module **Sample:** {'bandwidth': '100', 'description': None, 'lsaaholdinterval': '500', 'lsaainterval': None, 'lsaalflag': 'False', 'lsaamaxinterval': '1000', 'lsaastartinterval': '500', 'lsaoholdinterval': '1000', 'lsaointerval': '2', 'lsaointervalflag': 'False', 'lsaomaxinterval': '5000', 'lsaostartinterval': '500', 'process\_id': '2', 'route\_id': '2.2.2.2', 'spfholdinterval': '1000', 'spfinterval': None, 'spfintervalmi': None, 'spfintervaltype': 'intelligent-timer', 'spfmaxinterval': '10000', 'spfstartinterval': '500', 'vrf': '\_public\_'} |
| **updates** list / elements=string | always | commands sent to the device **Sample:** ['ospf 2'] |
### Authors
* Yang yang (@QijunPan)
| programming_docs |
ansible community.network.avi_role β Module for setup of Role Avi RESTful Object community.network.avi\_role β Module for setup of Role Avi RESTful Object
=========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_role`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure Role object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **name** string / required | | Name of the object. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **privileges** string | | List of permission. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create Role object
community.network.avi_role:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_role
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | Role (api/role) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#5b3c293a282f343c327d78686c607d786e69607d786f63603a2d32353e2f2c342930287d786f6d60383436)>
ansible community.network.pn_stp β CLI command to modify stp community.network.pn\_stp β CLI command to modify stp
=====================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_stp`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to modify Spanning Tree Protocol parameters.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_bpdus\_bridge\_ports** boolean | **Choices:*** no
* yes
| BPDU packets to bridge specific port. |
| **pn\_bridge\_id** string | | STP bridge id. |
| **pn\_bridge\_priority** string | **Default:**"32768" | STP bridge priority. |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_enable** boolean | **Choices:*** no
* yes
| enable or disable STP |
| **pn\_forwarding\_delay** string | **Default:**"15" | STP forwarding delay between 4 and 30 secs. |
| **pn\_hello\_time** string | **Default:**"2" | STP hello time between 1 and 10 secs. |
| **pn\_max\_age** string | **Default:**"20" | maximum age time between 6 and 40 secs. |
| **pn\_mst\_config\_name** string | | Name for MST Configuration Instance. |
| **pn\_mst\_max\_hops** string | **Default:**"20" | maximum hop count for mstp bpdu. |
| **pn\_root\_guard\_wait\_time** string | **Default:**"20" | root guard wait time between 0 and 300 secs. 0 to disable wait. |
| **pn\_stp\_mode** string | **Choices:*** rstp
* mstp
| STP mode. |
| **state** string / required | **Choices:*** update
| State the action to perform. Use `update` to stp. |
Examples
--------
```
- name: Modify stp
community.network.pn_stp:
pn_cliswitch: "sw01"
state: "update"
pn_hello_time: "3"
pn_stp_mode: "rstp"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the stp command. |
| **stdout** list / elements=string | always | set of responses from the stp command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.exos_lldp_interfaces β Manage link layer discovery protocol (LLDP) attributes of interfaces on EXOS platforms. community.network.exos\_lldp\_interfaces β Manage link layer discovery protocol (LLDP) attributes of interfaces on EXOS platforms.
==================================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.exos_lldp_interfaces`.
New in version 0.2.0: of community.network
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module manages link layer discovery protocol (LLDP) attributes of interfaces on Extreme Networks EXOS platforms.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **config** list / elements=dictionary | | The list of link layer discovery protocol interface attribute configurations |
| | **enabled** boolean | **Choices:*** no
* yes
| This is a boolean value to control disabling of LLDP on the interface `name`
|
| | **name** string / required | | Name of the interface LLDP needs to be configured on. |
| **state** string | **Choices:*** **merged** β
* replaced
* overridden
* deleted
| The state the configuration should be left in. |
Examples
--------
```
# Using merged
# Before state:
# -------------
#
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": true,
# "name": "1"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "2"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "3"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "4"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "5"
# }
# }
# ]
# }
# }
- name: Merge provided configuration with device configuration
community.network.exos_lldp_interfaces:
config:
- name: '2'
enabled: false
- name: '5'
enabled: true
state: merged
# Module Execution Results:
# -------------------------
#
# "before":
# - name: '1'
# enabled: True
# - name: '2'
# enabled: True
# - name: '3'
# enabled: False
# - name: '4'
# enabled: True
# - name: '5'
# enabled: False
#
# "requests": [
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": false,
# "name": "2"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=2/config"
# },
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": true,
# "name": "5"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=5/config"
# }
# ]
#
# "after":
# - name: '1'
# enabled: True
# - name: '2'
# enabled: False
# - name: '3'
# enabled: False
# - name: '4'
# enabled: True
# - name: '5'
# enabled: True
# After state:
# -------------
#
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": true,
# "name": "1"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "2"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "3"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "4"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "5"
# }
# }
# ]
# }
# }
# Using replaced
# Before state:
# -------------
#
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": true,
# "name": "1"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "2"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "3"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "4"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "5"
# }
# }
# ]
# }
# }
- name: Replaces device configuration of listed lldp_interfaces with provided configuration
community.network.exos_lldp_interfaces:
config:
- name: '1'
enabled: false
- name: '3'
enabled: true
state: merged
# Module Execution Results:
# -------------------------
#
# "before":
# - name: '1'
# enabled: True
# - name: '2'
# enabled: True
# - name: '3'
# enabled: False
# - name: '4'
# enabled: True
# - name: '5'
# enabled: False
#
# "requests": [
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": false,
# "name": "1"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=1/config"
# },
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": true,
# "name": "3"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=3/config"
# }
# ]
#
# "after":
# - name: '1'
# enabled: False
# - name: '2'
# enabled: True
# - name: '3'
# enabled: True
# - name: '4'
# enabled: True
# - name: '5'
# enabled: False
# After state:
# -------------
#
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": false,
# "name": "1"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "2"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "3"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "4"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "5"
# }
# }
# ]
# }
# }
# Using deleted
# Before state:
# -------------
#
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": false,
# "name": "1"
# },
# },
# {
# "config": {
# "enabled": false,
# "name": "2"
# },
# },
# {
# "config": {
# "enabled": false,
# "name": "3"
# },
# }
# ]
# }
# }
- name: Delete lldp interface configuration (this will not delete other lldp configuration)
community.network.exos_lldp_interfaces:
config:
- name: '1'
- name: '3'
state: deleted
# Module Execution Results:
# -------------------------
#
# "before":
# - name: '1'
# enabled: False
# - name: '2'
# enabled: False
# - name: '3'
# enabled: False
#
# "requests": [
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": true,
# "name": "1"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=1/config"
# },
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": true,
# "name": "3"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=3/config"
# }
# ]
#
# "after":
# - name: '1'
# enabled: True
# - name: '2'
# enabled: False
# - name: '3'
# enabled: True
#
# After state:
# -------------
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": true,
# "name": "1"
# },
# },
# {
# "config": {
# "enabled": false,
# "name": "2"
# },
# },
# {
# "config": {
# "enabled": true,
# "name": "3"
# },
# }
# ]
# }
# }
# Using overridden
# Before state:
# -------------
#
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": true,
# "name": "1"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "2"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "3"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "4"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "5"
# }
# }
# ]
# }
# }
- name: Override device configuration of all lldp_interfaces with provided configuration
community.network.exos_lldp_interfaces:
config:
- name: '3'
enabled: true
state: overridden
# Module Execution Results:
# -------------------------
#
# "before":
# - name: '1'
# enabled: True
# - name: '2'
# enabled: True
# - name: '3'
# enabled: False
# - name: '4'
# enabled: True
# - name: '5'
# enabled: False
#
# "requests": [
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": true,
# "name": "5"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=5/config"
# },
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": true,
# "name": "3"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=3/config"
# }
# ]
#
# "after":
# - name: '1'
# enabled: True
# - name: '2'
# enabled: True
# - name: '3'
# enabled: True
# - name: '4'
# enabled: True
# - name: '5'
# enabled: True
# After state:
# -------------
#
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": true,
# "name": "1"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "2"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "3"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "4"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "5"
# }
# }
# ]
# }
# }
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **after** list / elements=string | when changed | The resulting configuration model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. |
| **before** list / elements=string | always | The configuration prior to the model invocation. **Sample:** The configuration returned will always be in the same format of the parameters above. |
| **requests** list / elements=string | always | The set of requests pushed to the remote device. **Sample:** [{'data': '...', 'method': '...', 'path': '...'}, {'data': '...', 'method': '...', 'path': '...'}, {'data': '...', 'method': '...', 'path': '...'}] |
### Authors
* Jayalakshmi Viswanathan (@JayalakshmiV)
| programming_docs |
ansible community.network.netscaler_cs_vserver β Manage content switching vserver community.network.netscaler\_cs\_vserver β Manage content switching vserver
===========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.netscaler_cs_vserver`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage content switching vserver
* This module is intended to run either on the ansible control node or a bastion (jumpserver) with access to the actual netscaler instance
Requirements
------------
The below requirements are needed on the host that executes this module.
* nitro python sdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **appflowlog** string | **Choices:*** enabled
* disabled
| Enable logging appflow flow information. |
| **authentication** boolean | **Choices:*** no
* yes
| Authenticate users who request a connection to the content switching virtual server. |
| **authenticationhost** string | | FQDN of the authentication virtual server. The service type of the virtual server should be either `HTTP` or `SSL`. Minimum length = 3 Maximum length = 252 |
| **authn401** boolean | **Choices:*** no
* yes
| Enable HTTP 401-response based authentication. |
| **authnprofile** string | | Name of the authentication profile to be used when authentication is turned on. |
| **authnvsname** string | | Name of authentication virtual server that authenticates the incoming user requests to this content switching virtual server. . Minimum length = 1 Maximum length = 252 |
| **backupip** string | | . Minimum length = 1 |
| **backupvserver** string | | Name of the backup virtual server that you are configuring. Must begin with an ASCII alphanumeric or underscore `_` character, and must contain only ASCII alphanumeric, underscore `_`, hash `#`, period `.`, space , colon `:`, at sign `@`, equal sign `=`, and hyphen `-` characters. Can be changed after the backup virtual server is created. You can assign a different backup virtual server or rename the existing virtual server. Minimum length = 1 |
| **cacheable** boolean | **Choices:*** no
* yes
| Use this option to specify whether a virtual server, used for load balancing or content switching, routes requests to the cache redirection virtual server before sending it to the configured servers. |
| **casesensitive** boolean | **Choices:*** no
* yes
| Consider case in URLs (for policies that use URLs instead of RULES). For example, with the `on` setting, the URLs /a/1.html and /A/1.HTML are treated differently and can have different targets (set by content switching policies). With the `off` setting, /a/1.html and /A/1.HTML are switched to the same target. |
| **clttimeout** string | | Idle time, in seconds, after which the client connection is terminated. The default values are: Minimum value = `0`
Maximum value = `31536000`
|
| **comment** string | | Information about this virtual server. |
| **cookiedomain** string | | . Minimum length = 1 |
| **cookietimeout** string | | . Minimum value = `0`
Maximum value = `1440`
|
| **dbprofilename** string | | Name of the DB profile. Minimum length = 1 Maximum length = 127 |
| **disabled** boolean | **Choices:*** **no** β
* yes
| When set to `yes` the cs vserver will be disabled. When set to `no` the cs vserver will be enabled. Note that due to limitations of the underlying NITRO API a `disabled` state change alone does not cause the module result to report a changed status. |
| **disableprimaryondown** string | **Choices:*** enabled
* disabled
| Continue forwarding the traffic to backup virtual server even after the primary server comes UP from the DOWN state. |
| **dnsprofilename** string | | Name of the DNS profile to be associated with the VServer. DNS profile properties will applied to the transactions processed by a VServer. This parameter is valid only for DNS and DNS-TCP VServers. Minimum length = 1 Maximum length = 127 |
| **domainname** string | | Domain name for which to change the time to live (TTL) and/or backup service IP address. Minimum length = 1 |
| **downstateflush** string | **Choices:*** enabled
* disabled
| Flush all active transactions associated with a virtual server whose state transitions from UP to DOWN. Do not enable this option for applications that must complete their transactions. |
| **httpprofilename** string | | Name of the HTTP profile containing HTTP configuration settings for the virtual server. The service type of the virtual server should be either `HTTP` or `SSL`. Minimum length = 1 Maximum length = 127 |
| **icmpvsrresponse** string | **Choices:*** PASSIVE
* ACTIVE
| Can be active or passive. |
| **insertvserveripport** string | **Choices:*** OFF
* VIPADDR
* V6TOV4MAPPING
| Insert the virtual server's VIP address and port number in the request header. Available values function as follows:
`VIPADDR` - Header contains the vserver's IP address and port number without any translation.
`OFF` - The virtual IP and port header insertion option is disabled.
`V6TOV4MAPPING` - Header contains the mapped IPv4 address corresponding to the IPv6 address of the vserver and the port number. An IPv6 address can be mapped to a user-specified IPv4 address using the set ns ip6 command. |
| **ipmask** string | | IP mask, in dotted decimal notation, for the IP Pattern parameter. Can have leading or trailing non-zero octets (for example, `255.255.240.0` or `0.0.255.255`). Accordingly, the mask specifies whether the first n bits or the last n bits of the destination IP address in a client request are to be matched with the corresponding bits in the IP pattern. The former is called a forward mask. The latter is called a reverse mask. |
| **ippattern** string | | IP address pattern, in dotted decimal notation, for identifying packets to be accepted by the virtual server. The IP Mask parameter specifies which part of the destination IP address is matched against the pattern. Mutually exclusive with the IP Address parameter. For example, if the IP pattern assigned to the virtual server is `198.51.100.0` and the IP mask is `255.255.240.0` (a forward mask), the first 20 bits in the destination IP addresses are matched with the first 20 bits in the pattern. The virtual server accepts requests with IP addresses that range from 198.51.96.1 to 198.51.111.254. You can also use a pattern such as `0.0.2.2` and a mask such as `0.0.255.255` (a reverse mask). If a destination IP address matches more than one IP pattern, the pattern with the longest match is selected, and the associated virtual server processes the request. For example, if the virtual servers, `vs1` and `vs2`, have the same IP pattern, `0.0.100.128`, but different IP masks of `0.0.255.255` and `0.0.224.255`, a destination IP address of 198.51.100.128 has the longest match with the IP pattern of `vs1`. If a destination IP address matches two or more virtual servers to the same extent, the request is processed by the virtual server whose port number matches the port number in the request. |
| **ipv46** string | | IP address of the content switching virtual server. Minimum length = 1 |
| **l2conn** boolean | **Choices:*** no
* yes
| Use L2 Parameters to identify a connection. |
| **lbvserver** string | | The default Load Balancing virtual server. |
| **listenpolicy** string | | String specifying the listen policy for the content switching virtual server. Can be either the name of an existing expression or an in-line expression. |
| **mssqlserverversion** string | **Choices:*** 70
* 2000
* 2000SP1
* 2005
* 2008
* 2008R2
* 2012
* 2014
| The version of the MSSQL server. |
| **mysqlcharacterset** string | | The character set returned by the mysql vserver. |
| **mysqlprotocolversion** string | | The protocol version returned by the mysql vserver. |
| **mysqlservercapabilities** string | | The server capabilities returned by the mysql vserver. |
| **mysqlserverversion** string | | The server version string returned by the mysql vserver. Minimum length = 1 Maximum length = 31 |
| **name** string | | Name for the content switching virtual server. Must begin with an ASCII alphanumeric or underscore `_` character, and must contain only ASCII alphanumeric, underscore `_`, hash `#`, period `.`, space, colon `:`, at sign `@`, equal sign `=`, and hyphen `-` characters. Cannot be changed after the CS virtual server is created. Minimum length = 1 |
| **netprofile** string | | The name of the network profile. Minimum length = 1 Maximum length = 127 |
| **nitro\_pass** string / required | | The password with which to authenticate to the netscaler node. |
| **nitro\_protocol** string | **Choices:*** **http** β
* https
| Which protocol to use when accessing the nitro API objects. |
| **nitro\_timeout** float | **Default:**310 | Time in seconds until a timeout error is thrown when establishing a new session with Netscaler |
| **nitro\_user** string / required | | The username with which to authenticate to the netscaler node. |
| **nsip** string / required | | The ip address of the netscaler appliance where the nitro API calls will be made. The port can be specified with the colon (:). E.g. 192.168.1.1:555. |
| **oracleserverversion** string | **Choices:*** 10G
* 11G
| Oracle server version. |
| **port** string | | Port number for content switching virtual server. Minimum value = 1 Range `1` - `65535`
\* in CLI is represented as 65535 in NITRO API |
| **precedence** string | **Choices:*** RULE
* URL
| Type of precedence to use for both RULE-based and URL-based policies on the content switching virtual server. With the default `RULE` setting, incoming requests are evaluated against the rule-based content switching policies. If none of the rules match, the URL in the request is evaluated against the URL-based content switching policies. |
| **push** string | **Choices:*** enabled
* disabled
| Process traffic with the push virtual server that is bound to this content switching virtual server (specified by the Push VServer parameter). The service type of the push virtual server should be either `HTTP` or `SSL`. |
| **pushlabel** string | | Expression for extracting the label from the response received from server. This string can be either an existing rule name or an inline expression. The service type of the virtual server should be either `HTTP` or `SSL`. |
| **pushmulticlients** boolean | **Choices:*** no
* yes
| Allow multiple Web 2.0 connections from the same client to connect to the virtual server and expect updates. |
| **pushvserver** string | | Name of the load balancing virtual server, of type `PUSH` or `SSL_PUSH`, to which the server pushes updates received on the client-facing load balancing virtual server. Minimum length = 1 |
| **range** string | | Number of consecutive IP addresses, starting with the address specified by the IP Address parameter, to include in a range of addresses assigned to this virtual server. Minimum value = `1`
Maximum value = `254`
|
| **redirectportrewrite** string | **Choices:*** enabled
* disabled
| State of port rewrite while performing HTTP redirect. |
| **redirecturl** string | | URL to which traffic is redirected if the virtual server becomes unavailable. The service type of the virtual server should be either `HTTP` or `SSL`. Caution: Make sure that the domain in the URL does not match the domain specified for a content switching policy. If it does, requests are continuously redirected to the unavailable virtual server. Minimum length = 1 |
| **rhistate** string | **Choices:*** PASSIVE
* ACTIVE
| A host route is injected according to the setting on the virtual servers \* If set to `PASSIVE` on all the virtual servers that share the IP address, the appliance always injects the hostroute. \* If set to `ACTIVE` on all the virtual servers that share the IP address, the appliance injects even if one virtual server is UP. \* If set to `ACTIVE` on some virtual servers and `PASSIVE` on the others, the appliance, injects even if one virtual server set to `ACTIVE` is UP. |
| **rtspnat** boolean | **Choices:*** no
* yes
| Enable network address translation (NAT) for real-time streaming protocol (RTSP) connections. |
| **save\_config** boolean | **Choices:*** no
* **yes** β
| If `yes` the module will save the configuration on the netscaler node if it makes any changes. The module will not save the configuration on the netscaler node if it made no changes. |
| **servicetype** string | **Choices:*** HTTP
* SSL
* TCP
* FTP
* RTSP
* SSL\_TCP
* UDP
* DNS
* SIP\_UDP
* SIP\_TCP
* SIP\_SSL
* ANY
* RADIUS
* RDP
* MYSQL
* MSSQL
* DIAMETER
* SSL\_DIAMETER
* DNS\_TCP
* ORACLE
* SMPP
| Protocol used by the virtual server. |
| **sitedomainttl** string | | . Minimum value = `1`
|
| **sobackupaction** string | **Choices:*** DROP
* ACCEPT
* REDIRECT
| Action to be performed if spillover is to take effect, but no backup chain to spillover is usable or exists. |
| **somethod** string | **Choices:*** CONNECTION
* DYNAMICCONNECTION
* BANDWIDTH
* HEALTH
* NONE
| Type of spillover used to divert traffic to the backup virtual server when the primary virtual server reaches the spillover threshold. Connection spillover is based on the number of connections. Bandwidth spillover is based on the total Kbps of incoming and outgoing traffic. |
| **sopersistence** string | **Choices:*** enabled
* disabled
| Maintain source-IP based persistence on primary and backup virtual servers. |
| **sopersistencetimeout** string | | Time-out value, in minutes, for spillover persistence. Minimum value = `2`
Maximum value = `1440`
|
| **sothreshold** string | | Depending on the spillover method, the maximum number of connections or the maximum total bandwidth (Kbps) that a virtual server can handle before spillover occurs. Minimum value = `1`
Maximum value = `4294967287`
|
| **ssl\_certkey** string | | The name of the ssl certificate that is bound to this service. The ssl certificate must already exist. Creating the certificate can be done with the [community.network.netscaler\_ssl\_certkey](netscaler_ssl_certkey_module) module. This option is only applicable only when `servicetype` is `SSL`. |
| **state** string | **Choices:*** absent
* **present** β
| The state of the resource being configured by the module on the netscaler node. When present the resource will be created if needed and configured according to the module's parameters. When absent the resource will be deleted from the netscaler node. |
| **stateupdate** string | **Choices:*** enabled
* disabled
| Enable state updates for a specific content switching virtual server. By default, the Content Switching virtual server is always UP, regardless of the state of the Load Balancing virtual servers bound to it. This parameter interacts with the global setting as follows: Global Level | Vserver Level | Result enabled enabled enabled enabled disabled enabled disabled enabled enabled disabled disabled disabled If you want to enable state updates for only some content switching virtual servers, be sure to disable the state update parameter. |
| **targettype** string | **Choices:*** GSLB
| Virtual server target type. |
| **tcpprofilename** string | | Name of the TCP profile containing TCP configuration settings for the virtual server. Minimum length = 1 Maximum length = 127 |
| **td** string | | Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Minimum value = 0 Maximum value = 4094 |
| **ttl** string | | . Minimum value = `1`
|
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
| **vipheader** string | | Name of virtual server IP and port header, for use with the VServer IP Port Insertion parameter. Minimum length = 1 |
Notes
-----
Note
* For more information on using Ansible to manage Citrix NetScaler Network devices see <https://www.ansible.com/ansible-netscaler>.
Examples
--------
```
# policy_1 must have been already created with the netscaler_cs_policy module
# lbvserver_1 must have been already created with the netscaler_lb_vserver module
- name: Setup content switching vserver
delegate_to: localhost
community.network.netscaler_cs_vserver:
nsip: 172.18.0.2
nitro_user: nsroot
nitro_pass: nsroot
state: present
name: cs_vserver_1
ipv46: 192.168.1.1
port: 80
servicetype: HTTP
policybindings:
- policyname: policy_1
targetlbvserver: lbvserver_1
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **diff** dictionary | failure | List of differences between the actual configured object and the configuration specified in the module **Sample:** {'clttimeout': 'difference. ours: (float) 100.0 other: (float) 60.0'} |
| **loglines** list / elements=string | always | list of logged messages by the module **Sample:** ['message 1', 'message 2'] |
| **msg** string | failure | Message detailing the failure reason **Sample:** Action does not exist |
### Authors
* George Nikolopoulos (@giorgos-nikolopoulos)
ansible community.network.icx_static_route β Manage static IP routes on Ruckus ICX 7000 series switches community.network.icx\_static\_route β Manage static IP routes on Ruckus ICX 7000 series switches
=================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.icx_static_route`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of static IP routes on Ruckus ICX network devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **admin\_distance** integer | | Admin distance of the static route. Range is 1 to 255. |
| **aggregate** list / elements=string | | List of static route definitions. |
| | **admin\_distance** integer | | Admin distance of the static route. Range is 1 to 255. |
| | **check\_running\_config** boolean | **Choices:*** no
* yes
| Check running configuration. This can be set as environment variable. Module will use environment variable value(default:True), unless it is overridden, by specifying it as module parameter. |
| | **mask** string | | Network prefix mask of the static route. |
| | **next\_hop** string | | Next hop IP of the static route. |
| | **prefix** string | | Network prefix of the static route. |
| | **state** string | **Choices:*** present
* absent
| State of the static route configuration. |
| **check\_running\_config** boolean | **Choices:*** no
* **yes** β
| Check running configuration. This can be set as environment variable. Module will use environment variable value(default:True), unless it is overridden, by specifying it as module parameter. |
| **mask** string | | Network prefix mask of the static route. |
| **next\_hop** string | | Next hop IP of the static route. |
| **prefix** string | | Network prefix of the static route. |
| **purge** boolean | **Choices:*** **no** β
* yes
| Purge routes not defined in the *aggregate* parameter. |
| **state** string | **Choices:*** **present** β
* absent
| State of the static route configuration. |
Notes
-----
Note
* Tested against ICX 10.1.
* For information on using ICX platform, see [the ICX OS Platform Options guide](user_guide/platform_icx).
Examples
--------
```
- name: Configure static route
community.network.icx_static_route:
prefix: 192.168.2.0/24
next_hop: 10.0.0.1
- name: Remove configuration
community.network.icx_static_route:
prefix: 192.168.2.0
mask: 255.255.255.0
next_hop: 10.0.0.1
state: absent
- name: Add static route aggregates
community.network.icx_static_route:
aggregate:
- { prefix: 172.16.32.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
- { prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
- name: Remove static route aggregates
community.network.icx_static_route:
aggregate:
- { prefix: 172.16.32.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
- { prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always | The list of configuration mode commands to send to the device **Sample:** ['ip route 192.168.2.0 255.255.255.0 10.0.0.1'] |
### Authors
* Ruckus Wireless (@Commscope)
| programming_docs |
ansible community.network.avi_errorpagebody β Module for setup of ErrorPageBody Avi RESTful Object community.network.avi\_errorpagebody β Module for setup of ErrorPageBody Avi RESTful Object
===========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_errorpagebody`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure ErrorPageBody object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **error\_page\_body** string | | Error page body sent to client when match. Field introduced in 17.2.4. |
| **format** string | | Format of an error page body html or json. Enum options - ERROR\_PAGE\_FORMAT\_HTML, ERROR\_PAGE\_FORMAT\_JSON. Field introduced in 18.2.3. Default value when not specified in API or module is interpreted by Avi Controller as ERROR\_PAGE\_FORMAT\_HTML. |
| **name** string / required | | Field introduced in 17.2.4. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. Field introduced in 17.2.4. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Field introduced in 17.2.4. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create ErrorPageBody object
community.network.avi_errorpagebody:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_errorpagebody
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | ErrorPageBody (api/errorpagebody) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#ee899c8f9d9a818987c8cdddd9d5c8cddbdcd5c8cddad6d58f9887808b9a99819c859dc8cddad8d58d8183)>
ansible community.network.cnos_conditional_template β Manage switch configuration using templates based on condition on devices running Lenovo CNOS community.network.cnos\_conditional\_template β Manage switch configuration using templates based on condition on devices running Lenovo CNOS
=============================================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_conditional_template`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module allows you to work with the running configuration of a switch. It provides a way to execute a set of CNOS commands on a switch by evaluating the current running configuration and executing the commands only if the specific settings have not been already configured. The configuration source can be a set of commands or a template written in the Jinja2 templating language. This module functions the same as the cnos\_template module. The only exception is that the following inventory variable can be specified. [βcondition = <flag string>β] When this inventory variable is specified as the variable of a task, the template is executed for the network element that matches the flag string. Usually, templates are used when commands are the same across a group of network devices. When there is a requirement to skip the execution of the template on one or more devices, it is recommended to use this module. This module uses SSH to manage network device configuration.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **commandfile** string / required | | This specifies the path to the CNOS command file which needs to be applied. This usually comes from the commands folder. Generally this file is the output of the variables applied on a template file. So this command is preceded by a template module. The command file must contain the Ansible keyword {{ inventory\_hostname }} and the condition flag in its filename to ensure that the command file is unique for each switch and condition. If this is omitted, the command file will be overwritten during iteration. For example, commandfile=./commands/clos\_leaf\_bgp\_ {{ inventory\_hostname }}\_LP21\_commands.txt |
| **condition** string / required | | If you specify condition=<flag string> in the inventory file against any device, the template execution is done for that device in case it matches the flag setting for that task. |
| **deviceType** string / required | **Choices:*** g8272\_cnos
* g8296\_cnos
* g8332\_cnos
* NE0152T
* NE1072T
* NE1032
* NE1032T
* NE10032
* NE2572
| This specifies the type of device where the method is executed. The choices NE1072T,NE1032,NE1032T,NE10032,NE2572 are added since Ansible 2.4. The choice NE0152T is added since 2.8 |
| **enablePassword** string | | Configures the password used to enter Global Configuration command mode on the switch. If the switch does not request this password, the parameter is ignored.While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **flag** string / required | | If a task needs to be executed, you have to set the flag the same as it is specified in the inventory for that device. |
| **host** string / required | | This is the variable used to search the hosts file at /etc/ansible/hosts and identify the IP address of the device on which the template is going to be applied. Usually the Ansible keyword {{ inventory\_hostname }} is specified in the playbook as an abstraction of the group of network elements that need to be configured. |
| **outputfile** string / required | | This specifies the file path where the output of each command execution is saved. Each command that is specified in the merged template file and each response from the device are saved here. Usually the location is the results folder, but you can choose another location based on your write permission. |
| **password** string / required | | Configures the password used to authenticate the connection to the remote device. The value of the password parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **username** string / required | | Configures the username used to authenticate the connection to the remote device. The value of the username parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
Notes
-----
Note
* For more information on using Ansible to manage Lenovo Network devices see <https://www.ansible.com/ansible-lenovo>.
Examples
--------
```
Tasks : The following are examples of using the module
cnos_conditional_template. These are written in the main.yml file of the
tasks directory.
---
- name: Applying CLI template on VLAG Tier1 Leaf Switch1
community.network.cnos_conditional_template:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/vlag_1tier_leaf_switch1_
{{ inventory_hostname }}_output.txt"
condition: "{{ hostvars[inventory_hostname]['condition']}}"
flag: "leaf_switch1"
commandfile: "./commands/vlag_1tier_leaf_switch1_
{{ inventory_hostname }}_commands.txt"
stp_mode1: "disable"
port_range1: "17,18,29,30"
portchannel_interface_number1: 1001
portchannel_mode1: active
slot_chassis_number1: 1/48
switchport_mode1: trunk
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | always | Success or failure message **Sample:** Template Applied. |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
ansible community.network.pn_ipv6security_raguard_vlan β CLI command to add/remove ipv6security-raguard-vlan community.network.pn\_ipv6security\_raguard\_vlan β CLI command to add/remove ipv6security-raguard-vlan
=======================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_ipv6security_raguard_vlan`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to Add vlans to RA Guard Policy and Remove vlans to RA Guard Policy.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_name** string / required | | RA Guard Policy Name. |
| **pn\_vlans** string / required | | Vlans attached to RA Guard Policy. |
| **state** string | **Choices:*** **present** β
* absent
| ipv6security-raguard-vlan configuration command. |
Examples
--------
```
- name: Ipv6 security raguard vlan add
community.network.pn_ipv6security_raguard_vlan:
pn_cliswitch: "sw01"
pn_name: "foo"
pn_vlans: "100-105"
- name: Ipv6 security raguard vlan add
community.network.pn_ipv6security_raguard_vlan:
pn_cliswitch: "sw01"
pn_name: "foo"
pn_vlans: "100"
- name: Ipv6 security raguard vlan remove
community.network.pn_ipv6security_raguard_vlan:
pn_cliswitch: "sw01"
pn_name: "foo"
pn_vlans: "100-105"
state: 'absent'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the ipv6security-raguard-vlan command. |
| **stdout** list / elements=string | always | set of responses from the ipv6security-raguard-vlan command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.avi_cloudconnectoruser β Module for setup of CloudConnectorUser Avi RESTful Object community.network.avi\_cloudconnectoruser β Module for setup of CloudConnectorUser Avi RESTful Object
=====================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_cloudconnectoruser`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure CloudConnectorUser object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **azure\_serviceprincipal** string | | Field introduced in 17.2.1. |
| **azure\_userpass** string | | Field introduced in 17.2.1. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **gcp\_credentials** string | | Credentials for google cloud platform. Field introduced in 18.2.1. |
| **name** string / required | | Name of the object. |
| **oci\_credentials** string | | Credentials for oracle cloud infrastructure. Field introduced in 18.2.1,18.1.3. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **private\_key** string | | Private\_key of cloudconnectoruser. |
| **public\_key** string | | Public\_key of cloudconnectoruser. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **tencent\_credentials** string | | Credentials for tencent cloud. Field introduced in 18.2.3. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create a Cloud connector user that is used for integration into cloud platforms
community.network.avi_cloudconnectoruser:
controller: '{{ controller }}'
name: root
password: '{{ password }}'
private_key: |
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----'
public_key: 'ssh-rsa ...'
tenant_ref: admin
username: '{{ username }}'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | CloudConnectorUser (api/cloudconnectoruser) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#1374617260677c747a353020242835302621283530272b2872657a7d7667647c6178603530272528707c7e)>
| programming_docs |
ansible community.network.ce_snmp_community β Manages SNMP community configuration on HUAWEI CloudEngine switches. community.network.ce\_snmp\_community β Manages SNMP community configuration on HUAWEI CloudEngine switches.
============================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_snmp_community`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages SNMP community configuration on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access\_right** string | **Choices:*** read
* write
| Access right read or write. |
| **acl\_number** string | | Access control list number. |
| **community\_mib\_view** string | | Mib view name. |
| **community\_name** string | | Unique name to identify the community. |
| **group\_name** string | | Unique name to identify the SNMPv3 group. |
| **notify\_view** string | | Mib view name for notification. |
| **read\_view** string | | Mib view name for read. |
| **security\_level** string | **Choices:*** noAuthNoPriv
* authentication
* privacy
| Security level indicating whether to use authentication and encryption. |
| **state** string | **Choices:*** **present** β
* absent
| Manage the state of the resource. |
| **write\_view** string | | Mib view name for write. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: CloudEngine snmp community test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Config SNMP community"
community.network.ce_snmp_community:
state: present
community_name: Wdz123456789
access_right: write
provider: "{{ cli }}"
- name: "Undo SNMP community"
community.network.ce_snmp_community:
state: absent
community_name: Wdz123456789
access_right: write
provider: "{{ cli }}"
- name: "Config SNMP group"
community.network.ce_snmp_community:
state: present
group_name: wdz_group
security_level: noAuthNoPriv
acl_number: 2000
provider: "{{ cli }}"
- name: "Undo SNMP group"
community.network.ce_snmp_community:
state: absent
group_name: wdz_group
security_level: noAuthNoPriv
acl_number: 2000
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution **Sample:** {'snmp v3 group': {'snmp\_group': ['wdz\_group', 'noAuthNoPriv', '2000']}} |
| **existing** dictionary | always | k/v pairs of existing aaa server |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'acl\_number': '2000', 'group\_name': 'wdz\_group', 'security\_level': 'noAuthNoPriv', 'state': 'present'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['snmp-agent group v3 wdz\_group noauthentication acl 2000'] |
### Authors
* wangdezhuang (@QijunPan)
ansible community.network.aireos_config β Manage Cisco WLC configurations community.network.aireos\_config β Manage Cisco WLC configurations
==================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.aireos_config`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* AireOS does not use a block indent file syntax, so there are no sections or parents. This module provides an implementation for working with AireOS configurations in a deterministic way.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **after** string | | The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with *before* this allows the playbook designer to append a set of commands to be executed after the command set. |
| **backup** boolean | **Choices:*** **no** β
* yes
| This argument will cause the module to create a full backup of the current `running-config` from the remote device before any changes are made. If the `backup_options` value is not given, the backup file is written to the `backup` folder in the playbook root directory. If the directory does not exist, it is created. |
| **backup\_options** dictionary | | This is a dict object containing configurable options related to backup file path. The value of this option is read only when `backup` is set to *yes*, if `backup` is set to *no* this option will be silently ignored. |
| | **dir\_path** path | | This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of `filename` or default filename as described in `filename` options description. If the path value is not given in that case a *backup* directory will be created in the current working directory and backup configuration will be copied in `filename` within *backup* directory. |
| | **filename** string | | The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by <hostname>\_config.<current-date>@<current-time> |
| **before** string | | The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system. |
| **diff\_against** string | **Choices:*** intended
* running
| When using the `ansible-playbook --diff` command line argument the module can generate diffs against different sources. When this option is configured as *intended*, the module will return the diff of the running-config against the configuration provided in the `intended_config` argument. When this option is configured as *running*, the module will return the before and after diff of the running-config with respect to any changes made to the device configuration. |
| **diff\_ignore\_lines** string | | Use this argument to specify one or more lines that should be ignored during the diff. This is used for lines in the configuration that are automatically updated by the system. This argument takes a list of regular expressions or exact line matches. |
| **intended\_config** string | | The `intended_config` provides the master configuration that the node should conform to and is used to check the final running-config against. This argument will not modify any settings on the remote device and is strictly used to check the compliance of the current device's configuration against. When specifying this argument, the task should also modify the `diff_against` value and set it to *intended*. |
| **lines** string | | The ordered set of commands that should be configured. The commands must be the exact same commands as found in the device run-config. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser.
aliases: commands |
| **match** string | **Choices:*** **line** β
* none
| Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to *line*, commands are matched line by line. If match is set to *none*, the module will not attempt to compare the source configuration with the running configuration on the remote device. |
| **provider** string | | A dict object containing connection details. |
| | **host** string / required | | Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. |
| | **password** string | | Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_PASSWORD` will be used instead. |
| | **port** integer | **Default:**22 | Specifies the port to use when building the connection to the remote device. |
| | **ssh\_keyfile** path | | Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_SSH_KEYFILE` will be used instead. |
| | **timeout** integer | **Default:**10 | Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
| | **username** string | | Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable `ANSIBLE_NET_USERNAME` will be used instead. |
| **running\_config** string | | The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The *running\_config* argument allows the implementer to pass in the configuration to use as the base config for comparison.
aliases: config |
| **save** boolean | **Choices:*** **no** β
* yes
| The `save` argument instructs the module to save the running-config to startup-config. This operation is performed after any changes are made to the current running config. If no changes are made, the configuration is still saved to the startup config. This option will always cause the module to return changed. This argument is mutually exclusive with *save\_when*. This option is deprecated as of Ansible 2.7, use `save_when`
|
| **save\_when** string | **Choices:*** always
* **never** β
* changed
| When changes are made to the device running-configuration, the changes are not copied to non-volatile storage by default. Using this argument will change that. If the argument is set to *always*, then the running-config will always be copied to the startup-config and the module will always return as changed. If the argument is set to *never*, the running-config will never be copied to the startup-config. If the argument is set to *changed*, then the running-config will only be copied to the startup-config if the task has made a change. |
| **src** string | | Specifies the source path to the file that contains the configuration or configuration template to load. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. This argument is mutually exclusive with *lines*. |
Examples
--------
```
- name: Configure configuration
community.network.aireos_config:
lines: sysname testDevice
- name: Diff the running-config against a provided config
community.network.aireos_config:
diff_against: intended
intended: "{{ lookup('file', 'master.cfg') }}"
- name: Load new acl into device
community.network.aireos_config:
lines:
- acl create testACL
- acl rule protocol testACL 1 any
- acl rule direction testACL 3 in
before: acl delete testACL
- name: Configurable backup path
community.network.aireos_config:
backup: yes
lines: sysname testDevice
backup_options:
filename: backup.cfg
dir_path: /home/user
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **backup\_path** string | when backup is yes | The full path to the backup file **Sample:** /playbooks/ansible/backup/aireos\_config.2016-07-16@22:28:34 |
| **commands** list / elements=string | always | The set of commands that will be pushed to the remote device **Sample:** ['hostname foo', 'vlan 1', 'name default'] |
| **updates** list / elements=string | always | The set of commands that will be pushed to the remote device **Sample:** ['hostname foo', 'vlan 1', 'name default'] |
### Authors
* James Mighion (@jmighion)
ansible community.network.icx_logging β Manage logging on Ruckus ICX 7000 series switches community.network.icx\_logging β Manage logging on Ruckus ICX 7000 series switches
==================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.icx_logging`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module provides declarative management of logging on Ruckus ICX 7000 series switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggregate** list / elements=string | | List of logging definitions. |
| | **check\_running\_config** boolean | **Choices:*** no
* yes
| Check running configuration. This can be set as environment variable. Module will use environment variable value(default:True), unless it is overridden, by specifying it as module parameter. |
| | **dest** string | **Choices:*** on
* host
* console
* buffered
* persistence
* rfc5424
| Destination of the logs. |
| | **facility** string | **Choices:*** auth
* cron
* daemon
* kern
* local0
* local1
* local2
* local3
* local4
* local5
* local6
* local7
* user
* lpr
* mail
* news
* syslog
* sys9
* sys10
* sys11
* sys12
* sys13
* sys14
* user
* uucp
| Specifies log facility to log messages from the device. |
| | **level** list / elements=string | **Choices:*** alerts
* critical
* debugging
* emergencies
* errors
* informational
* notifications
* warnings
| Specifies the message level. |
| | **name** string | | ipv4 address/ipv6 address/name of syslog server. |
| | **state** string | **Choices:*** present
* absent
| State of the logging configuration. |
| | **udp\_port** string | | UDP port of destination host(syslog server). |
| **check\_running\_config** boolean | **Choices:*** no
* **yes** β
| Check running configuration. This can be set as environment variable. Module will use environment variable value(default:True), unless it is overridden, by specifying it as module parameter. |
| **dest** string | **Choices:*** on
* host
* console
* buffered
* persistence
* rfc5424
| Destination of the logs. |
| **facility** string | **Choices:*** auth
* cron
* daemon
* kern
* local0
* local1
* local2
* local3
* local4
* local5
* local6
* local7
* user
* lpr
* mail
* news
* syslog
* sys9
* sys10
* sys11
* sys12
* sys13
* sys14
* user
* uucp
| Specifies log facility to log messages from the device. |
| **level** list / elements=string | **Choices:*** alerts
* critical
* debugging
* emergencies
* errors
* informational
* notifications
* warnings
| Specifies the message level. |
| **name** string | | ipv4 address/ipv6 address/name of syslog server. |
| **state** string | **Choices:*** **present** β
* absent
| State of the logging configuration. |
| **udp\_port** string | | UDP port of destination host(syslog server). |
Notes
-----
Note
* Tested against ICX 10.1.
* For information on using ICX platform, see [the ICX OS Platform Options guide](user_guide/platform_icx).
Examples
--------
```
- name: Configure host logging.
community.network.icx_logging:
dest: host
name: 172.16.0.1
udp_port: 5555
- name: Remove host logging configuration.
community.network.icx_logging:
dest: host
name: 172.16.0.1
udp_port: 5555
state: absent
- name: Disables the real-time display of syslog messages.
community.network.icx_logging:
dest: console
state: absent
- name: Enables local syslog logging.
community.network.icx_logging:
dest : on
state: present
- name: Configure buffer level
community.network.icx_logging:
dest: buffered
level: critical
- name: Configure logging using aggregate
community.network.icx_logging:
aggregate:
- { dest: buffered, level: ['notifications','errors'] }
- name: Remove logging using aggregate
community.network.icx_logging:
aggregate:
- { dest: console }
- { dest: host, name: 172.16.0.1, udp_port: 5555 }
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commands** list / elements=string | always | The list of configuration mode commands to send to the device **Sample:** ['logging host 172.16.0.1', 'logging console'] |
### Authors
* Ruckus Wireless (@Commscope)
ansible community.network.avi_applicationpersistenceprofile β Module for setup of ApplicationPersistenceProfile Avi RESTful Object community.network.avi\_applicationpersistenceprofile β Module for setup of ApplicationPersistenceProfile Avi RESTful Object
===========================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_applicationpersistenceprofile`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure ApplicationPersistenceProfile object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **app\_cookie\_persistence\_profile** string | | Specifies the application cookie persistence profile parameters. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **description** string | | User defined description for the object. |
| **hdr\_persistence\_profile** string | | Specifies the custom http header persistence profile parameters. |
| **http\_cookie\_persistence\_profile** string | | Specifies the http cookie persistence profile parameters. |
| **ip\_persistence\_profile** string | | Specifies the client ip persistence profile parameters. |
| **is\_federated** boolean | **Choices:*** no
* yes
| This field describes the object's replication scope. If the field is set to false, then the object is visible within the controller-cluster and its associated service-engines. If the field is set to true, then the object is replicated across the federation. Field introduced in 17.1.3. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **name** string / required | | A user-friendly name for the persistence profile. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **persistence\_type** string / required | | Method used to persist clients to the same server for a duration of time or a session. Enum options - PERSISTENCE\_TYPE\_CLIENT\_IP\_ADDRESS, PERSISTENCE\_TYPE\_HTTP\_COOKIE, PERSISTENCE\_TYPE\_TLS, PERSISTENCE\_TYPE\_CLIENT\_IPV6\_ADDRESS, PERSISTENCE\_TYPE\_CUSTOM\_HTTP\_HEADER, PERSISTENCE\_TYPE\_APP\_COOKIE, PERSISTENCE\_TYPE\_GSLB\_SITE. Default value when not specified in API or module is interpreted by Avi Controller as PERSISTENCE\_TYPE\_CLIENT\_IP\_ADDRESS. |
| **server\_hm\_down\_recovery** string | | Specifies behavior when a persistent server has been marked down by a health monitor. Enum options - HM\_DOWN\_PICK\_NEW\_SERVER, HM\_DOWN\_ABORT\_CONNECTION, HM\_DOWN\_CONTINUE\_PERSISTENT\_SERVER. Default value when not specified in API or module is interpreted by Avi Controller as HM\_DOWN\_PICK\_NEW\_SERVER. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the persistence profile. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create an Application Persistence setting using http cookie.
community.network.avi_applicationpersistenceprofile:
controller: '{{ controller }}'
username: '{{ username }}'
password: '{{ password }}'
http_cookie_persistence_profile:
always_send_cookie: false
cookie_name: My-HTTP
key:
- aes_key: ShYGZdMks8j6Bpvm2sCvaXWzvXms2Z9ob+TTjRy46lQ=
name: c1276819-550c-4adf-912d-59efa5fd7269
- aes_key: OGsyVk84VCtyMENFOW0rMnRXVnNrb0RzdG5mT29oamJRb0dlbHZVSjR1az0=
name: a080de57-77c3-4580-a3ea-e7a6493c14fd
- aes_key: UVN0cU9HWmFUM2xOUzBVcmVXaHFXbnBLVUUxMU1VSktSVU5HWjJOWmVFMTBUMUV4UmxsNk4xQmFZejA9
name: 60478846-33c6-484d-868d-bbc324fce4a5
timeout: 15
name: My-HTTP-Cookie
persistence_type: PERSISTENCE_TYPE_HTTP_COOKIE
server_hm_down_recovery: HM_DOWN_PICK_NEW_SERVER
tenant_ref: Demo
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | ApplicationPersistenceProfile (api/applicationpersistenceprofile) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#7f180d1e0c0b101816595c4c4844595c4a4d44595c4b47441e0916111a0b08100d140c595c4b49441c1012)>
| programming_docs |
ansible community.network.avi_l4policyset β Module for setup of L4PolicySet Avi RESTful Object community.network.avi\_l4policyset β Module for setup of L4PolicySet Avi RESTful Object
=======================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_l4policyset`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure L4PolicySet object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **created\_by** string | | Creator name. Field introduced in 17.2.7. |
| **description** string | | Field introduced in 17.2.7. |
| **is\_internal\_policy** boolean | **Choices:*** no
* yes
| Field introduced in 17.2.7. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **l4\_connection\_policy** string | | Policy to apply when a new transport connection is setup. Field introduced in 17.2.7. |
| **name** string / required | | Name of the l4 policy set. Field introduced in 17.2.7. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. Field introduced in 17.2.7. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Id of the l4 policy set. Field introduced in 17.2.7. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create L4PolicySet object
community.network.avi_l4policyset:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_l4policyset
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | L4PolicySet (api/l4policyset) object |
### Authors
* Chaitanya Deshpande (@chaitanyaavi) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#3b58535a524f5a55425a1d180f0d005f5e48534b5a555f5e1d18080c001d180e09001d180f03005a4d52555e4f4c544950481d180f0d00585456)>
ansible community.network.ce_vxlan_gateway β Manages gateway for the VXLAN network on HUAWEI CloudEngine devices. community.network.ce\_vxlan\_gateway β Manages gateway for the VXLAN network on HUAWEI CloudEngine devices.
===========================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_vxlan_gateway`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Configuring Centralized All-Active Gateways or Distributed Gateway for the VXLAN Network on HUAWEI CloudEngine devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **arp\_direct\_route** string | **Choices:*** enable
* disable
| Enable VLINK direct route on VBDIF interface. |
| **arp\_distribute\_gateway** string | **Choices:*** enable
* disable
| Enable the distributed gateway function on VBDIF interface. |
| **dfs\_all\_active** string | **Choices:*** enable
* disable
| Creates all-active gateways. |
| **dfs\_id** string | | Specifies the ID of a DFS group. The value must be 1. |
| **dfs\_peer\_ip** string | | Configure the IP address of an all-active gateway peer. The value is in dotted decimal notation. |
| **dfs\_peer\_vpn** string | | Specifies the name of the VPN instance that is associated with all-active gateway peer. The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. The value `_public_` is reserved and cannot be used as the VPN instance name. |
| **dfs\_source\_ip** string | | Specifies the IPv4 address bound to a DFS group. The value is in dotted decimal notation. |
| **dfs\_source\_vpn** string | | Specifies the name of a VPN instance bound to a DFS group. The value is a string of 1 to 31 case-sensitive characters without spaces. If the character string is quoted by double quotation marks, the character string can contain spaces. The value `_public_` is reserved and cannot be used as the VPN instance name. |
| **dfs\_udp\_port** string | | Specifies the UDP port number of the DFS group. The value is an integer that ranges from 1025 to 65535. |
| **state** string | **Choices:*** **present** β
* absent
| Determines whether the config should be present or not on the device. |
| **vbdif\_bind\_vpn** string | | Specifies the name of the VPN instance that is associated with the interface. The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. The value `_public_` is reserved and cannot be used as the VPN instance name. |
| **vbdif\_mac** string | | Specifies a MAC address for a VBDIF interface. The value is in the format of H-H-H. Each H is a 4-digit hexadecimal number, such as `00e0` or `fc01`. If an H contains less than four digits, 0s are added ahead. For example, `e0` is equal to `00e0`. A MAC address cannot be all 0s or 1s or a multicast MAC address. |
| **vbdif\_name** string | | Full name of VBDIF interface, i.e. Vbdif100. |
| **vpn\_instance** string | | Specifies the name of a VPN instance. The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. The value `_public_` is reserved and cannot be used as the VPN instance name. |
| **vpn\_vni** string | | Specifies a VNI ID. Binds a VXLAN network identifier (VNI) to a virtual private network (VPN) instance. The value is an integer ranging from 1 to 16000000. |
Notes
-----
Note
* Ensure All-Active Gateways or Distributed Gateway for the VXLAN Network can not configure at the same time.
* Recommended connection is `network_cli`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Vxlan gateway module test
hosts: ce128
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Configuring Centralized All-Active Gateways for the VXLAN Network
community.network.ce_vxlan_gateway:
dfs_id: 1
dfs_source_ip: 6.6.6.6
dfs_all_active: enable
dfs_peer_ip: 7.7.7.7
provider: "{{ cli }}"
- name: Bind the VPN instance to a Layer 3 gateway, enable distributed gateway, and configure host route advertisement.
community.network.ce_vxlan_gateway:
vbdif_name: Vbdif100
vbdif_bind_vpn: vpn1
arp_distribute_gateway: enable
arp_direct_route: enable
provider: "{{ cli }}"
- name: Assign a VNI to a VPN instance.
community.network.ce_vxlan_gateway:
vpn_instance: vpn1
vpn_vni: 100
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | verbose mode | k/v pairs of configuration after module execution **Sample:** {'dfs\_all\_active': 'enable', 'dfs\_id': '1', 'evn\_peers': [{'ip': '7.7.7.7', 'vpn': ''}], 'evn\_source\_ip': '6.6.6.6', 'evn\_source\_vpn': None} |
| **existing** dictionary | verbose mode | k/v pairs of existing configuration **Sample:** {'dfs\_all\_active': 'disable', 'dfs\_id': '1', 'dfs\_source\_ip': None, 'evn\_peer\_ip': []} |
| **proposed** dictionary | verbose mode | k/v pairs of parameters passed into module **Sample:** {'dfs\_all\_active': 'enable', 'dfs\_id': '1', 'dfs\_peer\_ip': '7.7.7.7', 'dfs\_source\_ip': '6.6.6.6'} |
| **updates** list / elements=string | always | commands sent to the device **Sample:** ['dfs-group 1', 'source ip 6.6.6.6', 'active-active-gateway', 'peer 7.7.7.7'] |
### Authors
* QijunPan (@QijunPan)
ansible community.network.cnos_showrun β Collect the current running configuration on devices running on CNOS community.network.cnos\_showrun β Collect the current running configuration on devices running on CNOS
======================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_showrun`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module allows you to view the switch running configuration. It executes the display running-config CLI command on a switch and returns a file containing the current running configuration of the target network device. This module uses SSH to manage network device configuration. The results of the operation will be placed in a directory named βresultsβ that must be created by the user in their local directory to where the playbook is run.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **deviceType** string / required | **Choices:*** g8272\_cnos
* g8296\_cnos
* g8332\_cnos
* NE0152T
* NE1072T
* NE1032
* NE1032T
* NE10032
* NE2572
| This specifies the type of device where the method is executed. The choices NE1072T,NE1032,NE1032T,NE10032,NE2572 are added since Ansible 2.4. The choice NE0152T is added since 2.8 |
| **enablePassword** string | | Configures the password used to enter Global Configuration command mode on the switch. If the switch does not request this password, the parameter is ignored.While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **host** string / required | | This is the variable used to search the hosts file at /etc/ansible/hosts and identify the IP address of the device on which the template is going to be applied. Usually the Ansible keyword {{ inventory\_hostname }} is specified in the playbook as an abstraction of the group of network elements that need to be configured. |
| **outputfile** string / required | | This specifies the file path where the output of each command execution is saved. Each command that is specified in the merged template file and each response from the device are saved here. Usually the location is the results folder, but you can choose another location based on your write permission. |
| **password** string / required | | Configures the password used to authenticate the connection to the remote device. The value of the password parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **username** string / required | | Configures the username used to authenticate the connection to the remote device. The value of the username parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
Notes
-----
Note
* For more information on using Ansible to manage Lenovo Network devices see <https://www.ansible.com/ansible-lenovo>.
Examples
--------
```
Tasks : The following are examples of using the module cnos_showrun. These are
written in the main.yml file of the tasks directory.
---
- name: Run show running-config
community.network.cnos_showrun:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_showrun_{{ inventory_hostname }}_output.txt"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | always | Success or failure message **Sample:** Running Configuration saved in file |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
ansible community.network.ce_facts β Gets facts about HUAWEI CloudEngine switches. community.network.ce\_facts β Gets facts about HUAWEI CloudEngine switches.
===========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Collects facts from CloudEngine devices running the CloudEngine operating system. Fact collection is supported over Cli transport. This module prepends all of the base network fact keys with `ansible_net_<fact>`. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **gather\_subset** string | **Default:**"!config" | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, hardware, config, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial `!` to specify that a specific subset should not be collected. |
Notes
-----
Note
* Recommended connection is `network_cli`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
# Note: examples below use the following provider dict to handle
# transport and authentication to the node.
- name: CloudEngine facts test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Gather_subset is all"
community.network.ce_facts:
gather_subset: all
provider: "{{ cli }}"
- name: "Collect only the config facts"
community.network.ce_facts:
gather_subset: config
provider: "{{ cli }}"
- name: "Do not collect hardware facts"
community.network.ce_facts:
gather_subset: "!hardware"
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **all\_ipv4\_addresses** list / elements=string | when interfaces is configured | All IPv4 addresses configured on the device |
| **BIOS Version** string | always | The BIOS version running on the remote device |
| **Board Type** string | always | The board type of the remote device |
| **config** string | when config is configured | The current system configuration on the device |
| **CPLD1 Version** string | always | The CPLD1 Version running the remote device |
| **CPLD2 Version** string | always | The CPLD2 Version running the remote device |
| **FAN** string | when hardware is configured | The fan state on the device |
| **filesystems** string | when hardware is configured | The filesystems on the device |
| **flash\_free** string | when hardware is configured | The flash free space on the device |
| **flash\_total** string | when hardware is configured | The flash total space on the device |
| **gather\_subset** list / elements=string | always | The list of fact subsets collected from the device |
| **hostname** string | always | The hostname of the remote device |
| **interfaces** dictionary | when interfaces is configured | A hash of all interfaces running on the system |
| **MAB Version** string | always | The MAB Version running the remote device |
| **memory\_free** string | when hardware is configured | The memory free space on the remote device |
| **memory\_total** string | when hardware is configured | The memory total space on the remote device |
| **neighbors** dictionary | when interfaces is configured | The list of LLDP neighbors from the remote device |
| **PCB Version** string | always | The PCB Version running the remote device |
| **PWR** string | when hardware is configured | The power state on the device |
### Authors
* wangdezhuang (@QijunPan)
| programming_docs |
ansible community.network.avi_ipamdnsproviderprofile β Module for setup of IpamDnsProviderProfile Avi RESTful Object community.network.avi\_ipamdnsproviderprofile β Module for setup of IpamDnsProviderProfile Avi RESTful Object
=============================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_ipamdnsproviderprofile`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure IpamDnsProviderProfile object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allocate\_ip\_in\_vrf** boolean | **Choices:*** no
* yes
| If this flag is set, only allocate ip from networks in the virtual service vrf. Applicable for avi vantage ipam only. Field introduced in 17.2.4. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **aws\_profile** string | | Provider details if type is aws. |
| **azure\_profile** string | | Provider details if type is microsoft azure. Field introduced in 17.2.1. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **custom\_profile** string | | Provider details if type is custom. Field introduced in 17.1.1. |
| **gcp\_profile** string | | Provider details if type is google cloud. |
| **infoblox\_profile** string | | Provider details if type is infoblox. |
| **internal\_profile** string | | Provider details if type is avi. |
| **name** string / required | | Name for the ipam/dns provider profile. |
| **oci\_profile** string | | Provider details for oracle cloud. Field introduced in 18.2.1,18.1.3. |
| **openstack\_profile** string | | Provider details if type is openstack. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **proxy\_configuration** string | | Field introduced in 17.1.1. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **tencent\_profile** string | | Provider details for tencent cloud. Field introduced in 18.2.3. |
| **type** string / required | | Provider type for the ipam/dns provider profile. Enum options - IPAMDNS\_TYPE\_INFOBLOX, IPAMDNS\_TYPE\_AWS, IPAMDNS\_TYPE\_OPENSTACK, IPAMDNS\_TYPE\_GCP, IPAMDNS\_TYPE\_INFOBLOX\_DNS, IPAMDNS\_TYPE\_CUSTOM, IPAMDNS\_TYPE\_CUSTOM\_DNS, IPAMDNS\_TYPE\_AZURE, IPAMDNS\_TYPE\_OCI, IPAMDNS\_TYPE\_TENCENT, IPAMDNS\_TYPE\_INTERNAL, IPAMDNS\_TYPE\_INTERNAL\_DNS, IPAMDNS\_TYPE\_AWS\_DNS, IPAMDNS\_TYPE\_AZURE\_DNS. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the ipam/dns provider profile. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create IPAM DNS provider setting
community.network.avi_ipamdnsproviderprofile:
controller: '{{ controller }}'
username: '{{ username }}'
password: '{{ password }}'
internal_profile:
dns_service_domain:
- domain_name: ashish.local
num_dns_ip: 1
pass_through: true
record_ttl: 100
- domain_name: guru.local
num_dns_ip: 1
pass_through: true
record_ttl: 200
ttl: 300
name: Ashish-DNS
tenant_ref: Demo
type: IPAMDNS_TYPE_INTERNAL
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | IpamDnsProviderProfile (api/ipamdnsproviderprofile) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#b7d0c5d6c4c3d8d0de919484808c919482858c9194838f8cd6c1ded9d2c3c0d8c5dcc4919483818cd4d8da)>
ansible community.network.avi_tenant β Module for setup of Tenant Avi RESTful Object community.network.avi\_tenant β Module for setup of Tenant Avi RESTful Object
=============================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_tenant`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure Tenant object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **config\_settings** string | | Tenantconfiguration settings for tenant. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **created\_by** string | | Creator of this tenant. |
| **description** string | | User defined description for the object. |
| **local** boolean | **Choices:*** no
* yes
| Boolean flag to set local. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **name** string / required | | Name of the object. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create Tenant using Service Engines in provider mode
community.network.avi_tenant:
controller: '{{ controller }}'
password: '{{ password }}'
username: '{{ username }}'
config_settings:
se_in_provider_context: false
tenant_access_to_provider_se: true
tenant_vrf: false
description: VCenter, Open Stack, AWS Virtual services
local: true
name: Demo
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | Tenant (api/tenant) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#5037223123243f3739767363676b767365626b767364686b3126393e3524273f223b23767364666b333f3d)>
ansible community.network.pn_role β CLI command to create/delete/modify role community.network.pn\_role β CLI command to create/delete/modify role
=====================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_role`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to create, delete and modify user roles.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_access** string | **Choices:*** read-only
* read-write
| type of access. |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_delete\_from\_users** boolean | **Choices:*** no
* yes
| delete from users. |
| **pn\_name** string / required | | role name. |
| **pn\_running\_config** boolean | **Choices:*** no
* yes
| display running configuration of switch. |
| **pn\_scope** string | **Choices:*** local
* fabric
| local or fabric. |
| **pn\_shell** boolean | **Choices:*** no
* yes
| allow shell command. |
| **pn\_sudo** boolean | **Choices:*** no
* yes
| allow sudo from shell. |
| **state** string / required | **Choices:*** present
* absent
* update
| State the action to perform. Use `present` to create role and `absent` to delete role and `update` to modify role. |
Examples
--------
```
- name: Role create
community.network.pn_role:
pn_cliswitch: 'sw01'
state: 'present'
pn_name: 'foo'
pn_scope: 'local'
pn_access: 'read-only'
- name: Role delete
community.network.pn_role:
pn_cliswitch: 'sw01'
state: 'absent'
pn_name: 'foo'
- name: Role modify
community.network.pn_role:
pn_cliswitch: 'sw01'
state: 'update'
pn_name: 'foo'
pn_access: 'read-write'
pn_sudo: true
pn_shell: true
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the role command. |
| **stdout** list / elements=string | always | set of responses from the role command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.ce_snmp_location β Manages SNMP location configuration on HUAWEI CloudEngine switches. community.network.ce\_snmp\_location β Manages SNMP location configuration on HUAWEI CloudEngine switches.
==========================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_snmp_location`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages SNMP location configurations on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **location** string / required | | Location information. |
| **state** string | **Choices:*** **present** β
* absent
| Manage the state of the resource. |
Notes
-----
Note
* Recommended connection is `network_cli`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: CloudEngine snmp location test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Config SNMP location"
community.network.ce_snmp_location:
state: present
location: nanjing China
provider: "{{ cli }}"
- name: "Remove SNMP location"
community.network.ce_snmp_location:
state: absent
location: nanjing China
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution **Sample:** {'location': 'nanjing China'} |
| **existing** dictionary | always | k/v pairs of existing aaa server |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'location': 'nanjing China', 'state': 'present'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['snmp-agent sys-info location nanjing China'] |
### Authors
* wangdezhuang (@QijunPan)
ansible community.network.ce_snmp_target_host β Manages SNMP target host configuration on HUAWEI CloudEngine switches. community.network.ce\_snmp\_target\_host β Manages SNMP target host configuration on HUAWEI CloudEngine switches.
=================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_snmp_target_host`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages SNMP target host configurations on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string | | Network Address. |
| **connect\_port** string | | Udp port used by SNMP agent to connect the Network management. |
| **host\_name** string | | Unique name to identify target host entry. |
| **interface\_name** string | | Name of the interface to send the trap message. |
| **is\_public\_net** string | **Choices:*** **no\_use** β
* true
* false
| To enable or disable Public Net-manager for target Host. |
| **notify\_type** string | **Choices:*** trap
* inform
| To configure notify type as trap or inform. |
| **recv\_port** string | | UDP Port number used by network management to receive alarm messages. |
| **security\_level** string | **Choices:*** noAuthNoPriv
* authentication
* privacy
| Security level indicating whether to use authentication and encryption. |
| **security\_model** string | **Choices:*** v1
* v2c
* v3
| Security Model. |
| **security\_name** string | | Security Name. |
| **security\_name\_v3** string | | Security Name V3. |
| **version** string | **Choices:*** none
* v1
* v2c
* v3
* v1v2c
* v1v3
* v2cv3
* all
| Version(s) Supported by SNMP Engine. |
| **vpn\_name** string | | VPN instance Name. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: CloudEngine snmp target host test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Config SNMP version"
community.network.ce_snmp_target_host:
state: present
version: v2cv3
provider: "{{ cli }}"
- name: "Config SNMP target host"
community.network.ce_snmp_target_host:
state: present
host_name: test1
address: 1.1.1.1
notify_type: trap
vpn_name: js
security_model: v2c
security_name: wdz
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of aaa params after module execution **Sample:** {'target host info': [{'address': '10.135.182.158', 'domain': 'snmpUDPDomain', 'nmsName': 'test2', 'notifyType': 'trap', 'securityLevel': 'authentication', 'securityModel': 'v3', 'securityNameV3': 'wdz', 'vpnInstanceName': 'js'}]} |
| **existing** dictionary | always | k/v pairs of existing aaa server |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'address': '10.135.182.158', 'host\_name': 'test2', 'notify\_type': 'trap', 'security\_level': 'authentication', 'security\_model': 'v3', 'security\_name\_v3': 'wdz', 'state': 'present', 'vpn\_name': 'js'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['snmp-agent target-host host-name test2 trap address udp-domain 10.135.182.158 vpn-instance js params securityname wdz v3 authentication'] |
### Authors
* wangdezhuang (@QijunPan)
| programming_docs |
ansible community.network.ce_multicast_igmp_enable β Manages multicast igmp enable configuration on HUAWEI CloudEngine switches. community.network.ce\_multicast\_igmp\_enable β Manages multicast igmp enable configuration on HUAWEI CloudEngine switches.
===========================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_multicast_igmp_enable`.
New in version 0.2.0: of community.network
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages multicast igmp on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aftype** string / required | **Choices:*** v4
* v6
| Destination ip address family type of static route. |
| **features** string / required | **Choices:*** global
* vlan
| Distinguish between Globally Enabled IGMP or Enabled IGMP under vlanID. |
| **igmp** boolean | **Choices:*** **no** β
* yes
| Enable Layer 2 multicast Snooping in a VLAN. |
| **proxy** boolean | **Choices:*** **no** β
* yes
| Layer 2 multicast snooping proxy is enabled. |
| **state** string | **Choices:*** **present** β
* absent
| Specify desired state of the resource. |
| **version** integer | **Default:**2 | Specifies the IGMP version that can be processed. |
| **vlan\_id** integer | | Virtual LAN identity. |
Notes
-----
Note
* If no vrf is supplied, vrf is set to default. If *state=absent*, the route will be removed, regardless of the non-required parameters.
* This module requires the netconf system service be enabled on the remote device being managed.
* This module works with connection `netconf`.
Examples
--------
```
- name: Configure global igmp enable
community.network.ce_multicast_igmp_enable:
aftype: v4
features: 'global'
state: present
- name: Configure global igmp disable
community.network.ce_multicast_igmp_enable:
features: 'global'
aftype: v4
state: absent
- name: Configure vlan igmp enable
community.network.ce_multicast_igmp_enable:
features: 'vlan'
aftype: v4
vlan_id: 1
igmp: true
- name: New proxy,igmp,version
community.network.ce_multicast_igmp_enable:
features: 'vlan'
aftype: v4
vlan_id: 1
proxy: true
igmp: true
version: 1
- name: Modify proxy,igmp,version
community.network.ce_multicast_igmp_enable:
features: 'vlan'
aftype: v4
vlan_id: 1
version: 2
- name: Delete proxy,igmp,version
community.network.ce_multicast_igmp_enable:
features: 'vlan'
aftype: v4
vlan_id: 1
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of switchport after module execution |
| **existing** dictionary | always | k/v pairs of existing switchport |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'addrFamily': 'ipv4unicast', 'features': 'vlan', 'proxyEnable': 'false', 'snoopingEnable': 'false', 'state': 'absent', 'version': 2, 'vlanId': 1} |
| **updates** list / elements=string | always | command list sent to the device **Sample:** ['undo igmp snooping enable', 'undo igmp snooping version', 'undo igmp snooping proxy'] |
### Authors
* xuxiaowei0512 (@CloudEngine-Ansible)
ansible community.network.a10_server β Manage A10 Networks AX/SoftAX/Thunder/vThunder devicesβ server object. community.network.a10\_server β Manage A10 Networks AX/SoftAX/Thunder/vThunder devicesβ server object.
======================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.a10_server`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage SLB (Server Load Balancer) server objects on A10 Networks devices via aXAPIv2.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **client\_cert** path | | PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, `client_key` is not required. |
| **client\_key** path | | PEM formatted file that contains your private key to be used for SSL client authentication. If `client_cert` contains both the certificate and key, this option is not required. |
| **force** boolean | **Choices:*** **no** β
* yes
| If `yes` do not get a cached copy. Alias `thirsty` has been deprecated and will be removed in 2.13.
aliases: thirsty |
| **force\_basic\_auth** boolean | **Choices:*** **no** β
* yes
| Credentials specified with *url\_username* and *url\_password* should be passed in HTTP Header. |
| **host** string / required | | Hostname or IP of the A10 Networks device. |
| **http\_agent** string | **Default:**"ansible-httpget" | Header to identify as, generally appears in web server logs. |
| **partition** string | | set active-partition |
| **password** string / required | | Password for the `username` account.
aliases: pass, pwd |
| **server\_ip** string | | The SLB server IPv4 address.
aliases: ip, address |
| **server\_name** string / required | | The SLB (Server Load Balancer) server name.
aliases: server |
| **server\_ports** string | | A list of ports to create for the server. Each list item should be a dictionary which specifies the `port:` and `protocol:`, but can also optionally specify the `status:`. See the examples below for details. This parameter is required when `state` is `present`.
aliases: port |
| **server\_status** string | **Choices:*** **enabled** β
* disabled
| The SLB virtual server status.
aliases: status |
| **state** string | **Choices:*** **present** β
* absent
| This is to specify the operation to create, update or remove SLB server. |
| **url** string | | HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path |
| **url\_password** string | | The password for use in HTTP basic authentication. If the *url\_username* parameter is not specified, the *url\_password* parameter will not be used. |
| **url\_username** string | | The username for use in HTTP basic authentication. This parameter can be used without *url\_password* for sites that allow empty passwords |
| **use\_gssapi** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication. Requires the Python library [gssapi](https://github.com/pythongssapi/python-gssapi) to be installed. Credentials for GSSAPI can be specified with *url\_username*/*url\_password* or with the GSSAPI env var `KRB5CCNAME` that specified a custom Kerberos credential cache. NTLM authentication is `not` supported even if the GSSAPI mech for NTLM has been installed. |
| **use\_proxy** boolean | **Choices:*** no
* **yes** β
| If `no`, it will not use a proxy, even if one is defined in an environment variable on the target hosts. |
| **username** string / required | | An account with administrator privileges.
aliases: admin, user |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled devices using self-signed certificates. |
| **write\_config** boolean | **Choices:*** **no** β
* yes
| If `yes`, any changes will cause a write of the running configuration to non-volatile memory. This will save *all* configuration changes, including those that may have been made manually or through other modules, so care should be taken when specifying `yes`. |
Notes
-----
Note
* Requires A10 Networks aXAPI 2.1.
* Requires A10 Networks aXAPI 2.1.
Examples
--------
```
- name: Create a new server
community.network.a10_server:
host: a10.mydomain.com
username: myadmin
password: mypassword
partition: mypartition
server: test
server_ip: 1.1.1.100
server_ports:
- port_num: 8080
protocol: tcp
- port_num: 8443
protocol: TCP
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **content** string | success | the full info regarding the slb\_server **Sample:** mynewserver |
### Authors
* Eric Chou (@ericchou1)
* Mischa Peters (@mischapeters)
ansible community.network.netact_cm_command β Manage network configuration data in Nokia Core and Radio networks community.network.netact\_cm\_command β Manage network configuration data in Nokia Core and Radio networks
==========================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.netact_cm_command`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* netact\_cm\_command can be used to run various configuration management operations. This module requires that the target hosts have Nokia NetAct network management system installed. Module will access the Configurator command line interface in NetAct to upload network configuration to NetAct, run configuration export, plan import and configuration provision operations To set the scope of the operation, define Distinguished Name (DN) or Working Set (WS) or Maintenance Region (MR) as input
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **backupPlanName** string | | Specifies a backup plan name |
| **createBackupPlan** boolean | **Choices:*** no
* yes
| Specifies if backup plan generation is enabled. |
| **DN** string | | Sets the exact scope of the operation in form of a list of managed object Distinguished Names (DN) in the network. A single DN or a list of DNs can be given (comma separated list without spaces). Alternatively, if DN or a list of DNs is not given, working set (WS) or Maintenance Region (MR) must be provided as parameter to set the scope of operation. |
| **extra\_opts** string | | Extra options to be set for operations. Check Configuration Management > Configuration Management Operating Procedures > Command Line Operations in Nokia NetAct user documentation for further information for extra options. |
| **fileFormat** string | **Choices:*** RAML2
* CSV
* XLSX
| Indicates file format. |
| **fileName** string | | Specifies a file name. Valid for Import and Export operations. |
| **inputFile** string | | Specifies full path to plan file location for the import operation. This parameter (inputFile) or the fileName parameter must be filled. If both are present then the inputFile is used. |
| **MR** string | | Sets the scope of the operation to network elements assigned to a Maintenance Region (MR) Value can be set as MR IDs including the Maintenance Region Collection (MRC) information (for example MRC-FIN1/MR-Hel). Multiple MRs can be given (comma-separated list without spaces) The value of this parameter is searched through MR IDs under given MRC. If there is no match, then it is searched from all MR names. Alternatively, if MR ID or a list or MR IDs is not given, Distinguished Name (DN) or Working Set (WS) must be provided as parameter to set the scope of operation. |
| **operation** string / required | **Choices:*** upload
* provision
* import
* export
* Provision\_Mass\_Modification
| Supported operations allow user to upload actual configuration from the network, to import and provision prepared plans, or export reference or actual configuration for planning purposes. Provision\_Mass\_Modification enables provisioning the same parameters to multiple network elements. This operation supports modifications only to one object class at a time. With this option NetAct Configurator creates and provisions a plan to the network with the given scope and options.
aliases: op |
| **opsName** string | | user specified operation name |
| **planName** string | | Specifies a plan name. |
| **typeOption** string | **Choices:*** plan
* actual
* reference
* template
* siteTemplate
| Specifies the type of the export operation.
aliases: type |
| **verbose** string | | NetAct Configurator will print more info |
| **WS** string | | Sets the scope of the operation to use one or more pre-defined working sets (WS) in NetAct. A working set contains network elements selected by user according to defined criteria. A single WS name, or multiple WSs can be provided (comma-separated list without spaces). Alternatively, if a WS name or a list of WSs is not given, Distinguished Name (DN) or Maintenance Region(MR) must be provided as parameter to set the scope of operation. |
Notes
-----
Note
* Check mode is not currently supported
Examples
--------
```
# Pass in a message
- name: Upload
community.network.netact_cm_command:
operation: "Upload"
opsname: 'Uploading_test'
dn: "PLMN-PLMN/MRBTS-746"
extra_opts: '-btsContentInUse true'
- name: Provision
community.network.netact_cm_command:
operation: "Provision"
opsname: 'Provision_test'
dn: "PLMN-PLMN/MRBTS-746"
planName: 'mySiteTemplate'
type: 'actual'
createBackupPlan: true
backupPlanName: 'myBackupPlanName'
- name: Export and fetching data from target
community.network.netact_cm_command:
operation: "Export"
opsname: 'Export_test'
planName: 'mySiteTemplate'
type: 'actual'
fileName: 'exportTest.xml'
- ansible.builtin.fetch:
src: /var/opt/nokia/oss/global/racops/export/exportTest.xml
dest: fetched
- name: Import
community.network.netact_cm_command:
operation: "Import"
opsname: 'Import_test'
fileFormat: 'CSV'
type: 'plan'
fileName: 'myCSVFile'
planName: 'myPlanName'
extra_ops: 'enablePolicyPlans true'
# fail the module
- name: Test failure of the module
community.network.netact_cm_command:
name: fail me
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | true if data is changed | data changed |
| **message** string | Command output message | The output message that the netact\_cm\_command module generates |
| **original\_message** string | Command line | The original name param that was passed in **Sample:** /opt/oss/bin/racclimx.sh -op Upload -opsName Uploading\_testi -DN PLMN-PLMN/MRBTS-746 |
### Authors
* Harri Tuominen (@hatuomin)
ansible community.network.avi_scheduler β Module for setup of Scheduler Avi RESTful Object community.network.avi\_scheduler β Module for setup of Scheduler Avi RESTful Object
===================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_scheduler`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure Scheduler object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **backup\_config\_ref** string | | Backup configuration to be executed by this scheduler. It is a reference to an object of type backupconfiguration. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **enabled** boolean | **Choices:*** no
* yes
| Boolean flag to set enabled. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **end\_date\_time** string | | Scheduler end date and time. |
| **frequency** string | | Frequency at which custom scheduler will run. Allowed values are 0-60. |
| **frequency\_unit** string | | Unit at which custom scheduler will run. Enum options - SCHEDULER\_FREQUENCY\_UNIT\_MIN, SCHEDULER\_FREQUENCY\_UNIT\_HOUR, SCHEDULER\_FREQUENCY\_UNIT\_DAY, SCHEDULER\_FREQUENCY\_UNIT\_WEEK, SCHEDULER\_FREQUENCY\_UNIT\_MONTH. |
| **name** string / required | | Name of scheduler. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **run\_mode** string | | Scheduler run mode. Enum options - RUN\_MODE\_PERIODIC, RUN\_MODE\_AT, RUN\_MODE\_NOW. |
| **run\_script\_ref** string | | Control script to be executed by this scheduler. It is a reference to an object of type alertscriptconfig. |
| **scheduler\_action** string | | Define scheduler action. Enum options - SCHEDULER\_ACTION\_RUN\_A\_SCRIPT, SCHEDULER\_ACTION\_BACKUP. Default value when not specified in API or module is interpreted by Avi Controller as SCHEDULER\_ACTION\_BACKUP. |
| **start\_date\_time** string | | Scheduler start date and time. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create Scheduler object
community.network.avi_scheduler:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_scheduler
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | Scheduler (api/scheduler) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#c9aebba8babda6aea0efeafafef2efeafcfbf2efeafdf1f2a8bfa0a7acbdbea6bba2baefeafdfff2aaa6a4)>
| programming_docs |
ansible community.network.apconos_command β Run arbitrary commands on APCON devices community.network.apconos\_command β Run arbitrary commands on APCON devices
============================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.apconos_command`.
New in version 0.2.0: of community.network
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Sends arbitrary commands to an apcon device and returns the results read from the device. The module includes an argument that will cause the module to wait for a specific condition before returning or timing out if the condition is not met.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **commands** list / elements=string / required | | List of commands to send to the remote device over the configured provider. The resulting output from the command is returned. If the *wait\_for* argument is provided, the module is not returned until the condition is satisfied or the number of retires as expired. |
| **interval** integer | **Default:**1 | Configures the interval in seconds to wait between retries of the command. If the command does not pass the specified conditions, the interval indicates how long to wait before trying the command again. |
| **match** string | **Choices:*** any
* **all** β
| The *match* argument is used in conjunction with the *wait\_for* argument to specify the match policy. Valid values are `all` or `any`. If the value is set to `all` then all conditionals in the wait\_for must be satisfied. If the value is set to `any` then only one of the values must be satisfied. |
| **retries** integer | **Default:**10 | Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the *wait\_for* conditions. |
| **wait\_for** list / elements=string | | List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples. |
Notes
-----
Note
* Tested against apcon iis+ii
Examples
--------
```
- name: Basic Configuration
community.network.apconos_command:
commands:
- show version
- enable ssh
register: result
- name: Get output from single command
community.network.apconos_command:
commands: ['show version']
register: result
```
### Authors
* David Lee (@davidlee-ap)
ansible community.network.netscaler_gslb_service β Manage gslb service entities in Netscaler. community.network.netscaler\_gslb\_service β Manage gslb service entities in Netscaler.
=======================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.netscaler_gslb_service`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage gslb service entities in Netscaler.
Requirements
------------
The below requirements are needed on the host that executes this module.
* nitro python sdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **appflowlog** string | **Choices:*** enabled
* disabled
| Enable logging appflow flow information. |
| **cip** string | **Choices:*** enabled
* disabled
| In the request that is forwarded to the GSLB service, insert a header that stores the client's IP address. Client IP header insertion is used in connection-proxy based site persistence. |
| **cipheader** string | | Name for the HTTP header that stores the client's IP address. Used with the Client IP option. If client IP header insertion is enabled on the service and a name is not specified for the header, the NetScaler appliance uses the name specified by the cipHeader parameter in the set ns param command or, in the GUI, the Client IP Header parameter in the Configure HTTP Parameters dialog box. Minimum length = 1 |
| **clttimeout** string | | Idle time, in seconds, after which a client connection is terminated. Applicable if connection proxy based site persistence is used. Minimum value = 0 Maximum value = 31536000 |
| **cnameentry** string | | Canonical name of the GSLB service. Used in CNAME-based GSLB. Minimum length = 1 |
| **comment** string | | Any comments that you might want to associate with the GSLB service. |
| **downstateflush** string | **Choices:*** enabled
* disabled
| Flush all active transactions associated with the GSLB service when its state transitions from UP to DOWN. Do not enable this option for services that must complete their transactions. Applicable if connection proxy based site persistence is used. |
| **hashid** string | | Unique hash identifier for the GSLB service, used by hash based load balancing methods. Minimum value = `1`
|
| **healthmonitor** boolean | **Choices:*** no
* yes
| Monitor the health of the GSLB service. |
| **ipaddress** string | | IP address for the GSLB service. Should represent a load balancing, content switching, or VPN virtual server on the NetScaler appliance, or the IP address of another load balancing device. |
| **maxaaausers** string | | Maximum number of SSL VPN users that can be logged on concurrently to the VPN virtual server that is represented by this GSLB service. A GSLB service whose user count reaches the maximum is not considered when a GSLB decision is made, until the count drops below the maximum. Minimum value = `0`
Maximum value = `65535`
|
| **maxbandwidth** string | | Integer specifying the maximum bandwidth allowed for the service. A GSLB service whose bandwidth reaches the maximum is not considered when a GSLB decision is made, until its bandwidth consumption drops below the maximum. |
| **maxclient** string | | The maximum number of open connections that the service can support at any given time. A GSLB service whose connection count reaches the maximum is not considered when a GSLB decision is made, until the connection count drops below the maximum. Minimum value = `0`
Maximum value = `4294967294`
|
| **monitor\_bindings** string | | Bind monitors to this gslb service |
| | **monitor\_name** string | | Monitor name. |
| | **weight** string | | Weight to assign to the monitor-service binding. A larger number specifies a greater weight. Contributes to the monitoring threshold, which determines the state of the service. Minimum value = `1`
Maximum value = `100`
|
| **monthreshold** string | | Monitoring threshold value for the GSLB service. If the sum of the weights of the monitors that are bound to this GSLB service and are in the UP state is not equal to or greater than this threshold value, the service is marked as DOWN. Minimum value = `0`
Maximum value = `65535`
|
| **nitro\_pass** string / required | | The password with which to authenticate to the netscaler node. |
| **nitro\_protocol** string | **Choices:*** **http** β
* https
| Which protocol to use when accessing the nitro API objects. |
| **nitro\_timeout** float | **Default:**310 | Time in seconds until a timeout error is thrown when establishing a new session with Netscaler |
| **nitro\_user** string / required | | The username with which to authenticate to the netscaler node. |
| **nsip** string / required | | The ip address of the netscaler appliance where the nitro API calls will be made. The port can be specified with the colon (:). E.g. 192.168.1.1:555. |
| **port** string | | Port on which the load balancing entity represented by this GSLB service listens. Minimum value = 1 Range 1 - 65535 \* in CLI is represented as 65535 in NITRO API |
| **publicip** string | | The public IP address that a NAT device translates to the GSLB service's private IP address. Optional. |
| **publicport** string | | The public port associated with the GSLB service's public IP address. The port is mapped to the service's private port number. Applicable to the local GSLB service. Optional. |
| **save\_config** boolean | **Choices:*** no
* **yes** β
| If `yes` the module will save the configuration on the netscaler node if it makes any changes. The module will not save the configuration on the netscaler node if it made no changes. |
| **servername** string | | Name of the server hosting the GSLB service. Minimum length = 1 |
| **servicename** string | | Name for the GSLB service. Must begin with an ASCII alphanumeric or underscore `_` character, and must contain only ASCII alphanumeric, underscore `_`, hash `#`, period `.`, space, colon `:`, at `@`, equals `=`, and hyphen `-` characters. Can be changed after the GSLB service is created. Minimum length = 1 |
| **servicetype** string | **Choices:*** HTTP
* FTP
* TCP
* UDP
* SSL
* SSL\_BRIDGE
* SSL\_TCP
* NNTP
* ANY
* SIP\_UDP
* SIP\_TCP
* SIP\_SSL
* RADIUS
* RDP
* RTSP
* MYSQL
* MSSQL
* ORACLE
| Type of service to create. |
| **sitename** string | | Name of the GSLB site to which the service belongs. Minimum length = 1 |
| **sitepersistence** string | **Choices:*** ConnectionProxy
* HTTPRedirect
* NONE
| Use cookie-based site persistence. Applicable only to `HTTP` and `SSL` GSLB services. |
| **siteprefix** string | | The site's prefix string. When the service is bound to a GSLB virtual server, a GSLB site domain is generated internally for each bound service-domain pair by concatenating the site prefix of the service and the name of the domain. If the special string NONE is specified, the site-prefix string is unset. When implementing HTTP redirect site persistence, the NetScaler appliance redirects GSLB requests to GSLB services by using their site domains. |
| **state** string | **Choices:*** absent
* **present** β
| The state of the resource being configured by the module on the netscaler node. When present the resource will be created if needed and configured according to the module's parameters. When absent the resource will be deleted from the netscaler node. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Notes
-----
Note
* For more information on using Ansible to manage Citrix NetScaler Network devices see <https://www.ansible.com/ansible-netscaler>.
Examples
--------
```
- name: Setup gslb service 2
delegate_to: localhost
register: result
check_mode: "{{ check_mode }}"
community.network.netscaler_gslb_service:
operation: present
servicename: gslb-service-2
cnameentry: example.com
sitename: gslb-site-1
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **diff** dictionary | failure | List of differences between the actual configured object and the configuration specified in the module **Sample:** { 'targetlbvserver': 'difference. ours: (str) server1 other: (str) server2' } |
| **loglines** list / elements=string | always | list of logged messages by the module **Sample:** ['message 1', 'message 2'] |
| **msg** string | failure | Message detailing the failure reason **Sample:** Action does not exist |
### Authors
* George Nikolopoulos (@giorgos-nikolopoulos)
ansible community.network.pn_admin_service β CLI command to modify admin-service community.network.pn\_admin\_service β CLI command to modify admin-service
==========================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_admin_service`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to modify services on the server-switch.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_\_if** string | **Choices:*** mgmt
* data
| administrative service interface. |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_icmp** boolean | **Choices:*** no
* yes
| Internet Message Control Protocol (ICMP) to enable or disable. |
| **pn\_net\_api** boolean | **Choices:*** no
* yes
| Netvisor API to enable or disable APIs. |
| **pn\_nfs** boolean | **Choices:*** no
* yes
| Network File System (NFS) to enable or disable. |
| **pn\_snmp** boolean | **Choices:*** no
* yes
| Simple Network Monitoring Protocol (SNMP) to enable or disable. |
| **pn\_ssh** boolean | **Choices:*** no
* yes
| Secure Shell to enable or disable. |
| **pn\_web** boolean | **Choices:*** no
* yes
| Web (HTTP) to enable or disable. |
| **pn\_web\_log** boolean | **Choices:*** no
* yes
| Web logging to enable or disable. |
| **pn\_web\_port** string | | Web (HTTP) port to enable or disable. |
| **pn\_web\_ssl** boolean | **Choices:*** no
* yes
| Web SSL (HTTPS) to enable or disable. |
| **pn\_web\_ssl\_port** string | | Web SSL (HTTPS) port to enable or disable. |
| **state** string / required | **Choices:*** update
| State the action to perform. Use `update` to modify the admin-service. |
Examples
--------
```
- name: Admin service functionality
community.network.pn_admin_service:
pn_cliswitch: "sw01"
state: "update"
pn__if: "mgmt"
pn_web: False
pn_icmp: True
- name: Admin service functionality
community.network.pn_admin_service:
pn_cliswitch: "sw01"
state: "update"
pn_web: False
pn__if: "mgmt"
pn_snmp: True
pn_net_api: True
pn_ssh: True
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the admin-service command. |
| **stdout** list / elements=string | always | set of responses from the admin-service command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.ce_mdn_interface β Manages MDN configuration on HUAWEI CloudEngine switches. community.network.ce\_mdn\_interface β Manages MDN configuration on HUAWEI CloudEngine switches.
================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_mdn_interface`.
New in version 0.2.0: of community.network
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages MDN configuration on HUAWEI CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **ifname** string | | Interface name. |
| **lldpenable** string | **Choices:*** enabled
* disabled
| Set global LLDP enable state. |
| **mdnstatus** string | **Choices:*** rxOnly
* disabled
| Set interface MDN enable state. |
| **state** string | **Choices:*** **present** β
* absent
| Manage the state of the resource. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* This module works with connection `netconf`.
Examples
--------
```
- name: "Configure global LLDP enable state"
community.network.ce_mdn_interface:
lldpenable: enabled
- name: "Configure interface MDN enable state"
community.network.ce_mdn_interface:
ifname: 10GE1/0/1
mdnstatus: rxOnly
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of global LLDP configration after module execution **Sample:** {'ifname': '10GE1/0/1', 'lldpenable': 'enabled', 'mdnstatus': 'rxOnly'} |
| **existing** dictionary | always | k/v pairs of existing global LLDP configration **Sample:** {'ifname': '10GE1/0/1', 'lldpenable': 'enabled', 'mdnstatus': 'disabled'} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'ifname': '10GE1/0/1', 'lldpenable': 'enabled', 'mdnstatus': 'rxOnly', 'state': 'present'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['interface 10ge 1/0/1', 'lldp mdn enable'] |
### Authors
* xuxiaowei0512 (@CloudEngine-Ansible)
ansible community.network.cnos_template β Manage switch configuration using templates on devices running Lenovo CNOS community.network.cnos\_template β Manage switch configuration using templates on devices running Lenovo CNOS
=============================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.cnos_template`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module allows you to work with the running configuration of a switch. It provides a way to execute a set of CNOS commands on a switch by evaluating the current running configuration and executing the commands only if the specific settings have not been already configured. The configuration source can be a set of commands or a template written in the Jinja2 templating language. This module uses SSH to manage network device configuration. The results of the operation will be placed in a directory named βresultsβ that must be created by the user in their local directory to where the playbook is run.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **commandfile** string / required | | This specifies the path to the CNOS command file which needs to be applied. This usually comes from the commands folder. Generally this file is the output of the variables applied on a template file. So this command is preceded by a template module. Note The command file must contain the Ansible keyword {{ inventory\_hostname }} in its filename to ensure that the command file is unique for each switch and condition. If this is omitted, the command file will be overwritten during iteration. For example, commandfile=./commands/clos\_leaf\_bgp\_{{ inventory\_hostname }}\_commands.txt |
| **deviceType** string / required | **Choices:*** g8272\_cnos
* g8296\_cnos
* g8332\_cnos
* NE0152T
* NE1072T
* NE1032
* NE1032T
* NE10032
* NE2572
| This specifies the type of device where the method is executed. The choices NE1072T,NE1032,NE1032T,NE10032,NE2572 are added since Ansible 2.4. The choice NE0152T is added since 2.8 |
| **enablePassword** string | | Configures the password used to enter Global Configuration command mode on the switch. If the switch does not request this password, the parameter is ignored.While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **host** string / required | | This is the variable used to search the hosts file at /etc/ansible/hosts and identify the IP address of the device on which the template is going to be applied. Usually the Ansible keyword {{ inventory\_hostname }} is specified in the playbook as an abstraction of the group of network elements that need to be configured. |
| **outputfile** string / required | | This specifies the file path where the output of each command execution is saved. Each command that is specified in the merged template file and each response from the device are saved here. Usually the location is the results folder, but you can choose another location based on your write permission. |
| **password** string / required | | Configures the password used to authenticate the connection to the remote device. The value of the password parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
| **username** string / required | | Configures the username used to authenticate the connection to the remote device. The value of the username parameter is used to authenticate the SSH session. While generally the value should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. |
Notes
-----
Note
* For more information on using Ansible to manage Lenovo Network devices see <https://www.ansible.com/ansible-lenovo>.
Examples
--------
```
Tasks : The following are examples of using the module cnos_template. These are written in the main.yml file of the tasks directory.
---
- name: Replace Config CLI command template with values
template:
src: demo_template.j2
dest: "./commands/demo_template_{{ inventory_hostname }}_commands.txt"
vlanid1: 13
slot_chassis_number1: "1/2"
portchannel_interface_number1: 100
portchannel_mode1: "active"
- name: Applying CLI commands on Switches
community.network.cnos_template:
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
commandfile: "./commands/demo_template_{{ inventory_hostname }}_commands.txt"
outputfile: "./results/demo_template_command_{{ inventory_hostname }}_output.txt"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | always | Success or failure message **Sample:** Template Applied. |
### Authors
* Anil Kumar Muraleedharan (@amuraleedhar)
| programming_docs |
ansible community.network.avi_webhook β Module for setup of Webhook Avi RESTful Object community.network.avi\_webhook β Module for setup of Webhook Avi RESTful Object
===============================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_webhook`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure Webhook object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **callback\_url** string | | Callback url for the webhook. Field introduced in 17.1.1. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **description** string | | Field introduced in 17.1.1. |
| **name** string / required | | The name of the webhook profile. Field introduced in 17.1.1. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. Field introduced in 17.1.1. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the webhook profile. Field introduced in 17.1.1. |
| **verification\_token** string | | Verification token sent back with the callback asquery parameters. Field introduced in 17.1.1. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create Webhook object
community.network.avi_webhook:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_webhook
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | Webhook (api/webhook) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#4d2a3f2c3e39222a246b6e7e7a766b6e787f766b6e7975762c3b242328393a223f263e6b6e797b762e2220)>
ansible community.network.dladm_etherstub β Manage etherstubs on Solaris/illumos systems. community.network.dladm\_etherstub β Manage etherstubs on Solaris/illumos systems.
==================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.dladm_etherstub`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create or delete etherstubs on Solaris/illumos systems.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name** string / required | | Etherstub name. |
| **state** string | **Choices:*** **present** β
* absent
| Create or delete Solaris/illumos etherstub. |
| **temporary** boolean | **Choices:*** **no** β
* yes
| Specifies that the etherstub is temporary. Temporary etherstubs do not persist across reboots. |
Examples
--------
```
- name: Create 'stub0' etherstub
community.network.dladm_etherstub:
name: stub0
state: present
- name: Remove 'stub0 etherstub
community.network.dladm_etherstub:
name: stub0
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **name** string | always | etherstub name **Sample:** switch0 |
| **state** string | always | state of the target **Sample:** present |
| **temporary** boolean | always | etherstub's persistence **Sample:** True |
### Authors
* Adam Ε tevko (@xen0l)
ansible community.network.weos4 β Use weos4 cliconf to run commands on Westermo platform community.network.weos4 β Use weos4 cliconf to run commands on Westermo platform
================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.weos4`.
New in version 2.2.0: of community.network
Synopsis
--------
* This weos4 plugin provides low level abstraction APIs for sending and receiving CLI commands from Westermo WeOS 4 network devices.
### Authors
* Ernst Oudhof (@ernst-s)
ansible community.network.ipadm_ifprop β Manage IP interface properties on Solaris/illumos systems. community.network.ipadm\_ifprop β Manage IP interface properties on Solaris/illumos systems.
============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ipadm_ifprop`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Modify IP interface properties on Solaris/illumos systems.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **interface** string / required | | Specifies the IP interface we want to manage.
aliases: nic |
| **property** string / required | | Specifies the name of the property we want to manage.
aliases: name |
| **protocol** string / required | | Specifies the protocol for which we want to manage properties. |
| **state** string | **Choices:*** **present** β
* absent
* reset
| Set or reset the property value. |
| **temporary** boolean | **Choices:*** **no** β
* yes
| Specifies that the property value is temporary. Temporary property values do not persist across reboots. |
| **value** string | | Specifies the value we want to set for the property. |
Examples
--------
```
- name: Allow forwarding of IPv4 packets on network interface e1000g0
community.network.ipadm_ifprop: protocol=ipv4 property=forwarding value=on interface=e1000g0
- name: Temporarily reset IPv4 forwarding property on network interface e1000g0
community.network.ipadm_ifprop: protocol=ipv4 interface=e1000g0 temporary=true property=forwarding state=reset
- name: Configure IPv6 metric on network interface e1000g0
community.network.ipadm_ifprop: protocol=ipv6 nic=e1000g0 name=metric value=100
- name: Set IPv6 MTU on network interface bge0
community.network.ipadm_ifprop: interface=bge0 name=mtu value=1280 protocol=ipv6
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **interface** string | always | interface name we want to set property on **Sample:** e1000g0 |
| **property** string | always | property's name **Sample:** mtu |
| **protocol** string | always | property's protocol **Sample:** ipv4 |
| **state** string | always | state of the target **Sample:** present |
| **value** string | when value is provided | property's value **Sample:** 1280 |
### Authors
* Adam Ε tevko (@xen0l)
ansible community.network.pn_dscp_map_pri_map β CLI command to modify dscp-map-pri-map community.network.pn\_dscp\_map\_pri\_map β CLI command to modify dscp-map-pri-map
==================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_dscp_map_pri_map`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to update priority mappings in tables.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_dsmap** string | | DSCP value(s). |
| **pn\_name** string | | Name for the DSCP map. |
| **pn\_pri** string | | CoS priority. |
| **state** string / required | **Choices:*** update
| State the action to perform. Use `update` to modify the dscp-map-pri-map. |
Examples
--------
```
- name: Dscp map pri map modify
community.network.pn_dscp_map_pri_map:
pn_cliswitch: 'sw01'
state: 'update'
pn_name: 'foo'
pn_pri: '0'
pn_dsmap: '40'
- name: Dscp map pri map modify
community.network.pn_dscp_map_pri_map:
pn_cliswitch: 'sw01'
state: 'update'
pn_name: 'foo'
pn_pri: '1'
pn_dsmap: '8,10,12,14'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the dscp-map-pri-map command. |
| **stdout** list / elements=string | always | set of responses from the dscp-map-pri-map command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.avi_gslbservice β Module for setup of GslbService Avi RESTful Object community.network.avi\_gslbservice β Module for setup of GslbService Avi RESTful Object
=======================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_gslbservice`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure GslbService object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **application\_persistence\_profile\_ref** string | | The federated application persistence associated with gslbservice site persistence functionality. It is a reference to an object of type applicationpersistenceprofile. Field introduced in 17.2.1. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **controller\_health\_status\_enabled** boolean | **Choices:*** no
* yes
| 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. |
| **created\_by** string | | Creator name. Field introduced in 17.1.2. |
| **description** string | | User defined description for the object. |
| **domain\_names** string | | Fully qualified domain name of the gslb service. |
| **down\_response** string | | Response to the client query when the gslb service is down. |
| **enabled** boolean | **Choices:*** no
* yes
| 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** string | | Select list of pools belonging to this gslb service. |
| **health\_monitor\_refs** string | | 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 healthmonitor. |
| **health\_monitor\_scope** string | | 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. |
| **hm\_off** boolean | **Choices:*** no
* yes
| This field is an internal field and is used in se. Field introduced in 18.2.2. |
| **is\_federated** boolean | **Choices:*** no
* yes
| This field indicates that this object is replicated across gslb federation. Field introduced in 17.1.3. Default value when not specified in API or module is interpreted by Avi Controller as True. |
| **min\_members** string | | The minimum number of members to distribute traffic to. Allowed values are 1-65535. Special values are 0 - 'disable'. Field introduced in 17.2.4. Default value when not specified in API or module is interpreted by Avi Controller as 0. |
| **name** string / required | | Name for the gslb service. |
| **num\_dns\_ip** string | | 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'. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **pool\_algorithm** string | | The load balancing algorithm will pick a gslb pool within the gslb service list of available pools. Enum options - GSLB\_SERVICE\_ALGORITHM\_PRIORITY, GSLB\_SERVICE\_ALGORITHM\_GEO. Field introduced in 17.2.3. Default value when not specified in API or module is interpreted by Avi Controller as GSLB\_SERVICE\_ALGORITHM\_PRIORITY. |
| **site\_persistence\_enabled** boolean | **Choices:*** no
* yes
| Enable site-persistence for the gslbservice. Field introduced in 17.2.1. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **ttl** string | | Ttl value (in seconds) for records served for this gslb service by the dns service. Allowed values are 0-86400. |
| **url** string | | Avi controller URL of the object. |
| **use\_edns\_client\_subnet** boolean | **Choices:*** no
* yes
| 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. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the gslb service. |
| **wildcard\_match** boolean | **Choices:*** no
* yes
| 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. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Example to create GslbService object
community.network.avi_gslbservice:
controller: 10.10.25.42
username: admin
password: something
state: present
name: sample_gslbservice
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | GslbService (api/gslbservice) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#98ffeaf9ebecf7fff1bebbabafa3bebbadaaa3bebbaca0a3f9eef1f6fdeceff7eaf3ebbebbacaea3fbf7f5)>
| programming_docs |
ansible community.network.avi_httppolicyset β Module for setup of HTTPPolicySet Avi RESTful Object community.network.avi\_httppolicyset β Module for setup of HTTPPolicySet Avi RESTful Object
===========================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_httppolicyset`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure HTTPPolicySet object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **cloud\_config\_cksum** string | | Checksum of cloud configuration for pool. Internally set by cloud connector. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **created\_by** string | | Creator name. |
| **description** string | | User defined description for the object. |
| **http\_request\_policy** string | | Http request policy for the virtual service. |
| **http\_response\_policy** string | | Http response policy for the virtual service. |
| **http\_security\_policy** string | | Http security policy for the virtual service. |
| **is\_internal\_policy** boolean | **Choices:*** no
* yes
| Boolean flag to set is\_internal\_policy. Default value when not specified in API or module is interpreted by Avi Controller as False. |
| **name** string / required | | Name of the http policy set. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Uuid of the http policy set. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create a HTTP Policy set two switch between testpool1 and testpool2
community.network.avi_httppolicyset:
controller: 10.10.27.90
username: admin
password: AviNetworks123!
name: test-HTTP-Policy-Set
tenant_ref: admin
http_request_policy:
rules:
- index: 1
enable: true
name: test-test1
match:
path:
match_case: INSENSITIVE
match_str:
- /test1
match_criteria: EQUALS
switching_action:
action: HTTP_SWITCHING_SELECT_POOL
status_code: HTTP_LOCAL_RESPONSE_STATUS_CODE_200
pool_ref: "/api/pool?name=testpool1"
- index: 2
enable: true
name: test-test2
match:
path:
match_case: INSENSITIVE
match_str:
- /test2
match_criteria: CONTAINS
switching_action:
action: HTTP_SWITCHING_SELECT_POOL
status_code: HTTP_LOCAL_RESPONSE_STATUS_CODE_200
pool_ref: "/api/pool?name=testpool2"
is_internal_policy: false
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | HTTPPolicySet (api/httppolicyset) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#d4b3a6b5a7a0bbb3bdf2f7e7e3eff2f7e1e6eff2f7e0ecefb5a2bdbab1a0a3bba6bfa7f2f7e0e2efb7bbb9)>
ansible community.network.pn_vrouter_ospf β CLI command to add/remove vrouter-ospf community.network.pn\_vrouter\_ospf β CLI command to add/remove vrouter-ospf
============================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.pn_vrouter_ospf`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to add OSPF protocol to vRouter and remove OSPF protocol from a vRouter
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **pn\_cliswitch** string | | Target switch to run the CLI on. |
| **pn\_netmask** string | | OSPF network IP address netmask. |
| **pn\_network** string / required | | OSPF network IP address. |
| **pn\_ospf\_area** string | | stub area number for the configuration. |
| **pn\_vrouter\_name** string / required | | name of service config. |
| **state** string | **Choices:*** **present** β
* absent
| vrouter-ospf configuration command. |
Examples
--------
```
- name: Add OSPF to vRouter
community.network.pn_vrouter_ospf:
state: 'present'
pn_vrouter_name: 'sw01-vrouter'
pn_network: '105.104.104.1'
pn_netmask: '24'
pn_ospf_area: '0'
- name: "Remove OSPF to vRouter"
community.network.pn_vrouter_ospf:
state: 'absent'
pn_vrouter_name: 'sw01-vrouter'
pn_network: '105.104.104.1'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | indicates whether the CLI caused changes on the target. |
| **command** string | always | the CLI command run on the target node. |
| **stderr** list / elements=string | on error | set of error responses from the vrouter-ospf command. |
| **stdout** list / elements=string | always | set of responses from the vrouter-ospf command. |
### Authors
* Pluribus Networks (@rajaspachipulusu17)
ansible community.network.ipadm_addr β Manage IP addresses on an interface on Solaris/illumos systems community.network.ipadm\_addr β Manage IP addresses on an interface on Solaris/illumos systems
==============================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ipadm_addr`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create/delete static/dynamic IP addresses on network interfaces on Solaris/illumos systems.
* Up/down static/dynamic IP addresses on network interfaces on Solaris/illumos systems.
* Manage IPv6 link-local addresses on network interfaces on Solaris/illumos systems.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string | | Specifiies an IP address to configure in CIDR notation.
aliases: addr |
| **addrobj** string / required | | Specifies an unique IP address on the system. |
| **addrtype** string | **Choices:*** **static** β
* dhcp
* addrconf
| Specifiies a type of IP address to configure. |
| **state** string | **Choices:*** absent
* **present** β
* up
* down
* enabled
* disabled
* refreshed
| Create/delete/enable/disable an IP address on the network interface. |
| **temporary** boolean | **Choices:*** **no** β
* yes
| Specifies that the configured IP address is temporary. Temporary IP addresses do not persist across reboots. |
| **wait** string | **Default:**60 | Specifies the time in seconds we wait for obtaining address via DHCP. |
Examples
--------
```
- name: Configure IP address 10.0.0.1 on e1000g0
community.network.ipadm_addr: addr=10.0.0.1/32 addrobj=e1000g0/v4 state=present
- name: Delete addrobj
community.network.ipadm_addr: addrobj=e1000g0/v4 state=absent
- name: Configure link-local IPv6 address
community.network.ipadm_addr: addtype=addrconf addrobj=vnic0/v6
- name: Configure address via DHCP and wait 180 seconds for address obtaining
community.network.ipadm_addr: addrobj=vnic0/dhcp addrtype=dhcp wait=180
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **address** string | only if addrtype is 'static' | IP address **Sample:** 1.3.3.7/32 |
| **addrobj** string | always | address object name **Sample:** bge0/v4 |
| **addrtype** string | always | address type **Sample:** static |
| **state** string | always | state of the target **Sample:** present |
| **temporary** boolean | always | specifies if operation will persist across reboots **Sample:** True |
| **wait** string | only if addrtype is 'dhcp' | time we wait for DHCP **Sample:** 10 |
### Authors
* Adam Ε tevko (@xen0l)
ansible community.network.ce_vxlan_tunnel β Manages VXLAN tunnel configuration on HUAWEI CloudEngine devices. community.network.ce\_vxlan\_tunnel β Manages VXLAN tunnel configuration on HUAWEI CloudEngine devices.
=======================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_vxlan_tunnel`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module offers the ability to set the VNI and mapped to the BD, and configure an ingress replication list on HUAWEI CloudEngine devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bridge\_domain\_id** string | | Specifies a bridge domain ID. The value is an integer ranging from 1 to 16777215. |
| **nve\_mode** string | **Choices:*** mode-l2
* mode-l3
| Specifies the working mode of an NVE interface. |
| **nve\_name** string | | Specifies the number of an NVE interface. The value ranges from 1 to 2. |
| **peer\_list\_ip** string | | Specifies the IP address of a remote VXLAN tunnel endpoints (VTEP). The value is in dotted decimal notation. |
| **protocol\_type** string | **Choices:*** bgp
* null
| The operation type of routing protocol. |
| **source\_ip** string | | Specifies an IP address for a source VTEP. The value is in dotted decimal notation. |
| **state** string | **Choices:*** **present** β
* absent
| Manage the state of the resource. |
| **vni\_id** string | | Specifies a VXLAN network identifier (VNI) ID. The value is an integer ranging from 1 to 16000000. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Vxlan tunnel module test
hosts: ce128
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Make sure nve_name is exist, ensure vni_id and protocol_type is configured on Nve1 interface.
community.network.ce_vxlan_tunnel:
nve_name: Nve1
vni_id: 100
protocol_type: bgp
state: present
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of configuration after module execution **Sample:** {'nve\_interface\_name"': 'Nve1', 'nve\_mode"': 'mode-l3', 'source\_ip': '0.0.0.0'} |
| **existing** dictionary | always | k/v pairs of existing rollback **Sample:** {'nve\_interface\_name"': 'Nve1', 'nve\_mode"': 'mode-l3', 'source\_ip': '0.0.0.0'} |
| **proposed** dictionary | always | k/v pairs of parameters passed into module **Sample:** {'nve\_interface\_name"': 'Nve1', 'nve\_mode"': 'mode-l2', 'source\_ip': '0.0.0.0'} |
| **updates** list / elements=string | always | command sent to the device **Sample:** ['interface Nve1', 'mode l3'] |
### Authors
* Li Yanfeng (@QijunPan)
ansible community.network.iap_token β Get token for the Itential Automation Platform community.network.iap\_token β Get token for the Itential Automation Platform
=============================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.iap_token`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Checks the connection to IAP and retrieves a login token.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **https** boolean | **Choices:*** **no** β
* yes
| Use HTTPS to connect By default using http |
| **iap\_fqdn** string / required | | Provide the fqdn or ip-address for the Itential Automation Platform |
| **iap\_port** string / required | | Provide the port number for the Itential Automation Platform |
| **password** string / required | | Provide the password for the Itential Automation Platform |
| **username** string / required | | Provide the username for the Itential Automation Platform |
| **validate\_certs** boolean | **Choices:*** **no** β
* yes
| If `no`, SSL certificates for the target url will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Examples
--------
```
- name: Get token for the Itential Automation Platform
community.network.iap_token:
iap_port: 3000
iap_fqdn: localhost
username: myusername
password: mypass
register: result
- ansible.builtin.debug: var=result.token
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **token** string | always | The token acquired from the Itential Automation Platform |
### Authors
* Itential (@cma0) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#d8b7a8bdb6abb7adaabbbdfefbebefe3fefbedeae3fefbece0e3b1acbdb6acb1b9b4fefbeceee3bbb7b5)>
ansible community.network.aruba β Use aruba cliconf to run command on Aruba platform community.network.aruba β Use aruba cliconf to run command on Aruba platform
============================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.aruba`.
Synopsis
--------
* This aruba plugin provides low level abstraction apis for sending and receiving CLI commands from Aruba network devices.
### Authors
* Unknown (!UNKNOWN)
| programming_docs |
ansible community.network.ce_vlan β Manages VLAN resources and attributes on Huawei CloudEngine switches. community.network.ce\_vlan β Manages VLAN resources and attributes on Huawei CloudEngine switches.
==================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_vlan`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages VLAN configurations on Huawei CloudEngine switches.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **description** string | | Specify VLAN description, minimum of 1 character, maximum of 80 characters. |
| **name** string | | Name of VLAN, minimum of 1 character, maximum of 31 characters. |
| **state** string | **Choices:*** **present** β
* absent
| Manage the state of the resource. |
| **vlan\_id** string | | Single VLAN ID, in the range from 1 to 4094. |
| **vlan\_range** string | | Range of VLANs such as `2-10` or `2,5,10-15`, etc. |
Notes
-----
Note
* This module requires the netconf system service be enabled on the remote device being managed.
* Recommended connection is `netconf`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Vlan module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Ensure a range of VLANs are not present on the switch
community.network.ce_vlan:
vlan_range: "2-10,20,50,55-60,100-150"
state: absent
provider: "{{ cli }}"
- name: Ensure VLAN 50 exists with the name WEB
community.network.ce_vlan:
vlan_id: 50
name: WEB
state: absent
provider: "{{ cli }}"
- name: Ensure VLAN is NOT on the device
community.network.ce_vlan:
vlan_id: 50
state: absent
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | always | k/v pairs of the VLAN after executing module or null when using vlan\_range **Sample:** {'description': 'vlan for app', 'name': 'VLAN\_APP', 'vlan\_id': '20'} |
| **end\_state\_vlans\_list** list / elements=string | always | list of VLANs after the module is executed **Sample:** ['1', '2', '3', '4', '5', '20', '100'] |
| **existing** dictionary | always | k/v pairs of existing vlan or null when using vlan\_range **Sample:** {'description': '', 'name': 'VLAN\_APP', 'vlan\_id': '20'} |
| **existing\_vlans\_list** list / elements=string | always | list of existing VLANs on the switch prior to making changes **Sample:** ['1', '2', '3', '4', '5', '20'] |
| **proposed** dictionary | always | k/v pairs of parameters passed into module (does not include vlan\_id or vlan\_range) **Sample:** {'description': 'vlan for app', 'name': 'VLAN\_APP', 'vlan\_id': '20'} |
| **proposed\_vlans\_list** list / elements=string | always | list of VLANs being proposed **Sample:** ['100'] |
| **updates** list / elements=string | always | command string sent to the device **Sample:** ['vlan 20', 'name VLAN20'] |
### Authors
* QijunPan (@QijunPan)
ansible community.network.ce_vxlan_global β Manages global attributes of VXLAN and bridge domain on HUAWEI CloudEngine devices. community.network.ce\_vxlan\_global β Manages global attributes of VXLAN and bridge domain on HUAWEI CloudEngine devices.
=========================================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ce_vxlan_global`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages global attributes of VXLAN and bridge domain on HUAWEI CloudEngine devices.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bridge\_domain\_id** string | | Specifies a bridge domain ID. The value is an integer ranging from 1 to 16777215. |
| **nvo3\_acl\_extend** string | **Choices:*** enable
* disable
| Enabling or disabling the VXLAN ACL extension function. |
| **nvo3\_ecmp\_hash** string | **Choices:*** enable
* disable
| Load balancing of VXLAN packets through ECMP in optimized mode. |
| **nvo3\_eth\_trunk\_hash** string | **Choices:*** enable
* disable
| Eth-Trunk from load balancing VXLAN packets in optimized mode. |
| **nvo3\_gw\_enhanced** string | **Choices:*** l2
* l3
| Configuring the Layer 3 VXLAN Gateway to Work in Non-loopback Mode. |
| **nvo3\_prevent\_loops** string | **Choices:*** enable
* disable
| Loop prevention of VXLAN traffic in non-enhanced mode. When the device works in non-enhanced mode, inter-card forwarding of VXLAN traffic may result in loops. |
| **nvo3\_service\_extend** string | **Choices:*** enable
* disable
| Enabling or disabling the VXLAN service extension function. |
| **state** string | **Choices:*** **present** β
* absent
| Determines whether the config should be present or not on the device. |
| **tunnel\_mode\_vxlan** string | **Choices:*** enable
* disable
| Set the tunnel mode to VXLAN when configuring the VXLAN feature. |
Notes
-----
Note
* Recommended connection is `network_cli`.
* This module also works with `local` connections for legacy playbooks.
Examples
--------
```
- name: Vxlan global module test
hosts: ce128
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Create bridge domain and set tunnel mode to VXLAN
community.network.ce_vxlan_global:
bridge_domain_id: 100
nvo3_acl_extend: enable
provider: "{{ cli }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **changed** boolean | always | check to see if a change was made on the device **Sample:** True |
| **end\_state** dictionary | verbose mode | k/v pairs of configuration after module execution **Sample:** {'bridge\_domain\_id': {'100': None, '80': None, '90': None}, 'nvo3\_acl\_extend': 'enable'} |
| **existing** dictionary | verbose mode | k/v pairs of existing configuration **Sample:** {'bridge\_domain': {'80': None, '90': None}, 'nvo3\_acl\_extend': 'disable'} |
| **proposed** dictionary | verbose mode | k/v pairs of parameters passed into module **Sample:** {'bridge\_domain\_id': '100', 'nvo3\_acl\_extend': 'enable', 'state="present"': None} |
| **updates** list / elements=string | always | commands sent to the device **Sample:** ['bridge-domain 100', 'ip tunnel mode vxlan'] |
### Authors
* QijunPan (@QijunPan)
ansible community.network.vdirect_runnable β Runs templates and workflow actions in Radware vDirect server community.network.vdirect\_runnable β Runs templates and workflow actions in Radware vDirect server
===================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.vdirect_runnable`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Runs configuration templates, creates workflows and runs workflow actions in Radware vDirect server.
Requirements
------------
The below requirements are needed on the host that executes this module.
* vdirect-client >= 4.9.0-post4
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action\_name** string | | Workflow action name to run. Required if *runnable\_type=Workflow*. |
| **parameters** string | | Action parameters dictionary. In case of `ConfigurationTemplate` runnable type, the device connection details should always be passed as a parameter. |
| **runnable\_name** string / required | | vDirect runnable name to run. May be configuration template name, workflow template name or workflow instance name. |
| **runnable\_type** string / required | **Choices:*** ConfigurationTemplate
* Workflow
* WorkflowTemplate
* Plugin
| vDirect runnable type. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If `no`, SSL certificates will not be validated, may be set as `VDIRECT_VALIDATE_CERTS` or `VDIRECT_VERIFY` environment variable. This should only set to `no` used on personally controlled sites using self-signed certificates.
aliases: vdirect\_validate\_certs |
| **vdirect\_http\_port** string | **Default:**2188 | vDirect server HTTP port number, may be set as `VDIRECT_HTTP_PORT` environment variable. |
| **vdirect\_https\_port** string | **Default:**2189 | vDirect server HTTPS port number, may be set as `VDIRECT_HTTPS_PORT` environment variable. |
| **vdirect\_ip** string / required | | Primary vDirect server IP address, may be set as `VDIRECT_IP` environment variable. |
| **vdirect\_password** string / required | | vDirect server password, may be set as `VDIRECT_PASSWORD` environment variable. |
| **vdirect\_secondary\_ip** string | | Secondary vDirect server IP address, may be set as `VDIRECT_SECONDARY_IP` environment variable. |
| **vdirect\_timeout** string | **Default:**60 | Amount of time to wait for async operation completion [seconds], may be set as `VDIRECT_TIMEOUT` environment variable. |
| **vdirect\_use\_ssl** boolean | **Choices:*** no
* **yes** β
| If `no`, an HTTP connection will be used instead of the default HTTPS connection, may be set as `VDIRECT_HTTPS` or `VDIRECT_USE_SSL` environment variable. |
| **vdirect\_user** string / required | | vDirect server username, may be set as `VDIRECT_USER` environment variable. |
| **vdirect\_wait** boolean | **Choices:*** no
* **yes** β
| Wait for async operation to complete, may be set as `VDIRECT_WAIT` environment variable. |
Notes
-----
Note
* Requires the Radware vdirect-client Python package on the host. This is as easy as `pip install vdirect-client`
Examples
--------
```
- name: Run the module from Ansible playbook
community.network.vdirect_runnable:
vdirect_ip: 10.10.10.10
vdirect_user: vDirect
vdirect_password: radware
runnable_type: ConfigurationTemplate
runnable_name: get_vlans
parameters: {'vlans_needed':1,'adc':[{'type':'Adc','name':'adc-1'}]}
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **result** string | success | Message detailing run result **Sample:** Workflow action run completed. |
### Authors
* Evgeny Fedoruk @ Radware LTD (@evgenyfedoruk)
ansible community.network.avi_networksecuritypolicy β Module for setup of NetworkSecurityPolicy Avi RESTful Object community.network.avi\_networksecuritypolicy β Module for setup of NetworkSecurityPolicy Avi RESTful Object
===========================================================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.avi_networksecuritypolicy`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to configure NetworkSecurityPolicy object
* more examples at <https://github.com/avinetworks/devops>
Requirements
------------
The below requirements are needed on the host that executes this module.
* avisdk
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_context** dictionary | | Avi API context that includes current session ID and CSRF Token. This allows user to perform single login and re-use the session. |
| **api\_version** string | **Default:**"16.4.4" | Avi API version of to use for Avi API and objects. |
| **avi\_api\_patch\_op** string | **Choices:*** add
* replace
* delete
| Patch operation to use when using avi\_api\_update\_method as patch. |
| **avi\_api\_update\_method** string | **Choices:*** **put** β
* patch
| Default method for object update is HTTP PUT. Setting to patch will override that behavior to use HTTP PATCH. |
| **avi\_credentials** dictionary | | Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. |
| | **api\_version** string | **Default:**"16.4.4" | Avi controller version |
| | **controller** string | | Avi controller IP or SQDN |
| | **csrftoken** string | | Avi controller API csrftoken to reuse existing session with session id |
| | **password** string | | Avi controller password |
| | **port** string | | Avi controller port |
| | **session\_id** string | | Avi controller API session id to reuse existing session with csrftoken |
| | **tenant** string | **Default:**"admin" | Avi controller tenant |
| | **tenant\_uuid** string | | Avi controller tenant UUID |
| | **timeout** string | **Default:**300 | Avi controller request timeout |
| | **token** string | | Avi controller API token |
| | **username** string | | Avi controller username |
| **avi\_disable\_session\_cache\_as\_fact** boolean | **Choices:*** **no** β
* yes
| It disables avi session information to be cached as a fact. |
| **cloud\_config\_cksum** string | | Checksum of cloud configuration for network sec policy. Internally set by cloud connector. |
| **controller** string | **Default:**"" | IP address or hostname of the controller. The default value is the environment variable `AVI_CONTROLLER`. |
| **created\_by** string | | Creator name. |
| **description** string | | User defined description for the object. |
| **name** string | | Name of the object. |
| **password** string | **Default:**"" | Password of Avi user in Avi controller. The default value is the environment variable `AVI_PASSWORD`. |
| **rules** string | | List of networksecurityrule. |
| **state** string | **Choices:*** absent
* **present** β
| The state that should be applied on the entity. |
| **tenant** string | **Default:**"admin" | Name of tenant used for all Avi API calls and context of object. |
| **tenant\_ref** string | | It is a reference to an object of type tenant. |
| **tenant\_uuid** string | **Default:**"" | UUID of tenant used for all Avi API calls and context of object. |
| **url** string | | Avi controller URL of the object. |
| **username** string | **Default:**"" | Username used for accessing Avi controller. The default value is the environment variable `AVI_USERNAME`. |
| **uuid** string | | Unique object identifier of the object. |
Notes
-----
Note
* For more information on using Ansible to manage Avi Network devices see <https://www.ansible.com/ansible-avi-networks>.
Examples
--------
```
- name: Create a network security policy to block clients represented by ip group known_attackers
community.network.avi_networksecuritypolicy:
controller: '{{ controller }}'
username: '{{ username }}'
password: '{{ password }}'
name: vs-gurutest-ns
rules:
- action: NETWORK_SECURITY_POLICY_ACTION_TYPE_DENY
age: 0
enable: true
index: 1
log: false
match:
client_ip:
group_refs:
- Demo:known_attackers
match_criteria: IS_IN
name: Rule 1
tenant_ref: Demo
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **obj** dictionary | success, changed | NetworkSecurityPolicy (api/networksecuritypolicy) object |
### Authors
* Gaurav Rastogi (@grastogi23) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#e384918290978c848ac5c0d0d4d8c5c0d6d1d8c5c0d7dbd882958a8d8697948c918890c5c0d7d5d8808c8e)>
ansible community.network.ftd_install β Installs FTD pkg image on the firewall community.network.ftd\_install β Installs FTD pkg image on the firewall
=======================================================================
Note
This plugin is part of the [community.network collection](https://galaxy.ansible.com/community/network) (version 3.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.network`.
To use it in a playbook, specify: `community.network.ftd_install`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Provisioning module for FTD devices that installs ROMMON image (if needed) and FTD pkg image on the firewall.
* Can be used with `httpapi` and `local` connection types. The `httpapi` is preferred, the `local` connection should be used only when the device cannot be accessed via REST API.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 3.5
* firepower-kickstart
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **console\_ip** string / required | | IP address of a terminal server. Used to set up an SSH connection with device's console port through the terminal server. |
| **console\_password** string / required | | Password to login on a terminal server. |
| **console\_port** string / required | | Device's port on a terminal server. |
| **console\_username** string / required | | Username to login on a terminal server. |
| **device\_gateway** string | | Device gateway of management interface. If not specified and connection is 'httpapi`, the module tries to fetch the existing value via REST API. For 'local' connection type, this parameter is mandatory. |
| **device\_hostname** string / required | | Hostname of the device as appears in the prompt (e.g., 'firepower-5516'). |
| **device\_ip** string | | Device IP address of management interface. If not specified and connection is 'httpapi`, the module tries to fetch the existing value via REST API. For 'local' connection type, this parameter is mandatory. |
| **device\_model** string | **Choices:*** Cisco ASA5506-X Threat Defense
* Cisco ASA5508-X Threat Defense
* Cisco ASA5516-X Threat Defense
* Cisco Firepower 2110 Threat Defense
* Cisco Firepower 2120 Threat Defense
* Cisco Firepower 2130 Threat Defense
* Cisco Firepower 2140 Threat Defense
| Platform model of the device (e.g., 'Cisco ASA5506-X Threat Defense'). If not specified and connection is 'httpapi`, the module tries to fetch the device model via REST API. For 'local' connection type, this parameter is mandatory. |
| **device\_netmask** string | | Device netmask of management interface. If not specified and connection is 'httpapi`, the module tries to fetch the existing value via REST API. For 'local' connection type, this parameter is mandatory. |
| **device\_new\_password** string | | New device password to set after image installation. If not specified, current password from `device\_password` property is reused. Not applicable for ASA5500-X series devices. |
| **device\_password** string / required | | Password to login on the device. |
| **device\_sudo\_password** string | | Root password for the device. If not specified, `device\_password` is used. |
| **device\_username** string | **Default:**"admin" | Username to login on the device. Defaulted to 'admin' if not specified. |
| **dns\_server** string | | DNS IP address of management interface. If not specified and connection is 'httpapi`, the module tries to fetch the existing value via REST API. For 'local' connection type, this parameter is mandatory. |
| **force\_install** boolean | **Choices:*** **no** β
* yes
| Forces the FTD image to be installed even when the same version is already installed on the firewall. By default, the module stops execution when the target version is installed in the device. |
| **image\_file\_location** string / required | | Path to the FTD pkg image on the server to be downloaded. FTP, SCP, SFTP, TFTP, or HTTP protocols are usually supported, but may depend on the device model. |
| **image\_version** string / required | | Version of FTD image to be installed. Helps to compare target and current FTD versions to prevent unnecessary reinstalls. |
| **rommon\_file\_location** string / required | | Path to the boot (ROMMON) image on TFTP server. Only TFTP is supported. |
| **search\_domains** string | **Default:**"cisco.com" | Search domains delimited by comma. Defaulted to 'cisco.com' if not specified. |
Notes
-----
Note
* Requires `firepower-kickstart` library that should be installed separately and requires Python >= 3.5.
* On localhost, Ansible can be still run with Python >= 2.7, but the interpreter for this particular module must be Python >= 3.5.
* Python interpreter for the module can overwritten in `ansible_python_interpreter` variable.
Examples
--------
```
- name: Install image v6.3.0 on FTD 5516
community.network.ftd_install:
device_hostname: firepower
device_password: pass
device_ip: 192.168.0.1
device_netmask: 255.255.255.0
device_gateway: 192.168.0.254
dns_server: 8.8.8.8
console_ip: 10.89.0.0
console_port: 2004
console_username: console_user
console_password: console_pass
rommon_file_location: 'tftp://10.89.0.11/installers/ftd-boot-9.10.1.3.lfbff'
image_file_location: 'https://10.89.0.11/installers/ftd-6.3.0-83.pkg'
image_version: 6.3.0-83
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **msg** string | always | The message saying whether the image was installed or explaining why the installation failed. |
### Authors
* Cisco Systems, Inc. (@annikulin)
| programming_docs |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.