code
stringlengths 2.5k
150k
| kind
stringclasses 1
value |
---|---|
ansible community.vmware.vmware_about_info β Provides information about VMware server to which user is connecting to community.vmware.vmware\_about\_info β Provides information about VMware server to which user is connecting to
==============================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_about_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 VMware server to which user is trying to connect.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Provide information about vCenter
community.vmware.vmware_about_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
delegate_to: localhost
register: vcenter_about_info
- name: Provide information about a standalone ESXi server
community.vmware.vmware_about_info:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
delegate_to: localhost
register: esxi_about_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 |
| --- | --- | --- |
| **about\_info** string | success | dict about VMware server **Sample:** {'api\_type': 'VirtualCenter', 'api\_version': '6.5', 'build': '5973321', 'instance\_uuid': 'dbed6e0c-bd88-4ef6-b594-21283e1c677f', 'license\_product\_name': 'VMware VirtualCenter Server', 'license\_product\_version': '6.0', 'locale\_build': '000', 'locale\_version': 'INTL', 'os\_type': 'darwin-amd64', 'product\_full\_name': 'VMware vCenter Server 6.5.0 build-5973321', 'product\_line\_id': 'vpx', 'product\_name': 'VMware vCenter Server (govmomi simulator)', 'vendor': 'VMware, Inc.', 'version': '6.5.0'} |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_host_datastore β Manage a datastore on ESXi host community.vmware.vmware\_host\_datastore β Manage a datastore on ESXi host
==========================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_datastore`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module can be used to mount/umount datastore on ESXi host.
* This module only supports NFS (NFS v3 or NFS v4.1) and VMFS datastores.
* For VMFS datastore, available device must already be connected on ESXi host.
* All parameters and VMware object names are case sensitive.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_expand** boolean added in 1.13.0 of community.vmware | **Choices:*** no
* **yes** β
| Expand a datastore capacity to full if it has free capacity. This parameter can't be extend using another datastore. A use case example in *auto\_expand*, it can be used to expand a datastore capacity after increasing LUN volume. |
| **datastore\_name** string / required | | Name of the datastore to add/remove. |
| **datastore\_type** string | **Choices:*** nfs
* nfs41
* vmfs
| Type of the datastore to configure (nfs/nfs41/vmfs). |
| **esxi\_hostname** string | | ESXi hostname to manage the datastore. Required when used with a vcenter |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **nfs\_path** string | | Resource path on NFS host. Required if datastore type is set to `nfs`/`nfs41` and state is set to `present`, else unused. |
| **nfs\_ro** boolean | **Choices:*** **no** β
* yes
| ReadOnly or ReadWrite mount. Unused if datastore type is not set to `nfs`/`nfs41` and state is not set to `present`. |
| **nfs\_server** string | | NFS host serving nfs datastore. Required if datastore type is set to `nfs`/`nfs41` and state is set to `present`, else unused. Two or more servers can be defined if datastore type is set to `nfs41`
|
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **present** β
* absent
| present: Mount datastore on host if datastore is absent else do nothing. absent: Umount datastore if datastore is present else do nothing. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
| **vmfs\_device\_name** string | | Name of the device to be used as VMFS datastore. Required for VMFS datastore type and state is set to `present`, else unused. |
| **vmfs\_version** integer | | VMFS version to use for datastore creation. Unused if datastore type is not set to `vmfs` and state is not set to `present`. |
Notes
-----
Note
* Tested on vSphere 6.0, 6.5 and ESXi 6.7
* NFS v4.1 tested on vSphere 6.5
* Kerberos authentication with NFS v4.1 isnβt implemented
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Mount VMFS datastores to ESXi
community.vmware.vmware_host_datastore:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datastore_name: '{{ item.name }}'
datastore_type: '{{ item.type }}'
vmfs_device_name: 'naa.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
vmfs_version: 6
esxi_hostname: '{{ inventory_hostname }}'
state: present
delegate_to: localhost
- name: Mount NFS datastores to ESXi
community.vmware.vmware_host_datastore:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datastore_name: '{{ item.name }}'
datastore_type: '{{ item.type }}'
nfs_server: '{{ item.server }}'
nfs_path: '{{ item.path }}'
nfs_ro: no
esxi_hostname: '{{ inventory_hostname }}'
state: present
delegate_to: localhost
loop:
- { 'name': 'NasDS_vol01', 'server': 'nas01', 'path': '/mnt/vol01', 'type': 'nfs'}
- { 'name': 'NasDS_vol02', 'server': 'nas01', 'path': '/mnt/vol02', 'type': 'nfs'}
- name: Mount NFS v4.1 datastores to ESXi
community.vmware.vmware_host_datastore:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datastore_name: '{{ item.name }}'
datastore_type: '{{ item.type }}'
nfs_server: '{{ item.server }}'
nfs_path: '{{ item.path }}'
nfs_ro: no
esxi_hostname: '{{ inventory_hostname }}'
state: present
delegate_to: localhost
loop:
- { 'name': 'NasDS_vol03', 'server': 'nas01,nas02', 'path': '/mnt/vol01', 'type': 'nfs41'}
- { 'name': 'NasDS_vol04', 'server': 'nas01,nas02', 'path': '/mnt/vol02', 'type': 'nfs41'}
- name: Remove/Umount Datastores from a ESXi
community.vmware.vmware_host_datastore:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
datastore_name: NasDS_vol01
state: absent
delegate_to: localhost
```
### Authors
* Ludovic Rivallain (@lrivallain) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#fd918899928b949edbdec9cbc68f948b9c91919c9493dbdececac6dbdec8cfc6dbdec9c5c69a909c9491dbdec9cbc69e9290)>
* Christian Kotte (@ckotte) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#54373c263d27203d353a727760626f3f3b202031727767636f727761666f7277606c6f33392c727760626f3031)>
ansible community.vmware.vcenter_extension_info β Gather info vCenter extensions community.vmware.vcenter\_extension\_info β Gather info vCenter extensions
==========================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vcenter_extension_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 vCenter extension.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather info about vCenter Extensions
community.vmware.vcenter_extension_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
register: ext_info
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 |
| --- | --- | --- |
| **extension\_info** list / elements=string | success | List of extensions **Sample:** [{'extension\_company': 'VMware, Inc.', 'extension\_key': 'com.vmware.vim.ls', 'extension\_label': 'License Services', 'extension\_last\_heartbeat\_time': '2018-09-03T09:36:18.003768+00:00', 'extension\_subject\_name': '', 'extension\_summary': 'Provides various license services', 'extension\_type': '', 'extension\_version': '5.0'}, {'extension\_company': 'VMware Inc.', 'extension\_key': 'com.vmware.vim.sms', 'extension\_label': 'VMware vCenter Storage Monitoring Service', 'extension\_last\_heartbeat\_time': '2018-09-03T09:36:18.005730+00:00', 'extension\_subject\_name': '', 'extension\_summary': 'Storage Monitoring and Reporting', 'extension\_type': '', 'extension\_version': '5.5'}] |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_vmkernel β Manages a VMware VMkernel Adapter of an ESXi host. community.vmware.vmware\_vmkernel β Manages a VMware VMkernel Adapter of an ESXi host.
======================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_vmkernel`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to manage the VMKernel adapters / VMKernel network interfaces of an ESXi host.
* The module assumes that the host is already configured with the Port Group in case of a vSphere Standard Switch (vSS).
* The module assumes that the host is already configured with the Distributed Port Group in case of a vSphere Distributed Switch (vDS).
* The module automatically migrates the VMKernel adapter from vSS to vDS or vice versa if present.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **device** string | | Search VMkernel adapter by device name. The parameter is required only in case of `type` is set to `dhcp`. |
| **dvswitch\_name** string | | The name of the vSphere Distributed Switch (vDS) where to add the VMKernel interface. Required parameter only if `state` is set to `present`. Optional parameter from version 2.8 and onwards.
aliases: dvswitch |
| **enable\_ft** boolean | **Choices:*** **no** β
* yes
| Enable Fault Tolerance traffic on the VMKernel adapter. This option is only allowed if the default TCP/IP stack is used. |
| **enable\_mgmt** boolean | **Choices:*** **no** β
* yes
| Enable Management traffic on the VMKernel adapter. This option is only allowed if the default TCP/IP stack is used. |
| **enable\_provisioning** boolean | **Choices:*** **no** β
* yes
| Enable Provisioning traffic on the VMKernel adapter. This option is only allowed if the default TCP/IP stack is used. |
| **enable\_replication** boolean | **Choices:*** **no** β
* yes
| Enable vSphere Replication traffic on the VMKernel adapter. This option is only allowed if the default TCP/IP stack is used. |
| **enable\_replication\_nfc** boolean | **Choices:*** **no** β
* yes
| Enable vSphere Replication NFC traffic on the VMKernel adapter. This option is only allowed if the default TCP/IP stack is used. |
| **enable\_vmotion** boolean | **Choices:*** **no** β
* yes
| Enable vMotion traffic on the VMKernel adapter. This option is only allowed if the default TCP/IP stack is used. You cannot enable vMotion on an additional adapter if you already have an adapter with the vMotion TCP/IP stack configured. |
| **enable\_vsan** boolean | **Choices:*** **no** β
* yes
| Enable VSAN traffic on the VMKernel adapter. This option is only allowed if the default TCP/IP stack is used. |
| **esxi\_hostname** string / required | | Name of ESXi host to which VMKernel is to be managed. From version 2.5 onwards, this parameter is required. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **mtu** integer | **Default:**1500 | The MTU for the VMKernel interface. The default value of 1500 is valid from version 2.5 and onwards. |
| **network** dictionary | **Default:**{"tcpip\_stack": "default", "type": "static"} | A dictionary of network details. |
| | **default\_gateway** string | | Default gateway (Override default gateway for this adapter). |
| | **ip\_address** string | | Static IP address. Required if `type` is set to `static`. |
| | **subnet\_mask** string | | Static netmask required. Required if `type` is set to `static`. |
| | **tcpip\_stack** string | **Choices:*** **default** β
* provisioning
* vmotion
* vxlan
| The TCP/IP stack for the VMKernel interface. |
| | **type** string | **Choices:*** **static** β
* dhcp
| Type of IP assignment. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **portgroup\_name** string / required | | The name of the port group for the VMKernel interface.
aliases: portgroup |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **present** β
* absent
| If set to `present`, the VMKernel adapter will be created with the given specifications. If set to `absent`, the VMKernel adapter will be removed. If set to `present` and VMKernel adapter exists, the configurations will be updated. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
| **vswitch\_name** string | | The name of the vSwitch where to add the VMKernel interface. Required parameter only if `state` is set to `present`. Optional parameter from version 2.5 and onwards.
aliases: vswitch |
Notes
-----
Note
* The option `device` need to be used with DHCP because otherwise itβs not possible to check if a VMkernel device is already present
* You can only change from DHCP to static, and vSS to vDS, or vice versa, in one step, without creating a new device, with `device` specified.
* You can only create the VMKernel adapter on a vDS if authenticated to vCenter and not if authenticated to ESXi.
* Tested on vSphere 5.5 and 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Add Management vmkernel port using static network type
community.vmware.vmware_vmkernel:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
esxi_hostname: '{{ esxi_hostname }}'
vswitch_name: vSwitch0
portgroup_name: PG_0001
network:
type: 'static'
ip_address: 192.168.127.10
subnet_mask: 255.255.255.0
state: present
enable_mgmt: True
delegate_to: localhost
- name: Add Management vmkernel port using DHCP network type
community.vmware.vmware_vmkernel:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
esxi_hostname: '{{ esxi_hostname }}'
vswitch_name: vSwitch0
portgroup_name: PG_0002
state: present
network:
type: 'dhcp'
enable_mgmt: True
delegate_to: localhost
- name: Change IP allocation from static to dhcp
community.vmware.vmware_vmkernel:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
esxi_hostname: '{{ esxi_hostname }}'
vswitch_name: vSwitch0
portgroup_name: PG_0002
state: present
device: vmk1
network:
type: 'dhcp'
enable_mgmt: True
delegate_to: localhost
- name: Delete VMkernel port
community.vmware.vmware_vmkernel:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
esxi_hostname: '{{ esxi_hostname }}'
vswitch_name: vSwitch0
portgroup_name: PG_0002
state: absent
delegate_to: localhost
- name: Add Management vmkernel port to Distributed Switch
community.vmware.vmware_vmkernel:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
dvswitch_name: dvSwitch1
portgroup_name: dvPG_0001
network:
type: 'static'
ip_address: 192.168.127.10
subnet_mask: 255.255.255.0
state: present
enable_mgmt: True
delegate_to: localhost
- name: Add vMotion vmkernel port with vMotion TCP/IP stack
community.vmware.vmware_vmkernel:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
dvswitch_name: dvSwitch1
portgroup_name: dvPG_0001
network:
type: 'static'
ip_address: 192.168.127.10
subnet_mask: 255.255.255.0
tcpip_stack: vmotion
state: present
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 |
| --- | --- | --- |
| **result** dictionary | always | metadata about VMKernel name **Sample:** {'changed': False, 'device': 'vmk1', 'ipv4': 'static', 'ipv4\_gw': 'No override', 'ipv4\_ip': '192.168.1.15', 'ipv4\_sm': '255.255.255.0', 'msg': 'VMkernel Adapter already configured properly', 'mtu': 9000, 'services': 'vMotion', 'switch': 'vDS'} |
### Authors
* Joseph Callen (@jcpowermac)
* Russell Teague (@mtnbikenc)
* Abhijeet Kasurde (@Akasurde)
* Christian Kotte (@ckotte)
| programming_docs |
ansible community.vmware.vcenter_extension β Register/deregister vCenter Extensions community.vmware.vcenter\_extension β Register/deregister vCenter Extensions
============================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vcenter_extension`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to register/deregister vCenter Extensions.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **client\_type** string | **Default:**"vsphere-client-serenity" | Required for `state=present`. Type of client the extension is (win32, .net, linux, etc.). |
| **company** string | | Required for `state=present`. The name of the company that makes the extension. |
| **description** string | | Required for `state=present`. A short description of the extension. |
| **email** string | | Required for `state=present`. Administrator email to use for extension. |
| **extension\_key** string / required | | The extension key of the extension to install or uninstall. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **name** string | | Required for `state=present`. The name of the extension you are installing. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **server\_type** string | **Default:**"vsphere-client-serenity" | Required for `state=present`. Type of server being used to install the extension (SOAP, REST, HTTP, etc.). |
| **ssl\_thumbprint** string | | Required for `state=present`. SSL thumbprint of the extension hosting server. |
| **state** string | **Choices:*** absent
* **present** β
| Add or remove vCenter Extension. |
| **url** string | | Required for `state=present`. Link to server hosting extension zip file to install. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
| **version** string / required | | The version of the extension you are installing or uninstalling. |
| **visible** boolean | **Choices:*** no
* **yes** β
| Show the extension in solution manager inside vCenter. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Register vCenter Extension
community.vmware.vcenter_extension:
hostname: "{{ groups['vcsa'][0] }}"
username: "{{ vcenter_username }}"
password: "{{ site_password }}"
extension_key: "{{ extension_key }}"
version: "1.0"
company: "Acme"
name: "Acme Extension"
description: "acme management"
email: "[email protected]"
url: "https://10.0.0.1/ACME-vSphere-web-plugin-1.0.zip"
ssl_thumbprint: "{{ ssl_thumbprint }}"
state: present
delegate_to: localhost
register: register_extension
- name: Deregister vCenter Extension
community.vmware.vcenter_extension:
hostname: "{{ groups['vcsa'][0] }}"
username: "{{ vcenter_username }}"
password: "{{ site_password }}"
extension_key: "{{ extension_key }}"
version: "1.0"
state: absent
delegate_to: localhost
register: deregister_extension
```
Return Values
-------------
Common return 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 | always | information about performed operation **Sample:** 'com.acme.Extension' installed. |
### Authors
* Michael Tipton (@castawayegr)
ansible community.vmware.vmware_folder_info β Provides information about folders in a datacenter community.vmware.vmware\_folder\_info β Provides information about folders in a datacenter
==========================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_folder_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* The module can be used to gather a hierarchical view of the folders that exist within a datacenter
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **datacenter** string / required | | Name of the datacenter.
aliases: datacenter\_name |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* `flat_folder_info` added in VMware collection 1.4.0.
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Provide information about vCenter folders
community.vmware.vmware_folder_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter: datacenter_name
delegate_to: localhost
register: vcenter_folder_info
- name: Get information about folders
community.vmware.vmware_folder_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter: 'Asia-Datacenter1'
register: r
- name: Set Managed object ID for the given folder
ansible.builtin.set_fact:
folder_mo_id: "{{ (r.flat_folder_info | selectattr('path', 'equalto', '/Asia-Datacenter1/vm/tier1/tier2') | map(attribute='moid'))[0] }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **flat\_folder\_info** list / elements=string | success | list of dict about folders in flat structure **Sample:** [{'moid': 'group-v3', 'path': '/Asia-Datacenter1/vm'}, {'moid': 'group-v44', 'path': '/Asia-Datacenter1/vm/tier1'}, {'moid': 'group-v45', 'path': '/Asia-Datacenter1/vm/tier1/tier2'}] |
| **folder\_info** dictionary | success | dict about folders **Sample:** {'datastoreFolders': {'moid': 'group-v10', 'path': '/DC01/datastore', 'subfolders': {'Local Datastores': {'path': '/DC01/datastore/Local Datastores', 'subfolders': {}}}}, 'hostFolders': {'moid': 'group-v21', 'path': '/DC01/host', 'subfolders': {}}, 'networkFolders': {'moid': 'group-v31', 'path': '/DC01/network', 'subfolders': {}}, 'vmFolders': {'moid': 'group-v41', 'path': '/DC01/vm', 'subfolders': {'Core Infrastructure Servers': {'moid': 'group-v42', 'path': '/DC01/vm/Core Infrastructure Servers', 'subfolders': {'Staging Network Services': {'moid': 'group-v43', 'path': '/DC01/vm/Core Infrastructure Servers/Staging Network Services', 'subfolders': {}}, 'VMware': {'moid': 'group-v44', 'path': '/DC01/vm/Core Infrastructure Servers/VMware', 'subfolders': {}}}}}}} |
### Authors
* David Hewitt (@davidmhewitt)
ansible community.vmware.vmware_vc_infraprofile_info β List and Export VMware vCenter infra profile configs. community.vmware.vmware\_vc\_infraprofile\_info β List and Export VMware vCenter infra profile configs.
=======================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_vc_infraprofile_info`.
New in version 1.0.0: of community.vmware
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage VMware vCenter infra profile configs.
* vCenter infra profile Library feature is introduced in vSphere 7.0 version, so this module is not supported in the earlier versions of vSphere.
* All variables and VMware object names are case sensitive.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* PyVmomi
* vSphere Automation SDK
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api** string | **Choices:*** export
* import
* list
* validate
| API which needs to be executed |
| **config\_path** string | | Config file path which contains infra profile config JSON data, supports both relative and absolute path. This parameter is required only when `import`,`validate` APIs are being used. |
| **decryption\_key** string | | decryption\_key argument for while doing import profile task as of now its not taken into account form API team. |
| **description** string | | Description of about encryption or decryption key. |
| **encryption\_key** string | | encryption\_key argument for while doing import profile task as of now its not taken into account form API team. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. |
| **password** string | | The password of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. |
| **profiles** string | | A list of profile names to be exported, imported, and validated. This parameter is not required while running for List API, not for `export`,`import` and `validate`. |
| **protocol** string | **Choices:*** http
* **https** β
| The connection to protocol. |
| **proxy\_host** string added in 1.12.0 of community.vmware | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. |
| **proxy\_port** integer added in 1.12.0 of community.vmware | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. |
Notes
-----
Note
* Tested on vSphere 7.0
Examples
--------
```
- name: Get information about VC infraprofile
vmware_vc_infraprofile_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
delegate_to: localhost
- name: export vCenter appliance infra profile config
vmware_vc_infraprofile_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
api: "export"
profiles: "ApplianceManagement"
delegate_to: localhost
- name: validate vCenter appliance infra profile config
vmware_vc_infraprofile_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
api: "validate"
profiles: "ApplianceManagement"
config_path: "export.json"
- name: import vCenter appliance infra profile config
vmware_vc_infraprofile_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
api: "import"
profiles: "ApplianceManagement"
config_path: "import.json"
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 |
| --- | --- | --- |
| **export\_infra** dictionary | On success with API set as "export" | A message about the exported file **Sample:** {'export\_config\_json': 'json exported to file'} |
| **import\_profile** dictionary | On success with API set as "import" | A message about import on import\_profile spec **Sample:** {'changed': True, 'failed': False, 'status': '0.0'} |
| **list\_infra** list / elements=string | on success with API as "list" | A list of infra configs, **Sample:** [{'info': 'ApplianceManagement', 'name': 'ApplianceManagement'}, {'info': 'ApplianceNetwork', 'name': 'ApplianceNetwork'}, {'info': 'Authentication & Authorization Management', 'name': 'AuthManagement'}] |
| **validate\_infra** dictionary | On success with API set as "validate" | A message about validate on exported file **Sample:** {'changed': False, 'failed': False, 'status': 'VALID'} |
### Authors
* Naveenkumar G P (@ngp)
ansible community.vmware.vmware_host_iscsi_info β Gather iSCSI configuration information of ESXi host community.vmware.vmware\_host\_iscsi\_info β Gather iSCSI configuration information of ESXi host
================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_iscsi_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 the iSCSI configuration of the ESXi host.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **esxi\_hostname** string / required | | The ESXi hostname on which to gather iSCSI settings. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather iSCSI configuration information of ESXi host
community.vmware.vmware_host_iscsi_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi_hostname }}"
register: iscsi_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 |
| --- | --- | --- |
| **detected\_iscsi\_drives** list / elements=string | always | list of detected iSCSI drive added from version 1.9.0 **Sample:** [ { "address": [ "192.168.0.57:3260" ], "canonical\_name": "naa.60014055f198fb3d0cb4bd7ae1f802e1", "iscsi\_name": "iqn.2021-03.local.iscsi-target:iscsi-storage.target0" } ] |
| **iscsi\_properties** dictionary | always | dictionary of current iSCSI information **Sample:** { "iscsi\_alias": "", "iscsi\_authentication\_properties": { "\_vimtype": "vim.host.InternetScsiHba.AuthenticationProperties", "chapAuthEnabled": false, "chapAuthenticationType": "chapProhibited", "chapInherited": null, "chapName": "", "chapSecret": "XXXXXXXXX", "mutualChapAuthenticationType": "chapProhibited", "mutualChapInherited": null, "mutualChapName": "", "mutualChapSecret": "XXXXXXXXX" }, "iscsi\_enabled": true, "iscsi\_name": "iqn.1998-01.com.vmware:esxi-033f58ee", "iscsi\_send\_targets": [ { "address": "192.168.0.1", "authenticationProperties": { "\_vimtype": "vim.host.InternetScsiHba.AuthenticationProperties", "chapAuthEnabled": false, "chapAuthenticationType": "chapProhibited", "chapInherited": true, "chapName": "", "chapSecret": "XXXXXXXXX", "mutualChapAuthenticationType": "chapProhibited", "mutualChapInherited": true, "mutualChapName": "", "mutualChapSecret": "XXXXXXXXX" }, "port": 3260 } ], "iscsi\_static\_targets": [ { "address": "192.168.0.1", "authenticationProperties": { "\_vimtype": "vim.host.InternetScsiHba.AuthenticationProperties", "chapAuthEnabled": false, "chapAuthenticationType": "chapProhibited", "chapInherited": true, "chapName": "", "chapSecret": "XXXXXXXXX", "mutualChapAuthenticationType": "chapProhibited", "mutualChapInherited": true, "mutualChapName": "", "mutualChapSecret": "XXXXXXXXX" }, "iscsi\_name": "iqn.2004-04.com.qnap:tvs-673:iscsi.vm3.2c580e", "port": 3260 } ], "port\_bind": [], "vmhba\_name": "vmhba65" } |
### Authors
* sky-joker (@sky-joker)
| programming_docs |
ansible community.vmware.vmware_cluster_vsan β Manages virtual storage area network (vSAN) configuration on VMware vSphere clusters community.vmware.vmware\_cluster\_vsan β Manages virtual storage area network (vSAN) configuration on VMware vSphere clusters
=============================================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_cluster_vsan`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manages vSAN on VMware vSphere clusters.
* All values and VMware object names are case sensitive.
Requirements
------------
The below requirements are needed on the host that executes this module.
* Tested on ESXi 6.7.
* PyVmomi installed.
* vSAN Management SDK, which needs to be downloaded from VMware and installed manually.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **advanced\_options** dictionary added in 1.1.0 of community.vmware | | Advanced VSAN Options. |
| | **automatic\_rebalance** boolean | **Choices:*** no
* yes
| If enabled, vSAN automatically rebalances (moves the data among disks) when a capacity disk fullness hits proactive rebalance threshold. |
| | **disable\_site\_read\_locality** boolean | **Choices:*** no
* yes
| For vSAN stretched clusters, reads to vSAN objects occur on the site the VM resides on. Setting to `True` will force reads across all mirrors. |
| | **large\_cluster\_support** boolean | **Choices:*** no
* yes
| Allow > 32 VSAN hosts per cluster; if this is changed on an existing vSAN cluster, all hosts are required to reboot to apply this change. |
| | **object\_repair\_timer** integer | | Delay time in minutes for VSAN to wait for the absent component to come back before starting to repair it. |
| | **thin\_swap** boolean | **Choices:*** no
* yes
| When `enabled`, swap objects would not reserve 100% space of their size on vSAN datastore. |
| **cluster\_name** string / required | | The name of the cluster to be managed. |
| **datacenter** string / required | | The name of the datacenter.
aliases: datacenter\_name |
| **enable** boolean | **Choices:*** **no** β
* yes
| Whether to enable vSAN.
aliases: enable\_vsan |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
| **vsan\_auto\_claim\_storage** boolean | **Choices:*** **no** β
* yes
| Whether the VSAN service is configured to automatically claim local storage on VSAN-enabled hosts in the cluster. |
Notes
-----
Note
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Enable vSAN
community.vmware.vmware_cluster_vsan:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: datacenter
cluster_name: cluster
enable: true
delegate_to: localhost
- name: Enable vSAN and automatic rebalancing
community.vmware.vmware_cluster_vsan:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: datacenter
cluster_name: cluster
enable: true
advanced_options:
automatic_rebalance: True
delegate_to: localhost
- name: Enable vSAN and claim storage automatically
community.vmware.vmware_cluster_vsan:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter_name: DC0
cluster_name: "{{ cluster_name }}"
enable: True
vsan_auto_claim_storage: True
delegate_to: localhost
```
### Authors
* Joseph Callen (@jcpowermac)
* Abhijeet Kasurde (@Akasurde)
* Mario Lenz (@mariolenz)
ansible community.vmware.vmware_host_inventory β VMware ESXi hostsystem inventory source community.vmware.vmware\_host\_inventory β VMware ESXi hostsystem inventory source
==================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_inventory`.
New in version 1.11.0: of community.vmware
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get VMware ESXi hostsystem as inventory hosts from VMware environment.
* Uses any file which ends with vmware.yml, vmware.yaml, vmware\_host\_inventory.yml, or vmware\_host\_inventory.yaml as a YAML configuration file.
Requirements
------------
The below requirements are needed on the local controller node that executes this inventory.
* Python >= 2.7
* PyVmomi
* requests >= 2.3
* vSphere Automation SDK - For tag feature
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. |
| **filters** list / elements=string | **Default:**[] | | This option allows client-side filtering hosts with jinja templating. When server-side filtering is introduced, it should be preferred over this. |
| **groups** dictionary | **Default:**{} | | Add hosts to group based on Jinja2 conditionals. |
| **hostname** string / required | | env:VMWARE\_HOST env:VMWARE\_SERVER | Name of vCenter or ESXi server. |
| **hostnames** list / elements=string | **Default:**["name"] | | A list of templates in order of precedence to compose inventory\_hostname. Ignores template if resulted in an empty string or None value. You can use property specified in *properties* as variables in the template. |
| **keyed\_groups** list / elements=string | **Default:**[{"key": "summary.runtime.powerState", "separator": ""}] | | 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:VMWARE\_PASSWORD | Password of vSphere user. Accepts vault encrypted variable. |
| **port** integer | **Default:**443 | env:VMWARE\_PORT | Port number used to connect to vCenter or ESXi Server. |
| **properties** list / elements=string | **Default:**["name", "customValue", "summary.runtime.powerState"] | | Specify the list of VMware schema properties associated with the ESXi hostsystem. These properties will be populated in hostvars of the given ESXi hostsystem. Each value in the list can be a path to a specific property in hostsystem object or a path to a collection of hostsystem objects.
`summary.runtime.powerState` are required if `keyed_groups` is set to default. Please make sure that all the properties that are used in other parameters are included in this options. In addition to ESXi hostsystem's properties, the following are special values Use `customValue` to populate ESXi hostsystem's custom attributes. `customValue` is only supported by vCenter and not by ESXi. Use `all` to populate all the properties of the virtual machine. The value `all` is time consuming operation, do not use unless required absolutely. |
| **proxy\_host** string added in 1.12.0 of community.vmware | | env:VMWARE\_PROXY\_HOST | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. This feature depends on a version of pyvmomi>=v6.7.1.2018.12. |
| **proxy\_port** integer added in 1.12.0 of community.vmware | | env:VMWARE\_PROXY\_PORT | Port of the HTTP proxy that will receive all HTTPS requests and relay them. |
| **resources** list / elements=string | **Default:**[] | | A list of resources to limit search scope. Each resource item is represented by exactly one `'vim_type_snake_case`:`list of resource names` pair and optional nested *resources*
Key name is based on snake case of a vim type name; e.g `host_system` correspond to `vim.HostSystem`
|
| **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). |
| **username** string / required | | env:VMWARE\_USER env:VMWARE\_USERNAME | Name of vSphere user. Accepts vault encrypted variable. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| env:VMWARE\_VALIDATE\_CERTS | Allows connection when SSL certificates are not valid. Set to `false` when certificates are not trusted. |
| **with\_nested\_properties** boolean | **Choices:*** no
* **yes** β
| | This option transform flatten properties name to nested dictionary. |
| **with\_path** boolean | **Choices:*** **no** β
* yes
| | Include ESXi hostsystem's path. Set this option to a string value to replace root name from *'Datacenters'*. |
| **with\_sanitized\_property\_name** boolean | **Choices:*** **no** β
* yes
| | This option allows property name sanitization to create safe property names for use in Ansible. Also, transforms property name to snake case. |
| **with\_tags** boolean | **Choices:*** **no** β
* yes
| | Include tags and associated hosts. Requires 'vSphere Automation SDK' library to be installed on the given controller machine. Please refer following URLs for installation steps <https://code.vmware.com/web/sdk/7.0/vsphere-automation-python> |
Examples
--------
```
# Sample configuration file for VMware Host dynamic inventory
plugin: community.vmware.vmware_host_inventory
strict: False
hostname: 10.65.223.31
username: [email protected]
password: Esxi@123$%
validate_certs: False
with_tags: True
# Using compose
plugin: community.vmware.vmware_host_inventory
hostname: 10.65.223.31
username: [email protected]
password: Esxi@123$%
validate_certs: False
properties:
- name
- summary
- config.lockdownMode
compose:
ansible_user: "'root'"
ansible_connection: "'ssh'"
```
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_first_class_disk β Manage VMware vSphere First Class Disks community.vmware.vmware\_first\_class\_disk β Manage VMware vSphere First Class Disks
=====================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_first_class_disk`.
New in version 1.7.0: of community.vmware
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to manage (create, delete, resize) VMware vSphere First Class Disks.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **datacenter\_name** string | | The name of the datacenter. |
| **datastore\_name** string / required | | Name of datastore or datastore cluster to be used for the disk. |
| **disk\_name** string / required | | The name of the disk. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **size** string | | Disk storage size, an integer plus a unit. There is no space allowed in between size number and unit. Allowed units are MB, GB and TB. Examples: size: 2048MB size: 10GB size: 1TB |
| **state** string | **Choices:*** **present** β
* absent
| If the disk should be present or absent. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 7.0
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Create Disk
community.vmware.vmware_first_class_disk:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datastore_name: '{{ datastore_name }}'
disk_name: '1GBDisk'
size: '1GB'
state: present
delegate_to: localhost
- name: Delete Disk
community.vmware.vmware_first_class_disk:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datastore_name: '{{ datastore_name }}'
disk_name: 'FirstClassDisk'
state: absent
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 |
| --- | --- | --- |
| **first\_class\_disk** dictionary | changed | First-class disk returned when created, deleted or changed **Sample:** { "name": "1GBDisk" "datastore\_name": "DS0" "size\_mb": "1024" "state": "present" } |
### Authors
* Mario Lenz (@mariolenz)
| programming_docs |
ansible community.vmware.vmware_host_capability_facts β Gathers facts about an ESXi hostβs capability information community.vmware.vmware\_host\_capability\_facts β Gathers facts about an ESXi hostβs capability information
============================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_capability_facts`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)
DEPRECATED
----------
Removed in
major release after 2021-12-01
Why
Deprecated in favour of [community.vmware.vmware\_host\_capability\_info](vmware_host_capability_info_module#ansible-collections-community-vmware-vmware-host-capability-info-module) module.
Alternative
Use [community.vmware.vmware\_host\_capability\_info](vmware_host_capability_info_module#ansible-collections-community-vmware-vmware-host-capability-info-module) instead.
Synopsis
--------
* This module can be used to gather facts about an ESXi hostβs capability information when ESXi hostname or Cluster name is given.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of the cluster from all host systems to be used for facts gathering. If `esxi_hostname` is not given, this parameter is required. |
| **esxi\_hostname** string | | ESXi hostname to gather facts from. If `cluster_name` is not given, this parameter is required. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather capability facts about all ESXi Host in given Cluster
community.vmware.vmware_host_capability_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: cluster_name
delegate_to: localhost
register: all_cluster_hosts_facts
- name: Gather capability facts about ESXi Host
community.vmware.vmware_host_capability_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
delegate_to: localhost
register: hosts_facts
```
Return Values
-------------
Common return 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\_capability\_facts** dictionary | always | metadata about host's capability information **Sample:** {'esxi\_hostname\_0001': {'accel3dSupported': False, 'backgroundSnapshotsSupported': False, 'checkpointFtCompatibilityIssues': [], 'checkpointFtSupported': False, 'cloneFromSnapshotSupported': True, 'cpuHwMmuSupported': True}} |
Status
------
* This module will be removed in a major release after 2021-12-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_drs_group_facts β Gathers facts about DRS VM/Host groups on the given cluster community.vmware.vmware\_drs\_group\_facts β Gathers facts about DRS VM/Host groups on the given cluster
========================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_drs_group_facts`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)
DEPRECATED
----------
Removed in
major release after 2021-12-01
Why
Deprecated in favour of [community.vmware.vmware\_drs\_group\_info](vmware_drs_group_info_module#ansible-collections-community-vmware-vmware-drs-group-info-module) module.
Alternative
Use [community.vmware.vmware\_drs\_group\_info](vmware_drs_group_info_module#ansible-collections-community-vmware-vmware-drs-group-info-module) instead.
Synopsis
--------
* This module can be used to gather facts about DRS VM/HOST groups from the given cluster.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Cluster to search for VM/Host groups. If set, facts of DRS groups belonging this cluster will be returned. Not needed if `datacenter` is set. |
| **datacenter** string | | Datacenter to search for DRS VM/Host groups.
aliases: datacenter\_name |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5 and 6.7
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
---
- name: "Gather DRS facts about given Cluster"
register: cluster_drs_group_facts
community.vmware.vmware_drs_group_facts:
hostname: "{{ vcenter_hostname }}"
password: "{{ vcenter_password }}"
username: "{{ vcenter_username }}"
cluster_name: "{{ cluster_name }}"
datacenter: "{{ datacenter }}"
delegate_to: localhost
- name: "Gather DRS group facts about all clusters in given datacenter"
register: cluster_drs_group_facts
community.vmware.vmware_drs_group_facts:
hostname: "{{ vcenter_hostname }}"
password: "{{ vcenter_password }}"
username: "{{ vcenter_username }}"
datacenter: "{{ datacenter }}"
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 |
| --- | --- | --- |
| **drs\_group\_facts** dictionary | always | Metadata about DRS group from given cluster / datacenter **Sample:** {'drs\_group\_facts': {'DC0\_C0': [{'group\_name': 'GROUP\_HOST\_S01', 'hosts': ['vm-01.zone', 'vm-02.zone'], 'type': 'host'}, {'group\_name': 'GROUP\_HOST\_S02', 'hosts': ['vm-03.zone', 'vm-04.zone'], 'type': 'host'}, {'group\_name': 'GROUP\_VM\_S01', 'type': 'vm', 'vms': ['test-node01']}, {'group\_name': 'GROUP\_VM\_S02', 'type': 'vm', 'vms': ['test-node02']}], 'DC0\_C1': []}} |
Status
------
* This module will be removed in a major release after 2021-12-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Karsten Kaj Jakobsen (@karstenjakobsen)
ansible community.vmware.vmware_host_vmnic_info β Gathers info about vmnics available on the given ESXi host community.vmware.vmware\_host\_vmnic\_info β Gathers info about vmnics available on the given ESXi host
=======================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_vmnic_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 vmnics available on the given ESXi host.
* If `cluster_name` is provided, then vmnic information about all hosts from given cluster will be returned.
* If `esxi_hostname` is provided, then vmnic information about given host system will be returned.
* Additional details about vswitch and dvswitch with respective vmnic is also provided which is added in 2.7 version.
* Additional details about lldp added in 1.11.0
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **capabilities** boolean | **Choices:*** **no** β
* yes
| Gather information about general capabilities (Auto negotiation, Wake On LAN, and Network I/O Control). |
| **cluster\_name** string | | Name of the cluster from which all host systems will be used. Vmnic information about each ESXi server will be returned for the given cluster. This parameter is required if `esxi_hostname` is not specified. |
| **directpath\_io** boolean | **Choices:*** **no** β
* yes
| Gather information about DirectPath I/O capabilities and configuration. |
| **esxi\_hostname** string | | Name of the host system to work with. Vmnic information about this ESXi server will be returned. This parameter is required if `cluster_name` is not specified. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **sriov** boolean | **Choices:*** **no** β
* yes
| Gather information about SR-IOV capabilities and configuration. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather info about vmnics of all ESXi Host in the given Cluster
community.vmware.vmware_host_vmnic_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: '{{ cluster_name }}'
delegate_to: localhost
register: cluster_host_vmnics
- name: Gather info about vmnics of an ESXi Host
community.vmware.vmware_host_vmnic_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
delegate_to: localhost
register: host_vmnics
```
Return Values
-------------
Common return 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\_vmnics\_info** dictionary | hosts\_vmnics\_info | dict with hostname as key and dict with vmnics information as value. for `num_vmnics`, only NICs starting with vmnic are counted. NICs like vusb\* are not counted. details about vswitch and dvswitch was added in version 2.7. details about vmnics was added in version 2.8. details about lldp was added in version 1.11.0 **Sample:** {'10.76.33.204': {'all': ['vmnic0', 'vmnic1'], 'available': [], 'dvswitch': {'dvs\_0002': ['vmnic1']}, 'num\_vmnics': 2, 'used': ['vmnic1', 'vmnic0'], 'vmnic\_details': [{'actual\_duplex': 'Full Duplex', 'actual\_speed': 10000, 'adapter': 'Intel(R) 82599 10 Gigabit Dual Port Network Connection', 'configured\_duplex': 'Auto negotiate', 'configured\_speed': 'Auto negotiate', 'device': 'vmnic0', 'driver': 'ixgbe', 'lldp\_info': {'Aggregated Port ID': '0', 'Aggregation Status': '1', 'Enabled Capabilities': {'\_vimtype': 'vim.host.PhysicalNic.CdpDeviceCapability', 'host': False, 'igmpEnabled': False, 'networkSwitch': False, 'repeater': False, 'router': True, 'sourceRouteBridge': False, 'transparentBridge': True}, 'MTU': '9216', 'Port Description': 'switch port description', 'Samples': 18814, 'System Description': 'omitted from output', 'System Name': 'sw1', 'TimeOut': 30, 'Vlan ID': '1'}, 'location': '0000:01:00.0', 'mac': 'aa:bb:cc:dd:ee:ff', 'status': 'Connected'}, {'actual\_duplex': 'Full Duplex', 'actual\_speed': 10000, 'adapter': 'Intel(R) 82599 10 Gigabit Dual Port Network Connection', 'configured\_duplex': 'Auto negotiate', 'configured\_speed': 'Auto negotiate', 'device': 'vmnic1', 'driver': 'ixgbe', 'lldp\_info': 'N/A', 'location': '0000:01:00.1', 'mac': 'ab:ba:cc:dd:ee:ff', 'status': 'Connected'}], 'vswitch': {'vSwitch0': ['vmnic0']}}} |
### Authors
* Abhijeet Kasurde (@Akasurde)
* Christian Kotte (@ckotte)
ansible community.vmware.vmware_host_config_info β Gathers info about an ESXi hostβs advance configuration information community.vmware.vmware\_host\_config\_info β Gathers info about an ESXi hostβs advance configuration information
=================================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_config_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 an ESXi hostβs advance configuration information when ESXi hostname or Cluster name is given.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of the cluster from which the ESXi host belong to. If `esxi_hostname` is not given, this parameter is required. |
| **esxi\_hostname** string | | ESXi hostname to gather information from. If `cluster_name` is not given, this parameter is required. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather info about all ESXi Host in given Cluster
community.vmware.vmware_host_config_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: cluster_name
delegate_to: localhost
- name: Gather info about ESXi Host
community.vmware.vmware_host_config_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
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 |
| --- | --- | --- |
| **hosts\_info** dictionary | always | dict with hostname as key and dict with host config information **Sample:** {'10.76.33.226': {'Annotations.WelcomeMessage': '', 'BufferCache.FlushInterval': 30000, 'BufferCache.HardMaxDirty': 95, 'BufferCache.PerFileHardMaxDirty': 50, 'BufferCache.SoftMaxDirty': 15}} |
### Authors
* Abhijeet Kasurde (@Akasurde)
| programming_docs |
ansible community.vmware.vmware_vm_vm_drs_rule β Configure VMware DRS Affinity rule for virtual machines in the given cluster community.vmware.vmware\_vm\_vm\_drs\_rule β Configure VMware DRS Affinity rule for virtual machines in the given cluster
=========================================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_vm_vm_drs_rule`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to configure VMware DRS Affinity rule for virtual machines in the given cluster.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **affinity\_rule** boolean | **Choices:*** no
* **yes** β
| If set to `True`, the DRS rule will be an Affinity rule. If set to `False`, the DRS rule will be an Anti-Affinity rule. Effective only if `state` is set to `present`. |
| **cluster\_name** string / required | | Desired cluster name where virtual machines are present for the DRS rule. |
| **drs\_rule\_name** string / required | | The name of the DRS rule to manage. |
| **enabled** boolean | **Choices:*** **no** β
* yes
| If set to `True`, the DRS rule will be enabled. Effective only if `state` is set to `present`. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **mandatory** boolean | **Choices:*** **no** β
* yes
| If set to `True`, the DRS rule will be mandatory. Effective only if `state` is set to `present`. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **present** β
* absent
| If set to `present`, then the DRS rule is created if not present. If set to `present`, then the DRS rule is already present, it updates to the given configurations. If set to `absent`, then the DRS rule is deleted if present. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
| **vms** list / elements=string | | List of virtual machines name for which DRS rule needs to be applied. Required if `state` is set to `present`. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Create DRS Affinity Rule for VM-VM
community.vmware.vmware_vm_vm_drs_rule:
hostname: "{{ esxi_server }}"
username: "{{ esxi_username }}"
password: "{{ esxi_password }}"
cluster_name: "{{ cluster_name }}"
vms:
- vm1
- vm2
drs_rule_name: vm1-vm2-affinity-rule-001
enabled: True
mandatory: True
affinity_rule: True
delegate_to: localhost
- name: Create DRS Anti-Affinity Rule for VM-VM
community.vmware.vmware_vm_vm_drs_rule:
hostname: "{{ esxi_server }}"
username: "{{ esxi_username }}"
password: "{{ esxi_password }}"
cluster_name: "{{ cluster_name }}"
enabled: True
vms:
- vm1
- vm2
drs_rule_name: vm1-vm2-affinity-rule-001
mandatory: True
affinity_rule: False
delegate_to: localhost
- name: Delete DRS Affinity Rule for VM-VM
community.vmware.vmware_vm_vm_drs_rule:
hostname: "{{ esxi_server }}"
username: "{{ esxi_username }}"
password: "{{ esxi_password }}"
cluster_name: "{{ cluster_name }}"
drs_rule_name: vm1-vm2-affinity-rule-001
state: absent
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 |
| --- | --- | --- |
| **result** dictionary | when state is present | metadata about DRS VM and VM rule **Sample:** {'rule\_enabled': False, 'rule\_key': 20, 'rule\_mandatory': True, 'rule\_name': 'drs\_rule\_0014', 'rule\_uuid': '525f3bc0-253f-825a-418e-2ec93bffc9ae', 'rule\_vms': ['VM\_65', 'VM\_146']} |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_about_facts β Provides information about VMware server to which user is connecting to community.vmware.vmware\_about\_facts β Provides information about VMware server to which user is connecting to
===============================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_about_facts`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)
DEPRECATED
----------
Removed in
major release after 2021-12-01
Why
Deprecated in favour of [community.vmware.vmware\_about\_info](vmware_about_info_module#ansible-collections-community-vmware-vmware-about-info-module) module.
Alternative
Use [community.vmware.vmware\_about\_info](vmware_about_info_module#ansible-collections-community-vmware-vmware-about-info-module) instead.
Synopsis
--------
* This module can be used to gather information about VMware server to which user is trying to connect.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Provide information about vCenter
community.vmware.vmware_about_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
delegate_to: localhost
register: vcenter_about_info
- name: Provide information about a standalone ESXi server
community.vmware.vmware_about_facts:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
delegate_to: localhost
register: esxi_about_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 |
| --- | --- | --- |
| **about\_facts** string | success | dict about VMware server **Sample:** {'api\_type': 'VirtualCenter', 'api\_version': '6.5', 'build': '5973321', 'instance\_uuid': 'dbed6e0c-bd88-4ef6-b594-21283e1c677f', 'license\_product\_name': 'VMware VirtualCenter Server', 'license\_product\_version': '6.0', 'locale\_build': '000', 'locale\_version': 'INTL', 'os\_type': 'darwin-amd64', 'product\_full\_name': 'VMware vCenter Server 6.5.0 build-5973321', 'product\_line\_id': 'vpx', 'product\_name': 'VMware vCenter Server (govmomi simulator)', 'vendor': 'VMware, Inc.', 'version': '6.5.0'} |
Status
------
* This module will be removed in a major release after 2021-12-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_guest_screenshot β Create a screenshot of the Virtual Machine console. community.vmware.vmware\_guest\_screenshot β Create a screenshot of the Virtual Machine console.
================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_guest_screenshot`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used to take screenshot of the given virtual machine when virtual machine is powered on.
* All parameters and VMware object names are case sensitive.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster** string | | The name of cluster where the virtual machine is running. This is a required parameter, if `esxi_hostname` is not set.
`esxi_hostname` and `cluster` are mutually exclusive parameters. |
| **datacenter** string | | The datacenter name to which virtual machine belongs to. |
| **esxi\_hostname** string | | The ESXi hostname where the virtual machine is running. This is a required parameter, if `cluster` is not set.
`esxi_hostname` and `cluster` are mutually exclusive parameters. |
| **folder** string | | Destination folder, absolute or relative path to find an existing guest. This is a required parameter, only if multiple VMs are found with same name. The folder should include the datacenter. ESXi server's datacenter is ha-datacenter. Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2 |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **local\_path** path | | If `local_path` is not set, the created screenshot file will be kept in the directory of the virtual machine on ESXi host. If `local_path` is set to a valid path on local machine, then the screenshot file will be downloaded from ESXi host to the local directory. If not download screenshot file to local machine, you can open it through the returned file URL in screenshot facts manually. |
| **moid** string | | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if `name` or `uuid` is not supplied. |
| **name** string | | Name of the virtual machine. This is a required parameter, if parameter `uuid` or `moid` is not supplied. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **uuid** string | | UUID of the instance to gather facts if known, this is VMware's unique identifier. This is a required parameter, if parameter `name` or `moid` is not supplied. |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5 and 6.7
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: take a screenshot of the virtual machine console
community.vmware.vmware_guest_screenshot:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
folder: "{{ folder_name }}"
name: "{{ vm_name }}"
local_path: "/tmp/"
delegate_to: localhost
register: take_screenshot
- name: Take a screenshot of the virtual machine console using MoID
community.vmware.vmware_guest_screenshot:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
folder: "{{ folder_name }}"
moid: vm-42
local_path: "/tmp/"
delegate_to: localhost
register: take_screenshot
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **screenshot\_info** dictionary | always | display the facts of captured virtual machine screenshot file **Sample:** {'download\_file\_size': 2367, 'download\_local\_path': '/tmp/', 'result': 'success', 'screenshot\_file': '[datastore0] test\_vm/test\_vm-1.png', 'screenshot\_file\_url': 'https://test\_vcenter/folder/test\_vm/test\_vm-1.png?dcPath=test-dc&dsName=datastore0', 'task\_complete\_time': '2019-05-25T10:35:04.412622Z', 'task\_start\_time': '2019-05-25T10:35:04.215016Z', 'virtual\_machine': 'test\_vm'} |
### Authors
* Diane Wang (@Tomorrow9) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#02666b636c6775242131353924213730392421363a39746f756370672421363439616d6f)>
ansible community.vmware.vmware_vsan_health_info β Gather information about a VMware vSAN clusterβs health community.vmware.vmware\_vsan\_health\_info β Gather information about a VMware vSAN clusterβs health
=====================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_vsan_health_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather information about a VMware vSAN clusterβs health.
Requirements
------------
The below requirements are needed on the host that executes this module.
* PyVmomi
* VMware vSAN Pythonβs SDK
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string / required | | Name of the vSAN cluster. |
| **datacenter** string added in 1.6.0 of community.vmware | | Name of the Datacenter.
aliases: datacenter\_name |
| **fetch\_from\_cache** boolean | **Choices:*** **no** β
* yes
|
`True` to return the result from cache directly instead of running the full health check. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather health info from a vSAN's cluster
community.vmware.vmware_vsan_health_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
cluster_name: 'vSAN01'
fetch_from_cache: False
- name: Gather health info from a vSAN's cluster with datacenter
community.vmware.vmware_vsan_health_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
cluster_name: 'vSAN01'
datacenter: 'Datacenter_01'
fetch_from_cache: 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 |
| --- | --- | --- |
| **vsan\_health\_info** dictionary | on success | vSAN cluster health info **Sample:** {'\_vimtype': 'vim.cluster.VsanClusterHealthSummary', 'burnInTest': None, 'clusterStatus': {'\_vimtype': 'vim.cluster.VsanClusterHealthSystemStatusResult', 'goalState': 'installed', 'status': 'green', 'trackedHostsStatus': [{'\_vimtype': 'vim.host.VsanHostHealthSystemStatusResult', 'hostname': 'esxi01.example.com', 'issues': [], 'status': 'green'}, {'\_vimtype': 'vim.host.VsanHostHealthSystemStatusResult', 'hostname': 'esxi04.example.com', 'issues': [], 'status': 'green'}, {'\_vimtype': 'vim.host.VsanHostHealthSystemStatusResult', 'hostname': 'esxi02.example.com', 'issues': [], 'status': 'green'}, {'\_vimtype': 'vim.host.VsanHostHealthSystemStatusResult', 'hostname': 'esxi03.example.com', 'issues': [], 'status': 'green'}], 'untrackedHosts': []}} |
### Authors
* Erwan Quelin (@equelin)
| programming_docs |
ansible community.vmware.vmware_guest_vnc β Manages VNC remote display on virtual machines in vCenter community.vmware.vmware\_guest\_vnc β Manages VNC remote display on virtual machines in vCenter
===============================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_guest_vnc`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)
DEPRECATED
----------
Removed in
major release after 2022-10-15
Why
VNC has been removed in 7.0 and 2022-10-15 is the End of General Support date for 6.5 / 6.7.
Alternative
Users should use the VM Console via the vSphere Client, the ESXi Host Client, or the VMware Remote Console to connect to virtual machines.
Synopsis
--------
* This module can be used to enable and disable VNC remote display on virtual machine.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **datacenter** string | **Default:**"ha-datacenter" | Destination datacenter for the deploy operation. This parameter is case sensitive. |
| **folder** string | | Destination folder, absolute or relative path to find an existing guest. The folder should include the datacenter. ESX's datacenter is ha-datacenter |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **moid** string | | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if `name` or `uuid` is not supplied. |
| **name** string | | Name of the virtual machine to work with. Virtual machine names in vCenter are not necessarily unique, which may be problematic, see `name_match`. |
| **name\_match** string | **Choices:*** **first** β
* last
| If multiple virtual machines matching the name, use the first or last found. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **present** β
* absent
| Set the state of VNC on virtual machine. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **uuid** string | | UUID of the instance to manage if known, this is VMware's unique identifier. This is required, if `name` or `moid` is not supplied. |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
| **vnc\_ip** string | **Default:**"0.0.0.0" | Sets an IP for VNC on virtual machine. This is required only when *state* is set to present and will be ignored if *state* is absent. |
| **vnc\_password** string | **Default:**"" | Sets a password for VNC on virtual machine. This is required only when *state* is set to present and will be ignored if *state* is absent. |
| **vnc\_port** integer | **Default:**0 | The port that VNC listens on. Usually a number between 5900 and 7000 depending on your config. This is required only when *state* is set to present and will be ignored if *state* is absent. |
Notes
-----
Note
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Enable VNC remote display on the VM
community.vmware.vmware_guest_vnc:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
folder: /mydatacenter/vm
name: testvm1
vnc_port: 5990
vnc_password: vNc5ecr3t
datacenter: "{{ datacenter_name }}"
state: present
delegate_to: localhost
register: vnc_result
- name: Disable VNC remote display on the VM
community.vmware.vmware_guest_vnc:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
uuid: 32074771-7d6b-699a-66a8-2d9cf8236fff
state: absent
delegate_to: localhost
register: vnc_result
- name: Disable VNC remote display on the VM using MoID
community.vmware.vmware_guest_vnc:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
moid: vm-42
state: absent
delegate_to: localhost
register: vnc_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 |
| --- | --- | --- |
| **changed** boolean | always | If anything changed on VM's extraConfig. |
| **failed** boolean | always | If changes failed. |
| **instance** dictionary | On success in both *state* | Dictionary describing the VM, including VNC info. |
Status
------
* This module will be removed in a major release after 2022-10-15. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Armin Ranjbar Daemi (@rmin)
ansible community.vmware.vmware_portgroup β Create a VMware portgroup community.vmware.vmware\_portgroup β Create a VMware portgroup
==============================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_portgroup`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create a VMware Port Group on a VMware Standard Switch (vSS) for given ESXi host(s) or hosts of given cluster.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of cluster name for host membership. Portgroup will be created on all hosts of the given cluster. This option is required if `hosts` is not specified.
aliases: cluster |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **hosts** list / elements=string | | List of name of host or hosts on which portgroup needs to be added. This option is required if `cluster_name` is not specified.
aliases: esxi\_hostname |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **portgroup** string / required | | Portgroup name to add.
aliases: portgroup\_name |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **security** dictionary | | Network policy specifies layer 2 security settings for a portgroup such as promiscuous mode, where guest adapter listens to all the packets, MAC address changes and forged transmits. Dict which configures the different security values for portgroup.
aliases: security\_policy, network\_policy |
| | **forged\_transmits** boolean | **Choices:*** no
* yes
| Indicates whether forged transmits are allowed. |
| | **mac\_changes** boolean | **Choices:*** no
* yes
| Indicates whether mac changes are allowed. |
| | **promiscuous\_mode** boolean | **Choices:*** no
* yes
| Indicates whether promiscuous mode is allowed. |
| **state** string | **Choices:*** **present** β
* absent
| Determines if the portgroup should be present or not. |
| **switch** string / required | | vSwitch to modify.
aliases: switch\_name, vswitch |
| **teaming** dictionary | | Dictionary which configures the different teaming values for portgroup.
aliases: teaming\_policy |
| | **active\_adapters** list / elements=string | | List of active adapters used for load balancing. All vmnics are used as active adapters if `active_adapters` and `standby_adapters` are not defined. |
| | **failback** boolean | **Choices:*** no
* yes
| Indicate whether or not to use a failback when restoring links. |
| | **load\_balancing** string | **Choices:*** loadbalance\_ip
* loadbalance\_srcmac
* loadbalance\_srcid
* failover\_explicit
* None
| Network adapter teaming policy.
aliases: load\_balance\_policy |
| | **network\_failure\_detection** string | **Choices:*** link\_status\_only
* beacon\_probing
| Network failure detection. |
| | **notify\_switches** boolean | **Choices:*** no
* yes
| Indicate whether or not to notify the physical switch if a link fails. |
| | **standby\_adapters** list / elements=string | | List of standby adapters used for failover. All vmnics are used as active adapters if `active_adapters` and `standby_adapters` are not defined. |
| **traffic\_shaping** dictionary | | Dictionary which configures traffic shaping for the switch. |
| | **average\_bandwidth** integer | | Average bandwidth (kbit/s). |
| | **burst\_size** integer | | Burst size (KB). |
| | **enabled** boolean | **Choices:*** no
* yes
| Status of Traffic Shaping Policy. |
| | **peak\_bandwidth** integer | | Peak bandwidth (kbit/s). |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
| **vlan\_id** integer | **Default:**0 | VLAN ID to assign to portgroup. Set to 0 (no VLAN tagging) by default.
aliases: vlan |
Notes
-----
Note
* Tested on vSphere 5.5 and 6.5
* Complete configuration only tested on vSphere 6.5
* `inbound_policy` and `rolling_order` are removed in 2.11.
* Those two options are only used during portgroup creation. Updating is not supported with those options.
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Add Management Network VM Portgroup
community.vmware.vmware_portgroup:
hostname: "{{ esxi_hostname }}"
username: "{{ esxi_username }}"
password: "{{ esxi_password }}"
switch: "{{ vswitch_name }}"
portgroup: "{{ portgroup_name }}"
vlan_id: "{{ vlan_id }}"
delegate_to: localhost
- name: Add Portgroup with Promiscuous Mode Enabled
community.vmware.vmware_portgroup:
hostname: "{{ esxi_hostname }}"
username: "{{ esxi_username }}"
password: "{{ esxi_password }}"
switch: "{{ vswitch_name }}"
portgroup: "{{ portgroup_name }}"
security:
promiscuous_mode: True
delegate_to: localhost
- name: Add Management Network VM Portgroup to specific hosts
community.vmware.vmware_portgroup:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
hosts: [esxi_hostname_one]
switch: "{{ vswitch_name }}"
portgroup: "{{ portgroup_name }}"
vlan_id: "{{ vlan_id }}"
delegate_to: localhost
- name: Add Management Network VM Portgroup to all hosts in a cluster
community.vmware.vmware_portgroup:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
cluster_name: "{{ cluster_name }}"
switch: "{{ vswitch_name }}"
portgroup: "{{ portgroup_name }}"
vlan_id: "{{ vlan_id }}"
delegate_to: localhost
- name: Remove Management Network VM Portgroup to all hosts in a cluster
community.vmware.vmware_portgroup:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
cluster_name: "{{ cluster_name }}"
switch: "{{ vswitch_name }}"
portgroup: "{{ portgroup_name }}"
vlan_id: "{{ vlan_id }}"
state: absent
delegate_to: localhost
- name: Add Portgroup with all settings defined
community.vmware.vmware_portgroup:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ inventory_hostname }}"
switch: "{{ vswitch_name }}"
portgroup: "{{ portgroup_name }}"
vlan_id: 10
security:
promiscuous_mode: False
mac_changes: False
forged_transmits: False
traffic_shaping:
enabled: True
average_bandwidth: 100000
peak_bandwidth: 100000
burst_size: 102400
teaming:
load_balancing: failover_explicit
network_failure_detection: link_status_only
notify_switches: true
failback: true
active_adapters:
- vmnic0
standby_adapters:
- vmnic1
delegate_to: localhost
register: teaming_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** dictionary | always | metadata about the portgroup **Sample:** {'esxi01.example.com': {'changed': True, 'failback': 'No override', 'failover\_active': 'No override', 'failover\_standby': 'No override', 'failure\_detection': 'No override', 'load\_balancing': 'No override', 'msg': 'Port Group added', 'notify\_switches': 'No override', 'portgroup': 'vMotion', 'sec\_forged\_transmits': False, 'sec\_mac\_changes': False, 'sec\_promiscuous\_mode': False, 'traffic\_shaping': 'No override', 'vlan\_id': 33, 'vswitch': 'vSwitch1'}} |
### Authors
* Joseph Callen (@jcpowermac)
* Russell Teague (@mtnbikenc)
* Abhijeet Kasurde (@Akasurde)
* Christian Kotte (@ckotte)
ansible community.vmware.vmware_target_canonical_facts β Return canonical (NAA) from an ESXi host system community.vmware.vmware\_target\_canonical\_facts β Return canonical (NAA) from an ESXi host system
===================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_target_canonical_facts`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)
DEPRECATED
----------
Removed in
major release after 2021-12-01
Why
Deprecated in favour of [community.vmware.vmware\_target\_canonical\_info](vmware_target_canonical_info_module#ansible-collections-community-vmware-vmware-target-canonical-info-module) module.
Alternative
Use [community.vmware.vmware\_target\_canonical\_info](vmware_target_canonical_info_module#ansible-collections-community-vmware-vmware-target-canonical-info-module) instead.
Synopsis
--------
* This module can be used to gather facts about canonical (NAA) from an ESXi host based on SCSI target ID.
Requirements
------------
The below requirements are needed on the host that executes this module.
* Tested on vSphere 5.5 and 6.5
* PyVmomi installed
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of the cluster. Facts about all SCSI devices for all host system in the given cluster is returned. This parameter is required, if `esxi_hostname` is not provided. |
| **esxi\_hostname** string | | Name of the ESXi host system. Facts about all SCSI devices for the given ESXi host system is returned. This parameter is required, if `cluster_name` is not provided. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **target\_id** integer | | The target id based on order of scsi device. version 2.6 onwards, this parameter is optional. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Get Canonical name of particular target on particular ESXi host system
community.vmware.vmware_target_canonical_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
target_id: 7
esxi_hostname: esxi_hostname
delegate_to: localhost
- name: Get Canonical name of all target on particular ESXi host system
community.vmware.vmware_target_canonical_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
delegate_to: localhost
- name: Get Canonical name of all ESXi hostname on particular Cluster
community.vmware.vmware_target_canonical_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: '{{ cluster_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 |
| --- | --- | --- |
| **canonical** string | if host system and target id is given | metadata about SCSI Target device **Sample:** mpx.vmhba0:C0:T0:L0 |
| **scsi\_tgt\_facts** dictionary | if host system or cluster is given | metadata about all SCSI Target devices **Sample:** {'DC0\_C0\_H0': {'scsilun\_canonical': {'key-vim.host.ScsiDisk-0000000000766d686261303a303a30': 'mpx.vmhba0:C0:T0:L0', 'key-vim.host.ScsiLun-0005000000766d686261313a303a30': 'mpx.vmhba1:C0:T0:L0'}, 'target\_lun\_uuid': {'0': 'key-vim.host.ScsiDisk-0000000000766d686261303a303a30'}}, 'DC0\_C0\_H1': {'scsilun\_canonical': {'key-vim.host.ScsiDisk-0000000000766d686261303a303a30': 'mpx.vmhba0:C0:T0:L0', 'key-vim.host.ScsiLun-0005000000766d686261313a303a30': 'mpx.vmhba1:C0:T0:L0'}, 'target\_lun\_uuid': {'0': 'key-vim.host.ScsiDisk-0000000000766d686261303a303a30'}}} |
Status
------
* This module will be removed in a major release after 2021-12-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Joseph Callen (@jcpowermac)
* Abhijeet Kasurde (@Akasurde)
| programming_docs |
ansible community.vmware.vca_nat β add remove nat rules in a gateway in a vca community.vmware.vca\_nat β add remove nat rules in a gateway in a vca
======================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vca_nat`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Status](#status)
DEPRECATED
----------
Removed in
major release after 2022-06-01
Why
Module depends upon deprecated version of Pyvcloud library.
Alternative
Use <https://github.com/vmware/ansible-module-vcloud-director> instead.
Synopsis
--------
* Adds or removes nat rules from a gateway in a vca environment
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_version** string | **Default:**"5.7" | The API version to be used with the vca. |
| **gateway\_name** string | **Default:**"gateway" | The name of the gateway of the vdc where the rule should be added. |
| **host** string | | The authentication host to be used when service type is vcd. |
| **instance\_id** string | | The instance ID in a vchs environment to be used for creating the vapp. |
| **nat\_rules** string / required | **Default:**"no" | A list of rules to be added to the gateway, Please see examples on valid entries |
| **org** string | | The org to login to for creating vapp. This option is required when the `service_type` is *vdc*. |
| **password** string | | The vca password, if not set the environment variable `VCA_PASS` is checked for the password.
aliases: pass, passwd |
| **purge\_rules** boolean | **Choices:*** **no** β
* yes
| If set to true, it will delete all rules in the gateway that are not given as parameter to this module. |
| **service\_type** string | **Choices:*** **vca** β
* vcd
* vchs
| The type of service we are authenticating against. |
| **state** string | **Choices:*** absent
* **present** β
| Whether the object should be added or removed. |
| **username** string | | The vca username or email address, if not set the environment variable `VCA_USER` is checked for the username.
aliases: user |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| If the certificates of the authentication is to be verified.
aliases: verify\_certs |
| **vdc\_name** string | | The name of the vdc where the gateway is located. |
Examples
--------
```
#An example for a source nat
- hosts: localhost
connection: local
tasks:
- community.vmware.vca_nat:
instance_id: 'b15ff1e5-1024-4f55-889f-ea0209726282'
vdc_name: 'benz_ansible'
state: 'present'
nat_rules:
- rule_type: SNAT
original_ip: 192.0.2.42
translated_ip: 203.0.113.23
#example for a DNAT
- hosts: localhost
connection: local
tasks:
- community.vmware.vca_nat:
instance_id: 'b15ff1e5-1024-4f55-889f-ea0209726282'
vdc_name: 'benz_ansible'
state: 'present'
nat_rules:
- rule_type: DNAT
original_ip: 203.0.113.23
original_port: 22
translated_ip: 192.0.2.42
translated_port: 22
```
Status
------
* This module will be removed in a major release after 2022-06-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Peter Sprygada (@privateip)
ansible community.vmware.vmware_host_ntp_facts β Gathers facts about NTP configuration on an ESXi host community.vmware.vmware\_host\_ntp\_facts β Gathers facts about NTP configuration on an ESXi host
=================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_ntp_facts`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)
DEPRECATED
----------
Removed in
major release after 2021-12-01
Why
Deprecated in favour of [community.vmware.vmware\_host\_ntp\_info](vmware_host_ntp_info_module#ansible-collections-community-vmware-vmware-host-ntp-info-module) module.
Alternative
Use [community.vmware.vmware\_host\_ntp\_info](vmware_host_ntp_info_module#ansible-collections-community-vmware-vmware-host-ntp-info-module) instead.
Synopsis
--------
* This module can be used to gather facts about NTP configurations on an ESXi host.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of the cluster. NTP config facts about each ESXi server will be returned for the given cluster. If `esxi_hostname` is not given, this parameter is required. |
| **esxi\_hostname** string | | ESXi hostname. NTP config facts about this ESXi server will be returned. If `cluster_name` is not given, this parameter is required. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather NTP facts about all ESXi Host in the given Cluster
community.vmware.vmware_host_ntp_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: cluster_name
delegate_to: localhost
register: cluster_host_ntp
- name: Gather NTP facts about ESXi Host
community.vmware.vmware_host_ntp_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
delegate_to: localhost
register: host_ntp
```
Return Values
-------------
Common return 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\_ntp\_facts** dictionary | hosts\_ntp\_facts | dict with hostname as key and dict with NTP facts as value **Sample:** {'10.76.33.226': [{'ntp\_servers': [], 'time\_zone\_description': 'UTC', 'time\_zone\_gmt\_offset': 0, 'time\_zone\_identifier': 'UTC', 'time\_zone\_name': 'UTC'}]} |
Status
------
* This module will be removed in a major release after 2021-12-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_guest_file_operation β Files operation in a VMware guest operating system without network community.vmware.vmware\_guest\_file\_operation β Files operation in a VMware guest operating system without network
====================================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_guest_file_operation`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Module to copy a file to a VM, fetch a file from a VM and create or delete a directory in the guest OS.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster** string | | The cluster hosting the virtual machine. If set, it will help to speed up virtual machine search. |
| **copy** dictionary | | Copy file to vm without requiring network. |
| | **dest** string / required | | File destination, path must be exist. |
| | **overwrite** boolean | **Choices:*** **no** β
* yes
| Overwrite or not. |
| | **src** string / required | | File source absolute or relative. |
| **datacenter** string | | The datacenter hosting the virtual machine. If set, it will help to speed up virtual machine search. |
| **directory** dictionary | | Create or delete a directory. Can be used to create temp directory inside guest using mktemp operation. mktemp sets variable `dir` in the result with the name of the new directory. mktemp operation option is added in version 2.8. |
| | **operation** string / required | **Choices:*** create
* delete
* mktemp
| Operation to perform. |
| | **path** string | | Directory path. Required for `create` or `remove`. |
| | **prefix** string | | Temporary directory prefix. Required for `mktemp`. |
| | **recurse** boolean | **Choices:*** **no** β
* yes
| Not required. |
| | **suffix** string | | Temporary directory suffix. Required for `mktemp`. |
| **fetch** dictionary | | Get file from virtual machine without requiring network. |
| | **dest** string / required | | File destination on localhost, path must be exist. |
| | **src** string / required | | The file on the remote system to fetch. This *must* be a file, not a directory. |
| **folder** string | | Destination folder, absolute path to find an existing guest or create the new guest. The folder should include the datacenter. ESX's datacenter is ha-datacenter Used only if `vm_id_type` is `inventory_path`. Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2 folder: vm/folder2 folder: folder2 |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
| **vm\_id** string / required | | Name of the virtual machine to work with. |
| **vm\_id\_type** string | **Choices:*** uuid
* instance\_uuid
* dns\_name
* inventory\_path
* **vm\_name** β
| The VMware identification method by which the virtual machine will be identified. |
| **vm\_password** string / required | | The password used to login-in to the virtual machine. |
| **vm\_username** string / required | | The user to login in to the virtual machine. |
Notes
-----
Note
* Tested on vSphere 6
* Only the first match against vm\_id is used, even if there are multiple matches
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Create directory inside a vm
community.vmware.vmware_guest_file_operation:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
vm_id: "{{ guest_name }}"
vm_username: "{{ guest_username }}"
vm_password: "{{ guest_userpassword }}"
directory:
path: "/test"
operation: create
recurse: no
delegate_to: localhost
- name: copy file to vm
community.vmware.vmware_guest_file_operation:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
vm_id: "{{ guest_name }}"
vm_username: "{{ guest_username }}"
vm_password: "{{ guest_userpassword }}"
copy:
src: "files/test.zip"
dest: "/root/test.zip"
overwrite: False
delegate_to: localhost
- name: fetch file from vm
community.vmware.vmware_guest_file_operation:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
vm_id: "{{ guest_name }}"
vm_username: "{{ guest_username }}"
vm_password: "{{ guest_userpassword }}"
fetch:
src: "/root/test.zip"
dest: "files/test.zip"
delegate_to: localhost
```
### Authors
* StΓ©phane Travassac (@stravassac)
ansible community.vmware.vmware_datastore_info β Gather info about datastores available in given vCenter community.vmware.vmware\_datastore\_info β Gather info about datastores available in given vCenter
==================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_datastore_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 datastores in VMWare infrastructure.
* All values and VMware object names are case sensitive.
* This module was called `vmware_datastore_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
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster** string | | Cluster to search for datastores. If set, information of datastores belonging this clusters will be returned. This parameter is required, if `datacenter` is not supplied. |
| **datacenter** string | | Datacenter to search for datastores. This parameter is required, if `cluster` is not supplied.
aliases: datacenter\_name |
| **gather\_nfs\_mount\_info** boolean | **Choices:*** **no** β
* yes
| Gather mount information of NFS datastores. Disabled per default because this slows down the execution if you have a lot of datastores. Only valid when `schema` is `summary`. |
| **gather\_vmfs\_mount\_info** boolean | **Choices:*** **no** β
* yes
| Gather mount information of VMFS datastores. Disabled per default because this slows down the execution if you have a lot of datastores. Only valid when `schema` is `summary`. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **name** string | | Name of the datastore to match. If set, information of specific datastores are returned. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **properties** list / elements=string | | Specify the properties to retrieve. If not specified, all properties are retrieved (deeply). Results are returned in a structure identical to the vsphere API. Example: properties: [ "name", "info.vmfs.ssd", "capability.vsanSparseSupported", "overallStatus" ] Only valid when `schema` is `vsphere`. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **schema** string | **Choices:*** **summary** β
* vsphere
| Specify the output schema desired. The 'summary' output schema is the legacy output from the module The 'vsphere' output schema is the vSphere API class definition which requires pyvmomi>6.7.1 |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 5.5, 6.0 and 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather info from standalone ESXi server having datacenter as 'ha-datacenter'
community.vmware.vmware_datastore_info:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
datacenter_name: "ha-datacenter"
delegate_to: localhost
register: info
- name: Gather info from datacenter about specific datastore
community.vmware.vmware_datastore_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: '{{ datacenter_name }}'
name: datastore1
delegate_to: localhost
register: info
- name: Gather some info from a datastore using the vSphere API output schema
community.vmware.vmware_datastore_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: '{{ datacenter_name }}'
schema: vsphere
properties:
- name
- info.vmfs.ssd
- capability.vsanSparseSupported
- overallStatus
delegate_to: localhost
register: 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 |
| --- | --- | --- |
| **datastores** list / elements=string | always | metadata about the available datastores **Sample:** [{'accessible': False, 'capacity': 42681237504, 'datastore\_cluster': 'datacluster0', 'freeSpace': 39638269952, 'maintenanceMode': 'normal', 'multipleHostAccess': False, 'name': 'datastore2', 'provisioned': 12289211488, 'type': 'VMFS', 'uncommitted': 9246243936, 'url': 'ds:///vmfs/volumes/5a69b18a-c03cd88c-36ae-5254001249ce/', 'vmfs\_blockSize': 1024, 'vmfs\_uuid': '5a69b18a-c03cd88c-36ae-5254001249ce', 'vmfs\_version': '6.81'}, {'accessible': True, 'capacity': 5497558138880, 'datastore\_cluster': 'datacluster0', 'freeSpace': 4279000641536, 'maintenanceMode': 'normal', 'multipleHostAccess': True, 'name': 'datastore3', 'nfs\_path': '/vol/datastore3', 'nfs\_server': 'nfs\_server1', 'provisioned': 1708109410304, 'type': 'NFS', 'uncommitted': 489551912960, 'url': 'ds:///vmfs/volumes/420b3e73-67070776/'}] |
### Authors
* Tim Rightnour (@garbled1)
| programming_docs |
ansible community.vmware.vmware_migrate_vmk β Migrate a VMK interface from VSS to VDS community.vmware.vmware\_migrate\_vmk β Migrate a VMK interface from VSS to VDS
===============================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_migrate_vmk`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Migrate a VMK interface from VSS to VDS
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **current\_portgroup\_name** string / required | | Portgroup name VMK interface is currently on |
| **current\_switch\_name** string / required | | Switch VMK interface is currently on |
| **device** string / required | | VMK interface name |
| **esxi\_hostname** string / required | | ESXi hostname to be managed |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **migrate\_portgroup\_name** string / required | | Portgroup name to migrate VMK interface to |
| **migrate\_switch\_name** string / required | | Switch name to migrate VMK interface to |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.7
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Migrate Management vmk
community.vmware.vmware_migrate_vmk:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi_hostname }}"
device: vmk1
current_switch_name: temp_vswitch
current_portgroup_name: esx-mgmt
migrate_switch_name: dvSwitch
migrate_portgroup_name: Management
delegate_to: localhost
```
### Authors
* Joseph Callen (@jcpowermac)
* Russell Teague (@mtnbikenc)
ansible community.vmware.vmware_local_role_manager β Manage local roles on an ESXi host community.vmware.vmware\_local\_role\_manager β Manage local roles on an ESXi host
==================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_local_role_manager`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to manage local roles on an ESXi host.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string | **Choices:*** add
* remove
* **set** β
| This parameter is only valid while updating an existing role with privileges.
`add` will add the privileges to the existing privilege list.
`remove` will remove the privileges from the existing privilege list.
`set` will replace the privileges of the existing privileges with user defined list of privileges. |
| **force\_remove** boolean | **Choices:*** **no** β
* yes
| If set to `False` then prevents the role from being removed if any permissions are using it. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **local\_privilege\_ids** list / elements=string | **Default:**[] | The list of privileges that role needs to have. Please see <https://docs.vmware.com/en/VMware-vSphere/6.0/com.vmware.vsphere.security.doc/GUID-ED56F3C4-77D0-49E3-88B6-B99B8B437B62.html>
|
| **local\_role\_name** string / required | | The local role name to be managed. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the role. If the role already exists when `state=present`, the role info is updated. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on ESXi 6.5
* Be sure that the ESXi user used for login, has the appropriate rights to create / delete / edit roles
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Add local role to ESXi
community.vmware.vmware_local_role_manager:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
local_role_name: vmware_qa
state: present
delegate_to: localhost
- name: Add local role with privileges to ESXi
community.vmware.vmware_local_role_manager:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
local_role_name: vmware_qa
local_privilege_ids: [ 'Folder.Create', 'Folder.Delete']
state: present
delegate_to: localhost
- name: Remove local role from ESXi
community.vmware.vmware_local_role_manager:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
local_role_name: vmware_qa
state: absent
delegate_to: localhost
- name: Add a privilege to an existing local role
community.vmware.vmware_local_role_manager:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
local_role_name: vmware_qa
local_privilege_ids: [ 'Folder.Create' ]
action: add
delegate_to: localhost
- name: Remove a privilege to an existing local role
community.vmware.vmware_local_role_manager:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
local_role_name: vmware_qa
local_privilege_ids: [ 'Folder.Create' ]
action: remove
delegate_to: localhost
- name: Set a privilege to an existing local role
community.vmware.vmware_local_role_manager:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
local_role_name: vmware_qa
local_privilege_ids: [ 'Folder.Create' ]
action: set
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 |
| --- | --- | --- |
| **local\_role\_name** string | always | Name of local role |
| **new\_privileges** list / elements=string | always | List of privileges |
| **old\_privileges** list / elements=string | on update | List of privileges of role before the update |
| **privileges** list / elements=string | always | List of privileges |
| **privileges\_previous** list / elements=string | on update | List of privileges of role before the update |
| **role\_id** integer | always | ESXi generated local role id |
| **role\_name** string | always | Name of local role |
### Authors
* Abhijeet Kasurde (@Akasurde)
* Christian Kotte (@ckotte)
ansible community.vmware.vmware_vsan_cluster β Configure VSAN clustering on an ESXi host community.vmware.vmware\_vsan\_cluster β Configure VSAN clustering on an ESXi host
==================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_vsan_cluster`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module can be used to configure VSAN clustering on an ESXi host
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_uuid** string | | Desired cluster UUID |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 5.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Configure VMware VSAN Cluster
hosts: deploy_node
tags:
- vsan
tasks:
- name: Configure VSAN on first host
community.vmware.vmware_vsan_cluster:
hostname: "{{ groups['esxi'][0] }}"
username: "{{ esxi_username }}"
password: "{{ site_password }}"
delegate_to: localhost
register: vsan_cluster
- name: Configure VSAN on remaining hosts
community.vmware.vmware_vsan_cluster:
hostname: "{{ item }}"
username: "{{ esxi_username }}"
password: "{{ site_password }}"
cluster_uuid: "{{ vsan_cluster.cluster_uuid }}"
delegate_to: localhost
loop: "{{ groups['esxi'][1:] }}"
```
### Authors
* Russell Teague (@mtnbikenc)
ansible community.vmware.vmware_drs_group_info β Gathers info about DRS VM/Host groups on the given cluster community.vmware.vmware\_drs\_group\_info β Gathers info about DRS VM/Host groups on the given cluster
======================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_drs_group_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 DRS VM/HOST groups from the given cluster.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Cluster to search for VM/Host groups. If set, information of DRS groups belonging this cluster will be returned. Not needed if `datacenter` is set. |
| **datacenter** string | | Datacenter to search for DRS VM/Host groups.
aliases: datacenter\_name |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5 and 6.7
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
---
- name: "Gather DRS info about given Cluster"
register: cluster_drs_group_info
community.vmware.vmware_drs_group_info:
hostname: "{{ vcenter_hostname }}"
password: "{{ vcenter_password }}"
username: "{{ vcenter_username }}"
cluster_name: "{{ cluster_name }}"
delegate_to: localhost
- name: "Gather DRS group info about all clusters in given datacenter"
register: cluster_drs_group_info
community.vmware.vmware_drs_group_info:
hostname: "{{ vcenter_hostname }}"
password: "{{ vcenter_password }}"
username: "{{ vcenter_username }}"
datacenter: "{{ datacenter }}"
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 |
| --- | --- | --- |
| **drs\_group\_info** dictionary | always | Metadata about DRS group from given cluster / datacenter **Sample:** {'drs\_group\_info': {'DC0\_C0': [{'group\_name': 'GROUP\_HOST\_S01', 'hosts': ['vm-01.zone', 'vm-02.zone'], 'type': 'host'}, {'group\_name': 'GROUP\_HOST\_S02', 'hosts': ['vm-03.zone', 'vm-04.zone'], 'type': 'host'}, {'group\_name': 'GROUP\_VM\_S01', 'type': 'vm', 'vms': ['test-node01']}, {'group\_name': 'GROUP\_VM\_S02', 'type': 'vm', 'vms': ['test-node02']}], 'DC0\_C1': []}} |
### Authors
* Karsten Kaj Jakobsen (@karstenjakobsen)
| programming_docs |
ansible community.vmware.vmware_host_ntp β Manage NTP server configuration of an ESXi host community.vmware.vmware\_host\_ntp β Manage NTP server configuration of an ESXi host
====================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_ntp`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to configure, add or remove NTP servers from an ESXi host.
* If `state` is not given, the NTP servers will be configured in the exact sequence.
* User can specify an ESXi hostname or Cluster name. In case of cluster name, all ESXi hosts are updated.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of the cluster from which all host systems will be used. This parameter is required if `esxi_hostname` is not specified. |
| **esxi\_hostname** string | | Name of the host system to work with. This parameter is required if `cluster_name` is not specified. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **ntp\_servers** list / elements=string / required | | IP or FQDN of NTP server(s). This accepts a list of NTP servers. For multiple servers, please look at the examples. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** present
* absent
| present: Add NTP server(s), if specified server(s) are absent else do nothing. absent: Remove NTP server(s), if specified server(s) are present else do nothing. Specified NTP server(s) will be configured if `state` isn't specified. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
| **verbose** boolean | **Choices:*** **no** β
* yes
| Verbose output of the configuration change. Explains if an NTP server was added, removed, or if the NTP server sequence was changed. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Configure NTP servers for an ESXi Host
community.vmware.vmware_host_ntp:
hostname: vcenter01.example.local
username: [email protected]
password: SuperSecretPassword
esxi_hostname: esx01.example.local
ntp_servers:
- 0.pool.ntp.org
- 1.pool.ntp.org
delegate_to: localhost
- name: Set NTP servers for all ESXi Host in given Cluster
community.vmware.vmware_host_ntp:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: '{{ cluster_name }}'
state: present
ntp_servers:
- 0.pool.ntp.org
- 1.pool.ntp.org
delegate_to: localhost
- name: Set NTP servers for an ESXi Host
community.vmware.vmware_host_ntp:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
state: present
ntp_servers:
- 0.pool.ntp.org
- 1.pool.ntp.org
delegate_to: localhost
- name: Remove NTP servers for an ESXi Host
community.vmware.vmware_host_ntp:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
state: absent
ntp_servers:
- bad.server.ntp.org
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 |
| --- | --- | --- |
| **host\_ntp\_status** dictionary | always | metadata about host system's NTP configuration **Sample:** {'esx01.example.local': {'ntp\_servers': ['time3.example.local', 'time4.example.local'], 'ntp\_servers\_changed': ['time1.example.local', 'time2.example.local', 'time3.example.local', 'time4.example.local'], 'ntp\_servers\_previous': ['time1.example.local', 'time2.example.local']}, 'esx02.example.local': {'ntp\_servers\_changed': ['time3.example.local'], 'ntp\_servers\_current': ['time1.example.local', 'time2.example.local', 'time3.example.local'], 'ntp\_servers\_previous': ['time1.example.local', 'time2.example.local'], 'state': 'present'}} |
### Authors
* Abhijeet Kasurde (@Akasurde)
* Christian Kotte (@ckotte)
ansible community.vmware.vmware_object_rename β Renames VMware objects community.vmware.vmware\_object\_rename β Renames VMware objects
================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_object_rename`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to rename VMware objects.
* All variables and VMware object names are case sensitive.
* Renaming Host and Network is not supported by VMware APIs.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* PyVmomi
* vSphere Automation SDK
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **hostname** string | | The hostname or IP address of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. |
| **new\_name** string / required | | New name for VMware object.
aliases: object\_new\_name |
| **object\_moid** string | | Managed object id of the VMware object to work with. Mutually exclusive with `object_name`. |
| **object\_name** string | | Name of the object to work with. Mutually exclusive with `object_moid`. |
| **object\_type** string / required | **Choices:*** ClusterComputeResource
* Cluster
* Datacenter
* Datastore
* Folder
* Network
* ResourcePool
* VM
* VirtualMachine
| Type of object to work with. Valid options are Cluster, ClusterComputeResource, Datacenter, Datastore, Folder, ResourcePool, VM or VirtualMachine. |
| **password** string | | The password of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. |
| **protocol** string | **Choices:*** http
* **https** β
| The connection to protocol. |
| **proxy\_host** string added in 1.12.0 of community.vmware | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. |
| **proxy\_port** integer added in 1.12.0 of community.vmware | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. |
Notes
-----
Note
* Tested on vSphere 6.5
Examples
--------
```
- name: Rename a virtual machine
community.vmware.vmware_object_rename:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
new_name: Fedora_31
object_name: Fedora_VM
object_type: VirtualMachine
delegate_to: localhost
- name: Rename a virtual machine using moid
community.vmware.vmware_object_rename:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
new_name: Fedora_31
object_moid: vm-14
object_type: VirtualMachine
delegate_to: localhost
- name: Rename a datacenter
community.vmware.vmware_object_rename:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
new_name: Asia_Datacenter
object_name: dc1
object_type: Datacenter
delegate_to: localhost
- name: Rename a folder with moid
community.vmware.vmware_object_rename:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
new_name: backup
object_moid: group-v46
object_type: Folder
delegate_to: localhost
- name: Rename a cluster with moid
community.vmware.vmware_object_rename:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
new_name: CCR_1
object_moid: domain-c33
object_type: Cluster
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 |
| --- | --- | --- |
| **rename\_status** dictionary | on success | metadata about VMware object rename operation **Sample:** {'current\_name': 'Fedora\_31', 'desired\_name': 'Fedora\_31', 'previous\_name': 'Fedora\_VM'} |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_host_lockdown β Manage administrator permission for the local administrative account for the ESXi host community.vmware.vmware\_host\_lockdown β Manage administrator permission for the local administrative account for the ESXi host
================================================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_lockdown`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to manage administrator permission for the local administrative account for the host when ESXi hostname is given.
* All parameters and VMware objects values are case sensitive.
* This module is destructive as administrator permission are managed using APIs used, please read options carefully and proceed.
* Please specify `hostname` as vCenter IP or hostname only, as lockdown operations are not possible from standalone ESXi server.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of cluster. All host systems from given cluster used to manage lockdown. Required parameter, if `esxi_hostname` is not set. |
| **esxi\_hostname** list / elements=string | | List of ESXi hostname to manage lockdown. Required parameter, if `cluster_name` is not set. See examples for specifications. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **present** β
* absent
| State of hosts system If set to `present`, all host systems will be set in lockdown mode. If host system is already in lockdown mode and set to `present`, no action will be taken. If set to `absent`, all host systems will be removed from lockdown mode. If host system is already out of lockdown mode and set to `absent`, no action will be taken. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Enter host system into lockdown mode
community.vmware.vmware_host_lockdown:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
state: present
delegate_to: localhost
- name: Exit host systems from lockdown mode
community.vmware.vmware_host_lockdown:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
state: absent
delegate_to: localhost
- name: Enter host systems into lockdown mode
community.vmware.vmware_host_lockdown:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname:
- '{{ esxi_hostname_1 }}'
- '{{ esxi_hostname_2 }}'
state: present
delegate_to: localhost
- name: Exit host systems from lockdown mode
community.vmware.vmware_host_lockdown:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname:
- '{{ esxi_hostname_1 }}'
- '{{ esxi_hostname_2 }}'
state: absent
delegate_to: localhost
- name: Enter all host system from cluster into lockdown mode
community.vmware.vmware_host_lockdown:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: '{{ cluster_name }}'
state: present
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 |
| --- | --- | --- |
| **results** dictionary | always | metadata about state of Host system lock down **Sample:** {'host\_lockdown\_state': {'DC0\_C0': {'current\_state': 'present', 'desired\_state': 'present', 'previous\_state': 'absent'}}} |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_datastore_maintenancemode β Place a datastore into maintenance mode community.vmware.vmware\_datastore\_maintenancemode β Place a datastore into maintenance mode
=============================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_datastore_maintenancemode`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to manage maintenance mode of a datastore.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of the cluster where datastore is connected to. If multiple datastores are connected to the given cluster, then all datastores will be managed by `state`. If `datastore` or `datastore_cluster` are not set, this parameter is required. |
| **datastore** string | | Name of datastore to manage. If `datastore_cluster` or `cluster_name` are not set, this parameter is required. |
| **datastore\_cluster** string | | Name of the datastore cluster from all child datastores to be managed. If `datastore` or `cluster_name` are not set, this parameter is required. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **present** β
* absent
| If set to `present`, then enter datastore into maintenance mode. If set to `present` and datastore is already in maintenance mode, then no action will be taken. If set to `absent` and datastore is in maintenance mode, then exit maintenance mode. If set to `absent` and datastore is not in maintenance mode, then no action will be taken. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 5.5, 6.0 and 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Enter datastore into Maintenance Mode
community.vmware.vmware_datastore_maintenancemode:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datastore: '{{ datastore_name }}'
state: present
delegate_to: localhost
- name: Enter all datastores under cluster into Maintenance Mode
community.vmware.vmware_datastore_maintenancemode:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: '{{ cluster_name }}'
state: present
delegate_to: localhost
- name: Enter all datastores under datastore cluster into Maintenance Mode
community.vmware.vmware_datastore_maintenancemode:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datastore_cluster: '{{ datastore_cluster_name }}'
state: present
delegate_to: localhost
- name: Exit datastore into Maintenance Mode
community.vmware.vmware_datastore_maintenancemode:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datastore: '{{ datastore_name }}'
state: absent
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 |
| --- | --- | --- |
| **datastore\_status** dictionary | always | Action taken for datastore **Sample:** {'ds\_226\_01': "Datastore 'ds\_226\_01' is already in maintenance mode."} |
### Authors
* Abhijeet Kasurde (@Akasurde)
| programming_docs |
ansible community.vmware.vmware_vm_info β Return basic info pertaining to a VMware machine guest community.vmware.vmware\_vm\_info β Return basic info pertaining to a VMware machine guest
==========================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_vm_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Return basic information pertaining to a vSphere or ESXi virtual machine guest.
* Cluster name as fact is added in version 2.7.
* This module was called `vmware_vm_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
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **folder** string | | Specify a folder location of VMs to gather information from. Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2 |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **show\_attribute** boolean | **Choices:*** **no** β
* yes
| Attributes related to VM guest shown in information only when this is set `true`. |
| **show\_tag** boolean | **Choices:*** **no** β
* yes
| Tags related to virtual machine are shown if set to `True`. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
| **vm\_type** string | **Choices:*** **all** β
* vm
* template
| If set to `vm`, then information are gathered for virtual machines only. If set to `template`, then information are gathered for virtual machine templates only. If set to `all`, then information are gathered for all virtual machines and virtual machine templates. |
Notes
-----
Note
* Tested on ESXi 6.7, vSphere 5.5 and vSphere 6.5
* From 2.8 and onwards, information are returned as list of dict instead of dict.
* Fact about `moid` added in VMware collection 1.4.0.
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather all registered virtual machines
community.vmware.vmware_vm_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
delegate_to: localhost
register: vminfo
- debug:
var: vminfo.virtual_machines
- name: Gather only registered virtual machine templates
community.vmware.vmware_vm_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
vm_type: template
delegate_to: localhost
register: template_info
- debug:
var: template_info.virtual_machines
- name: Gather only registered virtual machines
community.vmware.vmware_vm_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
vm_type: vm
delegate_to: localhost
register: vm_info
- debug:
var: vm_info.virtual_machines
- name: Get UUID from given VM Name
block:
- name: Get virtual machine info
community.vmware.vmware_vm_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
folder: "/datacenter/vm/folder"
delegate_to: localhost
register: vm_info
- debug:
msg: "{{ item.uuid }}"
with_items:
- "{{ vm_info.virtual_machines | json_query(query) }}"
vars:
query: "[?guest_name=='DC0_H0_VM0']"
- name: Get Tags from given VM Name
block:
- name: Get virtual machine info
community.vmware.vmware_vm_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
folder: "/datacenter/vm/folder"
delegate_to: localhost
register: vm_info
- debug:
msg: "{{ item.tags }}"
with_items:
- "{{ vm_info.virtual_machines | json_query(query) }}"
vars:
query: "[?guest_name=='DC0_H0_VM0']"
- name: Gather all VMs from a specific folder
community.vmware.vmware_vm_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
folder: "/Asia-Datacenter1/vm/prod"
delegate_to: localhost
register: vm_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 |
| --- | --- | --- |
| **virtual\_machines** list / elements=string | success | list of dictionary of virtual machines and their information **Sample:** [{'attributes': {'job': 'backup-prepare'}, 'cluster': None, 'datacenter': 'Datacenter-1', 'esxi\_hostname': '10.76.33.226', 'folder': '/Datacenter-1/vm', 'guest\_fullname': 'Ubuntu Linux (64-bit)', 'guest\_name': 'ubuntu\_t', 'ip\_address': '', 'mac\_address': ['00:50:56:87:a5:9a'], 'moid': 'vm-24', 'power\_state': 'poweredOff', 'tags': [{'category\_id': 'urn:vmomi:InventoryServiceCategory:b316cc45-f1a9-4277-811d-56c7e7975203:GLOBAL', 'category\_name': 'cat\_0001', 'description': '', 'id': 'urn:vmomi:InventoryServiceTag:43737ec0-b832-4abf-abb1-fd2448ce3b26:GLOBAL', 'name': 'tag\_0001'}], 'uuid': '4207072c-edd8-3bd5-64dc-903fd3a0db04', 'vm\_network': {'00:50:56:87:a5:9a': {'ipv4': ['10.76.33.228'], 'ipv6': []}}}] |
### Authors
* Joseph Callen (@jcpowermac)
* Abhijeet Kasurde (@Akasurde)
* Fedor Vompe (@sumkincpp)
ansible community.vmware.vmware_datacenter β Manage VMware vSphere Datacenters community.vmware.vmware\_datacenter β Manage VMware vSphere Datacenters
=======================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_datacenter`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module can be used to manage (create, delete) VMware vSphere Datacenters.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **datacenter\_name** string / required | | The name of the datacenter the cluster will be created in. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **present** β
* absent
| If the datacenter should be present or absent. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.0, 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Create Datacenter
community.vmware.vmware_datacenter:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: '{{ datacenter_name }}'
state: present
delegate_to: localhost
- name: Delete Datacenter
community.vmware.vmware_datacenter:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: '{{ datacenter_name }}'
state: absent
delegate_to: localhost
register: datacenter_delete_result
```
### Authors
* Joseph Callen (@jcpowermac)
* Kamil Szczygiel (@kamsz)
ansible community.vmware.vmware_vm_config_option β Return supported guest ID list and VM recommended config option for specific guest OS community.vmware.vmware\_vm\_config\_option β Return supported guest ID list and VM recommended config option for specific guest OS
===================================================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_vm_config_option`.
New in version 1.15.0: of community.vmware
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is used for getting the hardware versions supported for creation, the guest ID list supported by ESXi host for the most recent virtual hardware supported or specified hardware version, the VM recommended config options for specified guest OS ID.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
* System.View privilege
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of the cluster. If `esxi_hostname` is not given, this parameter is required. |
| **datacenter** string | **Default:**"ha-datacenter" | The datacenter name used to get specified cluster or host. This parameter is case sensitive. |
| **esxi\_hostname** string | | ESXi hostname. Obtain VM configure options on this ESXi host. If `cluster_name` is not given, this parameter is required. |
| **get\_config\_options** boolean | **Choices:*** **no** β
* yes
| Return the dict of VM recommended config options for guest ID specified by `guest_id` with hardware version specified by `hardware_version` or the default hardware version. When set to True, `guest_id` must be set. |
| **get\_guest\_os\_ids** boolean | **Choices:*** **no** β
* yes
| Return the list of guest OS IDs supported on the specified entity. If `hardware_version` is set, will return the corresponding guest OS ID list supported, or will return the guest OS ID list for the default hardware version. |
| **get\_hardware\_versions** boolean | **Choices:*** **no** β
* yes
| Return the list of VM hardware versions supported for creation and the default hardware version on the specified entity. |
| **guest\_id** string | | The guest OS ID from the returned list when `get_guest_os_ids` is set to `True`, e.g., 'rhel8\_64Guest'. This parameter must be set when `get_config_options` is set to `True`. |
| **hardware\_version** string | | The hardware version from the returned list when `get_hardware_versions` is set to `True`, e.g., 'vmx-19'. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* Tested on vSphere 6.7
* Known issue on vSphere 7.0 (<https://github.com/vmware/pyvmomi/issues/915>)
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Get supported guest ID list on given ESXi host for with default hardware version
community.vmware.vmware_vm_config_option:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi_hostname }}"
get_guest_os_ids: True
delegate_to: localhost
- name: Get VM recommended config option for Windows 10 guest OS on given ESXi host
community.vmware.vmware_vm_config_option:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi_hostname }}"
get_config_options: True
guest_id: "windows9_64Guest"
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 |
| --- | --- | --- |
| **instance** dictionary | always | metadata about the VM recommended configuration **Sample:** None |
### Authors
* Diane Wang (@Tomorrow9) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#c4a0ada5aaa1b3e2e7f7f3ffe2e7f1f6ffe2e7f0fcffb2a9b3a5b6a1e2e7f0f2ffa7aba9)>
ansible community.vmware.vmware_resource_pool β Add/remove resource pools to/from vCenter community.vmware.vmware\_resource\_pool β Add/remove resource pools to/from vCenter
===================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_resource_pool`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to add/remove a resource pool to/from vCenter
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster** string | | Name of the cluster to configure the resource pool. This parameter is required if `esxi_hostname` or `parent_resource_pool` is not specified. |
| **cpu\_allocation\_shares** integer added in 1.4.0 of community.vmware | **Default:**4000 | The number of cpu shares allocated. This value is only set if *cpu\_shares* is set to `custom`. |
| **cpu\_expandable\_reservations** boolean | **Choices:*** no
* **yes** β
| In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value. |
| **cpu\_limit** integer | **Default:**-1 | The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources. The default value -1 indicates no limit. |
| **cpu\_reservation** integer | **Default:**0 | Amount of resource that is guaranteed available to the virtual machine or resource pool. |
| **cpu\_shares** string | **Choices:*** high
* custom
* low
* **normal** β
| Memory shares are used in case of resource contention. |
| **datacenter** string / required | | Name of the datacenter. |
| **esxi\_hostname** string added in 1.5.0 of community.vmware | | Name of the host to configure the resource pool. The host must not be member of a cluster. This parameter is required if `cluster` or `parent_resource_pool` is not specified. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **mem\_allocation\_shares** integer added in 1.4.0 of community.vmware | **Default:**163840 | The number of memory shares allocated. This value is only set if *mem\_shares* is set to `custom`. |
| **mem\_expandable\_reservations** boolean | **Choices:*** no
* **yes** β
| In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value. |
| **mem\_limit** integer | **Default:**-1 | The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources. The default value -1 indicates no limit. |
| **mem\_reservation** integer | **Default:**0 | Amount of resource that is guaranteed available to the virtual machine or resource pool. |
| **mem\_shares** string | **Choices:*** high
* custom
* low
* **normal** β
| Memory shares are used in case of resource contention. |
| **parent\_resource\_pool** string added in 1.9.0 of community.vmware | | Name of the parent resource pool. This parameter is required if `cluster` or `esxi_hostname` is not specified. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **resource\_pool** string / required | | Resource pool name to manage. |
| **state** string | **Choices:*** **present** β
* absent
| Add or remove the resource pool |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Add resource pool to vCenter
community.vmware.vmware_resource_pool:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter: '{{ datacenter_name }}'
cluster: '{{ cluster_name }}'
resource_pool: '{{ resource_pool_name }}'
mem_shares: normal
mem_limit: -1
mem_reservation: 0
mem_expandable_reservations: true
cpu_shares: normal
cpu_limit: -1
cpu_reservation: 0
cpu_expandable_reservations: true
state: present
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 |
| --- | --- | --- |
| **instance** dictionary | always | metadata about the new resource pool **Sample:** None |
| **resource\_pool\_config** dictionary | always | config data about the resource pool, version added 1.4.0 **Sample:** { "\_vimtype": "vim.ResourceConfigSpec", "changeVersion": null, "cpuAllocation": { "\_vimtype": "vim.ResourceAllocationInfo", "expandableReservation": true, "limit": -1, "overheadLimit": null, "reservation": 0, "shares": { "\_vimtype": "vim.SharesInfo", "level": "normal", "shares": 4000 } }, "entity": "vim.ResourcePool:resgroup-1108", "lastModified": null, "memoryAllocation": { "\_vimtype": "vim.ResourceAllocationInfo", "expandableReservation": true, "limit": -1, "overheadLimit": null, "reservation": 0, "shares": { "\_vimtype": "vim.SharesInfo", "level": "high", "shares": 327680 } }, "name": "test\_pr1", "scaleDescendantsShares": null } |
### Authors
* Davis Phillips (@dav1x)
| programming_docs |
ansible community.vmware.vmware_local_user_manager β Manage local users on an ESXi host community.vmware.vmware\_local\_user\_manager β Manage local users on an ESXi host
==================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_local_user_manager`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage local users on an ESXi host
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi installed
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **local\_user\_description** string | | Description for the user. |
| **local\_user\_name** string / required | | The local user name to be changed. |
| **local\_user\_password** string | | The password to be set. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **present** β
* absent
| Indicate desired state of the user. If the user already exists when `state=present`, the user info is updated |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on ESXi 6.0
* Be sure that the ESXi user used for login, has the appropriate rights to create / delete / edit users
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Add local user to ESXi
community.vmware.vmware_local_user_manager:
hostname: esxi_hostname
username: root
password: vmware
local_user_name: foo
local_user_password: password
delegate_to: localhost
```
### Authors
* Andreas Nafpliotis (@nafpliot-ibm)
ansible community.vmware.vmware_host_active_directory β Joins an ESXi host system to an Active Directory domain or leaves it community.vmware.vmware\_host\_active\_directory β Joins an ESXi host system to an Active Directory domain or leaves it
=======================================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_active_directory`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to join or leave an ESXi host to or from an Active Directory domain.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **ad\_domain** string | | AD Domain to join.
aliases: domain, domain\_name |
| **ad\_password** string | | Password for AD domain join. |
| **ad\_state** string | **Choices:*** present
* **absent** β
| Whether the ESXi host is joined to an AD domain or not.
aliases: state |
| **ad\_user** string | | Username for AD domain join. |
| **cluster\_name** string | | Name of the cluster from which all host systems will be used. This parameter is required if `esxi_hostname` is not specified. |
| **esxi\_hostname** string | | Name of the host system to work with. This parameter is required if `cluster_name` is not specified. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Join an AD domain
community.vmware.vmware_host_active_directory:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
ad_domain: example.local
ad_user: adjoin
ad_password: Password123$
ad_state: present
delegate_to: localhost
- name: Leave AD domain
community.vmware.vmware_host_active_directory:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
ad_state: absent
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 |
| --- | --- | --- |
| **results** dictionary | always | metadata about host system's AD domain join state **Sample:** {'esxi01': {'ad\_state': 'present', 'ad\_state\_current': 'present', 'ad\_state\_previous': 'absent', 'changed': True, 'domain': 'example.local', 'membership\_state': 'ok', 'msg': 'Host joined to AD domain'}} |
### Authors
* Christian Kotte (@ckotte)
ansible community.vmware.vmware_host_ipv6 β Enables/Disables IPv6 support for an ESXi host system community.vmware.vmware\_host\_ipv6 β Enables/Disables IPv6 support for an ESXi host system
===========================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_ipv6`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to enable or disable IPv6 support for ESXi host systems in given vCenter infrastructure.
* It also checks if the host needs to be restarted.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of the cluster from which all host systems will be used. This is required parameter if `esxi_hostname` is not specified. |
| **esxi\_hostname** string | | Name of the host system to work with. This is required parameter if `cluster_name` is not specified. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **enabled** β
* disabled
| Enable or disable IPv6 support. You need to reboot the ESXi host if you change the configuration. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Enable IPv6 for an host system
community.vmware.vmware_host_ipv6:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
state: enabled
delegate_to: localhost
- name: Disable IPv6 for an host system
community.vmware.vmware_host_ipv6:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
state: disabled
delegate_to: localhost
- name: Disable IPv6 for all host systems from cluster
community.vmware.vmware_host_ipv6:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: '{{ cluster_name }}'
state: disabled
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 |
| --- | --- | --- |
| **result** dictionary | always | metadata about host system's IPv6 configuration **Sample:** {'esxi01': {'changed': False, 'msg': "IPv6 is already enabled and active for host 'esxi01'"}} |
### Authors
* Christian Kotte (@ckotte) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#d8bbb0aab1abacb1b9b6fefbeceee3b3b7acacbdfefbebefe3fefbedeae3fefbece0e3bfb5a0fefbeceee3bcbd)>
ansible community.vmware.vmware_tag_manager β Manage association of VMware tags with VMware objects community.vmware.vmware\_tag\_manager β Manage association of VMware tags with VMware objects
=============================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_tag_manager`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to assign / remove VMware tags from the given VMware objects.
* Tag feature is introduced in vSphere 6 version, so this module is not supported in the earlier versions of vSphere.
* All variables and VMware object names are case sensitive.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
* vSphere Automation SDK
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **hostname** string | | The hostname or IP address of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. |
| **moid** string added in 1.4.0 of community.vmware | | Managed object ID for the given object. Required if `object_name` is not set. |
| **object\_name** string | | Name of the object to work with. For DistributedVirtualPortgroups the format should be "switch\_name:portgroup\_name" Required if `moid` is not set. |
| **object\_type** string / required | **Choices:*** VirtualMachine
* Datacenter
* ClusterComputeResource
* HostSystem
* DistributedVirtualSwitch
* DistributedVirtualPortgroup
* Datastore
* DatastoreCluster
* ResourcePool
* Folder
| Type of object to work with. |
| **password** string | | The password of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. |
| **protocol** string | **Choices:*** http
* **https** β
| The connection to protocol. |
| **proxy\_host** string added in 1.12.0 of community.vmware | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. |
| **proxy\_port** integer added in 1.12.0 of community.vmware | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** present
* absent
* **add** β
* remove
* set
| If `state` is set to `add` or `present` will add the tags to the existing tag list of the given object. If `state` is set to `remove` or `absent` will remove the tags from the existing tag list of the given object. If `state` is set to `set` will replace the tags of the given objects with the user defined list of tags. |
| **tag\_names** list / elements=raw / required | | List of tag(s) to be managed. User can also specify category name by specifying colon separated value. For example, "category\_name:tag\_name". User can also specify tag and category as dict, when tag or category contains colon. See example for more information. Added in version 2.10. User can skip category name if you have unique tag names. |
| **username** string | | The username of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. |
Notes
-----
Note
* Tested on vSphere 6.5
Examples
--------
```
- name: Add tags to a virtual machine
community.vmware.vmware_tag_manager:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
tag_names:
- Sample_Tag_0002
- Category_0001:Sample_Tag_0003
object_name: Fedora_VM
object_type: VirtualMachine
state: add
delegate_to: localhost
- name: Specify tag and category as dict
community.vmware.vmware_tag_manager:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
tag_names:
- tag: tag_0001
category: cat_0001
- tag: tag_0002
category: cat_0002
object_name: Fedora_VM
object_type: VirtualMachine
state: add
delegate_to: localhost
- name: Remove a tag from a virtual machine
community.vmware.vmware_tag_manager:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
tag_names:
- Sample_Tag_0002
object_name: Fedora_VM
object_type: VirtualMachine
state: remove
delegate_to: localhost
- name: Add tags to a distributed virtual switch
community.vmware.vmware_tag_manager:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
tag_names:
- Sample_Tag_0003
object_name: Switch_0001
object_type: DistributedVirtualSwitch
state: add
delegate_to: localhost
- name: Add tags to a distributed virtual portgroup
community.vmware.vmware_tag_manager:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
tag_names:
- Sample_Tag_0004
object_name: Switch_0001:Portgroup_0001
object_type: DistributedVirtualPortgroup
state: add
delegate_to: localhost
- name: Get information about folders
community.vmware.vmware_folder_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter: 'Asia-Datacenter1'
delegate_to: localhost
register: r
- name: Set Managed object ID for the given folder
ansible.builtin.set_fact:
folder_mo_id: "{{ (r.flat_folder_info | selectattr('path', 'equalto', '/Asia-Datacenter1/vm/tier1/tier2') | map(attribute='moid'))[0] }}"
- name: Add tags to a Folder using managed object id
community.vmware.vmware_tag_manager:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
tag_names:
- Sample_Cat_0004:Sample_Tag_0004
object_type: Folder
moid: "{{ folder_mo_id }}"
state: add
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 |
| --- | --- | --- |
| **tag\_status** list / elements=string | on success | metadata about tags related to object configuration **Sample:** {'current\_tags': ['backup', 'security'], 'desired\_tags': ['security'], 'previous\_tags': ['backup', 'security']} |
### Authors
* Abhijeet Kasurde (@Akasurde)
* Frederic Van Reet (@GBrawl)
| programming_docs |
ansible community.vmware.vmware_cluster β Manage VMware vSphere clusters community.vmware.vmware\_cluster β Manage VMware vSphere clusters
=================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_cluster`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
Synopsis
--------
* Adds or removes VMware vSphere clusters.
* Although this module can manage DRS, HA and VSAN related configurations, this functionality is deprecated and will be removed in 2.12.
* To manage DRS, HA and VSAN related configurations, use the new modules vmware\_cluster\_drs, vmware\_cluster\_ha and vmware\_cluster\_vsan.
* All values and VMware object names are case sensitive.
Requirements
------------
The below requirements are needed on the host that executes this module.
* Tested on ESXi 5.5 and 6.5.
* PyVmomi installed.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string / required | | The name of the cluster to be managed. |
| **datacenter** string / required | | The name of the datacenter.
aliases: datacenter\_name |
| **drs\_default\_vm\_behavior** string | **Choices:*** **fullyAutomated** β
* manual
* partiallyAutomated
| Specifies the cluster-wide default DRS behavior for virtual machines. If set to `partiallyAutomated`, then vCenter generate recommendations for virtual machine migration and for the placement with a host. vCenter automatically implement placement at power on. If set to `manual`, then vCenter generate recommendations for virtual machine migration and for the placement with a host. vCenter should not implement the recommendations automatically. If set to `fullyAutomated`, then vCenter should automate both the migration of virtual machines and their placement with a host at power on. Use `drs_default_vm_behavior` of [community.vmware.vmware\_cluster\_drs](vmware_cluster_drs_module) instead. Deprecated option, will be removed in version 2.12. |
| **drs\_enable\_vm\_behavior\_overrides** boolean | **Choices:*** no
* **yes** β
| Determines whether DRS Behavior overrides for individual virtual machines are enabled. If set to `True`, overrides `drs_default_vm_behavior`. Use `drs_enable_vm_behavior_overrides` of [community.vmware.vmware\_cluster\_drs](vmware_cluster_drs_module) instead. Deprecated option, will be removed in version 2.12. |
| **drs\_vmotion\_rate** integer | **Choices:*** 1
* 2
* 3
* 4
* 5
**Default:**3 | Threshold for generated ClusterRecommendations. Use `drs_vmotion_rate` of [community.vmware.vmware\_cluster\_drs](vmware_cluster_drs_module) instead. Deprecated option, will be removed in version 2.12. |
| **enable\_drs** boolean | **Choices:*** **no** β
* yes
| If set to `True`, will enable DRS when the cluster is created. Use `enable_drs` of [community.vmware.vmware\_cluster\_drs](vmware_cluster_drs_module) instead. Deprecated option, will be removed in version 2.12. |
| **enable\_ha** boolean | **Choices:*** **no** β
* yes
| If set to `True` will enable HA when the cluster is created. Use `enable_ha` of [community.vmware.vmware\_cluster\_ha](vmware_cluster_ha_module) instead. Deprecated option, will be removed in version 2.12. |
| **enable\_vsan** boolean | **Choices:*** **no** β
* yes
| If set to `True` will enable vSAN when the cluster is created. Use `enable_vsan` of [community.vmware.vmware\_cluster\_vsan](vmware_cluster_vsan_module) instead. Deprecated option, will be removed in version 2.12. |
| **ha\_admission\_control\_enabled** boolean | **Choices:*** no
* **yes** β
| Determines if strict admission control is enabled. It is recommended to set this parameter to `True`, please refer documentation for more details. Use `slot_based_admission_control`, `reservation_based_admission_control` or `failover_host_admission_control` of [community.vmware.vmware\_cluster\_ha](vmware_cluster_ha_module) instead. Deprecated option, will be removed in version 2.12. |
| **ha\_failover\_level** integer | **Default:**2 | Number of host failures that should be tolerated, still guaranteeing sufficient resources to restart virtual machines on available hosts. Accepts integer values only. Use `slot_based_admission_control`, `reservation_based_admission_control` or `failover_host_admission_control` of [community.vmware.vmware\_cluster\_ha](vmware_cluster_ha_module) instead. Deprecated option, will be removed in version 2.12. |
| **ha\_host\_monitoring** string | **Choices:*** **enabled** β
* disabled
| Indicates whether HA restarts virtual machines after a host fails. If set to `enabled`, HA restarts virtual machines after a host fails. If set to `disabled`, HA does not restart virtual machines after a host fails. If `enable_ha` is set to `False`, then this value is ignored. Use `ha_host_monitoring` of [community.vmware.vmware\_cluster\_ha](vmware_cluster_ha_module) instead. Deprecated option, will be removed in version 2.12. |
| **ha\_restart\_priority** string | **Choices:*** disabled
* high
* low
* **medium** β
| Determines the preference that HA gives to a virtual machine if sufficient capacity is not available to power on all failed virtual machines. This setting is only valid if `ha_vm_monitoring` is set to, either `vmAndAppMonitoring` or `vmMonitoringOnly`. If set to `disabled`, then HA is disabled for this virtual machine. If set to `high`, then virtual machine with this priority have a higher chance of powering on after a failure, when there is insufficient capacity on hosts to meet all virtual machine needs. If set to `medium`, then virtual machine with this priority have an intermediate chance of powering on after a failure, when there is insufficient capacity on hosts to meet all virtual machine needs. If set to `low`, then virtual machine with this priority have a lower chance of powering on after a failure, when there is insufficient capacity on hosts to meet all virtual machine needs. Use `ha_restart_priority` of [community.vmware.vmware\_cluster\_ha](vmware_cluster_ha_module) instead. Deprecated option, will be removed in version 2.12. |
| **ha\_vm\_failure\_interval** integer | **Default:**30 | The number of seconds after which virtual machine is declared as failed if no heartbeat has been received. This setting is only valid if `ha_vm_monitoring` is set to, either `vmAndAppMonitoring` or `vmMonitoringOnly`. Unit is seconds. Use `ha_vm_failure_interval` of [community.vmware.vmware\_cluster\_ha](vmware_cluster_ha_module) instead. Deprecated option, will be removed in version 2.12. |
| **ha\_vm\_max\_failure\_window** integer | **Default:**-1 | The number of seconds for the window during which up to `ha_vm_max_failures` resets can occur before automated responses stop. This setting is only valid if `ha_vm_monitoring` is set to, either `vmAndAppMonitoring` or `vmMonitoringOnly`. Unit is seconds. Default specifies no failure window. Use `ha_vm_max_failure_window` of [community.vmware.vmware\_cluster\_ha](vmware_cluster_ha_module) instead. Deprecated option, will be removed in version 2.12. |
| **ha\_vm\_max\_failures** integer | **Default:**3 | Maximum number of failures and automated resets allowed during the time that `ha_vm_max_failure_window` specifies. This setting is only valid if `ha_vm_monitoring` is set to, either `vmAndAppMonitoring` or `vmMonitoringOnly`. Use `ha_vm_max_failures` of [community.vmware.vmware\_cluster\_ha](vmware_cluster_ha_module) instead. Deprecated option, will be removed in version 2.12. |
| **ha\_vm\_min\_up\_time** integer | **Default:**120 | The number of seconds for the virtual machine's heartbeats to stabilize after the virtual machine has been powered on. This setting is only valid if `ha_vm_monitoring` is set to, either `vmAndAppMonitoring` or `vmMonitoringOnly`. Unit is seconds. Use `ha_vm_min_up_time` of [community.vmware.vmware\_cluster\_ha](vmware_cluster_ha_module) instead. Deprecated option, will be removed in version 2.12. |
| **ha\_vm\_monitoring** string | **Choices:*** vmAndAppMonitoring
* vmMonitoringOnly
* **vmMonitoringDisabled** β
| Indicates the state of virtual machine health monitoring service. If set to `vmAndAppMonitoring`, HA response to both virtual machine and application heartbeat failure. If set to `vmMonitoringDisabled`, virtual machine health monitoring is disabled. If set to `vmMonitoringOnly`, HA response to virtual machine heartbeat failure. If `enable_ha` is set to `False`, then this value is ignored. Use `ha_vm_monitoring` of [community.vmware.vmware\_cluster\_ha](vmware_cluster_ha_module) instead. Deprecated option, will be removed in version 2.12. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **ignore\_drs** boolean | **Choices:*** **no** β
* yes
| If set to `True`, DRS will not be configured; all explicit and default DRS related configurations will be ignored. |
| **ignore\_ha** boolean | **Choices:*** **no** β
* yes
| If set to `True`, HA will not be configured; all explicit and default HA related configurations will be ignored. |
| **ignore\_vsan** boolean | **Choices:*** **no** β
* yes
| If set to `True`, VSAN will not be configured; all explicit and default VSAN related configurations will be ignored. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** absent
* **present** β
| Create `present` or remove `absent` a VMware vSphere cluster. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
| **vsan\_auto\_claim\_storage** boolean | **Choices:*** **no** β
* yes
| Determines whether the VSAN service is configured to automatically claim local storage on VSAN-enabled hosts in the cluster. Use `vsan_auto_claim_storage` of [community.vmware.vmware\_cluster\_vsan](vmware_cluster_vsan_module) instead. Deprecated option, will be removed in version 2.12. |
Notes
-----
Note
* All modules requires API write access and hence is not supported on a free ESXi license.
See Also
--------
See also
[community.vmware.vmware\_cluster\_drs](vmware_cluster_drs_module#ansible-collections-community-vmware-vmware-cluster-drs-module)
The official documentation on the **community.vmware.vmware\_cluster\_drs** module.
[community.vmware.vmware\_cluster\_ha](vmware_cluster_ha_module#ansible-collections-community-vmware-vmware-cluster-ha-module)
The official documentation on the **community.vmware.vmware\_cluster\_ha** module.
[community.vmware.vmware\_cluster\_vsan](vmware_cluster_vsan_module#ansible-collections-community-vmware-vmware-cluster-vsan-module)
The official documentation on the **community.vmware.vmware\_cluster\_vsan** module.
Examples
--------
```
- name: Create Cluster
community.vmware.vmware_cluster:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: datacenter
cluster_name: cluster
enable_ha: true
enable_drs: true
enable_vsan: true
delegate_to: localhost
- name: Create Cluster with additional changes
community.vmware.vmware_cluster:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter_name: DC0
cluster_name: "{{ cluster_name }}"
enable_ha: True
ha_vm_monitoring: vmMonitoringOnly
enable_drs: True
drs_default_vm_behavior: partiallyAutomated
enable_vsan: True
register: cl_result
delegate_to: localhost
- name: Delete Cluster
community.vmware.vmware_cluster:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter_name: datacenter
cluster_name: cluster
enable_ha: true
enable_drs: true
enable_vsan: true
state: absent
delegate_to: localhost
```
### Authors
* Joseph Callen (@jcpowermac)
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_guest_move β Moves virtual machines in vCenter community.vmware.vmware\_guest\_move β Moves virtual machines in vCenter
========================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_guest_move`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to move virtual machines between folders.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **datacenter** string / required | | Destination datacenter for the move operation |
| **dest\_folder** string / required | | Absolute path to move an existing guest The dest\_folder should include the datacenter. ESX's datacenter is ha-datacenter. This parameter is case sensitive. Examples: dest\_folder: /ha-datacenter/vm dest\_folder: ha-datacenter/vm dest\_folder: /datacenter1/vm dest\_folder: datacenter1/vm dest\_folder: /datacenter1/vm/folder1 dest\_folder: datacenter1/vm/folder1 dest\_folder: /folder1/datacenter1/vm dest\_folder: folder1/datacenter1/vm dest\_folder: /folder1/datacenter1/vm/folder2 |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **moid** string | | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if `name` or `uuid` is not supplied. |
| **name** string | | Name of the existing virtual machine to move. This is required if `uuid` or `moid` is not supplied. |
| **name\_match** string | **Choices:*** **first** β
* last
| If multiple virtual machines matching the name, use the first or last found. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **use\_instance\_uuid** boolean | **Choices:*** **no** β
* yes
| Whether to use the VMware instance UUID rather than the BIOS UUID. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **uuid** string | | UUID of the virtual machine to manage if known, this is VMware's unique identifier. This is required if `name` or `moid` is not supplied. |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 5.5 and vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Move Virtual Machine
community.vmware.vmware_guest_move:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: datacenter
name: testvm-1
dest_folder: "/{{ datacenter }}/vm"
delegate_to: localhost
- name: Move Virtual Machine using MoID
community.vmware.vmware_guest_move:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: datacenter
moid: vm-42
dest_folder: "/{{ datacenter }}/vm"
delegate_to: localhost
- name: Get VM UUID
vmware_guest_facts:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter }}"
folder: "/{{ datacenter }}/vm"
name: "{{ vm_name }}"
delegate_to: localhost
register: vm_facts
- name: Get UUID from previous task and pass it to this task
community.vmware.vmware_guest_move:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter }}"
uuid: "{{ vm_facts.instance.hw_product_uuid }}"
dest_folder: "/DataCenter/vm/path/to/new/folder/where/we/want"
delegate_to: localhost
register: facts
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **instance** dictionary | always | metadata about the virtual machine **Sample:** {'annotation': None, 'current\_snapshot': None, 'customvalues': {}, 'guest\_consolidation\_needed': False, 'guest\_question': None, 'guest\_tools\_status': None, 'guest\_tools\_version': '0', 'hw\_cores\_per\_socket': 1, 'hw\_datastores': ['LocalDS\_0'], 'hw\_esxi\_host': 'DC0\_H0', 'hw\_eth0': {'addresstype': 'generated', 'ipaddresses': None, 'label': 'ethernet-0', 'macaddress': '00:0c:29:6b:34:2c', 'macaddress\_dash': '00-0c-29-6b-34-2c', 'summary': 'DVSwitch: 43cdd1db-1ef7-4016-9bbe-d96395616199'}, 'hw\_files': ['[LocalDS\_0] DC0\_H0\_VM0/DC0\_H0\_VM0.vmx'], 'hw\_folder': '/F0/DC0/vm/F0', 'hw\_guest\_full\_name': None, 'hw\_guest\_ha\_state': None, 'hw\_guest\_id': 'otherGuest', 'hw\_interfaces': ['eth0'], 'hw\_is\_template': False, 'hw\_memtotal\_mb': 32, 'hw\_name': 'DC0\_H0\_VM0', 'hw\_power\_status': 'poweredOn', 'hw\_processor\_count': 1, 'hw\_product\_uuid': '581c2808-64fb-45ee-871f-6a745525cb29', 'instance\_uuid': '8bcb0b6e-3a7d-4513-bf6a-051d15344352', 'ipv4': None, 'ipv6': None, 'module\_hw': True, 'snapshots': []} |
### Authors
* Jose Angel Munoz (@imjoseangel)
| programming_docs |
ansible community.vmware.vmware_vswitch_facts β Gathers facts about an ESXi hostβs vswitch configurations community.vmware.vmware\_vswitch\_facts β Gathers facts about an ESXi hostβs vswitch configurations
===================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_vswitch_facts`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)
DEPRECATED
----------
Removed in
major release after 2021-12-01
Why
Deprecated in favour of [community.vmware.vmware\_vswitch\_info](vmware_vswitch_info_module#ansible-collections-community-vmware-vmware-vswitch-info-module) module.
Alternative
Use [community.vmware.vmware\_vswitch\_info](vmware_vswitch_info_module#ansible-collections-community-vmware-vmware-vswitch-info-module) instead.
Synopsis
--------
* This module can be used to gather facts about an ESXi hostβs vswitch configurations when ESXi hostname or Cluster name is given.
* The vSphere Client shows the value for the number of ports as elastic from vSphere 5.5 and above.
* Other tools like esxcli might show the number of ports as 1536 or 5632.
* See <https://kb.vmware.com/s/article/2064511> for more details.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of the cluster. Facts about vswitch belonging to every ESXi host systems under this cluster will be returned. If `esxi_hostname` is not given, this parameter is required. |
| **esxi\_hostname** string | | ESXi hostname to gather facts from. If `cluster_name` is not given, this parameter is required. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather vswitch facts about all ESXi Host in given Cluster
community.vmware.vmware_vswitch_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: '{{ cluster_name }}'
delegate_to: localhost
register: all_hosts_vswitch_facts
- name: Gather firewall facts about ESXi Host
community.vmware.vmware_vswitch_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
delegate_to: localhost
register: all_vswitch_facts
```
Return Values
-------------
Common return 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\_vswitch\_facts** dictionary | on success | metadata about host's vswitch configuration **Sample:** {'10.76.33.218': {'vSwitch0': {'mtu': 1500, 'num\_ports': 128, 'pnics': ['vmnic0']}, 'vSwitch\_0011': {'mtu': 1500, 'num\_ports': 128, 'pnics': ['vmnic2', 'vmnic1']}}} |
Status
------
* This module will be removed in a major release after 2021-12-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_evc_mode β Enable/Disable EVC mode on vCenter community.vmware.vmware\_evc\_mode β Enable/Disable EVC mode on vCenter
=======================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_evc_mode`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to enable/disable EVC mode on vCenter.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string / required | | The name of the cluster to enable or disable EVC mode on.
aliases: cluster |
| **datacenter\_name** string / required | | The name of the datacenter the cluster belongs to that you want to enable or disable EVC mode on.
aliases: datacenter |
| **evc\_mode** string | | Required for `state=present`. The EVC mode to enable or disable on the cluster. (intel-broadwell, intel-nehalem, intel-merom, etc.). |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** absent
* **present** β
| Add or remove EVC mode. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.7
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Enable EVC Mode
community.vmware.vmware_evc_mode:
hostname: "{{ groups['vcsa'][0] }}"
username: "{{ vcenter_username }}"
password: "{{ site_password }}"
datacenter_name: "{{ datacenter_name }}"
cluster_name: "{{ cluster_name }}"
evc_mode: "intel-broadwell"
state: present
delegate_to: localhost
register: enable_evc
- name: Disable EVC Mode
community.vmware.vmware_evc_mode:
hostname: "{{ groups['vcsa'][0] }}"
username: "{{ vcenter_username }}"
password: "{{ site_password }}"
datacenter_name: "{{ datacenter_name }}"
cluster_name: "{{ cluster_name }}"
state: absent
delegate_to: localhost
register: disable_evc
```
Return Values
-------------
Common return 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 | always | information about performed operation **Sample:** EVC Mode for 'intel-broadwell' has been enabled. |
### Authors
* Michael Tipton (@castawayegr)
ansible community.vmware.vmware_host_snmp β Configures SNMP on an ESXi host system community.vmware.vmware\_host\_snmp β Configures SNMP on an ESXi host system
============================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_snmp`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to configure the embedded SNMP agent on an ESXi host.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **community** list / elements=string | | List of SNMP community strings. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **hw\_source** string | **Choices:*** **indications** β
* sensors
| Source hardware events from IPMI sensors or CIM Indications. The embedded SNMP agent receives hardware events either from IPMI sensors `sensors` or CIM indications `indications`. |
| **log\_level** string | **Choices:*** debug
* **info** β
* warning
* error
| Syslog logging level. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **send\_trap** boolean | **Choices:*** **no** β
* yes
| Send a test trap to validate the configuration. |
| **snmp\_port** integer | **Default:**161 | Port used by the SNMP agent. |
| **state** string | **Choices:*** **disabled** β
* enabled
* reset
| Enable, disable, or reset the SNMP agent. |
| **trap\_filter** list / elements=string | | A list of trap oids for traps not to be sent by agent, e.g. [ 1.3.6.1.4.1.6876.4.1.1.0, 1.3.6.1.4.1.6876.4.1.1.1 ] Use value `reset` to clear settings. |
| **trap\_targets** list / elements=dictionary | **Default:**[] | A list of trap targets. You need to use `hostname`, `port`, and `community` for each trap target. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* You need to reset the agent (to factory defaults) if you want to clear all community strings, trap targets, or filters
* SNMP v3 configuration isnβt implemented yet
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Enable and configure SNMP community
community.vmware.vmware_host_snmp:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
community: [ test ]
state: enabled
delegate_to: localhost
- name: Configure SNMP traps and filters
community.vmware.vmware_host_snmp:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
community: [ test ]
trap_targets:
- hostname: 192.168.1.100
port: 162
community: test123
- hostname: 192.168.1.101
port: 162
community: test1234
trap_filter:
- 1.3.6.1.4.1.6876.4.1.1.0
- 1.3.6.1.4.1.6876.4.1.1.1
state: enabled
delegate_to: localhost
- name: Disable SNMP
community.vmware.vmware_host_snmp:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
state: disabled
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 |
| --- | --- | --- |
| **results** dictionary | always | metadata about host system's SNMP configuration **Sample:** {'esxi01': {'changed': False, 'community': ['test'], 'hw\_source': 'indications', 'msg': 'SNMP already configured properly', 'port': 161, 'state': 'enabled', 'trap\_targets': []}} |
### Authors
* Christian Kotte (@ckotte)
ansible community.vmware.vmware_host_vmhba_facts β Gathers facts about vmhbas available on the given ESXi host community.vmware.vmware\_host\_vmhba\_facts β Gathers facts about vmhbas available on the given ESXi host
=========================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_vmhba_facts`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)
DEPRECATED
----------
Removed in
major release after 2021-12-01
Why
Deprecated in favour of [community.vmware.vmware\_host\_vmhba\_info](vmware_host_vmhba_info_module#ansible-collections-community-vmware-vmware-host-vmhba-info-module) module.
Alternative
Use [community.vmware.vmware\_host\_vmhba\_info](vmware_host_vmhba_info_module#ansible-collections-community-vmware-vmware-host-vmhba-info-module) instead.
Synopsis
--------
* This module can be used to gather facts about vmhbas available on the given ESXi host.
* If `cluster_name` is provided, then vmhba facts about all hosts from given cluster will be returned.
* If `esxi_hostname` is provided, then vmhba facts about given host system will be returned.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of the cluster from which all host systems will be used. Vmhba facts about each ESXi server will be returned for the given cluster. This parameter is required if `esxi_hostname` is not specified. |
| **esxi\_hostname** string | | Name of the host system to work with. Vmhba facts about this ESXi server will be returned. This parameter is required if `cluster_name` is not specified. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather facts about vmhbas of all ESXi Host in the given Cluster
community.vmware.vmware_host_vmhba_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: '{{ cluster_name }}'
delegate_to: localhost
register: cluster_host_vmhbas
- name: Gather facts about vmhbas of an ESXi Host
community.vmware.vmware_host_vmhba_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
delegate_to: localhost
register: host_vmhbas
```
Return Values
-------------
Common return 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\_vmhbas\_facts** dictionary | hosts\_vmhbas\_facts | dict with hostname as key and dict with vmhbas facts as value. **Sample:** {'10.76.33.204': {'vmhba\_details': [{'adapter': 'HPE Smart Array P440ar', 'bus': 3, 'device': 'vmhba0', 'driver': 'nhpsa', 'location': '0000:03:00.0', 'model': 'Smart Array P440ar', 'node\_wwn': '50:01:43:80:37:18:9e:a0', 'status': 'unknown', 'type': 'SAS'}, {'adapter': 'QLogic Corp ISP2532-based 8Gb Fibre Channel to PCI Express HBA', 'bus': 5, 'device': 'vmhba1', 'driver': 'qlnativefc', 'location': '0000:05:00.0', 'model': 'ISP2532-based 8Gb Fibre Channel to PCI Express HBA', 'node\_wwn': '57:64:96:32:15:90:23:95:82', 'port\_type': 'unknown', 'port\_wwn': '57:64:96:32:15:90:23:95:82', 'speed': 8, 'status': 'online', 'type': 'Fibre Channel'}, {'adapter': 'QLogic Corp ISP2532-based 8Gb Fibre Channel to PCI Express HBA', 'bus': 8, 'device': 'vmhba2', 'driver': 'qlnativefc', 'location': '0000:08:00.0', 'model': 'ISP2532-based 8Gb Fibre Channel to PCI Express HBA', 'node\_wwn': '57:64:96:32:15:90:23:95:21', 'port\_type': 'unknown', 'port\_wwn': '57:64:96:32:15:90:23:95:21', 'speed': 8, 'status': 'online', 'type': 'Fibre Channel'}]}} |
Status
------
* This module will be removed in a major release after 2021-12-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Christian Kotte (@ckotte)
| programming_docs |
ansible community.vmware.vmware_guest_find β Find the folder path(s) for a virtual machine by name or UUID community.vmware.vmware\_guest\_find β Find the folder path(s) for a virtual machine by name or UUID
====================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_guest_find`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Find the folder path(s) for a virtual machine by name or UUID
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **name** string | | Name of the VM to work with. This is required if `uuid` parameter is not supplied. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **use\_instance\_uuid** boolean | **Choices:*** **no** β
* yes
| Whether to use the VMware instance UUID rather than the BIOS UUID. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **uuid** string | | UUID of the instance to manage if known, this is VMware's BIOS UUID by default. This is required if `name` parameter is not supplied. |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Find Guest's Folder using name
community.vmware.vmware_guest_find:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
name: testvm
delegate_to: localhost
register: vm_folder
- name: Find Guest's Folder using UUID
community.vmware.vmware_guest_find:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
uuid: 38c4c89c-b3d7-4ae6-ae4e-43c5118eae49
delegate_to: localhost
register: vm_folder
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **folders** list / elements=string | on success | List of folders for user specified virtual machine **Sample:** ['/DC0/vm'] |
### Authors
* Abhijeet Kasurde (@Akasurde) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#51303a302224233534777262666a777264636a777265696a233435393025777265676a323e3c)>
ansible community.vmware.vmware_dvswitch_lacp β Manage LACP configuration on a Distributed Switch community.vmware.vmware\_dvswitch\_lacp β Manage LACP configuration on a Distributed Switch
===========================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_dvswitch_lacp`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to configure Link Aggregation Control Protocol (LACP) support mode and Link Aggregation Groups (LAGs).
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **link\_aggregation\_groups** list / elements=dictionary | | Can only be used if `lacp_support` is set to `enhanced`. |
| | **load\_balancing\_mode** string | **Default:**"srcDestIpTcpUdpPortVlan" | Load balancing algorithm. Valid values are as follows - srcTcpUdpPort: Source TCP/UDP port number. - srcDestIpTcpUdpPortVlan: Source and destination IP, source and destination TCP/UDP port number and VLAN. - srcIpVlan: Source IP and VLAN. - srcDestTcpUdpPort: Source and destination TCP/UDP port number. - srcMac: Source MAC address. - destIp: Destination IP. - destMac: Destination MAC address. - vlan: VLAN only. - srcDestIp: Source and Destination IP. - srcIpTcpUdpPortVlan: Source IP, TCP/UDP port number and VLAN. - srcDestIpTcpUdpPort: Source and destination IP and TCP/UDP port number. - srcDestMac: Source and destination MAC address. - destIpTcpUdpPort: Destination IP and TCP/UDP port number. - srcPortId: Source Virtual Port Id. - srcIp: Source IP. - srcIpTcpUdpPort: Source IP and TCP/UDP port number. - destIpTcpUdpPortVlan: Destination IP, TCP/UDP port number and VLAN. - destTcpUdpPort: Destination TCP/UDP port number. - destIpVlan: Destination IP and VLAN. - srcDestIpVlan: Source and destination IP and VLAN. Please see examples for more information. |
| | **mode** string | **Choices:*** active
* passive
| The negotiating state of the uplinks/ports. |
| | **name** string | | Name of the LAG. |
| | **uplink\_number** integer | | Number of uplinks. Can 1 to 30. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **support\_mode** string | **Choices:*** **basic** β
* enhanced
| The LACP support mode.
`basic`: One Link Aggregation Control Protocol group in the switch (singleLag).
`enhanced`: Multiple Link Aggregation Control Protocol groups in the switch (multipleLag). |
| **switch** string / required | | The name of the Distributed Switch to manage.
aliases: dvswitch |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.7
* You need to run the task two times if you want to remove all LAGs and change the support mode to βbasicβ
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Enable enhanced mode on a Distributed Switch
community.vmware.vmware_dvswitch_lacp:
hostname: '{{ inventory_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
switch: dvSwitch
support_mode: enhanced
validate_certs: "{{ validate_vcenter_certs }}"
delegate_to: localhost
loop_control:
label: "{{ item.name }}"
with_items: "{{ vcenter_distributed_switches }}"
- name: Enable enhanced mode and create two LAGs on a Distributed Switch
community.vmware.vmware_dvswitch_lacp:
hostname: '{{ inventory_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
switch: dvSwitch
support_mode: enhanced
link_aggregation_groups:
- name: lag1
uplink_number: 2
mode: active
load_balancing_mode: srcDestIpTcpUdpPortVlan
- name: lag2
uplink_number: 2
mode: passive
load_balancing_mode: srcDestIp
validate_certs: "{{ validate_vcenter_certs }}"
delegate_to: localhost
loop_control:
label: "{{ item.name }}"
with_items: "{{ vcenter_distributed_switches }}"
```
Return Values
-------------
Common return 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 | always | information about performed operation **Sample:** {'changed': True, 'dvswitch': 'dvSwitch', 'link\_aggregation\_groups': [{'load\_balancing\_mode': 'srcDestIpTcpUdpPortVlan', 'mode': 'active', 'name': 'lag1', 'uplink\_number': 2}, {'load\_balancing\_mode': 'srcDestIp', 'mode': 'active', 'name': 'lag2', 'uplink\_number': 2}], 'link\_aggregation\_groups\_previous': [], 'result': 'lacp lags changed', 'support\_mode': 'enhanced'} |
### Authors
* Christian Kotte (@ckotte)
ansible community.vmware.vmware_object_custom_attributes_info β Gather custom attributes of an object community.vmware.vmware\_object\_custom\_attributes\_info β Gather custom attributes of an object
=================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_object_custom_attributes_info`.
New in version 1.11.0: of community.vmware
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be gathered custom attributes of an object.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 3.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **moid** string | | Managed Object ID of the instance to get if known, this is a unique identifier only within a single vCenter instance. This is required if `object_name` is not supplied. |
| **object\_name** string | | Name of the object to work with.
aliases: name |
| **object\_type** string / required | **Choices:*** Datacenter
* Cluster
* HostSystem
* ResourcePool
* Folder
* VirtualMachine
* DistributedVirtualSwitch
* DistributedVirtualPortgroup
* Datastore
| Type of an object to work with. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Supports `check_mode`.
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather custom attributes of a virtual machine
community.vmware.vmware_object_custom_attributes_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: false
object_type: VirtualMachine
object_name: "{{ object_name }}"
register: vm_attributes
- name: Gather custom attributes of a virtual machine with moid
community.vmware.vmware_object_custom_attributes_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: false
object_type: VirtualMachine
moid: "{{ moid }}"
register: vm_attributes
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **custom\_attributes** list / elements=string | always | list of custom attributes of an object. **Sample:** [ { "attribute": "example01", "key": 132, "type": "VirtualMachine", "value": "10" }, { "attribute": "example02", "key": 131, "type": "VirtualMachine", "value": "20" }, { "attribute": "example03", "key": 130, "type": "VirtualMachine", "value": null } ] |
### Authors
* sky-joker (@sky-joker)
ansible community.vmware.vmware_host_vmnic_facts β Gathers facts about vmnics available on the given ESXi host community.vmware.vmware\_host\_vmnic\_facts β Gathers facts about vmnics available on the given ESXi host
=========================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_vmnic_facts`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)
DEPRECATED
----------
Removed in
major release after 2021-12-01
Why
Deprecated in favour of [community.vmware.vmware\_host\_vmnic\_info](vmware_host_vmnic_info_module#ansible-collections-community-vmware-vmware-host-vmnic-info-module) module.
Alternative
Use [community.vmware.vmware\_host\_vmnic\_info](vmware_host_vmnic_info_module#ansible-collections-community-vmware-vmware-host-vmnic-info-module) instead.
Synopsis
--------
* This module can be used to gather facts about vmnics available on the given ESXi host.
* If `cluster_name` is provided, then vmnic facts about all hosts from given cluster will be returned.
* If `esxi_hostname` is provided, then vmnic facts about given host system will be returned.
* Additional details about vswitch and dvswitch with respective vmnic is also provided which is added in 2.7 version.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **capabilities** boolean | **Choices:*** **no** β
* yes
| Gather facts about general capabilities (Auto negotiation, Wake On LAN, and Network I/O Control). |
| **cluster\_name** string | | Name of the cluster from which all host systems will be used. Vmnic facts about each ESXi server will be returned for the given cluster. This parameter is required if `esxi_hostname` is not specified. |
| **directpath\_io** boolean | **Choices:*** **no** β
* yes
| Gather facts about DirectPath I/O capabilities and configuration. |
| **esxi\_hostname** string | | Name of the host system to work with. Vmnic facts about this ESXi server will be returned. This parameter is required if `cluster_name` is not specified. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **sriov** boolean | **Choices:*** **no** β
* yes
| Gather facts about SR-IOV capabilities and configuration. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather facts about vmnics of all ESXi Host in the given Cluster
community.vmware.vmware_host_vmnic_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: '{{ cluster_name }}'
delegate_to: localhost
register: cluster_host_vmnics
- name: Gather facts about vmnics of an ESXi Host
community.vmware.vmware_host_vmnic_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
delegate_to: localhost
register: host_vmnics
```
Return Values
-------------
Common return 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\_vmnics\_facts** dictionary | hosts\_vmnics\_facts | dict with hostname as key and dict with vmnics facts as value. for `num_vmnics`, only NICs starting with vmnic are counted. NICs like vusb\* are not counted. details about vswitch and dvswitch was added in version 2.7. details about vmnics was added in version 2.8. **Sample:** {'10.76.33.204': {'all': ['vmnic0', 'vmnic1'], 'available': [], 'dvswitch': {'dvs\_0002': ['vmnic1']}, 'num\_vmnics': 2, 'used': ['vmnic1', 'vmnic0'], 'vmnic\_details': [{'actual\_duplex': 'Full Duplex', 'actual\_speed': 10000, 'adapter': 'Intel(R) 82599 10 Gigabit Dual Port Network Connection', 'configured\_duplex': 'Auto negotiate', 'configured\_speed': 'Auto negotiate', 'device': 'vmnic0', 'driver': 'ixgbe', 'location': '0000:01:00.0', 'mac': 'aa:bb:cc:dd:ee:ff', 'status': 'Connected'}, {'actual\_duplex': 'Full Duplex', 'actual\_speed': 10000, 'adapter': 'Intel(R) 82599 10 Gigabit Dual Port Network Connection', 'configured\_duplex': 'Auto negotiate', 'configured\_speed': 'Auto negotiate', 'device': 'vmnic1', 'driver': 'ixgbe', 'location': '0000:01:00.1', 'mac': 'ab:ba:cc:dd:ee:ff', 'status': 'Connected'}], 'vswitch': {'vSwitch0': ['vmnic0']}}} |
Status
------
* This module will be removed in a major release after 2021-12-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Abhijeet Kasurde (@Akasurde)
* Christian Kotte (@ckotte)
| programming_docs |
ansible community.vmware.vmware_host_iscsi β Manage the iSCSI configuration of ESXi host community.vmware.vmware\_host\_iscsi β Manage the iSCSI configuration of ESXi host
==================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_iscsi`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* In this module, can manage the iSCSI configuration of ESXi host
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **esxi\_hostname** string / required | | The ESXi hostname on which to change iSCSI settings. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **iscsi\_config** dictionary | | The iSCSI configs. This parameter is required if *state=present* or *state=absent*. |
| | **alias** string | **Default:**"" | The new value for the alias of the adapter. |
| | **authentication** dictionary | | CHAP authentication parent settings for iSCSI. |
| | | **chap\_auth\_enabled** boolean | **Choices:*** **no** β
* yes
| Whether to enable CHAP authentication. |
| | | **chap\_authentication\_type** string | **Choices:*** chapDiscouraged
* chapPreferred
* chapRequired
* **chapProhibited** β
| The preference for CHAP or non-CHAP protocol of CHAP if CHAP is enabled. |
| | | **chap\_name** string | **Default:**"" | CHAP user name if CHAP is enabled. |
| | | **chap\_secret** string | | The secret password of CHAP if CHAP is enabled. |
| | | **mutual\_chap\_authentication\_type** string | **Choices:*** **chapProhibited** β
* chapRequired
| The preference for CHAP or non-CHAP protocol of Mutual-CHAP if CHAP is enabled. |
| | | **mutual\_chap\_name** string | **Default:**"" | The user name that the target needs to use to authenticate with the initiator if Mutual-CHAP is enabled. |
| | | **mutual\_chap\_secret** string | | The secret password of mutual CHAP if Mutual-CHAP is enabled. |
| | **force** boolean | **Choices:*** **no** β
* yes
| Force port bind VMkernels to be removed. |
| | **iscsi\_name** string added in 1.7.0 of community.vmware | | The name for the iSCSI HBA adapter. This is iSCSI qualified name.
aliases: initiator\_iqn |
| | **port\_bind** list / elements=string | **Default:**[] | The list of the VMkernels if use port bindings. |
| | **send\_target** dictionary | | The iSCSI dynamic target settings. |
| | | **address** string / required | | The IP address or hostname of the storage device. |
| | | **authentication** dictionary | | CHAP authentication settings of a dynamic target for iSCSI. |
| | | | **chap\_auth\_enabled** boolean | **Choices:*** **no** β
* yes
| Whether to enable CHAP authentication. |
| | | | **chap\_authentication\_type** string | **Choices:*** chapDiscouraged
* chapPreferred
* chapRequired
* **chapProhibited** β
| The preference for CHAP or non-CHAP protocol of CHAP if CHAP is enabled. |
| | | | **chap\_inherited** boolean | **Choices:*** no
* **yes** β
| Whether or not to inherit CHAP settings from the parent settings. |
| | | | **chap\_name** string | **Default:**"" | CHAP user name if CHAP is enabled. |
| | | | **chap\_secret** string | | The secret password of CHAP if CHAP is enabled. |
| | | | **mutual\_chap\_authentication\_type** string | **Choices:*** **chapProhibited** β
* chapRequired
| The preference for CHAP or non-CHAP protocol of Mutual-CHAP if CHAP is enabled. |
| | | | **mutual\_chap\_inherited** boolean | **Choices:*** no
* **yes** β
| Whether or not to inherit Mutual-CHAP settings from the parent settings. |
| | | | **mutual\_chap\_name** string | **Default:**"" | The user name that the target needs to use to authenticate with the initiator if Mutual-CHAP is enabled. |
| | | | **mutual\_chap\_secret** string | | The secret password of mutual CHAP if Mutual-CHAP is enabled. |
| | | **port** integer | **Default:**3260 | The TCP port of the storage device. If not specified, the standard default of 3260 is used. |
| | **static\_target** dictionary | | The iSCSI static target settings. |
| | | **address** string / required | | The IP address or hostname of the storage device. |
| | | **authentication** dictionary | | CHAP authentication settings of a static target for iSCSI. |
| | | | **chap\_auth\_enabled** boolean | **Choices:*** **no** β
* yes
| Whether to enable CHAP authentication. |
| | | | **chap\_authentication\_type** string | **Choices:*** chapDiscouraged
* chapPreferred
* chapRequired
* **chapProhibited** β
| The preference for CHAP or non-CHAP protocol of CHAP if CHAP is enabled. |
| | | | **chap\_inherited** boolean | **Choices:*** no
* **yes** β
| Whether or not to inherit CHAP settings from the parent settings. |
| | | | **chap\_name** string | **Default:**"" | CHAP user name if CHAP is enabled. |
| | | | **chap\_secret** string | | The secret password of CHAP if CHAP is enabled. |
| | | | **mutual\_chap\_authentication\_type** string | **Choices:*** **chapProhibited** β
* chapRequired
| The preference for CHAP or non-CHAP protocol of Mutual-CHAP if CHAP is enabled. |
| | | | **mutual\_chap\_inherited** boolean | **Choices:*** no
* **yes** β
| Whether or not to inherit Mutual-CHAP settings from the parent settings. |
| | | | **mutual\_chap\_name** string | **Default:**"" | The user name that the target needs to use to authenticate with the initiator if Mutual-CHAP is enabled. |
| | | | **mutual\_chap\_secret** string | | The secret password of mutual CHAP if Mutual-CHAP is enabled. |
| | | **iscsi\_name** string / required | | The name of the iSCSI target to connect to. |
| | | **port** integer | **Default:**3260 | The TCP port of the storage device. If not specified, the standard default of 3260 is used. |
| | **vmhba\_name** string / required | | The iSCSI adapter name. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **present** β
* absent
* enabled
* disabled
| If set to `present`, add the iSCSI target or the bind ports if they are not existing. If set to `present`, update the iSCSI settings if they already exist and occur change. If set to `absent`, remove the iSCSI target or the bind ports if they are existing. If set to (enabled), enable the iSCSI of ESXi if the iSCSI is disabled. If set to (disabled), disable the iSCSI of ESXi if the iSCSI is enabled. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Enable iSCSI of ESXi
community.vmware.vmware_host_iscsi:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi_hostname }}"
state: enabled
- name: Add a dynamic target to iSCSI config of ESXi
community.vmware.vmware_host_iscsi:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi_hostname }}"
iscsi_config:
vmhba_name: vmhba65
send_target:
address: "{{ send_target_address }}"
state: present
- name: Add a static target to iSCSI config of ESXi
community.vmware.vmware_host_iscsi:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi_hostname }}"
iscsi_config:
vmhba_name: vmhba65
static_target:
iscsi_name: iqn.2011-08.com.xxxxxxx:as6104t-8c3e9d.target001
address: "{{ send_target_address }}"
state: present
- name: Add VMKernels to iSCSI config of ESXi
community.vmware.vmware_host_iscsi:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi_hostname }}"
iscsi_config:
vmhba_name: vmhba65
port_bind:
- vmk0
- vmk1
state: present
- name: Use CHAP authentication
community.vmware.vmware_host_iscsi:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi_hostname }}"
iscsi_config:
vmhba_name: vmhba65
authentication:
chap_auth_enabled: true
chap_authentication_type: chapPreferred
chap_name: chap_user_name
chap_secret: secret
state: present
- name: Remove a dynamic target from iSCSI config of ESXi
community.vmware.vmware_host_iscsi:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi_hostname }}"
iscsi_config:
vmhba_name: vmhba65
send_target:
address: "{{ send_target_address }}"
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 |
| --- | --- | --- |
| **iscsi\_properties** dictionary | changed | Parameter return when system defaults config is changed. **Sample:** { "iscsi\_alias": "", "iscsi\_authentication\_properties": { "\_vimtype": "vim.host.InternetScsiHba.AuthenticationProperties", "chapAuthEnabled": false, "chapAuthenticationType": "chapProhibited", "chapInherited": null, "chapName": "", "chapSecret": "XXXXXXXXXXXXXXXXXXXXX", "mutualChapAuthenticationType": "chapProhibited", "mutualChapInherited": null, "mutualChapName": "XXXXXXXXXXXXXXXXXXXXX", "mutualChapSecret": "" }, "iscsi\_enabled": true, "iscsi\_name": "", "iscsi\_send\_targets": [], "iscsi\_static\_targets": [], "port\_bind": [], "vmhba\_name": "vmhba65" } |
### Authors
* sky-joker (@sky-joker)
ansible community.vmware.vmware_guest β Manages virtual machines in vCenter community.vmware.vmware\_guest β Manages virtual machines in vCenter
====================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_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, manage power state of virtual machine such as power on, power off, suspend, shutdown, reboot, restart etc., modify various virtual machine components like network, disk, customization etc., 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
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **advanced\_settings** list / elements=dictionary added in 1.7.0 of community.vmware | | Define a list of advanced settings to be added to the VMX config. An advanced settings object takes two fields `key` and `value`. Incorrect key and values will be ignored. |
| **annotation** string | | A note or annotation to include in the virtual machine.
aliases: notes |
| **cdrom** raw | | A list of CD-ROM configurations for the virtual machine. Added in version 2.9. Providing CD-ROM configuration as dict is deprecated and will be removed VMware collection 4.0.0. Please use a list instead. Parameters `controller_type`, `controller_number`, `unit_number`, `state` are added for a list of CD-ROMs configuration support. For `ide` controller, hot-add or hot-remove CD-ROM is not supported. |
| | **controller\_number** integer | | For `ide` controller, valid value is 0 or 1. For `sata` controller, valid value is 0 to 3. |
| | **controller\_type** string | | Valid options are `ide` and `sata`. Default value is `ide`. When set to `sata`, please make sure `unit_number` is correct and not used by SATA disks. |
| | **iso\_path** string | | The datastore path to the ISO file to use, in the form of `[datastore1] path/to/file.iso`. Required if type is set `iso`. |
| | **state** string | | Valid value is `present` or `absent`. Default is `present`. If set to `absent`, then the specified CD-ROM will be removed. |
| | **type** string | | The type of CD-ROM, valid options are `none`, `client` or `iso`. With `none` the CD-ROM will be disconnected but present. The default value is `client`. |
| | **unit\_number** integer | | For CD-ROM device attach to `ide` controller, valid value is 0 or 1. For CD-ROM device attach to `sata` controller, valid value is 0 to 29.
`controller_number` and `unit_number` are mandatory attributes. |
| **cluster** string | | The cluster name where the virtual machine will run. This is a required parameter, if `esxi_hostname` is not set.
`esxi_hostname` and `cluster` are mutually exclusive parameters. This parameter is case sensitive. |
| **convert** string | **Choices:*** thin
* thick
* eagerzeroedthick
| Specify convert disk type while cloning template or virtual machine. |
| **customization** dictionary | | Parameters for OS customization when cloning from the template or the virtual machine, or apply to the existing virtual machine directly. Not all operating systems are supported for customization with respective vCenter version, please check VMware documentation for respective OS customization. For supported customization operating system matrix, (see <http://partnerweb.vmware.com/programs/guestOS/guest-os-customization-matrix.pdf>) All parameters and VMware object names are case sensitive. Linux based OSes requires Perl package to be installed for OS customizations. |
| | **autologon** boolean | **Choices:*** no
* yes
| Auto logon after virtual machine customization. Specific to Windows customization. |
| | **autologoncount** integer | | Number of autologon after reboot. Specific to Windows customization. Ignored if `autologon` is unset or set to `False`. If unset, 1 will be used. |
| | **dns\_servers** list / elements=string | | List of DNS servers to configure. Common for Linux and Windows customization. |
| | **dns\_suffix** list / elements=string | | List of domain suffixes, also known as DNS search path. Default `domain` parameter. Common for Linux and Windows customization. |
| | **domain** string | | DNS domain name to use. Common for Linux and Windows customization. |
| | **domainadmin** string | | User used to join in AD domain. Required if `joindomain` specified. Specific to Windows customization. |
| | **domainadminpassword** string | | Password used to join in AD domain. Required if `joindomain` specified. Specific to Windows customization. |
| | **existing\_vm** boolean | **Choices:*** no
* yes
| If set to `True`, do OS customization on the specified virtual machine directly. Common for Linux and Windows customization. |
| | **fullname** string | | Server owner name. Specific to Windows customization. If unset, "Administrator" will be used as a fall-back. |
| | **hostname** string | | Computer hostname. Default is shortened `name` parameter. Allowed characters are alphanumeric (uppercase and lowercase) and minus, rest of the characters are dropped as per RFC 952. Common for Linux and Windows customization. |
| | **hwclockUTC** boolean | **Choices:*** no
* yes
| Specifies whether the hardware clock is in UTC or local time. Specific to Linux customization. |
| | **joindomain** string | | AD domain to join. Not compatible with `joinworkgroup`. Specific to Windows customization. |
| | **joinworkgroup** string | | Workgroup to join. Not compatible with `joindomain`. Specific to Windows customization. If unset, "WORKGROUP" will be used as a fall-back. |
| | **orgname** string | | Organisation name. Specific to Windows customization. If unset, "ACME" will be used as a fall-back. |
| | **password** string | | Local administrator password. Specific to Windows customization. |
| | **productid** string | | Product ID. Specific to Windows customization. |
| | **runonce** list / elements=string | | List of commands to run at first user logon. Specific to Windows customization. |
| | **timezone** string | | Timezone. See List of supported time zones for different vSphere versions in Linux/Unix. Common for Linux and Windows customization.
[Windows](https://msdn.microsoft.com/en-us/library/ms912391.aspx). |
| **customization\_spec** string | | Unique name identifying the requested customization specification. This parameter is case sensitive. If set, then overrides `customization` parameter values. |
| **customvalues** list / elements=dictionary | | Define a list of custom values to set on virtual machine. A custom value object takes two fields `key` and `value`. Incorrect key and values will be ignored. |
| **datacenter** string | **Default:**"ha-datacenter" | Destination datacenter for the deploy operation. This parameter is case sensitive. |
| **datastore** string | | Specify datastore or datastore cluster to provision virtual machine. This parameter takes precedence over `disk.datastore` parameter. This parameter can be used to override datastore or datastore cluster setting of the virtual machine when deployed from the template. Please see example for more usage. |
| **delete\_from\_inventory** boolean | **Choices:*** **no** β
* yes
| Whether to delete Virtual machine from inventory or delete from disk. |
| **disk** list / elements=dictionary | | A list of disks to add. This parameter is case sensitive. Shrinking disks is not supported. Removing existing disks of the virtual machine is not supported. Attributes `controller_type`, `controller_number`, `unit_number` are used to configure multiple types of disk controllers and disks for creating or reconfiguring virtual machine. Added in Ansible 2.10. |
| | **autoselect\_datastore** boolean | **Choices:*** no
* yes
| Select the less used datastore.
`disk.datastore` and `disk.autoselect_datastore` will not be used if `datastore` is specified outside this `disk` configuration. |
| | **controller\_number** integer | **Choices:*** 0
* 1
* 2
* 3
| Disk controller bus number. The maximum number of same type controller is 4 per VM. |
| | **controller\_type** string | **Choices:*** buslogic
* lsilogic
* lsilogicsas
* paravirtual
* sata
* nvme
| Type of disk controller.
`nvme` controller type support starts on ESXi 6.5 with VM hardware version `version` 13. Set this type on not supported ESXi or VM hardware version will lead to failure in deployment. When set to `sata`, please make sure `unit_number` is correct and not used by SATA CDROMs. If set to `sata` type, please make sure `controller_number` and `unit_number` are set correctly when `cdrom` also set to `sata` type. |
| | **datastore** string | | The name of datastore which will be used for the disk. If `autoselect_datastore` is set to True, will select the less used datastore whose name contains this "disk.datastore" string. |
| | **disk\_mode** string | **Choices:*** persistent
* independent\_persistent
* independent\_nonpersistent
| Type of disk mode. Added in Ansible 2.6. If `persistent` specified, changes are immediately and permanently written to the virtual disk. This is default. If `independent_persistent` specified, same as persistent, but not affected by snapshots. If `independent_nonpersistent` specified, changes to virtual disk are made to a redo log and discarded at power off, but not affected by snapshots. |
| | **filename** string | | Existing disk image to be used. Filename must already exist on the datastore. Specify filename string in `[datastore_name] path/to/file.vmdk` format. Added in Ansible 2.8. |
| | **size** string | | Disk storage size. Please specify storage unit like [kb, mb, gb, tb]. |
| | **size\_gb** integer | | Disk storage size in gb. |
| | **size\_kb** integer | | Disk storage size in kb. |
| | **size\_mb** integer | | Disk storage size in mb. |
| | **size\_tb** integer | | Disk storage size in tb. |
| | **type** string | **Choices:*** thin
* thick
* eagerzeroedthick
| Type of disk. If `thin` specified, disk type is set to thin disk. If `eagerzeroedthick` specified, disk type is set to eagerzeroedthick disk. Added Ansible 2.5. If not specified, disk type is inherited from the source VM or template when cloned and thick disk, no eagerzero otherwise. |
| | **unit\_number** integer | | Disk Unit Number. Valid value range from 0 to 15 for SCSI controller, except 7. Valid value range from 0 to 14 for NVME controller. Valid value range from 0 to 29 for SATA controller.
`controller_type`, `controller_number` and `unit_number` are required when creating or reconfiguring VMs with multiple types of disk controllers and disks. When creating new VM, the first configured disk in the `disk` list will be "Hard Disk 1". |
| **esxi\_hostname** string | | The ESXi hostname where the virtual machine will run. This is a required parameter, if `cluster` is not set.
`esxi_hostname` and `cluster` are mutually exclusive parameters. This parameter is case sensitive. |
| **folder** string | | Destination folder, absolute path to find an existing guest or create the new guest. The folder should include the datacenter. ESXi's datacenter is ha-datacenter. This parameter is case sensitive. If multiple machines are found with same name, this parameter is used to identify Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2 |
| **force** boolean | **Choices:*** **no** β
* yes
| Ignore warnings and complete the actions. This parameter is useful while removing virtual machine which is powered on state. This module reflects the VMware vCenter API and UI workflow, as such, in some cases the `force` flag will be mandatory to perform the action to ensure you are certain the action has to be taken, no matter what the consequence. This is specifically the case for removing a powered on the virtual machine when `state` is set to `absent`. |
| **guest\_id** string | | Set the guest ID. This parameter is case sensitive.
`rhel7_64Guest` for virtual machine with RHEL7 64 bit.
`centos64Guest` for virtual machine with CentOS 64 bit.
`ubuntu64Guest` for virtual machine with Ubuntu 64 bit. This field is required when creating a virtual machine, not required when creating from the template. Valid values are referenced here: <https://code.vmware.com/apis/358/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html>
|
| **hardware** dictionary | | Manage virtual machine's hardware attributes. All parameters case sensitive. |
| | **boot\_firmware** string | **Choices:*** bios
* efi
| Choose which firmware should be used to boot the virtual machine. |
| | **cpu\_limit** integer | | The CPU utilization of a virtual machine will not exceed this limit. Unit is MHz. |
| | **cpu\_reservation** integer | | The amount of CPU resource that is guaranteed available to the virtual machine. |
| | **hotadd\_cpu** boolean | **Choices:*** no
* yes
| Allow virtual CPUs to be added while the virtual machine is running. |
| | **hotadd\_memory** boolean | **Choices:*** no
* yes
| Allow memory to be added while the virtual machine is running. |
| | **hotremove\_cpu** boolean | **Choices:*** no
* yes
| Allow virtual CPUs to be removed while the virtual machine is running. |
| | **iommu** boolean added in 1.11.0 of community.vmware | **Choices:*** no
* yes
| Flag to specify if I/O MMU is enabled for this virtual machine. |
| | **max\_connections** integer | | Maximum number of active remote display connections for the virtual machines. |
| | **mem\_limit** integer | | The memory utilization of a virtual machine will not exceed this limit. Unit is MB. |
| | **mem\_reservation** integer | | The amount of memory resource that is guaranteed available to the virtual machine.
aliases: memory\_reservation |
| | **memory\_mb** integer | | Amount of memory in MB. |
| | **memory\_reservation\_lock** boolean | **Choices:*** no
* yes
| If set `true`, memory resource reservation for the virtual machine. |
| | **nested\_virt** boolean | **Choices:*** no
* yes
| Enable nested virtualization. |
| | **num\_cpu\_cores\_per\_socket** integer | | Number of Cores Per Socket. |
| | **num\_cpus** integer | | Number of CPUs.
`num_cpus` must be a multiple of `num_cpu_cores_per_socket`. For example, to create a VM with 2 sockets of 4 cores, specify `num_cpus` as 8 and `num_cpu_cores_per_socket` as 4. |
| | **scsi** string | **Choices:*** buslogic
* lsilogic
* lsilogicsas
* paravirtual
| Valid values are `buslogic`, `lsilogic`, `lsilogicsas` and `paravirtual`.
`paravirtual` is default. |
| | **secure\_boot** boolean added in 1.11.0 of community.vmware | **Choices:*** no
* yes
| Whether to enable or disable (U)EFI secure boot. |
| | **version** string | | The Virtual machine hardware versions. Default is 10 (ESXi 5.5 and onwards). If set to `latest`, the specified virtual machine will be upgraded to the most current hardware version supported on the host.
`latest` is added in Ansible 2.10. Please check VMware documentation for correct virtual machine hardware version. Incorrect hardware version may lead to failure in deployment. If hardware version is already equal to the given. |
| | **virt\_based\_security** boolean | **Choices:*** no
* yes
| Enable Virtualization Based Security feature for Windows on ESXi 6.7 and later, from hardware version 14. Supported Guest OS are Windows 10 64 bit, Windows Server 2016, Windows Server 2019 and later. The firmware of virtual machine must be EFI and secure boot must be enabled. Virtualization Based Security depends on nested virtualization and Intel Virtualization Technology for Directed I/O. Deploy on unsupported ESXi, hardware version or firmware may lead to failure or deployed VM with unexpected configurations. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **is\_template** boolean | **Choices:*** **no** β
* yes
| Flag the instance as a template. This will mark the given virtual machine as template. Note, this may need to be done in a dedicated task invocation that is not making any other changes. For example, user cannot change the state from powered-on to powered-off AND save as template in the same task. See [community.vmware.vmware\_guest](vmware_guest_module) source for more details. |
| **linked\_clone** boolean | **Choices:*** **no** β
* yes
| Whether to create a linked clone from the snapshot specified. If specified, then `snapshot_src` is required parameter. |
| **name** string | | Name of the virtual machine to work with. Virtual machine names in vCenter are not necessarily unique, which may be problematic, see `name_match`. If multiple virtual machines with same name exists, then `folder` is required parameter to identify uniqueness of the virtual machine. This parameter is required, if `state` is set to `poweredon`, `powered-on`, `poweredoff`, `powered-off`, `present`, `restarted`, `suspended` and virtual machine does not exists. This parameter is case sensitive. |
| **name\_match** string | **Choices:*** **first** β
* last
| If multiple virtual machines matching the name, use the first or last found. |
| **networks** list / elements=dictionary | | A list of networks (in the order of the NICs). Removing NICs is not allowed, while reconfiguring the virtual machine. All parameters and VMware object names are case sensitive. |
| | **connected** boolean added in 1.5.0 of community.vmware | **Choices:*** no
* yes
| Indicates whether the NIC is currently connected. |
| | **device\_type** string | | Virtual network device. Valid value can be one of `e1000`, `e1000e`, `pcnet32`, `vmxnet2`, `vmxnet3`, `sriov`.
`vmxnet3` is default. Optional per entry. Used for virtual hardware. |
| | **dns\_servers** string | | DNS servers for this network interface (Windows). Optional per entry. Used for OS customization. |
| | **domain** string | | Domain name for this network interface (Windows). Optional per entry. Used for OS customization. |
| | **dvswitch\_name** string | | Name of the distributed vSwitch. Optional per entry. Used for virtual hardware. |
| | **gateway** string | | Static gateway. Optional per entry. Used for OS customization. |
| | **ip** string | | Static IP address. Implies `type=static`. Optional per entry. Used for OS customization. |
| | **mac** string | | Customize MAC address. Optional per entry. Used for virtual hardware. |
| | **name** string | | Name of the portgroup or distributed virtual portgroup for this interface. Required per entry. When specifying distributed virtual portgroup make sure given `esxi_hostname` or `cluster` is associated with it. |
| | **netmask** string | | Static netmask required for `ip`. Optional per entry. Used for OS customization. |
| | **start\_connected** boolean | **Choices:*** no
* yes
| Specifies whether or not to connect the device when the virtual machine starts. |
| | **type** string | | Type of IP assignment. Valid values are one of `dhcp`, `static`.
`dhcp` is default. Optional per entry. Used for OS customization. |
| | **vlan** integer | | VLAN number for this interface. Required per entry. |
| **nvdimm** dictionary added in 1.13.0 of community.vmware | | Add or remove a virtual NVDIMM device to the virtual machine. VM virtual hardware version must be 14 or higher on vSphere 6.7 or later. Verify that guest OS of the virtual machine supports PMem before adding virtual NVDIMM device. Verify that you have the *Datastore.Allocate* space privilege on the virtual machine. Make sure that the host or the cluster on which the virtual machine resides has available PMem resources. To add or remove virtual NVDIMM device to the existing virtual machine, it must be in power off state. |
| | **label** string | | The label of the virtual NVDIMM device to be removed or configured, e.g., "NVDIMM 1". This parameter is required when `state` is set to `absent`, or `present` to reconfigure NVDIMM device size. When add a new device, please do not set `label`. |
| | **size\_mb** integer | **Default:**1024 | Virtual NVDIMM device size in MB. |
| | **state** string | **Choices:*** present
* absent
| Valid value is `present` or `absent`. If set to `absent`, then the NVDIMM device with specified `label` will be removed. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **resource\_pool** string | | Use the given resource pool for virtual machine operation. This parameter is case sensitive. Resource pool should be child of the selected host parent. When not specified *Resources* is taken as default value. |
| **snapshot\_src** string | | Name of the existing snapshot to use to create a clone of a virtual machine. This parameter is case sensitive. While creating linked clone using `linked_clone` parameter, this parameter is required. |
| **state** string | **Choices:*** absent
* poweredon
* powered-on
* poweredoff
* powered-off
* **present** β
* rebootguest
* reboot-guest
* restarted
* suspended
* shutdownguest
* shutdown-guest
| Specify the state the virtual machine should be in. If `state` is set to `present` and virtual machine exists, ensure the virtual machine configurations conforms to task arguments. If `state` is set to `absent` and virtual machine exists, then the specified virtual machine is removed with it's associated components. If `state` is set to one of the following `poweredon`, `powered-on`, `poweredoff`, `powered-off`, `present`, `restarted`, `suspended` and virtual machine does not exists, virtual machine is deployed with the given parameters. If `state` is set to `poweredon` or `powered-on` and virtual machine exists with powerstate other than powered on, then the specified virtual machine is powered on. If `state` is set to `poweredoff` or `powered-off` and virtual machine exists with powerstate other than powered off, then the specified virtual machine is powered off. If `state` is set to `restarted` and virtual machine exists, then the virtual machine is restarted. If `state` is set to `suspended` and virtual machine exists, then the virtual machine is set to suspended mode. If `state` is set to `shutdownguest` or `shutdown-guest` and virtual machine exists, then the virtual machine is shutdown. If `state` is set to `rebootguest` or `reboot-guest` and virtual machine exists, then the virtual machine is rebooted. Powerstate `powered-on` and `powered-off` is added in version 2.10. |
| **state\_change\_timeout** integer | **Default:**0 | If the `state` is set to `shutdownguest`, by default the module will return immediately after sending the shutdown signal. If this argument is set to a positive integer, the module will instead wait for the virtual machine to reach the poweredoff state. The value sets a timeout in seconds for the module to wait for the state change. |
| **template** string | | Template or existing virtual machine used to create new virtual machine. If this value is not set, virtual machine is created without using a template. If the virtual machine already exists, this parameter will be ignored. This parameter is case sensitive. From version 2.8 onwards, absolute path to virtual machine or template can be used.
aliases: template\_src |
| **use\_instance\_uuid** boolean | **Choices:*** **no** β
* yes
| Whether to use the VMware instance UUID rather than the BIOS UUID. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **uuid** string | | UUID of the virtual machine to manage if known, this is VMware's unique identifier. This is required if `name` is not supplied. If virtual machine does not exists, then this parameter is ignored. Please note that a supplied UUID will be ignored on virtual machine creation, as VMware 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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
| **vapp\_properties** list / elements=dictionary | | A list of vApp properties. For full list of attributes and types refer to: <https://code.vmware.com/apis/704/vsphere/vim.vApp.PropertyInfo.html>
|
| | **id** string | | Property ID. Required per entry. |
| | **operation** string | | The `remove` attribute is required only when removing properties. |
| | **type** string | | Value type, string type by default. |
| | **value** string | | Property value. |
| **wait\_for\_customization** boolean | **Choices:*** **no** β
* yes
| Wait until vCenter detects all guest customizations as successfully completed. When enabled, the VM will automatically be powered on. If vCenter does not detect guest customization start or succeed, failed events after time `wait_for_customization_timeout` parameter specified, warning message will be printed and task result is fail. |
| **wait\_for\_customization\_timeout** integer | **Default:**"3600" | Define a timeout (in seconds) for the wait\_for\_customization parameter. Be careful when setting this value since the time guest customization took may differ among guest OSes. |
| **wait\_for\_ip\_address** boolean | **Choices:*** **no** β
* yes
| Wait until vCenter detects an IP address for the virtual machine. This requires vmware-tools (vmtoolsd) to properly work after creation. vmware-tools needs to be installed on the given virtual machine in order to work with this parameter. |
| **wait\_for\_ip\_address\_timeout** integer | **Default:**"300" | Define a timeout (in seconds) for the wait\_for\_ip\_address parameter. |
Notes
-----
Note
* Please make sure that the user used for [community.vmware.vmware\_guest](#ansible-collections-community-vmware-vmware-guest-module) has the correct level of privileges.
* For example, following is the list of minimum privileges required by users to create virtual machines.
* DataStore > Allocate Space
* Virtual Machine > Configuration > Add New Disk
* Virtual Machine > Configuration > Add or Remove Device
* Virtual Machine > Inventory > Create New
* Network > Assign Network
* Resource > Assign Virtual Machine to Resource Pool
* Module may require additional privileges as well, which may be required for gathering facts - e.g. ESXi configurations.
* Tested on vSphere 5.5, 6.0, 6.5 and 6.7.
* Use SCSI disks instead of IDE when you want to expand online disks by specifying a SCSI controller.
* Uses SysPrep for Windows VM (depends on βguest\_idβ parameter match βwinβ) with PyVmomi.
* In order to change the VMβs parameters (e.g. number of CPUs), the VM must be powered off unless the hot-add support is enabled and the `state=present` must be used to apply the changes.
* For additional information please visit Ansible VMware community wiki - <https://github.com/ansible/community/wiki/VMware>.
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Create a virtual machine on given ESXi hostname
community.vmware.vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
folder: /DC1/vm/
name: test_vm_0001
state: poweredon
guest_id: centos64Guest
# This is hostname of particular ESXi server on which user wants VM to be deployed
esxi_hostname: "{{ esxi_hostname }}"
disk:
- size_gb: 10
type: thin
datastore: datastore1
hardware:
memory_mb: 512
num_cpus: 4
scsi: paravirtual
networks:
- name: VM Network
mac: aa:bb:dd:aa:00:14
ip: 10.10.10.100
netmask: 255.255.255.0
device_type: vmxnet3
wait_for_ip_address: true
wait_for_ip_address_timeout: 600
delegate_to: localhost
register: deploy_vm
- name: Create a virtual machine from a template
community.vmware.vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
folder: /testvms
name: testvm_2
state: poweredon
template: template_el7
disk:
- size_gb: 10
type: thin
datastore: g73_datastore
# Add another disk from an existing VMDK
- filename: "[datastore1] testvms/testvm_2_1/testvm_2_1.vmdk"
hardware:
memory_mb: 512
num_cpus: 6
num_cpu_cores_per_socket: 3
scsi: paravirtual
memory_reservation_lock: True
mem_limit: 8096
mem_reservation: 4096
cpu_limit: 8096
cpu_reservation: 4096
max_connections: 5
hotadd_cpu: True
hotremove_cpu: True
hotadd_memory: False
version: 12 # Hardware version of virtual machine
boot_firmware: "efi"
cdrom:
- controller_number: 0
unit_number: 0
state: present
type: iso
iso_path: "[datastore1] livecd.iso"
networks:
- name: VM Network
mac: aa:bb:dd:aa:00:14
wait_for_ip_address: true
delegate_to: localhost
register: deploy
- name: Clone a virtual machine from Windows template and customize
community.vmware.vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: datacenter1
cluster: cluster
name: testvm-2
template: template_windows
networks:
- name: VM Network
ip: 192.168.1.100
netmask: 255.255.255.0
gateway: 192.168.1.1
mac: aa:bb:dd:aa:00:14
domain: my_domain
dns_servers:
- 192.168.1.1
- 192.168.1.2
- vlan: 1234
type: dhcp
customization:
autologon: true
dns_servers:
- 192.168.1.1
- 192.168.1.2
domain: my_domain
password: new_vm_password
runonce:
- powershell.exe -ExecutionPolicy Unrestricted -File C:\Windows\Temp\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert -EnableCredSSP
delegate_to: localhost
- name: Clone a virtual machine from Linux template and customize
community.vmware.vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter }}"
state: present
folder: /DC1/vm
template: "{{ template }}"
name: "{{ vm_name }}"
cluster: DC1_C1
networks:
- name: VM Network
ip: 192.168.10.11
netmask: 255.255.255.0
wait_for_ip_address: True
customization:
domain: "{{ guest_domain }}"
dns_servers:
- 8.9.9.9
- 7.8.8.9
dns_suffix:
- example.com
- example2.com
delegate_to: localhost
- name: Rename a virtual machine (requires the virtual machine's uuid)
community.vmware.vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
uuid: "{{ vm_uuid }}"
name: new_name
state: present
delegate_to: localhost
- name: Remove a virtual machine by uuid
community.vmware.vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
uuid: "{{ vm_uuid }}"
state: absent
delegate_to: localhost
- name: Remove a virtual machine from inventory
community.vmware.vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
name: vm_name
delete_from_inventory: True
state: absent
delegate_to: localhost
- name: Manipulate vApp properties
community.vmware.vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
name: vm_name
state: present
vapp_properties:
- id: remoteIP
category: Backup
label: Backup server IP
type: string
value: 10.10.10.1
- id: old_property
operation: remove
delegate_to: localhost
- name: Set powerstate of a virtual machine to poweroff by using UUID
community.vmware.vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
uuid: "{{ vm_uuid }}"
state: poweredoff
delegate_to: localhost
- name: Deploy a virtual machine in a datastore different from the datastore of the template
community.vmware.vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
name: "{{ vm_name }}"
state: present
template: "{{ template_name }}"
# Here datastore can be different which holds template
datastore: "{{ virtual_machine_datastore }}"
hardware:
memory_mb: 512
num_cpus: 2
scsi: paravirtual
delegate_to: localhost
- name: Create a diskless VM
community.vmware.vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ dc1 }}"
state: poweredoff
cluster: "{{ ccr1 }}"
name: diskless_vm
folder: /Asia-Datacenter1/vm
guest_id: centos64Guest
datastore: "{{ ds1 }}"
hardware:
memory_mb: 1024
num_cpus: 2
num_cpu_cores_per_socket: 1
- name: Create a VM with multiple disks of different disk controller types
community.vmware.vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
folder: /DC1/vm/
name: test_vm_multi_disks
state: poweredoff
guest_id: centos64Guest
datastore: datastore1
disk:
- size_gb: 10
controller_type: 'nvme'
controller_number: 0
unit_number: 0
- size_gb: 10
controller_type: 'paravirtual'
controller_number: 0
unit_number: 1
- size_gb: 10
controller_type: 'sata'
controller_number: 0
unit_number: 2
hardware:
memory_mb: 512
num_cpus: 4
version: 14
networks:
- name: VM Network
device_type: vmxnet3
delegate_to: localhost
register: deploy_vm
- name: Create a VM with NVDIMM device
community.vmware.vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
folder: /DC1/vm/
name: test_vm_nvdimm
state: poweredoff
guest_id: centos7_64Guest
datastore: datastore1
hardware:
memory_mb: 512
num_cpus: 4
version: 14
networks:
- name: VM Network
device_type: vmxnet3
nvdimm:
state: present
size_mb: 2048
delegate_to: localhost
register: deploy_vm
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **instance** dictionary | always | metadata about the new virtual machine **Sample:** None |
### Authors
* Loic Blot (@nerzhul) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#c0acafa9a3e6e3f4f6fba2acafb4e6e3f3f7fbe6e3f5f2fbe6e3f4f8fbb5aea9b8eda5b8b0a5b2a9a5aea3a5e6e3f4f6fba6b2)>
* Philippe Dellaert (@pdellaert) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#dbabb3b2b7b2ababbefdf8e8ece0fdf8eee9e0fdf8efe3e0bfbeb7b7babea9affdf8efede0b4a9bc)>
* Abhijeet Kasurde (@Akasurde) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#75141e140600071110535646424e535640474e5356414d4e0710111d1401535641434e161a18)>
| programming_docs |
ansible community.vmware.vmware_host_firewall_facts β Gathers facts about an ESXi hostβs firewall configuration information community.vmware.vmware\_host\_firewall\_facts β Gathers facts about an ESXi hostβs firewall configuration information
======================================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_firewall_facts`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)
DEPRECATED
----------
Removed in
major release after 2021-12-01
Why
Deprecated in favour of [community.vmware.vmware\_host\_firewall\_info](vmware_host_firewall_info_module#ansible-collections-community-vmware-vmware-host-firewall-info-module) module.
Alternative
Use [community.vmware.vmware\_host\_firewall\_info](vmware_host_firewall_info_module#ansible-collections-community-vmware-vmware-host-firewall-info-module) instead.
Synopsis
--------
* This module can be used to gather facts about an ESXi hostβs firewall configuration information when ESXi hostname or Cluster name is given.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of the cluster from which the ESXi host belong to. If `esxi_hostname` is not given, this parameter is required. |
| **esxi\_hostname** string | | ESXi hostname to gather facts from. If `cluster_name` is not given, this parameter is required. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather firewall facts about all ESXi Host in given Cluster
community.vmware.vmware_host_firewall_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: cluster_name
delegate_to: localhost
- name: Gather firewall facts about ESXi Host
community.vmware.vmware_host_firewall_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
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 |
| --- | --- | --- |
| **hosts\_firewall\_facts** dictionary | on success | metadata about host's firewall configuration **Sample:** {'esxi\_hostname\_0001': [{'allowed\_hosts': {'all\_ip': True, 'ip\_address': ['10.10.10.1'], 'ip\_network': ['11.111.112.0/22', '192.168.10.1/24']}, 'enabled': True, 'key': 'CIMHttpServer', 'rule': [{'direction': 'inbound', 'end\_port': None, 'port': 5988, 'port\_type': 'dst', 'protocol': 'tcp'}], 'service': 'sfcbd-watchdog'}]} |
Status
------
* This module will be removed in a major release after 2021-12-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_guest_disk_info β Gather info about disks of given virtual machine community.vmware.vmware\_guest\_disk\_info β Gather info about disks of given virtual machine
=============================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_guest_disk_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 disks belonging to given virtual machine.
* All parameters and VMware object names are case sensitive.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **datacenter** string / required | | The datacenter name to which virtual machine belongs to. |
| **folder** string | | Destination folder, absolute or relative path to find an existing guest. This is required parameter, only if multiple VMs are found with same name. The folder should include the datacenter. ESX's datacenter is ha-datacenter Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2 |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **moid** string | | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if `name` or `uuid` is not supplied. |
| **name** string | | Name of the virtual machine. This is required parameter, if parameter `uuid` or `moid` is not supplied. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **use\_instance\_uuid** boolean | **Choices:*** **no** β
* yes
| Whether to use the VMware instance UUID rather than the BIOS UUID. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **uuid** string | | UUID of the instance to gather information if known, this is VMware's unique identifier. This is required parameter, if parameter `name` or `moid` is not supplied. |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.0 and 6.5.
* Disk UUID information is added in version 2.8.
* Additional information about guest disk backings added in version 2.8.
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather disk info from virtual machine using UUID
community.vmware.vmware_guest_disk_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: ha-datacenter
uuid: 421e4592-c069-924d-ce20-7e7533fab926
delegate_to: localhost
register: disk_info
- name: Gather disk info from virtual machine using name
community.vmware.vmware_guest_disk_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: ha-datacenter
name: VM_225
delegate_to: localhost
register: disk_info
- name: Gather disk info from virtual machine using moid
community.vmware.vmware_guest_disk_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: ha-datacenter
moid: vm-42
delegate_to: localhost
register: disk_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 |
| --- | --- | --- |
| **guest\_disk\_info** dictionary | always | metadata about the virtual machine's disks **Sample:** {'0': {'backing\_datastore': 'datastore2', 'backing\_disk\_mode': 'persistent', 'backing\_diskmode': 'persistent', 'backing\_eagerlyscrub': False, 'backing\_filename': '[datastore2] VM\_225/VM\_225.vmdk', 'backing\_thinprovisioned': False, 'backing\_type': 'FlatVer2', 'backing\_uuid': '200C3A00-f82a-97af-02ff-62a595f0020a', 'backing\_writethrough': False, 'capacity\_in\_bytes': 10485760, 'capacity\_in\_kb': 10240, 'controller\_bus\_number': 0, 'controller\_key': 1000, 'controller\_type': 'paravirtual', 'key': 2000, 'label': 'Hard disk 1', 'summary': '10,240 KB', 'unit\_number': 0}, '1': {'backing\_datastore': 'datastore3', 'backing\_devicename': 'vml.012345678901234567890123456789012345678901234567890123', 'backing\_disk\_mode': 'independent\_persistent', 'backing\_diskmode': 'independent\_persistent', 'backing\_filename': '[datastore3] VM\_226/VM\_226.vmdk', 'backing\_lunuuid': '012345678901234567890123456789012345678901234567890123', 'backing\_type': 'RawDiskMappingVer1', 'backing\_uuid': None, 'capacity\_in\_bytes': 15728640, 'capacity\_in\_kb': 15360, 'controller\_bus\_number': 0, 'controller\_key': 1000, 'controller\_type': 'paravirtual', 'key': 2001, 'label': 'Hard disk 3', 'summary': '15,360 KB', 'unit\_number': 1}} |
### Authors
* Abhijeet Kasurde (@Akasurde) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#ccada7adbfb9bea8a9eaeffffbf7eaeff9fef7eaeff8f4f7bea9a8a4adb8eaeff8faf7afa3a1)>
ansible community.vmware.vmware_guest_custom_attribute_defs β Manage custom attributes definitions for virtual machine from VMware community.vmware.vmware\_guest\_custom\_attribute\_defs β Manage custom attributes definitions for virtual machine from VMware
==============================================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_guest_custom_attribute_defs`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to add and remove custom attributes definitions for the given virtual machine from VMware.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **attribute\_key** string | | Name of the custom attribute definition. This is required parameter, if `state` is set to `present` or `absent`. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **present** β
* absent
| Manage definition of custom attributes. If set to `present` and definition not present, then custom attribute definition is created. If set to `present` and definition is present, then no action taken. If set to `absent` and definition is present, then custom attribute definition is removed. If set to `absent` and definition is absent, then no action taken. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Add VMware Attribute Definition
community.vmware.vmware_guest_custom_attribute_defs:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
state: present
attribute_key: custom_attr_def_1
delegate_to: localhost
register: defs
- name: Remove VMware Attribute Definition
community.vmware.vmware_guest_custom_attribute_defs:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
state: absent
attribute_key: custom_attr_def_1
delegate_to: localhost
register: defs
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **custom\_attribute\_defs** list / elements=string | always | list of all current attribute definitions **Sample:** ['sample\_5', 'sample\_4'] |
### Authors
* Jimmy Conner (@cigamit)
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_tools β Execute tasks inside a VM via VMware Tools community.vmware.vmware\_tools β Execute tasks inside a VM via VMware Tools
===========================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_tools`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
Synopsis
--------
* Use VMware tools to run tasks in, or put/fetch files to guest operating systems running in VMware infrastructure.
* In case of Windows VMs, set `ansible_shell_type` to `powershell`.
* Does not work with βbecomeβ.
Requirements
------------
The below requirements are needed on the local controller node that executes this connection.
* pyvmomi (Python library)
* requests (Python library)
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **exec\_command\_sleep\_interval** float | **Default:**0.5 | var: ansible\_vmware\_tools\_exec\_command\_sleep\_interval | Time in seconds to sleep between execution of command. |
| **executable** string | **Default:**"/bin/sh" | ini entries: [defaults]executable = /bin/sh env:ANSIBLE\_EXECUTABLE var: ansible\_executable var: ansible\_vmware\_tools\_executable | shell to use for execution inside container |
| **file\_chunk\_size** integer | **Default:**128 | var: ansible\_vmware\_tools\_file\_chunk\_size | File chunk size. (Applicable when writing a file to disk, example: using the `fetch` module.) |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| env:VMWARE\_VALIDATE\_CERTS var: ansible\_vmware\_validate\_certs | Verify SSL for the connection. Note: This will validate certs for both `vmware_host` and the ESXi host running the VM. |
| **vm\_password** string / required | | var: ansible\_password var: ansible\_vmware\_tools\_password | Password for the user in guest operating system. |
| **vm\_path** string / required | | var: ansible\_vmware\_guest\_path | VM path absolute to the connection. vCenter Example: `Datacenter/vm/Discovered virtual machine/testVM`. ESXi Host Example: `ha-datacenter/vm/testVM`. Must include VM name, appended to 'folder' as would be passed to [community.vmware.vmware\_guest](vmware_guest_module). Needs to include *vm* between the Datacenter and the rest of the VM path. Datacenter default value for ESXi server is `ha-datacenter`. Folder *vm* is not visible in the vSphere Web Client but necessary for VMware API to work. |
| **vm\_user** string / required | | var: ansible\_user var: ansible\_vmware\_tools\_user | VM username. |
| **vmware\_host** string / required | | env:VI\_SERVER env:VMWARE\_HOST var: ansible\_host var: ansible\_vmware\_host | FQDN or IP Address for the connection (vCenter or ESXi Host). |
| **vmware\_password** string / required | | env:VI\_PASSWORD env:VMWARE\_PASSWORD var: ansible\_vmware\_password | Password for the connection. |
| **vmware\_port** string | **Default:**443 | env:VI\_PORTNUMBER env:VMWARE\_PORT var: ansible\_port var: ansible\_vmware\_port | Port for the connection. |
| **vmware\_user** string / required | | env:VI\_USERNAME env:VMWARE\_USER var: ansible\_vmware\_user | Username for the connection. Requires the following permissions on the VM: - VirtualMachine.GuestOperations.Execute - VirtualMachine.GuestOperations.Modify - VirtualMachine.GuestOperations.Query |
### Authors
* Deric Crago <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#ec88899e858fcacfd8dad78f9e8d8b83cacfdfdbd7cacfd9ded7cacfd8d4d78b818d8580cacfd8dad78f8381)>
| programming_docs |
ansible community.vmware.vmware_host_dns_facts β Gathers facts about an ESXi hostβs DNS configuration information community.vmware.vmware\_host\_dns\_facts β Gathers facts about an ESXi hostβs DNS configuration information
============================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_dns_facts`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)
DEPRECATED
----------
Removed in
major release after 2021-12-01
Why
Deprecated in favour of [community.vmware.vmware\_host\_dns\_info](vmware_host_dns_info_module#ansible-collections-community-vmware-vmware-host-dns-info-module) module.
Alternative
Use [community.vmware.vmware\_host\_dns\_info](vmware_host_dns_info_module#ansible-collections-community-vmware-vmware-host-dns-info-module) instead.
Synopsis
--------
* This module can be used to gather facts about an ESXi hostβs DNS configuration information when ESXi hostname or Cluster name is given.
* All parameters and VMware object names are case sensitive.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of the cluster from which the ESXi host belong to. If `esxi_hostname` is not given, this parameter is required. |
| **esxi\_hostname** string | | ESXi hostname to gather facts from. If `cluster_name` is not given, this parameter is required. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather DNS facts about all ESXi Hosts in given Cluster
community.vmware.vmware_host_dns_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: cluster_name
delegate_to: localhost
- name: Gather DNS facts about ESXi Host
community.vmware.vmware_host_dns_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
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 |
| --- | --- | --- |
| **hosts\_dns\_facts** dictionary | always | metadata about DNS config from given cluster / host system **Sample:** {'DC0\_C0\_H0': {'dhcp': True, 'domain\_name': 'localdomain', 'host\_name': 'localhost', 'ip\_address': ['8.8.8.8'], 'search\_domain': ['localdomain'], 'virtual\_nic\_device': 'vmk0'}} |
Status
------
* This module will be removed in a major release after 2021-12-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_host_hyperthreading β Enables/Disables Hyperthreading optimization for an ESXi host system community.vmware.vmware\_host\_hyperthreading β Enables/Disables Hyperthreading optimization for an ESXi host system
====================================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_hyperthreading`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to enable or disable Hyperthreading optimization for ESXi host systems in given vCenter infrastructure.
* It also checks if Hyperthreading is activated/deactivated and if the host needs to be restarted.
* The module informs the user if Hyperthreading is enabled but inactive because the processor is vulnerable to L1 Terminal Fault (L1TF).
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of the cluster from which all host systems will be used. This parameter is required if `esxi_hostname` is not specified. |
| **esxi\_hostname** string | | Name of the host system to work with. This parameter is required if `cluster_name` is not specified. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **enabled** β
* disabled
| Enable or disable Hyperthreading. You need to reboot the ESXi host if you change the configuration. Make sure that Hyperthreading is enabled in the BIOS. Otherwise, it will be enabled, but never activated. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Enable Hyperthreading for an host system
community.vmware.vmware_host_hyperthreading:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
state: enabled
delegate_to: localhost
- name: Disable Hyperthreading for an host system
community.vmware.vmware_host_hyperthreading:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
state: disabled
delegate_to: localhost
- name: Disable Hyperthreading for all host systems from cluster
community.vmware.vmware_host_hyperthreading:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: '{{ cluster_name }}'
state: disabled
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 |
| --- | --- | --- |
| **results** dictionary | always | metadata about host system's Hyperthreading configuration **Sample:** {'esxi01': {'msg': "Hyperthreading is already enabled and active for host 'esxi01'", 'state': 'enabled', 'state\_current': 'active'}} |
### Authors
* Christian Kotte (@ckotte)
ansible community.vmware.vmware_datacenter_info β Gather information about VMware vSphere Datacenters community.vmware.vmware\_datacenter\_info β Gather information about VMware vSphere Datacenters
===============================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_datacenter_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to gather information VMware vSphere Datacenters.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **datacenter** string | | The name of the datacenter to gather information for. If not provided, will gather information about all datacenters from the VMware infra.
aliases: datacenter\_name |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **properties** list / elements=string | | Specify the properties to retrieve. If not specified, all properties are retrieved (deeply). Results are returned in a structure identical to the vSphere API. Example: properties: [ "overallStatus" ] Only valid when `schema` is `vsphere`. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **schema** string | **Choices:*** **summary** β
* vsphere
| Specify the output schema desired. The 'summary' output schema is the legacy output from the module. The 'vsphere' output schema is the vSphere API class definition which requires pyvmomi>6.7.1. |
| **show\_tag** boolean | **Choices:*** **no** β
* yes
| Tags related to Datacenter are shown if set to `True`. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather information about all datacenters
community.vmware.vmware_datacenter_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
delegate_to: localhost
- name: Gather information about a particular datacenter
community.vmware.vmware_datacenter_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter: '{{ datacenter_name }}'
delegate_to: localhost
- name: Gather information about a particular datacenter
community.vmware.vmware_datacenter_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter: '{{ datacenter_name }}'
show_tag: True
delegate_to: localhost
- name: Gather vSphere schema information
community.vmware.vmware_datacenter_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter: '{{ datacenter_name }}'
schema: vsphere
properties:
- configStatus
- overallStatus
```
Return Values
-------------
Common return 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\_info** list / elements=string | always | Information about datacenter **Sample:** [{'configStatus': 'gray', 'moid': 'datacenter-2', 'name': 'Asia-Datacenter1'}] |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_dvswitch_info β Gathers info dvswitch configurations community.vmware.vmware\_dvswitch\_info β Gathers info dvswitch configurations
==============================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_dvswitch_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 dvswitch configurations.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **folder** string | | Specify a folder location of dvswitch to gather information from. Examples: folder: /datacenter1/network folder: datacenter1/network folder: /datacenter1/network/folder1 folder: datacenter1/network/folder1 folder: /folder1/datacenter1/network folder: folder1/datacenter1/network folder: /folder1/datacenter1/network/folder2 |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **properties** list / elements=string | | Specify the properties to retrieve. If not specified, all properties are retrieved (deeply). Results are returned in a structure identical to the vsphere API. Example: properties: [ "summary.name", "summary.numPorts", "config.maxMtu", "overallStatus" ] Only valid when `schema` is `vsphere`. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **schema** string | **Choices:*** **summary** β
* vsphere
| Specify the output schema desired. The 'summary' output schema is the legacy output from the module The 'vsphere' output schema is the vSphere API class definition which requires pyvmomi>6.7.1 |
| **switch\_name** string | | Name of a dvswitch to look for. If `switch_name` not specified gather all dvswitch information.
aliases: switch, dvswitch |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather all registered dvswitch
community.vmware.vmware_dvswitch_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
delegate_to: localhost
register: dvswitch_info
- name: Gather info about specific dvswitch
community.vmware.vmware_dvswitch_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
switch_name: DVSwitch01
delegate_to: localhost
register: dvswitch_info
- name: Gather info from folder about specific dvswitch
community.vmware.vmware_dvswitch_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
folder: /datacenter1/network/F01
switch_name: DVSwitch02
delegate_to: localhost
register: dvswitch_info
- name: Gather some info from a dvswitch using the vSphere API output schema
community.vmware.vmware_dvswitch_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
schema: vsphere
properties:
- summary.name
- summary.numPorts
- config.maxMtu
- overallStatus
switch_name: DVSwitch01
register: dvswitch_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 |
| --- | --- | --- |
| **distributed\_virtual\_switches** list / elements=string | always | list of dictionary of dvswitch and their information **Sample:** [{'configure': {'folder': 'network', 'hosts': ['esxi-test-02.local', 'esxi-test-01.local'], 'settings': {'healthCheck': {'TeamingHealthCheckConfig': False, 'VlanMtuHealthCheckConfig': False}, 'netflow': {'activeFlowTimeout': 60, 'collectorIpAddress': '', 'collectorPort': 0, 'idleFlowTimeout': 15, 'internalFlowsOnly': False, 'observationDomainId': 0, 'samplingRate': 0, 'switchIpAddress': None}, 'privateVlan': [], 'properties': {'administratorContact': {'contact': None, 'name': None}, 'advanced': {'maxMtu': 1500, 'multicastFilteringMode': 'legacyFiltering'}, 'discoveryProtocol': {'operation': 'listen', 'protocol': 'cdp'}, 'general': {'ioControl': True, 'name': 'DVSwitch01', 'numPorts': 10, 'numUplinks': 1, 'vendor': 'VMware, Inc.', 'version': '6.6.0'}}}}, 'uuid': '50 30 99 9c a7 60 8a 4f-05 9f e7 b5 da df 8f 17'}] |
### Authors
* sky-joker (@sky-joker)
| programming_docs |
ansible community.vmware.vmware_datastore_cluster β Manage VMware vSphere datastore clusters community.vmware.vmware\_datastore\_cluster β Manage VMware vSphere datastore clusters
======================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_datastore_cluster`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to add and delete datastore cluster in given VMware environment.
* All parameters and VMware object values are case sensitive.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **automation\_level** string | **Choices:*** automated
* **manual** β
| Run SDRS automated or manually. |
| **datacenter\_name** string | | The name of the datacenter. You must specify either a `datacenter_name` or a `folder`. Mutually exclusive with `folder` parameter.
aliases: datacenter |
| **datastore\_cluster\_name** string / required | | The name of the datastore cluster. |
| **enable\_io\_loadbalance** boolean | **Choices:*** **no** β
* yes
| Whether or not storage DRS takes into account storage I/O workload when making load balancing and initial placement recommendations. |
| **enable\_sdrs** boolean | **Choices:*** **no** β
* yes
| Whether or not storage DRS is enabled. |
| **folder** string | | Destination folder, absolute path to place datastore cluster in. The folder should include the datacenter. This parameter is case sensitive. You must specify either a `folder` or a `datacenter_name`. Examples: folder: /datacenter1/datastore folder: datacenter1/datastore folder: /datacenter1/datastore/folder1 folder: datacenter1/datastore/folder1 folder: /folder1/datacenter1/datastore folder: folder1/datacenter1/datastore folder: /folder1/datacenter1/datastore/folder2 |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **keep\_vmdks\_together** boolean | **Choices:*** no
* **yes** β
| Specifies whether or not each VM in this datastore cluster should have its virtual disks on the same datastore by default. |
| **loadbalance\_interval** integer | **Default:**480 | Specify the interval in minutes that storage DRS runs to load balance among datastores. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **present** β
* absent
| If the datastore cluster should be present or absent. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.0, 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Create datastore cluster and enable SDRS
community.vmware.vmware_datastore_cluster:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: '{{ datacenter_name }}'
datastore_cluster_name: '{{ datastore_cluster_name }}'
enable_sdrs: True
state: present
delegate_to: localhost
- name: Create datastore cluster using folder
community.vmware.vmware_datastore_cluster:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
folder: '/{{ datacenter_name }}/datastore/ds_folder'
datastore_cluster_name: '{{ datastore_cluster_name }}'
state: present
delegate_to: localhost
- name: Delete datastore cluster
community.vmware.vmware_datastore_cluster:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: '{{ datacenter_name }}'
datastore_cluster_name: '{{ datastore_cluster_name }}'
state: absent
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 |
| --- | --- | --- |
| **result** string | always | information about datastore cluster operation **Sample:** Datastore cluster 'DSC2' created successfully. |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_drs_group_manager β Manage VMs and Hosts in DRS group. community.vmware.vmware\_drs\_group\_manager β Manage VMs and Hosts in DRS group.
=================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_drs_group_manager`.
New in version 1.7.0: of community.vmware
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* The module can be used to add VMs / Hosts to or remove them from a DRS group.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster** string / required | | Cluster to which DRS group associated with.
aliases: cluster\_name |
| **datacenter** string | | Name of the datacenter.
aliases: datacenter\_name |
| **group\_name** string / required | | The name of the group to manage. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **hosts** list / elements=string | | A List of hosts to add / remove in the group. Required only if *vms* is not set. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **present** β
* absent
| If set to `present`, VMs/hosts will be added to the given DRS group. If set to `absent`, VMs/hosts will be removed from the given DRS group. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
| **vms** list / elements=string | | A List of vms to add / remove in the group. Required only if *hosts* is not set. |
Notes
-----
Note
* Tested on vSphere 6.5, and 6.7.
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
---
- name: Add VMs in an existing DRS VM group
delegate_to: localhost
community.vmware.vmware_drs_group_manager:
hostname: "{{ vcenter_hostname }}"
password: "{{ vcenter_password }}"
username: "{{ vcenter_username }}"
cluster: DC0_C0
datacenter: DC0
group_name: TEST_VM_01
vms:
- DC0_C0_RP0_VM0
- DC0_C0_RP0_VM1
state: present
- name: Add Hosts in an existing DRS Host group
delegate_to: localhost
community.vmware.vmware_drs_group_manager:
hostname: "{{ vcenter_hostname }}"
password: "{{ vcenter_password }}"
username: "{{ vcenter_username }}"
cluster: DC0_C0
datacenter: DC0
group_name: TEST_HOST_01
hosts:
- DC0_C0_H0
- DC0_C0_H1
- DC0_C0_H2
state: present
- name: Remove VM from an existing DRS VM group
delegate_to: localhost
community.vmware.vmware_drs_group_manager:
hostname: "{{ vcenter_hostname }}"
password: "{{ vcenter_password }}"
username: "{{ vcenter_username }}"
cluster: DC0_C0
datacenter: DC0
group_name: TEST_VM_01
vms:
- DC0_C0_RP0_VM0
state: absent
- name: Remove host from an existing DRS Host group
delegate_to: localhost
community.vmware.vmware_drs_group_manager:
hostname: "{{ vcenter_hostname }}"
password: "{{ vcenter_password }}"
username: "{{ vcenter_username }}"
cluster: DC0_C0
datacenter: DC0
group_name: TEST_HOST_01
hosts:
- DC0_C0_H0
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 |
| --- | --- | --- |
| **drs\_group\_member\_info** dictionary | always | Metadata about DRS group **Sample:** {'Asia-Cluster1': [{'group\_name': 'vm\_group\_002', 'type': 'vm', 'vms': ['dev-1']}]} |
| **msg** string | always | Info message **Sample:** Updated host group TEST\_HOST\_01 successfully |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_guest_boot_manager β Manage boot options for the given virtual machine community.vmware.vmware\_guest\_boot\_manager β Manage boot options for the given virtual machine
=================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_guest_boot_manager`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to manage boot options for the given virtual machine.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **boot\_delay** integer | **Default:**0 | Delay in milliseconds before starting the boot sequence. |
| **boot\_firmware** string | **Choices:*** bios
* efi
| Choose which firmware should be used to boot the virtual machine. |
| **boot\_order** list / elements=string | **Default:**[] | List of the boot devices. |
| **boot\_retry\_delay** integer | **Default:**0 | Specify the time in milliseconds between virtual machine boot failure and subsequent attempt to boot again. If set, will automatically set `boot_retry_enabled` to `True` as this parameter is required. |
| **boot\_retry\_enabled** boolean | **Choices:*** **no** β
* yes
| If set to `True`, the virtual machine that fails to boot, will try to boot again after `boot_retry_delay` is expired. If set to `False`, the virtual machine waits indefinitely for user intervention. |
| **enter\_bios\_setup** boolean | **Choices:*** **no** β
* yes
| If set to `True`, the virtual machine automatically enters BIOS setup the next time it boots. The virtual machine resets this flag, so that the machine boots proceeds normally. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **moid** string | | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if `name` or `uuid` is not supplied. |
| **name** string | | Name of the VM to work with. This is required if `uuid` or `moid` parameter is not supplied. |
| **name\_match** string | **Choices:*** **first** β
* last
| If multiple virtual machines matching the name, use the first or last found. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **secure\_boot\_enabled** boolean | **Choices:*** **no** β
* yes
| Choose if EFI secure boot should be enabled. EFI secure boot can only be enabled with boot\_firmware = efi |
| **use\_instance\_uuid** boolean | **Choices:*** **no** β
* yes
| Whether to use the VMware instance UUID rather than the BIOS UUID. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **uuid** string | | UUID of the instance to manage if known, this is VMware's BIOS UUID by default. This is required if `name` or `moid` parameter is not supplied. |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Change virtual machine's boot order and related parameters
community.vmware.vmware_guest_boot_manager:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
name: testvm
boot_delay: 2000
enter_bios_setup: True
boot_retry_enabled: True
boot_retry_delay: 22300
boot_firmware: bios
secure_boot_enabled: False
boot_order:
- floppy
- cdrom
- ethernet
- disk
delegate_to: localhost
register: vm_boot_order
- name: Change virtual machine's boot order using Virtual Machine MoID
community.vmware.vmware_guest_boot_manager:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
moid: vm-42
boot_delay: 2000
enter_bios_setup: True
boot_retry_enabled: True
boot_retry_delay: 22300
boot_firmware: bios
secure_boot_enabled: False
boot_order:
- floppy
- cdrom
- ethernet
- disk
delegate_to: localhost
register: vm_boot_order
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vm\_boot\_status** dictionary | always | metadata about boot order of virtual machine **Sample:** {'current\_boot\_delay': 2000, 'current\_boot\_firmware': 'bios', 'current\_boot\_order': ['floppy', 'disk', 'ethernet', 'cdrom'], 'current\_boot\_retry\_delay': 22300, 'current\_boot\_retry\_enabled': True, 'current\_enter\_bios\_setup': True, 'current\_secure\_boot\_enabled': False, 'previous\_boot\_delay': 10, 'previous\_boot\_firmware': 'efi', 'previous\_boot\_order': ['ethernet', 'cdrom', 'floppy', 'disk'], 'previous\_boot\_retry\_delay': 10000, 'previous\_boot\_retry\_enabled': True, 'previous\_enter\_bios\_setup': False, 'previous\_secure\_boot\_enabled': True} |
### Authors
* Abhijeet Kasurde (@Akasurde) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#f39298928086819796d5d0c0c4c8d5d0c6c1c8d5d0c7cbc88196979b9287d5d0c7c5c8909c9e)>
| programming_docs |
ansible community.vmware.vmware_host_package_facts β Gathers facts about available packages on an ESXi host community.vmware.vmware\_host\_package\_facts β Gathers facts about available packages on an ESXi host
======================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_package_facts`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)
DEPRECATED
----------
Removed in
major release after 2021-12-01
Why
Deprecated in favour of [community.vmware.vmware\_host\_package\_info](vmware_host_package_info_module#ansible-collections-community-vmware-vmware-host-package-info-module) module.
Alternative
Use [community.vmware.vmware\_host\_package\_info](vmware_host_package_info_module#ansible-collections-community-vmware-vmware-host-package-info-module) instead.
Synopsis
--------
* This module can be used to gather facts about available packages and their status on an ESXi host.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_name** string | | Name of the cluster. Package facts about each ESXi server will be returned for given cluster. If `esxi_hostname` is not given, this parameter is required. |
| **esxi\_hostname** string | | ESXi hostname. Package facts about this ESXi server will be returned. If `cluster_name` is not given, this parameter is required. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather facts about all ESXi Host in given Cluster
community.vmware.vmware_host_package_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: cluster_name
delegate_to: localhost
register: cluster_host_packages
- name: Gather facts about ESXi Host
community.vmware.vmware_host_package_facts:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
delegate_to: localhost
register: host_packages
```
Return Values
-------------
Common return 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\_package\_facts** dictionary | hosts\_package\_facts | dict with hostname as key and dict with package facts as value **Sample:** {'hosts\_package\_facts': {'localhost.localdomain': []}} |
Status
------
* This module will be removed in a major release after 2021-12-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_dvswitch β Create or remove a Distributed Switch community.vmware.vmware\_dvswitch β Create or remove a Distributed Switch
=========================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_dvswitch`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to create, remove a Distributed Switch.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **contact** dictionary | | Dictionary which configures administrator contact name and description for the Distributed Switch. |
| | **description** string | | Description or other details. |
| | **name** string | | Administrator name. |
| **datacenter\_name** string | | The name of the datacenter that will contain the Distributed Switch. This parameter is optional, if `folder` is provided. Mutually exclusive with `folder` parameter.
aliases: datacenter |
| **description** string | | Description of the Distributed Switch. |
| **discovery\_operation** string | **Choices:*** both
* advertise
* **listen** β
| Select the discovery operation. Required parameter for `state` both `present` and `absent`, before Ansible 2.6 version. Required only if `state` is set to `present`, for Ansible 2.6 and onwards. |
| **discovery\_proto** string | **Choices:*** **cdp** β
* lldp
* disabled
| Link discovery protocol between Cisco and Link Layer discovery. Required parameter for `state` both `present` and `absent`, before Ansible 2.6 version. Required only if `state` is set to `present`, for Ansible 2.6 and onwards.
`cdp`: Use Cisco Discovery Protocol (CDP).
`lldp`: Use Link Layer Discovery Protocol (LLDP).
`disabled`: Do not use a discovery protocol.
aliases: discovery\_protocol |
| **folder** string | | Destination folder, absolute path to place dvswitch in. The folder should include the datacenter. This parameter is case sensitive. This parameter is optional, if `datacenter` is provided. Examples: folder: /datacenter1/network folder: datacenter1/network folder: /datacenter1/network/folder1 folder: datacenter1/network/folder1 folder: /folder1/datacenter1/network folder: folder1/datacenter1/network folder: /folder1/datacenter1/network/folder2 |
| **health\_check** dictionary | **Default:**{"teaming\_failover": false, "teaming\_failover\_interval": 0, "vlan\_mtu": false, "vlan\_mtu\_interval": 0} | Dictionary which configures Health Check for the Distributed Switch. |
| | **teaming\_failover** boolean | **Choices:*** **no** β
* yes
| Teaming and failover health check. |
| | **teaming\_failover\_interval** integer | **Default:**0 | Teaming and failover health check interval (minutes). The default value is 1 in the vSphere Client if the Teaming and failover health check is enabled. |
| | **vlan\_mtu** boolean | **Choices:*** **no** β
* yes
| VLAN and MTU health check. |
| | **vlan\_mtu\_interval** integer | **Default:**0 | VLAN and MTU health check interval (minutes). The default value is 1 in the vSphere Client if the VLAN and MTU health check is enabled. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **mtu** integer | **Default:**1500 | The switch maximum transmission unit. Required parameter for `state` both `present` and `absent`, before Ansible 2.6 version. Required only if `state` is set to `present`, for Ansible 2.6 and onwards. Accepts value between 1280 to 9000 (both inclusive). |
| **multicast\_filtering\_mode** string | **Choices:*** **basic** β
* snooping
| The multicast filtering mode.
`basic` mode: multicast traffic for virtual machines is forwarded according to the destination MAC address of the multicast group.
`snooping` mode: the Distributed Switch provides IGMP and MLD snooping according to RFC 4541. |
| **network\_policy** dictionary added in 1.11.0 of community.vmware | | Dictionary which configures the different default security values for portgroups. If set, these options are inherited by the portgroups of the DVS. |
| | **forged\_transmits** boolean | **Choices:*** **no** β
* yes
| Indicates whether forged transmits are allowed. |
| | **mac\_changes** boolean | **Choices:*** **no** β
* yes
| Indicates whether mac changes are allowed. |
| | **promiscuous** boolean | **Choices:*** **no** β
* yes
| Indicates whether promiscuous mode is allowed. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **state** string | **Choices:*** **present** β
* absent
| If set to `present` and the Distributed Switch does not exist, the Distributed Switch will be created. If set to `absent` and the Distributed Switch exists, the Distributed Switch will be deleted. |
| **switch\_name** string / required | | The name of the distribute vSwitch to create or remove.
aliases: switch, dvswitch |
| **switch\_version** string | | The version of the Distributed Switch to create. The version must match the version of the ESXi hosts you want to connect. The version of the vCenter server is used if not specified. Required only if `state` is set to `present`.
aliases: version |
| **uplink\_prefix** string | **Default:**"Uplink " | The prefix used for the naming of the uplinks. Only valid if the Distributed Switch will be created. Not used if the Distributed Switch is already present. Uplinks are created as Uplink 1, Uplink 2, etc. pp. by default. |
| **uplink\_quantity** integer | | Quantity of uplink per ESXi host added to the Distributed Switch. The uplink quantity can be increased or decreased, but a decrease will only be successfull if the uplink isn't used by a portgroup. Required parameter for `state` both `present` and `absent`, before Ansible 2.6 version. Required only if `state` is set to `present`, for Ansible 2.6 and onwards. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5, 6.7 and 7.0
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Create dvSwitch
community.vmware.vmware_dvswitch:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter: '{{ datacenter }}'
switch: dvSwitch
version: 6.0.0
mtu: 9000
uplink_quantity: 2
discovery_protocol: lldp
discovery_operation: both
state: present
delegate_to: localhost
- name: Create dvSwitch with all options
community.vmware.vmware_dvswitch:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter: '{{ datacenter }}'
switch: dvSwitch
version: 6.5.0
mtu: 9000
uplink_quantity: 2
uplink_prefix: 'Uplink_'
discovery_protocol: cdp
discovery_operation: both
multicast_filtering_mode: snooping
health_check:
vlan_mtu: true
vlan_mtu_interval: 1
teaming_failover: true
teaming_failover_interval: 1
state: present
delegate_to: localhost
- name: Delete dvSwitch
community.vmware.vmware_dvswitch:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter: '{{ datacenter }}'
switch: dvSwitch
state: absent
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 |
| --- | --- | --- |
| **result** string | always | information about performed operation **Sample:** {'changed': False, 'contact': None, 'contact\_details': None, 'description': None, 'discovery\_operation': 'both', 'discovery\_protocol': 'cdp', 'dvswitch': 'test', 'health\_check\_teaming': False, 'health\_check\_teaming\_interval': 0, 'health\_check\_vlan': False, 'health\_check\_vlan\_interval': 0, 'mtu': 9000, 'multicast\_filtering\_mode': 'basic', 'result': 'DVS already configured properly', 'uplink\_quantity': 2, 'uplinks': ['Uplink\_1', 'Uplink\_2'], 'version': '6.6.0'} |
### Authors
* Joseph Callen (@jcpowermac)
* Abhijeet Kasurde (@Akasurde)
* Christian Kotte (@ckotte)
ansible community.vmware.vmware_host_logbundle β Fetch logbundle file from ESXi community.vmware.vmware\_host\_logbundle β Fetch logbundle file from ESXi
=========================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_host_logbundle`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to fetch logbundle file from ESXi.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dest** string / required | | file destination on localhost, path must be exist. |
| **esxi\_hostname** string / required | | Name of the host system to fetch the logbundle. |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **manifests** list / elements=string | **Default:**["System:Base", "System:CoreDumps", "System:EsxImage", "System:IOFilter", "System:LoadESX", "System:Modules", "System:RDMA", "System:ResourceGroups", "System:TPM", "System:VFlash", "System:VMTools", "System:VmiofPlugins", "System:ntp", "System:uwstats", "Fcd:Catalog", "VirtualMachines:CoreDumps", "VirtualMachines:VirtualMachineStats", "VirtualMachines:base", "VirtualMachines:base", "VirtualMachines:diskinfo", "VirtualMachines:logs", "Storage:FCoE", "Storage:Multipathing", "Storage:NAS", "Storage:VSAN", "Storage:VSANHealth", "Storage:VSANIscsiTarget", "Storage:VSANPerfStats", "Storage:VSANPerfSvc", "Storage:VSANTraces", "Storage:VVOL", "Storage:base", "Storage:iodm", "Storage:iscsi", "FeatureStateSwitch:FeatureStateSwitch", "Userworld:HostAgent", "Userworld:ProcessInformation", "Configuration:System", "Logs:System", "hostProfiles:SystemImageCacheHostProfile", "hostProfiles:hostProfiles", "FileSystem:VMFSDiskDump", "FileSystem:base", "ActiveDirectory:base", "CIM:base", "Hardware:base", "Hardware:usb", "Installer:base", "Network:base", "Network:dvs", "Network:lacp", "Network:nscd", "Network:tcpip", "IntegrityChecks:md5sums"] | Logs to include in the logbundle file. Refer to the id key of the [community.vmware.vmware\_host\_logbundle\_info](vmware_host_logbundle_info_module) module for values that can be specified in the manifest. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **performance\_data** dictionary | | Gather performance data for ESXi. |
| | **duration** integer | **Default:**300 | Duration for which performance data is gathered. |
| | **interval** integer | **Default:**5 | Interval for which performance data is gathered. |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: fetch logbundle file from ESXi
community.vmware.vmware_host_logbundle:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi_hostname }}"
dest: ./esxi-log.tgz
- name: fetch logbundle file from ESXi with manifests
community.vmware.vmware_host_logbundle:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi_hostname }}"
dest: ./esxi-log.tgz
manifests:
- System:Base
- VirtualMachines:VirtualMachineStats
```
Return Values
-------------
Common return 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 | on success | saved path of a logbundle file for ESXi **Sample:** {'changed': True, 'dest': './esxi-log.tgz', 'failed': False, 'gid': 0, 'group': 'root', 'mode': '0644', 'owner': 'root', 'size': 25783140, 'state': 'file', 'uid': 0} |
### Authors
* sky-joker (@sky-joker)
| programming_docs |
ansible community.vmware.vmware_guest_boot_info β Gather info about boot options for the given virtual machine community.vmware.vmware\_guest\_boot\_info β Gather info about boot options for the given virtual machine
=========================================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_guest_boot_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather information about boot options for the given virtual machine.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **moid** string | | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if `name` or `uuid` is not supplied. |
| **name** string | | Name of the VM to work with. This is required if `uuid` or `moid` parameter is not supplied. |
| **name\_match** string | **Choices:*** **first** β
* last
| If multiple virtual machines matching the name, use the first or last found. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **use\_instance\_uuid** boolean | **Choices:*** **no** β
* yes
| Whether to use the VMware instance UUID rather than the BIOS UUID. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **uuid** string | | UUID of the instance to manage if known, this is VMware's BIOS UUID by default. This is required if `name` or `moid` parameter is not supplied. |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.5
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather info about virtual machine's boot order and related parameters
community.vmware.vmware_guest_boot_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
name: "{{ vm_name }}"
register: vm_boot_order_info
- name: Gather information about virtual machine's boot order using MoID
community.vmware.vmware_guest_boot_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
moid: "vm-42"
register: vm_moid_boot_order_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 |
| --- | --- | --- |
| **vm\_boot\_info** dictionary | always | metadata about boot order of virtual machine **Sample:** {'current\_boot\_delay': 2000, 'current\_boot\_firmware': 'bios', 'current\_boot\_order': ['floppy', 'disk', 'ethernet', 'cdrom'], 'current\_boot\_retry\_delay': 22300, 'current\_boot\_retry\_enabled': True, 'current\_enter\_bios\_setup': True, 'current\_secure\_boot\_enabled': False} |
### Authors
* Abhijeet Kasurde (@Akasurde)
ansible community.vmware.vmware_guest_disk_facts β Gather facts about disks of given virtual machine community.vmware.vmware\_guest\_disk\_facts β Gather facts about disks of given virtual machine
===============================================================================================
Note
This plugin is part of the [community.vmware collection](https://galaxy.ansible.com/community/vmware) (version 1.15.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install community.vmware`.
To use it in a playbook, specify: `community.vmware.vmware_guest_disk_facts`.
* [DEPRECATED](#deprecated)
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
* [Status](#status)
DEPRECATED
----------
Removed in
major release after 2021-12-01
Why
Deprecated in favour of [community.vmware.vmware\_guest\_disk\_info](vmware_guest_disk_info_module#ansible-collections-community-vmware-vmware-guest-disk-info-module) module.
Alternative
Use [community.vmware.vmware\_guest\_disk\_info](vmware_guest_disk_info_module#ansible-collections-community-vmware-vmware-guest-disk-info-module) instead.
Synopsis
--------
* This module can be used to gather facts about disks belonging to given virtual machine.
* All parameters and VMware object names are case sensitive.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* PyVmomi
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **datacenter** string / required | | The datacenter name to which virtual machine belongs to. |
| **folder** string | | Destination folder, absolute or relative path to find an existing guest. This is required parameter, only if multiple VMs are found with same name. The folder should include the datacenter. ESX's datacenter is ha-datacenter Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2 |
| **hostname** string | | The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_HOST` will be used instead. Environment variable support added in Ansible 2.6. |
| **moid** string | | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if `name` or `uuid` is not supplied. |
| **name** string | | Name of the virtual machine. This is required parameter, if parameter `uuid` or `moid` is not supplied. |
| **password** string | | The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PASSWORD` will be used instead. Environment variable support added in Ansible 2.6.
aliases: pass, pwd |
| **port** integer | **Default:**443 | The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_PORT` will be used instead. Environment variable support added in Ansible 2.6. |
| **proxy\_host** string | | Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_HOST` will be used instead. This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
| **proxy\_port** integer | | Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable `VMWARE_PROXY_PORT` will be used instead. |
| **use\_instance\_uuid** boolean | **Choices:*** **no** β
* yes
| Whether to use the VMware instance UUID rather than the BIOS UUID. |
| **username** string | | The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable `VMWARE_USER` will be used instead. Environment variable support added in Ansible 2.6.
aliases: admin, user |
| **uuid** string | | UUID of the instance to gather facts if known, this is VMware's unique identifier. This is required parameter, if parameter `name` or `moid` is not supplied. |
| **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 `VMWARE_VALIDATE_CERTS` will be used instead. Environment variable support added in Ansible 2.6. If set to `true`, please make sure Python >= 2.7.9 is installed on the given machine. |
Notes
-----
Note
* Tested on vSphere 6.0 and 6.5.
* Disk UUID information is added in version 2.8.
* Additional information about guest disk backings added in version 2.8.
* All modules requires API write access and hence is not supported on a free ESXi license.
Examples
--------
```
- name: Gather disk facts from virtual machine using UUID
community.vmware.vmware_guest_disk_facts:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: ha-datacenter
uuid: 421e4592-c069-924d-ce20-7e7533fab926
delegate_to: localhost
register: disk_facts
- name: Gather disk facts from virtual machine using name
community.vmware.vmware_guest_disk_facts:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: ha-datacenter
name: VM_225
delegate_to: localhost
register: disk_facts
- name: Gather disk facts from virtual machine using moid
community.vmware.vmware_guest_disk_facts:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: ha-datacenter
moid: vm-42
delegate_to: localhost
register: disk_facts
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **guest\_disk\_facts** dictionary | always | metadata about the virtual machine's disks **Sample:** {'0': {'backing\_datastore': 'datastore2', 'backing\_disk\_mode': 'persistent', 'backing\_eagerlyscrub': False, 'backing\_filename': '[datastore2] VM\_225/VM\_225.vmdk', 'backing\_thinprovisioned': False, 'backing\_type': 'FlatVer2', 'backing\_uuid': '200C3A00-f82a-97af-02ff-62a595f0020a', 'backing\_writethrough': False, 'capacity\_in\_bytes': 10485760, 'capacity\_in\_kb': 10240, 'controller\_bus\_number': 0, 'controller\_key': 1000, 'controller\_type': 'paravirtual', 'key': 2000, 'label': 'Hard disk 1', 'summary': '10,240 KB', 'unit\_number': 0}, '1': {'backing\_datastore': 'datastore3', 'backing\_devicename': 'vml.012345678901234567890123456789012345678901234567890123', 'backing\_disk\_mode': 'independent\_persistent', 'backing\_filename': '[datastore3] VM\_226/VM\_226.vmdk', 'backing\_lunuuid': '012345678901234567890123456789012345678901234567890123', 'backing\_type': 'RawDiskMappingVer1', 'backing\_uuid': None, 'capacity\_in\_bytes': 15728640, 'capacity\_in\_kb': 15360, 'controller\_bus\_number': 0, 'controller\_key': 1000, 'controller\_type': 'paravirtual', 'key': 2001, 'label': 'Hard disk 3', 'summary': '15,360 KB', 'unit\_number': 1}} |
Status
------
* This module will be removed in a major release after 2021-12-01. *[deprecated]*
* For more information see [DEPRECATED](#deprecated).
### Authors
* Abhijeet Kasurde (@Akasurde) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#523339332127203637747161656974716760697471666a692037363a33267471666469313d3f)>
ansible Collections in the Servicenow Namespace Collections in the Servicenow Namespace
=======================================
These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **servicenow** namespace.
* [servicenow.servicenow](servicenow/index#plugins-in-servicenow-servicenow)
ansible Servicenow.Servicenow Servicenow.Servicenow
=====================
Collection version 1.0.6
Plugin Index
------------
These are the plugins in the servicenow.servicenow collection
### Inventory Plugins
* [now](now_inventory#ansible-collections-servicenow-servicenow-now-inventory) β ServiceNow Inventory Plugin
### Modules
* [snow\_record](snow_record_module#ansible-collections-servicenow-servicenow-snow-record-module) β Manage records in ServiceNow
* [snow\_record\_find](snow_record_find_module#ansible-collections-servicenow-servicenow-snow-record-find-module) β Search for multiple records from ServiceNow
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
ansible servicenow.servicenow.snow_record β Manage records in ServiceNow servicenow.servicenow.snow\_record β Manage records in ServiceNow
=================================================================
Note
This plugin is part of the [servicenow.servicenow collection](https://galaxy.ansible.com/servicenow/servicenow) (version 1.0.6).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install servicenow.servicenow`.
To use it in a playbook, specify: `servicenow.servicenow.snow_record`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Creates, deletes and updates a single record in ServiceNow.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python pysnow (pysnow)
* python requests (requests)
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **attachment** string | | Attach a file to the record. |
| **auth** string | **Choices:*** **basic** β
* oauth
* token
* openid
| The method used to authenticate with the Service Now instance. Basic authentication uses user name and password. OAuth authentication uses a client id and secret in addition to Basic authentication. Token authentication uses a bearer token in addition to OAuth authentication. OpenID Connect authentication, an extension of OAuth 2.0, uses a provider, like Okta, to obtain a bearer token. If the vaule is not specified in the task, the value of environment variable `SN_AUTH` will be used instead. |
| **client\_id** string | | Client ID generated by ServiceNow. Required when using OAuth or OpenID authentication, unless token is specified. If the value is not specified in the task, the value of environment variable `SN_CLIENTID` will be used instead. |
| **client\_secret** string | | Client Secret associated with client id. Required when using OAuth or OpenID authentication, unless token is specified. If the value is not specified in the task, the value of environment variable `SN_CLIENTSECRET` will be used instead. |
| **data** dictionary | | key, value pairs of data to load into the record. See Examples. Required for `state:present`. |
| **display\_value** boolean | **Choices:*** **no** β
* yes
| sysparm\_display\_value |
| **exclude\_reference\_link** boolean | **Choices:*** **no** β
* yes
| sysparm\_exclude\_reference\_link |
| **host** string | | The ServiceNow hostname. This value is FQDN for ServiceNow host. If the value is not specified in the task, the value of environment variable `SN_HOST` will be used instead. Mutually exclusive with `instance`. |
| **instance** string | | The ServiceNow instance name, without the domain, service-now.com. If the value is not specified in the task, the value of environment variable `SN_INSTANCE` will be used instead. |
| **log\_level** string | **Choices:*** debug
* info
* **normal** β
| Set the logging level of the module |
| **lookup\_field** string | **Default:**"number" | Changes the field that `number` uses to find records. |
| **number** string | | Record number to update. Required for `state:absent`. |
| **openid** dictionary | | If the result of a previous SNOW method, using OpenID, was registered, supply the `openid` key, from the result. The `openid` key contains a dictionary with the bearer token, which, if still valid, can be reused. If the bearer token is no longer valid, the dictionary includes all of the previously supplied `openid_` fields needed to make a new token request. Any other credentials previously supplied, must be provided again. |
| **openid\_issuer** string | | The URL for your organization's OpenID Connect provider. Okta, an OpenID provider, supports Single Sign-On with a url like 'https://yourorg.oktapreview.com/oauth2'. Okta supports application-level authentication using a url like 'https://yourorg.oktapreview.com/oauth2/TH151s50m3L0ngSTr1NG'. If the value is not specified in the task, the value of environment variable `OPENID_ISSUER` will be used instead. |
| **openid\_scope** list / elements=string | **Default:**["openid"] | A list of scopes to be included in the access token. Supported scopes for this application are address, email, groups, openid, phone, profile, of which, openid must be one. If the value is not specified in the task, the value of environment variable `OPENID_SCOPE` will be used instead. |
| **password** string | | Password for username. Required whether using Basic, OAuth or OpenID authentication. If the value is not specified in the task, the value of environment variable `SN_PASSWORD` will be used instead. |
| **raise\_on\_empty** boolean | **Choices:*** no
* **yes** β
| If set to false, will not cause a SNOW method to raise an exception should it return no records. This is particurlarly useful in snow\_record\_find, when not sure if any record exists. |
| **state** string / required | **Choices:*** present
* absent
| If `present` is supplied with a `number` argument, the module will attempt to update the record with the supplied data. If no such record exists, a new one will be created.
`absent` will delete a record. |
| **suppress\_pagination\_header** boolean | **Choices:*** **no** β
* yes
| sysparm\_suppress\_pagination\_header |
| **table** string | **Default:**"incident" | Table to query for records. |
| **token** string | | Bearer token associated with client id and secret. Can be used in place of client id and secret for OpenID authentication. If the value is not specified in the task, the value of environment variable `SN_TOKEN` will be used instead. |
| **username** string | | Name of user for connection to ServiceNow. Required whether using Basic, OAuth or OpenID authentication. If the value is not specified in the task, the value of environment variable `SN_USERNAME` will be used instead. |
Examples
--------
```
- name: Grab a user record
servicenow.servicenow.snow_record:
username: ansible_test
password: my_password
instance: dev99999
state: present
number: 62826bf03710200044e0bfc8bcbe5df1
table: sys_user
lookup_field: sys_id
- name: Grab a user record, explicitly using basic authentication and suppress exceptions if not found
servicenow.servicenow.snow_record:
auth: basic
raise_on_empty: False
username: ansible_test
password: my_password
instance: dev99999
state: present
number: 62826bf03710200044e0bfc8bcbe5df1
table: sys_user
lookup_field: sys_id
- name: Grab a user record using OAuth
servicenow.servicenow.snow_record:
auth: oauth
username: ansible_test
password: my_password
client_id: "1234567890abcdef1234567890abcdef"
client_secret: "Password1!"
instance: dev99999
state: present
number: 62826bf03710200044e0bfc8bcbe5df1
table: sys_user
lookup_field: sys_id
- name: Grab a user record using a bearer token
servicenow.servicenow.snow_record:
auth: token
username: ansible_test
password: my_password
token: "y0urHorrend0u51yL0ngT0kenG0esH3r3..."
instance: dev99999
state: present
number: 62826bf03710200044e0bfc8bcbe5df1
table: sys_user
lookup_field: sys_id
- name: Grab a user record using OpenID
servicenow.servicenow.snow_record:
auth: openid
username: ansible_test
password: my_password
client_id: "1234567890abcdef1234567890abcdef"
client_secret: "Password1!"
openid_issuer: "https://yourorg.oktapreview.com/TH151s50meL0ngSTr1NG"
openid_scope: "openid email"
instance: dev99999
state: present
number: 62826bf03710200044e0bfc8bcbe5df1
table: sys_user
lookup_field: sys_id
register: response
- name: Grab another user record using previous OpenID response
servicenow.servicenow.snow_record:
auth: openid
username: ansible_test
password: my_password
client_id: "1234567890abcdef1234567890abcdef"
client_secret: "Password1!"
openid: "{{ response['openid'] }}"
instance: dev99999
state: present
number: 62826bf03710200044e0bfc8deadbeef
table: sys_user
lookup_field: sys_id
register: response
- name: Create an incident
servicenow.servicenow.snow_record:
username: ansible_test
password: my_password
instance: dev99999
state: present
data:
short_description: "This is a test incident opened by Ansible"
severity: 3
priority: 2
register: new_incident
- name: Create an incident using host instead of instance
servicenow.servicenow.snow_record:
username: ansible_test
password: my_password
host: dev99999.mycustom.domain.com
state: present
data:
short_description: "This is a test incident opened by Ansible"
priority: 2
- name: Delete the record we just made
servicenow.servicenow.snow_record:
username: admin
password: xxxxxxx
instance: dev99999
state: absent
number: "{{new_incident['record']['number']}}"
- name: Delete a non-existant record
servicenow.servicenow.snow_record:
username: ansible_test
password: my_password
instance: dev99999
state: absent
number: 9872354
failed_when: false
- name: Update an incident
servicenow.servicenow.snow_record:
username: ansible_test
password: my_password
instance: dev99999
state: present
number: INC0000055
data:
work_notes : "Been working all day on this thing."
- name: Attach a file to an incident
servicenow.servicenow.snow_record:
username: ansible_test
password: my_password
instance: dev99999
state: present
number: INC0000055
attachment: README.md
tags: attach
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **attached\_file** dictionary | when supported | Details of the file that was attached via `attachment`
|
| **record** dictionary | when supported | Record data from Service Now |
### Authors
* Tim Rightnour (@garbled1)
| programming_docs |
ansible servicenow.servicenow.now β ServiceNow Inventory Plugin servicenow.servicenow.now β ServiceNow Inventory Plugin
=======================================================
Note
This plugin is part of the [servicenow.servicenow collection](https://galaxy.ansible.com/servicenow/servicenow) (version 1.0.6).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install servicenow.servicenow`.
To use it in a playbook, specify: `servicenow.servicenow.now`.
New in version 2.10: of servicenow.servicenow
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* ServiceNow Inventory plugin.
Requirements
------------
The below requirements are needed on the local controller node that executes this inventory.
* python requests (requests)
* netaddr
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. |
| **enhanced** boolean | **Choices:*** **no** β
* yes
| | Enable enhanced inventory which provides relationship information from CMDB. Requires installation of Update Set located in update\_sets directory. |
| **enhanced\_groups** boolean | **Choices:*** no
* **yes** β
| | enable enhanced groups from CMDB relationships. Only used if enhanced is enabled. |
| **fields** list / elements=string | **Default:**"ip\_address,fqdn,host\_name,sys\_class\_name,name" | | Comma seperated string providing additional table columns to add as host vars to each inventory host. |
| **filter\_results** string | **Default:**"" | | Filter results with sysparm\_query encoded query string syntax. Complete list of operators available for filters and queries. |
| **groups** dictionary | **Default:**{} | | Add hosts to group based on Jinja2 conditionals. |
| **host** string | | env:SN\_HOST | The ServiceNow hostname. This value is FQDN for ServiceNow host. If the value is not specified in the task, the value of environment variable `SN_HOST` will be used instead. Mutually exclusive with `instance`. |
| **instance** string | | env:SN\_INSTANCE | The ServiceNow instance name, without the domain, service-now.com. If the value is not specified in the task, the value of environment variable `SN_INSTANCE` will be used instead. |
| **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. |
| **password** string / required | | env:SN\_PASSWORD | Password for username. If the value is not specified, the value of environment variable `SN_PASSWORD` will be used instead. |
| **plugin** string / required | **Choices:*** servicenow.servicenow.now
| | The name of the ServiceNow Inventory Plugin, this should always be 'servicenow.servicenow.now'. |
| **proxy** string | **Default:**"" | | Proxy server to use for requests to ServiceNow. |
| **selection\_order** list / elements=string | **Default:**"ip\_address,fqdn,host\_name,name" | | Comma seperated string providing ability to define selection preference order. |
| **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. |
| **table** string | **Default:**"cmdb\_ci\_server" | | The ServiceNow table to query. |
| **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). |
| **username** string | | env:SN\_USERNAME | Name of user for connection to ServiceNow. If the value is not specified, the value of environment variable `SN_USERNAME` will be used instead. |
Examples
--------
```
# Simple Inventory Plugin example
plugin: servicenow.servicenow.now
instance: dev89007
username: admin
password: password
keyed_groups:
- key: sn_sys_class_name | lower
prefix: ''
separator: ''
# Using Keyed Groups
plugin: servicenow.servicenow.now
host: servicenow.mydomain.com
username: admin
password: password
fields: [name,host_name,fqdn,ip_address,sys_class_name, install_status, classification,vendor]
keyed_groups:
- key: sn_classification | lower
prefix: 'env'
- key: sn_vendor | lower
prefix: ''
separator: ''
- key: sn_sys_class_name | lower
prefix: ''
separator: ''
- key: sn_install_status | lower
prefix: 'status'
# Compose hostvars
plugin: servicenow.servicenow.now
instance: dev89007
username: admin
password: password
fields:
- name
- sys_tags
compose:
sn_tags: sn_sys_tags.replace(" ", "").split(',')
ansible_host: sn_ip_address
keyed_groups:
- key: sn_tags | lower
prefix: 'tag'
```
### Authors
* Will Tome (@willtome)
* Alex Mittell (@alex\_mittell)
ansible servicenow.servicenow.snow_record_find β Search for multiple records from ServiceNow servicenow.servicenow.snow\_record\_find β Search for multiple records from ServiceNow
======================================================================================
Note
This plugin is part of the [servicenow.servicenow collection](https://galaxy.ansible.com/servicenow/servicenow) (version 1.0.6).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install servicenow.servicenow`.
To use it in a playbook, specify: `servicenow.servicenow.snow_record_find`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gets multiple records from a specified table from ServiceNow based on a query dictionary.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python pysnow (pysnow)
* python requests (requests)
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** string | **Choices:*** **basic** β
* oauth
* token
* openid
| The method used to authenticate with the Service Now instance. Basic authentication uses user name and password. OAuth authentication uses a client id and secret in addition to Basic authentication. Token authentication uses a bearer token in addition to OAuth authentication. OpenID Connect authentication, an extension of OAuth 2.0, uses a provider, like Okta, to obtain a bearer token. If the vaule is not specified in the task, the value of environment variable `SN_AUTH` will be used instead. |
| **client\_id** string | | Client ID generated by ServiceNow. Required when using OAuth or OpenID authentication, unless token is specified. If the value is not specified in the task, the value of environment variable `SN_CLIENTID` will be used instead. |
| **client\_secret** string | | Client Secret associated with client id. Required when using OAuth or OpenID authentication, unless token is specified. If the value is not specified in the task, the value of environment variable `SN_CLIENTSECRET` will be used instead. |
| **display\_value** boolean | **Choices:*** **no** β
* yes
| sysparm\_display\_value |
| **exclude\_reference\_link** boolean | **Choices:*** **no** β
* yes
| sysparm\_exclude\_reference\_link |
| **host** string | | The ServiceNow hostname. This value is FQDN for ServiceNow host. If the value is not specified in the task, the value of environment variable `SN_HOST` will be used instead. Mutually exclusive with `instance`. |
| **instance** string | | The ServiceNow instance name, without the domain, service-now.com. If the value is not specified in the task, the value of environment variable `SN_INSTANCE` will be used instead. |
| **log\_level** string | **Choices:*** debug
* info
* **normal** β
| Set the logging level of the module |
| **max\_records** integer | **Default:**20 | Maximum number of records to return. |
| **openid** dictionary | | If the result of a previous SNOW method, using OpenID, was registered, supply the `openid` key, from the result. The `openid` key contains a dictionary with the bearer token, which, if still valid, can be reused. If the bearer token is no longer valid, the dictionary includes all of the previously supplied `openid_` fields needed to make a new token request. Any other credentials previously supplied, must be provided again. |
| **openid\_issuer** string | | The URL for your organization's OpenID Connect provider. Okta, an OpenID provider, supports Single Sign-On with a url like 'https://yourorg.oktapreview.com/oauth2'. Okta supports application-level authentication using a url like 'https://yourorg.oktapreview.com/oauth2/TH151s50m3L0ngSTr1NG'. If the value is not specified in the task, the value of environment variable `OPENID_ISSUER` will be used instead. |
| **openid\_scope** list / elements=string | **Default:**["openid"] | A list of scopes to be included in the access token. Supported scopes for this application are address, email, groups, openid, phone, profile, of which, openid must be one. If the value is not specified in the task, the value of environment variable `OPENID_SCOPE` will be used instead. |
| **order\_by** string | **Default:**"-created\_on" | Field to sort the results on. Can prefix with "-" or "+" to change descending or ascending sort order. |
| **password** string | | Password for username. Required whether using Basic, OAuth or OpenID authentication. If the value is not specified in the task, the value of environment variable `SN_PASSWORD` will be used instead. |
| **query** dictionary / required | | Dict to query for records. |
| **raise\_on\_empty** boolean | **Choices:*** no
* **yes** β
| If set to false, will not cause a SNOW method to raise an exception should it return no records. This is particurlarly useful in snow\_record\_find, when not sure if any record exists. |
| **return\_fields** list / elements=string | | Fields of the record to return in the json. By default, all fields will be returned. |
| **suppress\_pagination\_header** boolean | **Choices:*** **no** β
* yes
| sysparm\_suppress\_pagination\_header |
| **table** string | **Default:**"incident" | Table to query for records. |
| **token** string | | Bearer token associated with client id and secret. Can be used in place of client id and secret for OpenID authentication. If the value is not specified in the task, the value of environment variable `SN_TOKEN` will be used instead. |
| **username** string | | Name of user for connection to ServiceNow. Required whether using Basic, OAuth or OpenID authentication. If the value is not specified in the task, the value of environment variable `SN_USERNAME` will be used instead. |
Examples
--------
```
- name: Search for incident assigned to group, return specific fields
servicenow.servicenow.snow_record_find:
username: ansible_test
password: my_password
instance: dev99999
table: incident
query:
assignment_group: d625dccec0a8016700a222a0f7900d06
return_fields:
- number
- opened_at
- name: Search for incident assigned to group, explicitly using basic authentication, return specific fields, and suppress exception if not found
servicenow.servicenow.snow_record_find:
auth: basic
username: ansible_test
password: my_password
instance: dev99999
raise_on_empty: False
table: incident
query:
assignment_group: d625dccec0a8016700a222a0f7900d06
return_fields:
- number
- opened_at
- name: Search for incident using host instead of instance
servicenow.servicenow.snow_record_find:
username: ansible_test
password: my_password
host: dev99999.mycustom.domain.com
table: incident
query:
assignment_group: d625dccec0a8016700a222a0f7900d06
return_fields:
- number
- opened_at
- name: Using OAuth, search for incident assigned to group, return specific fields
servicenow.servicenow.snow_record_find:
auth: oauth
username: ansible_test
password: my_password
client_id: "1234567890abcdef1234567890abcdef"
client_secret: "Password1!"
instance: dev99999
table: incident
query:
assignment_group: d625dccec0a8016700a222a0f7900d06
return_fields:
- number
- opened_at
- name: Using a bearer token, search for incident assigned to group, return specific fields
servicenow.servicenow.snow_record_find:
auth: token
username: ansible_test
password: my_password
token: "y0urHorrend0u51yL0ngT0kenG0esH3r3..."
instance: dev99999
table: incident
query:
assignment_group: d625dccec0a8016700a222a0f7900d06
return_fields:
- number
- opened_at
- name: Using OpenID, search for incident assigned to group, return specific fields
servicenow.servicenow.snow_record_find:
auth: openid
username: ansible_test
password: my_password
client_id: "1234567890abcdef1234567890abcdef"
client_secret: "Password1!"
openid_issuer: "https://yourorg.oktapreview.com/oauth2/TH151s50M3L0ngStr1NG"
openid_scope: "openid email"
instance: dev99999
table: incident
query:
assignment_group: d625dccec0a8016700a222a0f7900d06
return_fields:
- number
- opened_at
register: response
- name: Using previous OpenID response, search for incident assigned to group, return specific fields
servicenow.servicenow.snow_record_find:
auth: openid
username: ansible_test
password: my_password
client_id: "1234567890abcdef1234567890abcdef"
client_secret: "Password1!"
openid: "{{ response['openid'] }}"
instance: dev99999
table: incident
query:
assignment_group: d625dccec0a8016700a222a0f7900d06
return_fields:
- number
- opened_at
- name: Find open standard changes with my template
servicenow.servicenow.snow_record_find:
username: ansible_test
password: my_password
instance: dev99999
table: change_request
query:
AND:
equals:
active: "True"
type: "standard"
u_change_stage: "80"
contains:
u_template: "MY-Template"
return_fields:
- sys_id
- number
- sys_created_on
- sys_updated_on
- u_template
- active
- type
- u_change_stage
- sys_created_by
- description
- short_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 |
| --- | --- | --- |
| **record** dictionary | always | The full contents of the matching ServiceNow records as a list of records. |
### Authors
* Tim Rightnour (@garbled1)
ansible Collections in the Check_point Namespace Collections in the Check\_point Namespace
=========================================
These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **check\_point** namespace.
* [check\_point.mgmt](mgmt/index#plugins-in-check-point-mgmt)
ansible check_point.mgmt.cp_mgmt_nat_rule_facts β Get nat-rule objects facts on Checkpoint over Web Services API check\_point.mgmt.cp\_mgmt\_nat\_rule\_facts β Get nat-rule objects facts on Checkpoint over Web Services API
=============================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_nat_rule_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get nat-rule objects facts on Checkpoint devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dereference\_group\_members** boolean | **Choices:*** no
* yes
| Indicates whether to dereference "members" field by details level for every object in reply. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **filter** string | | Search expression to filter the rulebase. The provided text should be exactly the same as it would be given in Smart Console. The logical operators in the expression ('AND', 'OR') should be provided in capital letters. If an operator is not used, the default OR operator applies. |
| **filter\_settings** dictionary | | Sets filter preferences. |
| | **packet\_search\_settings** dictionary | | When 'search-mode' is set to 'packet', this object allows to set the packet search preferences. |
| | | **expand\_group\_members** boolean | **Choices:*** no
* yes
| When true, if the search expression contains a UID or a name of a group object, results will include rules that match on at least one member of the group. |
| | | **expand\_group\_with\_exclusion\_members** boolean | **Choices:*** no
* yes
| When true, if the search expression contains a UID or a name of a group-with-exclusion object, results will include rules that match at least one member of the "include" part and is not a member of the "except" part. |
| | | **match\_on\_any** boolean | **Choices:*** no
* yes
| Whether to match on 'Any' object. |
| | | **match\_on\_group\_with\_exclusion** boolean | **Choices:*** no
* yes
| Whether to match on a group-with-exclusion. |
| | | **match\_on\_negate** boolean | **Choices:*** no
* yes
| Whether to match on a negated cell. |
| | **search\_mode** string | **Choices:*** general
* packet
| When set to 'general', both the Full Text Search and Packet Search are enabled. In this mode, Packet Search will not match on 'Any' object, a negated cell or a group-with-exclusion. When the search-mode is set to 'packet', by default, the match on 'Any' object, a negated cell or a group-with-exclusion are enabled. packet-search-settings may be provided to change the default behavior. |
| **limit** integer | | The maximal number of returned results. This parameter is relevant only for getting few objects. |
| **offset** integer | | Number of the results to initially skip. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts the results by search criteria. Automatically sorts the results by Name, in the ascending order. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **package** string | | Name of the package. |
| **rule\_number** string | | Rule number. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **use\_object\_dictionary** boolean | **Choices:*** no
* yes
| N/A |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-nat-rule
cp_mgmt_nat_rule_facts:
package: standard
- name: show-nat-rulebase
cp_mgmt_nat_rule_facts:
details_level: standard
limit: 2
offset: 1
package: standard
use_object_dictionary: true
```
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_access_layer β Manages access-layer objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_access\_layer β Manages access-layer objects on Check Point over Web Services API
=============================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_access_layer`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages access-layer objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **add\_default\_rule** boolean | **Choices:*** no
* yes
| Indicates whether to include a cleanup rule in the new layer. |
| **applications\_and\_url\_filtering** boolean | **Choices:*** no
* yes
| Whether to enable Applications & URL Filtering blade on the layer. |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **content\_awareness** boolean | **Choices:*** no
* yes
| Whether to enable Content Awareness blade on the layer. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **detect\_using\_x\_forward\_for** boolean | **Choices:*** no
* yes
| Whether to use X-Forward-For HTTP header, which is added by the proxy server to keep track of the original source IP. |
| **firewall** boolean | **Choices:*** no
* yes
| Whether to enable Firewall blade on the layer. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **implicit\_cleanup\_action** string | **Choices:*** drop
* accept
| The default "catch-all" action for traffic that does not match any explicit or implied rules in the layer. |
| **mobile\_access** boolean | **Choices:*** no
* yes
| Whether to enable Mobile Access blade on the layer. |
| **name** string / required | | Object name. |
| **shared** boolean | **Choices:*** no
* yes
| Whether this layer is shared. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-access-layer
cp_mgmt_access_layer:
name: New Layer 1
state: present
- name: set-access-layer
cp_mgmt_access_layer:
applications_and_url_filtering: false
data_awareness: true
name: New Layer 1
state: present
- name: delete-access-layer
cp_mgmt_access_layer:
name: New Layer 2
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 |
| --- | --- | --- |
| **cp\_mgmt\_access\_layer** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_show_access_section β Retrieve existing object using object name or uid. check\_point.mgmt.cp\_mgmt\_show\_access\_section β Retrieve existing object using object name or uid.
======================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_show_access_section`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve existing object using object name or uid.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **layer** string | | Layer that the rule belongs to identified by the name or UID. |
| **name** string | | Object name. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: show-access-section
cp_mgmt_show_access_section:
layer: Network
name: New Section 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 |
| --- | --- | --- |
| **cp\_mgmt\_show\_access\_section** dictionary | always. | The checkpoint show-access-section output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_delete_api_key β Delete the API key. For the key to be invalid publish is needed. check\_point.mgmt.cp\_mgmt\_delete\_api\_key β Delete the API key. For the key to be invalid publish is needed.
===============================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_delete_api_key`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Delete the API key. For the key to be invalid publish is needed.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **admin\_name** string | | Administrator name to generate API key for. |
| **admin\_uid** string | | Administrator uid to generate API key for. |
| **api\_key** string | | API key to be deleted. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: delete-api-key
cp_mgmt_delete_api_key:
api_key: eea3be76f4a8eb740ee872bcedc692748ff256a2d21c9ffd2754facbde046d00
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 |
| --- | --- | --- |
| **cp\_mgmt\_delete\_api\_key** dictionary | always. | The checkpoint delete-api-key output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_delete_domain β Delete existing object using object name or uid. check\_point.mgmt.cp\_mgmt\_delete\_domain β Delete existing object using object name or uid.
=============================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_delete_domain`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Delete existing object using object name or uid.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string / required | | Object name. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: delete-domain
cp_mgmt_delete_domain:
name: domain1
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_domain** dictionary | always. | TThe checkpoint delete-domain output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_install_software_package β Installs the software package on target machines. check\_point.mgmt.cp\_mgmt\_install\_software\_package β Installs the software package on target machines.
==========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_install_software_package`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Installs the software package on target machines.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_installation\_settings** dictionary | | Installation settings for cluster. |
| | **cluster\_delay** integer | | The delay between end of installation on one cluster members and start of installation on the next cluster member. |
| | **cluster\_strategy** string | | The cluster installation strategy. |
| **concurrency\_limit** integer | | The number of targets, on which the same package is installed at the same time. |
| **method** string | **Choices:*** install
* upgrade
| NOTE, Supported from Check Point version R81 How we want to use the package. |
| **name** string | | The name of the software package. |
| **package\_location** string | **Choices:*** automatic
* target-machine
* central
| NOTE, Supported from Check Point version R81 The package repository. |
| **targets** list / elements=string | | On what targets to execute this command. Targets may be identified by their name, or object unique identifier. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: install-software-package
cp_mgmt_install_software_package:
name: Check_Point_R80_40_JHF_MCD_DEMO_019_MAIN_Bundle_T1_VISIBLE_FULL.tgz
package_location: automatic
targets.1: corporate-gateway
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_install\_software\_package** dictionary | always. | The checkpoint install-software-package output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_access_role β Manages access-role objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_access\_role β Manages access-role objects on Check Point over Web Services API
===========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_access_role`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages access-role objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **machines** list / elements=string | | Machines that can access the system. |
| | **base\_dn** string | | When source is "Active Directory" use "base-dn" to refine the query in AD database. |
| | **selection** list / elements=string | | Name or UID of an object selected from source. |
| | **source** string | | Active Directory name or UID or Identity Tag. |
| **name** string / required | | Object name. |
| **networks** list / elements=string | | Collection of Network objects identified by the name or UID that can access the system. |
| **remote\_access\_clients** string | | Remote access clients identified by name or UID. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **users** list / elements=string | | Users that can access the system. |
| | **base\_dn** string | | When source is "Active Directory" use "base-dn" to refine the query in AD database. |
| | **selection** list / elements=string | | Name or UID of an object selected from source. |
| | **source** string | | Active Directory name or UID or Identity Tag or Internal User Groups or LDAP groups or Guests. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-access-role
cp_mgmt_access_role:
machines: all identified
name: New Access Role 1
networks: any
remote_access_clients: any
state: present
users: any
- name: set-access-role
cp_mgmt_access_role:
machines: any
name: New Access Role 1
state: present
users: all identified
- name: delete-access-role
cp_mgmt_access_role:
name: New Access Role 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 |
| --- | --- | --- |
| **cp\_mgmt\_access\_role** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_uninstall_software_package β Uninstalls the software package from target machines. check\_point.mgmt.cp\_mgmt\_uninstall\_software\_package β Uninstalls the software package from target machines.
================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_uninstall_software_package`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Uninstalls the software package from target machines.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_installation\_settings** dictionary | | Installation settings for cluster. |
| | **cluster\_delay** integer | | The delay between end of installation on one cluster members and start of installation on the next cluster member. |
| | **cluster\_strategy** string | | The cluster installation strategy. |
| **concurrency\_limit** integer | | The number of targets, on which the same package is installed at the same time. |
| **name** string | | The name of the software package. |
| **targets** list / elements=string | | On what targets to execute this command. Targets may be identified by their name, or object unique identifier. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: uninstall-software-package
cp_mgmt_uninstall_software_package:
name: Check_Point_R80_40_JHF_MCD_DEMO_019_MAIN_Bundle_T1_VISIBLE_FULL.tgz
targets.1: corporate-gateway
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_uninstall\_software\_package** dictionary | always. | The checkpoint uninstall-software-package output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_application_site_category β Manages application-site-category objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_application\_site\_category β Manages application-site-category objects on Check Point over Web Services API
========================================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_application_site_category`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages application-site-category objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **description** string | | N/A |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-application-site-category
cp_mgmt_application_site_category:
description: My Application Site category
name: New Application Site Category 1
state: present
- name: set-application-site-category
cp_mgmt_application_site_category:
description: My new Application Site category
name: New Application Site Category 1
state: present
- name: delete-application-site-category
cp_mgmt_application_site_category:
name: New Application Site Category 2
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 |
| --- | --- | --- |
| **cp\_mgmt\_application\_site\_category** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_service_icmp_facts β Get service-icmp objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_icmp\_facts β Get service-icmp objects facts on Check Point over Web Services API
======================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_icmp_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get service-icmp objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-service-icmp
cp_mgmt_service_icmp_facts:
name: info-req
- name: show-services-icmp
cp_mgmt_service_icmp_facts:
limit: 4
offset: 3
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_show_https_section β Retrieve existing HTTPS Inspection section using section name or uid and layer name. check\_point.mgmt.cp\_mgmt\_show\_https\_section β Retrieve existing HTTPS Inspection section using section name or uid and layer name.
=======================================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_show_https_section`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve existing HTTPS Inspection section using section name or uid and layer name.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **layer** string | | Layer that holds the Object. Identified by the Name or UID. |
| **name** string | | Object name. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: show-https-section
cp_mgmt_show_https_section:
layer: Default Layer
name: New Section 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 |
| --- | --- | --- |
| **cp\_mgmt\_show\_https\_section** dictionary | always. | The checkpoint show-https-section output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_service_tcp β Manages service-tcp objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_tcp β Manages service-tcp objects on Check Point over Web Services API
===========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_tcp`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages service-tcp objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggressive\_aging** dictionary | | Sets short (aggressive) timeouts for idle connections. |
| | **default\_timeout** integer | | Default aggressive aging timeout in seconds. |
| | **enable** boolean | **Choices:*** no
* yes
| N/A |
| | **timeout** integer | | Aggressive aging timeout in seconds. |
| | **use\_default\_timeout** boolean | **Choices:*** no
* yes
| N/A |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **keep\_connections\_open\_after\_policy\_installation** boolean | **Choices:*** no
* yes
| Keep connections open after policy has been installed even if they are not allowed under the new policy. This overrides the settings in the Connection Persistence page. If you change this property, the change will not affect open connections, but only future connections. |
| **match\_by\_protocol\_signature** boolean | **Choices:*** no
* yes
| A value of true enables matching by the selected protocol's signature - the signature identifies the protocol as genuine. Select this option to limit the port to the specified protocol. If the selected protocol does not support matching by signature, this field cannot be set to true. |
| **match\_for\_any** boolean | **Choices:*** no
* yes
| Indicates whether this service is used when 'Any' is set as the rule's service and there are several service objects with the same source port and protocol. |
| **name** string / required | | Object name. |
| **override\_default\_settings** boolean | **Choices:*** no
* yes
| Indicates whether this service is a Data Domain service which has been overridden. |
| **port** string | | The number of the port used to provide this service. To specify a port range, place a hyphen between the lowest and highest port numbers, for example 44-55. |
| **protocol** string | | Select the protocol type associated with the service, and by implication, the management server (if any) that enforces Content Security and Authentication for the service. Selecting a Protocol Type invokes the specific protocol handlers for each protocol type, thus enabling higher level of security by parsing the protocol, and higher level of connectivity by tracking dynamic actions (such as opening of ports). |
| **session\_timeout** integer | | Time (in seconds) before the session times out. |
| **source\_port** string | | Port number for the client side service. If specified, only those Source port Numbers will be Accepted, Dropped, or Rejected during packet inspection. Otherwise, the source port is not inspected. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **sync\_connections\_on\_cluster** boolean | **Choices:*** no
* yes
| Enables state-synchronized High Availability or Load Sharing on a ClusterXL or OPSEC-certified cluster. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **use\_default\_session\_timeout** boolean | **Choices:*** no
* yes
| Use default virtual session timeout. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-service-tcp
cp_mgmt_service_tcp:
aggressive_aging:
enable: true
timeout: 360
use_default_timeout: false
keep_connections_open_after_policy_installation: false
match_for_any: true
name: New_TCP_Service_1
port: 5669
session_timeout: 0
state: present
sync_connections_on_cluster: true
- name: set-service-tcp
cp_mgmt_service_tcp:
aggressive_aging:
default_timeout: 3600
color: green
name: New_TCP_Service_1
port: 5656
state: present
- name: delete-service-tcp
cp_mgmt_service_tcp:
name: New_TCP_Service_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 |
| --- | --- | --- |
| **cp\_mgmt\_service\_tcp** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_access_section β Manages access-section objects on Checkpoint over Web Services API check\_point.mgmt.cp\_mgmt\_access\_section β Manages access-section objects on Checkpoint over Web Services API
================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_access_section`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages access-section objects on Checkpoint devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **layer** string | | Layer that the rule belongs to identified by the name or UID. |
| **name** string / required | | Object name. |
| **position** string | | Position in the rulebase. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-access-section
cp_mgmt_access_section:
layer: Network
name: New Section 1
position: 1
state: present
- name: set-access-section
cp_mgmt_access_section:
layer: Network
name: New Section 1
state: present
- name: delete-access-section
cp_mgmt_access_section:
layer: Network
name: New Section 2
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 |
| --- | --- | --- |
| **cp\_mgmt\_access\_section** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_mds_facts β Get Multi-Domain Server (mds) objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_mds\_facts β Get Multi-Domain Server (mds) objects facts on Check Point over Web Services API
=========================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_mds_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get mds objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-mds
cp_mgmt_mds_facts:
name: test_mds1
- name: show-mdss
cp_mgmt_mds_facts:
```
### Authors
* Or Soffer (@chkp-orso)
ansible Check_Point.Mgmt Check\_Point.Mgmt
=================
Collection version 2.1.1
Plugin Index
------------
These are the plugins in the check\_point.mgmt collection
### Httpapi Plugins
* [checkpoint](checkpoint_httpapi#ansible-collections-check-point-mgmt-checkpoint-httpapi) β HttpApi Plugin for Checkpoint devices
### Modules
* [checkpoint\_access\_layer\_facts](checkpoint_access_layer_facts_module#ansible-collections-check-point-mgmt-checkpoint-access-layer-facts-module) β Get access layer facts on Check Point over Web Services API
* [checkpoint\_access\_rule](checkpoint_access_rule_module#ansible-collections-check-point-mgmt-checkpoint-access-rule-module) β Manages access rules on Check Point over Web Services API
* [checkpoint\_access\_rule\_facts](checkpoint_access_rule_facts_module#ansible-collections-check-point-mgmt-checkpoint-access-rule-facts-module) β Get access rules objects facts on Check Point over Web Services API
* [checkpoint\_host](checkpoint_host_module#ansible-collections-check-point-mgmt-checkpoint-host-module) β Manages host objects on Check Point over Web Services API
* [checkpoint\_host\_facts](checkpoint_host_facts_module#ansible-collections-check-point-mgmt-checkpoint-host-facts-module) β Get host objects facts on Check Point over Web Services API
* [checkpoint\_object\_facts](checkpoint_object_facts_module#ansible-collections-check-point-mgmt-checkpoint-object-facts-module) β Get object facts on Check Point over Web Services API
* [checkpoint\_run\_script](checkpoint_run_script_module#ansible-collections-check-point-mgmt-checkpoint-run-script-module) β Run scripts on Check Point devices over Web Services API
* [checkpoint\_session](checkpoint_session_module#ansible-collections-check-point-mgmt-checkpoint-session-module) β Manages session objects on Check Point over Web Services API
* [checkpoint\_task\_facts](checkpoint_task_facts_module#ansible-collections-check-point-mgmt-checkpoint-task-facts-module) β Get task objects facts on Check Point over Web Services API
* [cp\_mgmt\_access\_layer](cp_mgmt_access_layer_module#ansible-collections-check-point-mgmt-cp-mgmt-access-layer-module) β Manages access-layer objects on Check Point over Web Services API
* [cp\_mgmt\_access\_layer\_facts](cp_mgmt_access_layer_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-access-layer-facts-module) β Get access-layer objects facts on Check Point over Web Services API
* [cp\_mgmt\_access\_role](cp_mgmt_access_role_module#ansible-collections-check-point-mgmt-cp-mgmt-access-role-module) β Manages access-role objects on Check Point over Web Services API
* [cp\_mgmt\_access\_role\_facts](cp_mgmt_access_role_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-access-role-facts-module) β Get access-role objects facts on Check Point over Web Services API
* [cp\_mgmt\_access\_rule](cp_mgmt_access_rule_module#ansible-collections-check-point-mgmt-cp-mgmt-access-rule-module) β Manages access-rule objects on Check Point over Web Services API
* [cp\_mgmt\_access\_rule\_facts](cp_mgmt_access_rule_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-access-rule-facts-module) β Get access-rule objects facts on Check Point over Web Services API
* [cp\_mgmt\_access\_section](cp_mgmt_access_section_module#ansible-collections-check-point-mgmt-cp-mgmt-access-section-module) β Manages access-section objects on Checkpoint over Web Services API
* [cp\_mgmt\_add\_api\_key](cp_mgmt_add_api_key_module#ansible-collections-check-point-mgmt-cp-mgmt-add-api-key-module) β Add API key for administrator, to enable login with it. For the key to be valid publish is needed.
* [cp\_mgmt\_add\_data\_center\_object](cp_mgmt_add_data_center_object_module#ansible-collections-check-point-mgmt-cp-mgmt-add-data-center-object-module) β Imports a Data Center Object from a Data Center Server.<br> Data Center Object represents an object in the cloud environment.
* [cp\_mgmt\_add\_domain](cp_mgmt_add_domain_module#ansible-collections-check-point-mgmt-cp-mgmt-add-domain-module) β Create new object
* [cp\_mgmt\_add\_nat\_rule](cp_mgmt_add_nat_rule_module#ansible-collections-check-point-mgmt-cp-mgmt-add-nat-rule-module) β Create new object.
* [cp\_mgmt\_address\_range](cp_mgmt_address_range_module#ansible-collections-check-point-mgmt-cp-mgmt-address-range-module) β Manages address-range objects on Check Point over Web Services API
* [cp\_mgmt\_address\_range\_facts](cp_mgmt_address_range_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-address-range-facts-module) β Get address-range objects facts on Check Point over Web Services API
* [cp\_mgmt\_administrator](cp_mgmt_administrator_module#ansible-collections-check-point-mgmt-cp-mgmt-administrator-module) β Manages administrator objects on Checkpoint over Web Services API
* [cp\_mgmt\_administrator\_facts](cp_mgmt_administrator_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-administrator-facts-module) β Get administrator objects facts on Checkpoint over Web Services API
* [cp\_mgmt\_application\_site](cp_mgmt_application_site_module#ansible-collections-check-point-mgmt-cp-mgmt-application-site-module) β Manages application-site objects on Check Point over Web Services API
* [cp\_mgmt\_application\_site\_category](cp_mgmt_application_site_category_module#ansible-collections-check-point-mgmt-cp-mgmt-application-site-category-module) β Manages application-site-category objects on Check Point over Web Services API
* [cp\_mgmt\_application\_site\_category\_facts](cp_mgmt_application_site_category_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-application-site-category-facts-module) β Get application-site-category objects facts on Check Point over Web Services API
* [cp\_mgmt\_application\_site\_facts](cp_mgmt_application_site_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-application-site-facts-module) β Get application-site objects facts on Check Point over Web Services API
* [cp\_mgmt\_application\_site\_group](cp_mgmt_application_site_group_module#ansible-collections-check-point-mgmt-cp-mgmt-application-site-group-module) β Manages application-site-group objects on Check Point over Web Services API
* [cp\_mgmt\_application\_site\_group\_facts](cp_mgmt_application_site_group_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-application-site-group-facts-module) β Get application-site-group objects facts on Check Point over Web Services API
* [cp\_mgmt\_assign\_global\_assignment](cp_mgmt_assign_global_assignment_module#ansible-collections-check-point-mgmt-cp-mgmt-assign-global-assignment-module) β assign global assignment on Check Point over Web Services API
* [cp\_mgmt\_data\_center\_object\_facts](cp_mgmt_data_center_object_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-data-center-object-facts-module) β Get data-center-object objects facts on Checkpoint over Web Services API
* [cp\_mgmt\_delete\_api\_key](cp_mgmt_delete_api_key_module#ansible-collections-check-point-mgmt-cp-mgmt-delete-api-key-module) β Delete the API key. For the key to be invalid publish is needed.
* [cp\_mgmt\_delete\_data\_center\_object](cp_mgmt_delete_data_center_object_module#ansible-collections-check-point-mgmt-cp-mgmt-delete-data-center-object-module) β Delete existing object using object name or uid.
* [cp\_mgmt\_delete\_domain](cp_mgmt_delete_domain_module#ansible-collections-check-point-mgmt-cp-mgmt-delete-domain-module) β Delete existing object using object name or uid.
* [cp\_mgmt\_delete\_nat\_rule](cp_mgmt_delete_nat_rule_module#ansible-collections-check-point-mgmt-cp-mgmt-delete-nat-rule-module) β Delete existing object using object name or uid.
* [cp\_mgmt\_discard](cp_mgmt_discard_module#ansible-collections-check-point-mgmt-cp-mgmt-discard-module) β All changes done by user are discarded and removed from database.
* [cp\_mgmt\_dns\_domain](cp_mgmt_dns_domain_module#ansible-collections-check-point-mgmt-cp-mgmt-dns-domain-module) β Manages dns-domain objects on Check Point over Web Services API
* [cp\_mgmt\_dns\_domain\_facts](cp_mgmt_dns_domain_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-dns-domain-facts-module) β Get dns-domain objects facts on Check Point over Web Services API
* [cp\_mgmt\_domain\_facts](cp_mgmt_domain_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-domain-facts-module) β Get domain objects facts on Checkpoint over Web Services API
* [cp\_mgmt\_dynamic\_object](cp_mgmt_dynamic_object_module#ansible-collections-check-point-mgmt-cp-mgmt-dynamic-object-module) β Manages dynamic-object objects on Check Point over Web Services API
* [cp\_mgmt\_dynamic\_object\_facts](cp_mgmt_dynamic_object_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-dynamic-object-facts-module) β Get dynamic-object objects facts on Check Point over Web Services API
* [cp\_mgmt\_exception\_group](cp_mgmt_exception_group_module#ansible-collections-check-point-mgmt-cp-mgmt-exception-group-module) β Manages exception-group objects on Check Point over Web Services API
* [cp\_mgmt\_exception\_group\_facts](cp_mgmt_exception_group_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-exception-group-facts-module) β Get exception-group objects facts on Check Point over Web Services API
* [cp\_mgmt\_global\_assignment](cp_mgmt_global_assignment_module#ansible-collections-check-point-mgmt-cp-mgmt-global-assignment-module) β Manages global-assignment objects on Check Point over Web Services API
* [cp\_mgmt\_global\_assignment\_facts](cp_mgmt_global_assignment_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-global-assignment-facts-module) β Get global-assignment objects facts on Check Point over Web Services API
* [cp\_mgmt\_group](cp_mgmt_group_module#ansible-collections-check-point-mgmt-cp-mgmt-group-module) β Manages group objects on Check Point over Web Services API
* [cp\_mgmt\_group\_facts](cp_mgmt_group_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-group-facts-module) β Get group objects facts on Check Point over Web Services API
* [cp\_mgmt\_group\_with\_exclusion](cp_mgmt_group_with_exclusion_module#ansible-collections-check-point-mgmt-cp-mgmt-group-with-exclusion-module) β Manages group-with-exclusion objects on Check Point over Web Services API
* [cp\_mgmt\_group\_with\_exclusion\_facts](cp_mgmt_group_with_exclusion_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-group-with-exclusion-facts-module) β Get group-with-exclusion objects facts on Check Point over Web Services API
* [cp\_mgmt\_host](cp_mgmt_host_module#ansible-collections-check-point-mgmt-cp-mgmt-host-module) β Manages host objects on Check Point over Web Services API
* [cp\_mgmt\_host\_facts](cp_mgmt_host_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-host-facts-module) β Get host objects facts on Check Point over Web Services API
* [cp\_mgmt\_https\_section](cp_mgmt_https_section_module#ansible-collections-check-point-mgmt-cp-mgmt-https-section-module) β Manages https-section objects on Checkpoint over Web Services API
* [cp\_mgmt\_identity\_tag](cp_mgmt_identity_tag_module#ansible-collections-check-point-mgmt-cp-mgmt-identity-tag-module) β Manages identity-tag objects on Checkpoint over Web Services API
* [cp\_mgmt\_identity\_tag\_facts](cp_mgmt_identity_tag_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-identity-tag-facts-module) β Get identity-tag objects facts on Checkpoint over Web Services API
* [cp\_mgmt\_install\_database](cp_mgmt_install_database_module#ansible-collections-check-point-mgmt-cp-mgmt-install-database-module) β Copies the user database and network objects information to specified targets.
* [cp\_mgmt\_install\_policy](cp_mgmt_install_policy_module#ansible-collections-check-point-mgmt-cp-mgmt-install-policy-module) β install policy on Check Point over Web Services API
* [cp\_mgmt\_install\_software\_package](cp_mgmt_install_software_package_module#ansible-collections-check-point-mgmt-cp-mgmt-install-software-package-module) β Installs the software package on target machines.
* [cp\_mgmt\_mds](cp_mgmt_mds_module#ansible-collections-check-point-mgmt-cp-mgmt-mds-module) β Manages mds objects on Checkpoint over Web Services API
* [cp\_mgmt\_mds\_facts](cp_mgmt_mds_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-mds-facts-module) β Get Multi-Domain Server (mds) objects facts on Check Point over Web Services API
* [cp\_mgmt\_multicast\_address\_range](cp_mgmt_multicast_address_range_module#ansible-collections-check-point-mgmt-cp-mgmt-multicast-address-range-module) β Manages multicast-address-range objects on Check Point over Web Services API
* [cp\_mgmt\_multicast\_address\_range\_facts](cp_mgmt_multicast_address_range_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-multicast-address-range-facts-module) β Get multicast-address-range objects facts on Check Point over Web Services API
* [cp\_mgmt\_nat\_rule\_facts](cp_mgmt_nat_rule_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-nat-rule-facts-module) β Get nat-rule objects facts on Checkpoint over Web Services API
* [cp\_mgmt\_nat\_section](cp_mgmt_nat_section_module#ansible-collections-check-point-mgmt-cp-mgmt-nat-section-module) β Manages nat-section objects on Checkpoint over Web Services API
* [cp\_mgmt\_network](cp_mgmt_network_module#ansible-collections-check-point-mgmt-cp-mgmt-network-module) β Manages network objects on Check Point over Web Services API
* [cp\_mgmt\_network\_facts](cp_mgmt_network_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-network-facts-module) β Get network objects facts on Check Point over Web Services API
* [cp\_mgmt\_package](cp_mgmt_package_module#ansible-collections-check-point-mgmt-cp-mgmt-package-module) β Manages package objects on Check Point over Web Services API
* [cp\_mgmt\_package\_facts](cp_mgmt_package_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-package-facts-module) β Get package objects facts on Check Point over Web Services API
* [cp\_mgmt\_publish](cp_mgmt_publish_module#ansible-collections-check-point-mgmt-cp-mgmt-publish-module) β All the changes done by this user will be seen by all users only after publish is called.
* [cp\_mgmt\_put\_file](cp_mgmt_put_file_module#ansible-collections-check-point-mgmt-cp-mgmt-put-file-module) β put file on Check Point over Web Services API
* [cp\_mgmt\_run\_ips\_update](cp_mgmt_run_ips_update_module#ansible-collections-check-point-mgmt-cp-mgmt-run-ips-update-module) β Runs IPS database update. If βpackage-pathβ is not provided server will try to get the latest package from the User Center.
* [cp\_mgmt\_run\_script](cp_mgmt_run_script_module#ansible-collections-check-point-mgmt-cp-mgmt-run-script-module) β Executes the script on a given list of targets.
* [cp\_mgmt\_security\_zone](cp_mgmt_security_zone_module#ansible-collections-check-point-mgmt-cp-mgmt-security-zone-module) β Manages security-zone objects on Check Point over Web Services API
* [cp\_mgmt\_security\_zone\_facts](cp_mgmt_security_zone_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-security-zone-facts-module) β Get security-zone objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_dce\_rpc](cp_mgmt_service_dce_rpc_module#ansible-collections-check-point-mgmt-cp-mgmt-service-dce-rpc-module) β Manages service-dce-rpc objects on Check Point over Web Services API
* [cp\_mgmt\_service\_dce\_rpc\_facts](cp_mgmt_service_dce_rpc_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-dce-rpc-facts-module) β Get service-dce-rpc objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_group](cp_mgmt_service_group_module#ansible-collections-check-point-mgmt-cp-mgmt-service-group-module) β Manages service-group objects on Check Point over Web Services API
* [cp\_mgmt\_service\_group\_facts](cp_mgmt_service_group_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-group-facts-module) β Get service-group objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_icmp](cp_mgmt_service_icmp_module#ansible-collections-check-point-mgmt-cp-mgmt-service-icmp-module) β Manages service-icmp objects on Check Point over Web Services API
* [cp\_mgmt\_service\_icmp6](cp_mgmt_service_icmp6_module#ansible-collections-check-point-mgmt-cp-mgmt-service-icmp6-module) β Manages service-icmp6 objects on Check Point over Web Services API
* [cp\_mgmt\_service\_icmp6\_facts](cp_mgmt_service_icmp6_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-icmp6-facts-module) β Get service-icmp6 objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_icmp\_facts](cp_mgmt_service_icmp_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-icmp-facts-module) β Get service-icmp objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_other](cp_mgmt_service_other_module#ansible-collections-check-point-mgmt-cp-mgmt-service-other-module) β Manages service-other objects on Check Point over Web Services API
* [cp\_mgmt\_service\_other\_facts](cp_mgmt_service_other_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-other-facts-module) β Get service-other objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_rpc](cp_mgmt_service_rpc_module#ansible-collections-check-point-mgmt-cp-mgmt-service-rpc-module) β Manages service-rpc objects on Check Point over Web Services API
* [cp\_mgmt\_service\_rpc\_facts](cp_mgmt_service_rpc_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-rpc-facts-module) β Get service-rpc objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_sctp](cp_mgmt_service_sctp_module#ansible-collections-check-point-mgmt-cp-mgmt-service-sctp-module) β Manages service-sctp objects on Check Point over Web Services API
* [cp\_mgmt\_service\_sctp\_facts](cp_mgmt_service_sctp_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-sctp-facts-module) β Get service-sctp objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_tcp](cp_mgmt_service_tcp_module#ansible-collections-check-point-mgmt-cp-mgmt-service-tcp-module) β Manages service-tcp objects on Check Point over Web Services API
* [cp\_mgmt\_service\_tcp\_facts](cp_mgmt_service_tcp_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-tcp-facts-module) β Get service-tcp objects facts on Check Point over Web Services API
* [cp\_mgmt\_service\_udp](cp_mgmt_service_udp_module#ansible-collections-check-point-mgmt-cp-mgmt-service-udp-module) β Manages service-udp objects on Check Point over Web Services API
* [cp\_mgmt\_service\_udp\_facts](cp_mgmt_service_udp_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-service-udp-facts-module) β Get service-udp objects facts on Check Point over Web Services API
* [cp\_mgmt\_session\_facts](cp_mgmt_session_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-session-facts-module) β Get session objects facts on Check Point over Web Services API
* [cp\_mgmt\_set\_domain](cp_mgmt_set_domain_module#ansible-collections-check-point-mgmt-cp-mgmt-set-domain-module) β Edit existing object using object name or uid.
* [cp\_mgmt\_set\_nat\_rule](cp_mgmt_set_nat_rule_module#ansible-collections-check-point-mgmt-cp-mgmt-set-nat-rule-module) β Edit existing object using object name or uid.
* [cp\_mgmt\_set\_session](cp_mgmt_set_session_module#ansible-collections-check-point-mgmt-cp-mgmt-set-session-module) β Edit userβs current session.
* [cp\_mgmt\_show\_access\_section](cp_mgmt_show_access_section_module#ansible-collections-check-point-mgmt-cp-mgmt-show-access-section-module) β Retrieve existing object using object name or uid.
* [cp\_mgmt\_show\_https\_section](cp_mgmt_show_https_section_module#ansible-collections-check-point-mgmt-cp-mgmt-show-https-section-module) β Retrieve existing HTTPS Inspection section using section name or uid and layer name.
* [cp\_mgmt\_show\_logs](cp_mgmt_show_logs_module#ansible-collections-check-point-mgmt-cp-mgmt-show-logs-module) β Showing logs according to the given filter.
* [cp\_mgmt\_show\_nat\_section](cp_mgmt_show_nat_section_module#ansible-collections-check-point-mgmt-cp-mgmt-show-nat-section-module) β Retrieve existing object using object name or uid.
* [cp\_mgmt\_show\_software\_package\_details](cp_mgmt_show_software_package_details_module#ansible-collections-check-point-mgmt-cp-mgmt-show-software-package-details-module) β Gets the software package information from the cloud.
* [cp\_mgmt\_show\_task](cp_mgmt_show_task_module#ansible-collections-check-point-mgmt-cp-mgmt-show-task-module) β Show task progress and details.
* [cp\_mgmt\_show\_tasks](cp_mgmt_show_tasks_module#ansible-collections-check-point-mgmt-cp-mgmt-show-tasks-module) β Retrieve all tasks and show their progress and details.
* [cp\_mgmt\_simple\_gateway](cp_mgmt_simple_gateway_module#ansible-collections-check-point-mgmt-cp-mgmt-simple-gateway-module) β Manages simple-gateway objects on Check Point over Web Services API
* [cp\_mgmt\_simple\_gateway\_facts](cp_mgmt_simple_gateway_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-simple-gateway-facts-module) β Get simple-gateway objects facts on Check Point over Web Services API
* [cp\_mgmt\_tag](cp_mgmt_tag_module#ansible-collections-check-point-mgmt-cp-mgmt-tag-module) β Manages tag objects on Check Point over Web Services API
* [cp\_mgmt\_tag\_facts](cp_mgmt_tag_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-tag-facts-module) β Get tag objects facts on Check Point over Web Services API
* [cp\_mgmt\_threat\_exception](cp_mgmt_threat_exception_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-exception-module) β Manages threat-exception objects on Check Point over Web Services API
* [cp\_mgmt\_threat\_exception\_facts](cp_mgmt_threat_exception_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-exception-facts-module) β Get threat-exception objects facts on Check Point over Web Services API
* [cp\_mgmt\_threat\_indicator](cp_mgmt_threat_indicator_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-indicator-module) β Manages threat-indicator objects on Check Point over Web Services API
* [cp\_mgmt\_threat\_indicator\_facts](cp_mgmt_threat_indicator_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-indicator-facts-module) β Get threat-indicator objects facts on Check Point over Web Services API
* [cp\_mgmt\_threat\_layer](cp_mgmt_threat_layer_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-layer-module) β Manages threat-layer objects on Check Point over Web Services API
* [cp\_mgmt\_threat\_layer\_facts](cp_mgmt_threat_layer_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-layer-facts-module) β Get threat-layer objects facts on Check Point over Web Services API
* [cp\_mgmt\_threat\_profile](cp_mgmt_threat_profile_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-profile-module) β Manages threat-profile objects on Check Point over Web Services API
* [cp\_mgmt\_threat\_profile\_facts](cp_mgmt_threat_profile_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-profile-facts-module) β Get threat-profile objects facts on Check Point over Web Services API
* [cp\_mgmt\_threat\_protection\_override](cp_mgmt_threat_protection_override_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-protection-override-module) β Edit existing object using object name or uid.
* [cp\_mgmt\_threat\_rule](cp_mgmt_threat_rule_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-rule-module) β Manages threat-rule objects on Check Point over Web Services API
* [cp\_mgmt\_threat\_rule\_facts](cp_mgmt_threat_rule_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-threat-rule-facts-module) β Get threat-rule objects facts on Check Point over Web Services API
* [cp\_mgmt\_time](cp_mgmt_time_module#ansible-collections-check-point-mgmt-cp-mgmt-time-module) β Manages time objects on Check Point over Web Services API
* [cp\_mgmt\_time\_facts](cp_mgmt_time_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-time-facts-module) β Get time objects facts on Check Point over Web Services API
* [cp\_mgmt\_trusted\_client](cp_mgmt_trusted_client_module#ansible-collections-check-point-mgmt-cp-mgmt-trusted-client-module) β Manages trusted-client objects on Checkpoint over Web Services API
* [cp\_mgmt\_trusted\_client\_facts](cp_mgmt_trusted_client_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-trusted-client-facts-module) β Get trusted-client objects facts on Checkpoint over Web Services API
* [cp\_mgmt\_uninstall\_software\_package](cp_mgmt_uninstall_software_package_module#ansible-collections-check-point-mgmt-cp-mgmt-uninstall-software-package-module) β Uninstalls the software package from target machines.
* [cp\_mgmt\_verify\_policy](cp_mgmt_verify_policy_module#ansible-collections-check-point-mgmt-cp-mgmt-verify-policy-module) β Verifies the policy of the selected package.
* [cp\_mgmt\_verify\_software\_package](cp_mgmt_verify_software_package_module#ansible-collections-check-point-mgmt-cp-mgmt-verify-software-package-module) β Verifies the software package on target machines.
* [cp\_mgmt\_vpn\_community\_meshed](cp_mgmt_vpn_community_meshed_module#ansible-collections-check-point-mgmt-cp-mgmt-vpn-community-meshed-module) β Manages vpn-community-meshed objects on Check Point over Web Services API
* [cp\_mgmt\_vpn\_community\_meshed\_facts](cp_mgmt_vpn_community_meshed_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-vpn-community-meshed-facts-module) β Get vpn-community-meshed objects facts on Check Point over Web Services API
* [cp\_mgmt\_vpn\_community\_star](cp_mgmt_vpn_community_star_module#ansible-collections-check-point-mgmt-cp-mgmt-vpn-community-star-module) β Manages vpn-community-star objects on Check Point over Web Services API
* [cp\_mgmt\_vpn\_community\_star\_facts](cp_mgmt_vpn_community_star_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-vpn-community-star-facts-module) β Get vpn-community-star objects facts on Check Point over Web Services API
* [cp\_mgmt\_wildcard](cp_mgmt_wildcard_module#ansible-collections-check-point-mgmt-cp-mgmt-wildcard-module) β Manages wildcard objects on Check Point over Web Services API
* [cp\_mgmt\_wildcard\_facts](cp_mgmt_wildcard_facts_module#ansible-collections-check-point-mgmt-cp-mgmt-wildcard-facts-module) β Get wildcard objects facts on Check Point over Web Services API
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
| programming_docs |
ansible check_point.mgmt.cp_mgmt_package_facts β Get package objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_package\_facts β Get package objects facts on Check Point over Web Services API
===========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_package_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get package objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-package
cp_mgmt_package_facts:
name: New_Standard_Package_1
- name: show-packages
cp_mgmt_package_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_discard β All changes done by user are discarded and removed from database. check\_point.mgmt.cp\_mgmt\_discard β All changes done by user are discarded and removed from database.
=======================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_discard`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* All changes done by user are discarded and removed from database.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **uid** string | | Session unique identifier. Specify it to discard a different session than the one you currently use. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: discard
cp_mgmt_discard:
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_discard** dictionary | always. | The checkpoint discard output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_service_icmp6_facts β Get service-icmp6 objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_icmp6\_facts β Get service-icmp6 objects facts on Check Point over Web Services API
========================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_icmp6_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get service-icmp6 objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-service-icmp6
cp_mgmt_service_icmp6_facts:
name: echo-reply6
- name: show-services-icmp6
cp_mgmt_service_icmp6_facts:
limit: 2
offset: 4
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_vpn_community_meshed β Manages vpn-community-meshed objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_vpn\_community\_meshed β Manages vpn-community-meshed objects on Check Point over Web Services API
==============================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_vpn_community_meshed`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages vpn-community-meshed objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **encryption\_method** string | **Choices:*** prefer ikev2 but support ikev1
* ikev2 only
* ikev1 for ipv4 and ikev2 for ipv6 only
| The encryption method to be used. |
| **encryption\_suite** string | **Choices:*** suite-b-gcm-256
* custom
* vpn b
* vpn a
* suite-b-gcm-128
| The encryption suite to be used. |
| **gateways** list / elements=string | | Collection of Gateway objects identified by the name or UID. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **ike\_phase\_1** dictionary | | Ike Phase 1 settings. Only applicable when the encryption-suite is set to [custom]. |
| | **data\_integrity** string | **Choices:*** aes-xcbc
* sha1
* sha256
* sha384
* md5
| The hash algorithm to be used. |
| | **diffie\_hellman\_group** string | **Choices:*** group-1
* group-2
* group-5
* group-14
* group-19
* group-20
| The Diffie-Hellman group to be used. |
| | **encryption\_algorithm** string | **Choices:*** cast
* aes-256
* des
* aes-128
* 3des
| The encryption algorithm to be used. |
| **ike\_phase\_2** dictionary | | Ike Phase 2 settings. Only applicable when the encryption-suite is set to [custom]. |
| | **data\_integrity** string | **Choices:*** aes-xcbc
* sha1
* sha256
* sha384
* md5
| The hash algorithm to be used. |
| | **encryption\_algorithm** string | **Choices:*** cast
* aes-gcm-256
* cast-40
* aes-256
* des
* aes-128
* 3des
* des-40cp
* aes-gcm-128
* none
| The encryption algorithm to be used. |
| **name** string / required | | Object name. |
| **shared\_secrets** list / elements=string | | Shared secrets for external gateways. |
| | **external\_gateway** string | | External gateway identified by the name or UID. |
| | **shared\_secret** string | | Shared secret. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **use\_shared\_secret** boolean | **Choices:*** no
* yes
| Indicates whether the shared secret should be used for all external gateways. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-vpn-community-meshed
cp_mgmt_vpn_community_meshed:
encryption_method: prefer ikev2 but support ikev1
encryption_suite: custom
ike_phase_1:
data_integrity: sha1
diffie_hellman_group: group 19
encryption_algorithm: aes-128
ike_phase_2:
data_integrity: aes-xcbc
encryption_algorithm: aes-gcm-128
name: New_VPN_Community_Meshed_1
state: present
- name: set-vpn-community-meshed
cp_mgmt_vpn_community_meshed:
encryption_method: ikev2 only
encryption_suite: custom
ike_phase_1:
data_integrity: sha1
diffie_hellman_group: group 19
encryption_algorithm: aes-128
ike_phase_2:
data_integrity: aes-xcbc
encryption_algorithm: aes-gcm-128
name: New_VPN_Community_Meshed_1
state: present
- name: delete-vpn-community-meshed
cp_mgmt_vpn_community_meshed:
name: New_VPN_Community_Meshed_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 |
| --- | --- | --- |
| **cp\_mgmt\_vpn\_community\_meshed** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_access_role_facts β Get access-role objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_access\_role\_facts β Get access-role objects facts on Check Point over Web Services API
====================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_access_role_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get access-role objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-access-role
cp_mgmt_access_role_facts:
name: New Access Role 1
- name: show-access-roles
cp_mgmt_access_role_facts:
details_level: full
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_service_group_facts β Get service-group objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_group\_facts β Get service-group objects facts on Check Point over Web Services API
========================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_group_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get service-group objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dereference\_group\_members** boolean | **Choices:*** no
* yes
| Indicates whether to dereference "members" field by details level for every object in reply. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_as\_ranges** boolean | **Choices:*** no
* yes
| When true, the service group's matched content is displayed as ranges of port numbers rather than service objects.<br />Objects that are not represented using port numbers are presented as objects.<br />The 'members' parameter is omitted from the response and instead the 'ranges' parameter is displayed. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-service-group
cp_mgmt_service_group_facts:
name: New Service Group 1
- name: show-service-groups
cp_mgmt_service_group_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_administrator β Manages administrator objects on Checkpoint over Web Services API check\_point.mgmt.cp\_mgmt\_administrator β Manages administrator objects on Checkpoint over Web Services API
=============================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_administrator`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages administrator objects on Checkpoint devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **authentication\_method** string | **Choices:*** undefined
* check point password
* os password
* securid
* radius
* tacacs
* ad authentication
* api key
| Authentication method. |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **email** string | | Administrator email. |
| **expiration\_date** string | | Format, YYYY-MM-DD, YYYY-mm-ddThh,mm,ss. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **multi\_domain\_profile** string | | Administrator multi-domain profile. |
| **must\_change\_password** boolean | **Choices:*** no
* yes
| True if administrator must change password on the next login. |
| **name** string / required | | Object name. |
| **password** string | | Administrator password. |
| **password\_hash** string | | Administrator password hash. |
| **permissions\_profile** list / elements=string | | Administrator permissions profile. Permissions profile should not be provided when multi-domain-profile is set to "Multi-Domain Super User" or "Domain Super User". |
| | **profile** string | | Permission profile. |
| **phone\_number** string | | Administrator phone number. |
| **radius\_server** string | | RADIUS server object identified by the name or UID. Must be set when "authentication-method" was selected to be "RADIUS". |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tacacs\_server** string | | TACACS server object identified by the name or UID. Must be set when "authentication-method" was selected to be "TACACS". |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-administrator
cp_mgmt_administrator:
authentication_method: INTERNAL_PASSWORD
email: [email protected]
must_change_password: false
name: admin
password: secret
permissions_profile: read write all
phone_number: 1800-800-800
state: present
- name: set-administrator
cp_mgmt_administrator:
name: admin
password: bew secret
permissions_profile: read only profile
state: present
- name: delete-administrator
cp_mgmt_administrator:
name: admin
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 |
| --- | --- | --- |
| **cp\_mgmt\_administrator** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_run_ips_update β Runs IPS database update. If βpackage-pathβ is not provided server will try to get the latest package from the User Center. check\_point.mgmt.cp\_mgmt\_run\_ips\_update β Runs IPS database update. If βpackage-pathβ is not provided server will try to get the latest package from the User Center.
==========================================================================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_run_ips_update`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Runs IPS database update. If βpackage-pathβ is not provided server will try to get the latest package from the User Center.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **package\_path** string | | Offline update package path. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: run-ips-update
cp_mgmt_run_ips_update:
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_run\_ips\_update** dictionary | always. | The checkpoint run-ips-update output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_global_assignment β Manages global-assignment objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_global\_assignment β Manages global-assignment objects on Check Point over Web Services API
=======================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_global_assignment`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages global-assignment objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **dependent\_domain** string | | N/A |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **global\_access\_policy** string | | Global domain access policy that is assigned to a dependent domain. |
| **global\_domain** string | | N/A |
| **global\_threat\_prevention\_policy** string | | Global domain threat prevention policy that is assigned to a dependent domain. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **manage\_protection\_actions** boolean | **Choices:*** no
* yes
| N/A |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-global-assignment
cp_mgmt_global_assignment:
dependent_domain: domain2
global_access_policy: standard
global_domain: Global
global_threat_prevention_policy: standard
manage_protection_actions: true
state: present
- name: set-global-assignment
cp_mgmt_global_assignment:
dependent_domain: domain1
global_domain: Global2
global_threat_prevention_policy: ''
manage_protection_actions: false
state: present
- name: delete-global-assignment
cp_mgmt_global_assignment:
dependent_domain: domain1
global_domain: Global2
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 |
| --- | --- | --- |
| **cp\_mgmt\_global\_assignment** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_simple_gateway β Manages simple-gateway objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_simple\_gateway β Manages simple-gateway objects on Check Point over Web Services API
=================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_simple_gateway`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages simple-gateway objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **anti\_bot** boolean | **Choices:*** no
* yes
| Anti-Bot blade enabled. |
| **anti\_virus** boolean | **Choices:*** no
* yes
| Anti-Virus blade enabled. |
| **application\_control** boolean | **Choices:*** no
* yes
| Application Control blade enabled. |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **content\_awareness** boolean | **Choices:*** no
* yes
| Content Awareness blade enabled. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **firewall** boolean | **Choices:*** no
* yes
| Firewall blade enabled. |
| **firewall\_settings** dictionary | | N/A |
| | **auto\_calculate\_connections\_hash\_table\_size\_and\_memory\_pool** boolean | **Choices:*** no
* yes
| N/A |
| | **auto\_maximum\_limit\_for\_concurrent\_connections** boolean | **Choices:*** no
* yes
| N/A |
| | **connections\_hash\_size** integer | | N/A |
| | **maximum\_limit\_for\_concurrent\_connections** integer | | N/A |
| | **maximum\_memory\_pool\_size** integer | | N/A |
| | **memory\_pool\_size** integer | | N/A |
| **gateway\_version** string | | Gateway platform version. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **interfaces** list / elements=string | | Network interfaces. When a gateway is updated with a new interfaces, the existing interfaces are removed. |
| | **anti\_spoofing** boolean | **Choices:*** no
* yes
| N/A |
| | **anti\_spoofing\_settings** dictionary | | N/A |
| | | **action** string | **Choices:*** prevent
* detect
| If packets will be rejected (the Prevent option) or whether the packets will be monitored (the Detect option). |
| | **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| | **comments** string | | Comments string. |
| | **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| | **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| | **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| | **ip\_address** string | | IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. |
| | **ipv4\_address** string | | IPv4 address. |
| | **ipv4\_mask\_length** string | | IPv4 network mask length. |
| | **ipv4\_network\_mask** string | | IPv4 network address. |
| | **ipv6\_address** string | | IPv6 address. |
| | **ipv6\_mask\_length** string | | IPv6 network mask length. |
| | **ipv6\_network\_mask** string | | IPv6 network address. |
| | **mask\_length** string | | IPv4 or IPv6 network mask length. |
| | **name** string | | Object name. |
| | **network\_mask** string | | IPv4 or IPv6 network mask. If both masks are required use ipv4-network-mask and ipv6-network-mask fields explicitly. Instead of providing mask itself it is possible to specify IPv4 or IPv6 mask length in mask-length field. If both masks length are required use ipv4-mask-length and ipv6-mask-length fields explicitly. |
| | **security\_zone** boolean | **Choices:*** no
* yes
| N/A |
| | **security\_zone\_settings** dictionary | | N/A |
| | | **auto\_calculated** boolean | **Choices:*** no
* yes
| Security Zone is calculated according to where the interface leads to. |
| | | **specific\_zone** string | | Security Zone specified manually. |
| | **tags** list / elements=string | | Collection of tag identifiers. |
| | **topology** string | **Choices:*** automatic
* external
* internal
| N/A |
| | **topology\_settings** dictionary | | N/A |
| | | **interface\_leads\_to\_dmz** boolean | **Choices:*** no
* yes
| Whether this interface leads to demilitarized zone (perimeter network). |
| | | **ip\_address\_behind\_this\_interface** string | **Choices:*** not defined
* network defined by the interface ip and net mask
* network defined by routing
* specific
| N/A |
| | | **specific\_network** string | | Network behind this interface. |
| **ip\_address** string | | IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. |
| **ips** boolean | **Choices:*** no
* yes
| Intrusion Prevention System blade enabled. |
| **ipv4\_address** string | | IPv4 address. |
| **ipv6\_address** string | | IPv6 address. |
| **logs\_settings** dictionary | | N/A |
| | **alert\_when\_free\_disk\_space\_below** boolean | **Choices:*** no
* yes
| N/A |
| | **alert\_when\_free\_disk\_space\_below\_threshold** integer | | N/A |
| | **alert\_when\_free\_disk\_space\_below\_type** string | **Choices:*** none
* log
* popup alert
* mail alert
* snmp trap alert
* user defined alert no.1
* user defined alert no.2
* user defined alert no.3
| N/A |
| | **before\_delete\_keep\_logs\_from\_the\_last\_days** boolean | **Choices:*** no
* yes
| N/A |
| | **before\_delete\_keep\_logs\_from\_the\_last\_days\_threshold** integer | | N/A |
| | **before\_delete\_run\_script** boolean | **Choices:*** no
* yes
| N/A |
| | **before\_delete\_run\_script\_command** string | | N/A |
| | **delete\_index\_files\_older\_than\_days** boolean | **Choices:*** no
* yes
| N/A |
| | **delete\_index\_files\_older\_than\_days\_threshold** integer | | N/A |
| | **delete\_index\_files\_when\_index\_size\_above** boolean | **Choices:*** no
* yes
| N/A |
| | **delete\_index\_files\_when\_index\_size\_above\_threshold** integer | | N/A |
| | **delete\_when\_free\_disk\_space\_below** boolean | **Choices:*** no
* yes
| N/A |
| | **delete\_when\_free\_disk\_space\_below\_threshold** integer | | N/A |
| | **detect\_new\_citrix\_ica\_application\_names** boolean | **Choices:*** no
* yes
| N/A |
| | **forward\_logs\_to\_log\_server** boolean | **Choices:*** no
* yes
| N/A |
| | **forward\_logs\_to\_log\_server\_name** string | | N/A |
| | **forward\_logs\_to\_log\_server\_schedule\_name** string | | N/A |
| | **free\_disk\_space\_metrics** string | **Choices:*** mbytes
* percent
| N/A |
| | **perform\_log\_rotate\_before\_log\_forwarding** boolean | **Choices:*** no
* yes
| N/A |
| | **reject\_connections\_when\_free\_disk\_space\_below\_threshold** boolean | **Choices:*** no
* yes
| N/A |
| | **reserve\_for\_packet\_capture\_metrics** string | **Choices:*** percent
* mbytes
| N/A |
| | **reserve\_for\_packet\_capture\_threshold** integer | | N/A |
| | **rotate\_log\_by\_file\_size** boolean | **Choices:*** no
* yes
| N/A |
| | **rotate\_log\_file\_size\_threshold** integer | | N/A |
| | **rotate\_log\_on\_schedule** boolean | **Choices:*** no
* yes
| N/A |
| | **rotate\_log\_schedule\_name** string | | N/A |
| | **stop\_logging\_when\_free\_disk\_space\_below** boolean | **Choices:*** no
* yes
| N/A |
| | **stop\_logging\_when\_free\_disk\_space\_below\_threshold** integer | | N/A |
| | **turn\_on\_qos\_logging** boolean | **Choices:*** no
* yes
| N/A |
| | **update\_account\_log\_every** integer | | N/A |
| **name** string / required | | Object name. |
| **one\_time\_password** string | | N/A |
| **os\_name** string | | Gateway platform operating system. |
| **save\_logs\_locally** boolean | **Choices:*** no
* yes
| Save logs locally on the gateway. |
| **send\_alerts\_to\_server** list / elements=string | | Server(s) to send alerts to. |
| **send\_logs\_to\_backup\_server** list / elements=string | | Backup server(s) to send logs to. |
| **send\_logs\_to\_server** list / elements=string | | Server(s) to send logs to. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **threat\_emulation** boolean | **Choices:*** no
* yes
| Threat Emulation blade enabled. |
| **threat\_extraction** boolean | **Choices:*** no
* yes
| Threat Extraction blade enabled. |
| **url\_filtering** boolean | **Choices:*** no
* yes
| URL Filtering blade enabled. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **vpn** boolean | **Choices:*** no
* yes
| VPN blade enabled. |
| **vpn\_settings** dictionary | | Gateway VPN settings. |
| | **maximum\_concurrent\_ike\_negotiations** integer | | N/A |
| | **maximum\_concurrent\_tunnels** integer | | N/A |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-simple-gateway
cp_mgmt_simple_gateway:
ip_address: 192.0.2.1
name: gw1
state: present
- name: set-simple-gateway
cp_mgmt_simple_gateway:
anti_bot: true
anti_virus: true
application_control: true
ips: true
name: test_gateway
state: present
threat_emulation: true
url_filtering: true
- name: delete-simple-gateway
cp_mgmt_simple_gateway:
name: gw1
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 |
| --- | --- | --- |
| **cp\_mgmt\_simple\_gateway** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_vpn_community_star β Manages vpn-community-star objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_vpn\_community\_star β Manages vpn-community-star objects on Check Point over Web Services API
==========================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_vpn_community_star`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages vpn-community-star objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **center\_gateways** list / elements=string | | Collection of Gateway objects representing center gateways identified by the name or UID. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **encryption\_method** string | **Choices:*** prefer ikev2 but support ikev1
* ikev2 only
* ikev1 for ipv4 and ikev2 for ipv6 only
| The encryption method to be used. |
| **encryption\_suite** string | **Choices:*** suite-b-gcm-256
* custom
* vpn b
* vpn a
* suite-b-gcm-128
| The encryption suite to be used. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **ike\_phase\_1** dictionary | | Ike Phase 1 settings. Only applicable when the encryption-suite is set to [custom]. |
| | **data\_integrity** string | **Choices:*** aes-xcbc
* sha1
* sha256
* sha384
* md5
| The hash algorithm to be used. |
| | **diffie\_hellman\_group** string | **Choices:*** group-1
* group-2
* group-5
* group-14
* group-19
* group-20
| The Diffie-Hellman group to be used. |
| | **encryption\_algorithm** string | **Choices:*** cast
* aes-256
* des
* aes-128
* 3des
| The encryption algorithm to be used. |
| **ike\_phase\_2** dictionary | | Ike Phase 2 settings. Only applicable when the encryption-suite is set to [custom]. |
| | **data\_integrity** string | **Choices:*** aes-xcbc
* sha1
* sha256
* sha384
* md5
| The hash algorithm to be used. |
| | **encryption\_algorithm** string | **Choices:*** cast
* aes-gcm-256
* cast-40
* aes-256
* des
* aes-128
* 3des
* des-40cp
* aes-gcm-128
* none
| The encryption algorithm to be used. |
| **mesh\_center\_gateways** boolean | **Choices:*** no
* yes
| Indicates whether the meshed community is in center. |
| **name** string / required | | Object name. |
| **satellite\_gateways** list / elements=string | | Collection of Gateway objects representing satellite gateways identified by the name or UID. |
| **shared\_secrets** list / elements=string | | Shared secrets for external gateways. |
| | **external\_gateway** string | | External gateway identified by the name or UID. |
| | **shared\_secret** string | | Shared secret. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **use\_shared\_secret** boolean | **Choices:*** no
* yes
| Indicates whether the shared secret should be used for all external gateways. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-vpn-community-star
cp_mgmt_vpn_community_star:
center_gateways: Second_Security_Gateway
encryption_method: prefer ikev2 but support ikev1
encryption_suite: custom
ike_phase_1:
data_integrity: sha1
diffie_hellman_group: group 19
encryption_algorithm: aes-128
ike_phase_2:
data_integrity: aes-xcbc
encryption_algorithm: aes-gcm-128
name: New_VPN_Community_Star_1
state: present
- name: set-vpn-community-star
cp_mgmt_vpn_community_star:
encryption_method: ikev2 only
encryption_suite: custom
ike_phase_1:
data_integrity: sha1
diffie_hellman_group: group 19
encryption_algorithm: aes-128
ike_phase_2:
data_integrity: aes-xcbc
encryption_algorithm: aes-gcm-128
name: New_VPN_Community_Star_1
state: present
- name: delete-vpn-community-star
cp_mgmt_vpn_community_star:
name: New_VPN_Community_Star_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 |
| --- | --- | --- |
| **cp\_mgmt\_vpn\_community\_star** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_service_group β Manages service-group objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_group β Manages service-group objects on Check Point over Web Services API
===============================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_group`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages service-group objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **members** list / elements=string | | Collection of Network objects identified by the name or UID. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-service-group
cp_mgmt_service_group:
members:
- https
- bootp
- nisplus
- HP-OpCdistm
name: New Service Group 1
state: present
- name: set-service-group
cp_mgmt_service_group:
name: New Service Group 1
members:
- https
- bootp
- nisplus
state: present
- name: delete-service-group
cp_mgmt_service_group:
name: New Service Group 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 |
| --- | --- | --- |
| **cp\_mgmt\_service\_group** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_add_api_key β Add API key for administrator, to enable login with it. For the key to be valid publish is needed. check\_point.mgmt.cp\_mgmt\_add\_api\_key β Add API key for administrator, to enable login with it. For the key to be valid publish is needed.
==============================================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_add_api_key`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add API key for administrator, to enable login with it. For the key to be valid publish is needed. <br>When using mgmt\_cli tool, add -f json to get the key in the commandβs output.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **admin\_name** string | | Administrator name to generate API key for. |
| **admin\_uid** string | | Administrator uid to generate API key for. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-api-key
cp_mgmt_add_api_key:
admin_name: admin
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 |
| --- | --- | --- |
| **cp\_mgmt\_add\_api\_key** dictionary | always. | The checkpoint add-api-key output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_service_other_facts β Get service-other objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_other\_facts β Get service-other objects facts on Check Point over Web Services API
========================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_other_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get service-other objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-service-other
cp_mgmt_service_other_facts:
name: New_Service_1
- name: show-services-other
cp_mgmt_service_other_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_https_section β Manages https-section objects on Checkpoint over Web Services API check\_point.mgmt.cp\_mgmt\_https\_section β Manages https-section objects on Checkpoint over Web Services API
==============================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_https_section`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages https-section objects on Checkpoint devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **layer** string | | Layer that holds the Object. Identified by the Name or UID. |
| **name** string / required | | Object name. |
| **position** string | | Position in the rulebase. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-https-section
cp_mgmt_https_section:
layer: Default Layer
name: New Section 1
position: 1
state: present
- name: set-https-section
cp_mgmt_https_section:
layer: Default Layer
name: New Section 1
state: present
- name: delete-https-section
cp_mgmt_https_section:
layer: Default Layer
name: New Section 2
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 |
| --- | --- | --- |
| **cp\_mgmt\_https\_section** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_service_other β Manages service-other objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_other β Manages service-other objects on Check Point over Web Services API
===============================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_other`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages service-other objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **accept\_replies** boolean | **Choices:*** no
* yes
| Specifies whether Other Service replies are to be accepted. |
| **action** string | | Contains an INSPECT expression that defines the action to take if a rule containing this service is matched. Example, set r\_mhandler &open\_ssl\_handler sets a handler on the connection. |
| **aggressive\_aging** dictionary | | Sets short (aggressive) timeouts for idle connections. |
| | **default\_timeout** integer | | Default aggressive aging timeout in seconds. |
| | **enable** boolean | **Choices:*** no
* yes
| N/A |
| | **timeout** integer | | Aggressive aging timeout in seconds. |
| | **use\_default\_timeout** boolean | **Choices:*** no
* yes
| N/A |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **ip\_protocol** integer | | IP protocol number. |
| **keep\_connections\_open\_after\_policy\_installation** boolean | **Choices:*** no
* yes
| Keep connections open after policy has been installed even if they are not allowed under the new policy. This overrides the settings in the Connection Persistence page. If you change this property, the change will not affect open connections, but only future connections. |
| **match** string | | Contains an INSPECT expression that defines the matching criteria. The connection is examined against the expression during the first packet. Example, tcp, dport = 21, direction = 0 matches incoming FTP control connections. |
| **match\_for\_any** boolean | **Choices:*** no
* yes
| Indicates whether this service is used when 'Any' is set as the rule's service and there are several service objects with the same source port and protocol. |
| **name** string / required | | Object name. |
| **override\_default\_settings** boolean | **Choices:*** no
* yes
| Indicates whether this service is a Data Domain service which has been overridden. |
| **session\_timeout** integer | | Time (in seconds) before the session times out. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **sync\_connections\_on\_cluster** boolean | **Choices:*** no
* yes
| Enables state-synchronized High Availability or Load Sharing on a ClusterXL or OPSEC-certified cluster. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **use\_default\_session\_timeout** boolean | **Choices:*** no
* yes
| Use default virtual session timeout. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-service-other
cp_mgmt_service_other:
aggressive_aging:
enable: true
timeout: 360
use_default_timeout: false
ip_protocol: 51
keep_connections_open_after_policy_installation: false
match_for_any: true
name: New_Service_1
session_timeout: 0
state: present
sync_connections_on_cluster: true
- name: set-service-other
cp_mgmt_service_other:
aggressive_aging:
default_timeout: 3600
color: green
name: New_Service_1
state: present
- name: delete-service-other
cp_mgmt_service_other:
name: New_Service_2
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 |
| --- | --- | --- |
| **cp\_mgmt\_service\_other** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_exception_group β Manages exception-group objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_exception\_group β Manages exception-group objects on Check Point over Web Services API
===================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_exception_group`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages exception-group objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **applied\_profile** string | | The threat profile to apply this group to in the case of apply-on threat-rules-with-specific-profile. |
| **applied\_threat\_rules** dictionary | | The threat rules to apply this group on in the case of apply-on manually-select-threat-rules. |
| | **add** list / elements=string | | Adds to collection of values |
| | | **layer** string | | The layer of the threat rule to which the group is to be attached. |
| | | **name** string | | The name of the threat rule to which the group is to be attached. |
| | | **position** string | | Position in the rulebase. |
| | | **rule\_number** string | | The rule-number of the threat rule to which the group is to be attached. |
| **apply\_on** string | **Choices:*** all-threat-rules
* all-threat-rules-with-specific-profile
* manually-select-threat-rules
| An exception group can be set to apply on all threat rules, all threat rules which have a specific profile, or those rules manually chosen by the user. |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-exception-group
cp_mgmt_exception_group:
applied_threat_rules.0.layer: MyLayer
applied_threat_rules.0.name: MyThreatRule
apply_on: manually-select-threat-rules
name: exception_group_2
state: present
- name: set-exception-group
cp_mgmt_exception_group:
apply_on: all-threat-rules
name: exception_group_2
state: present
tags: tag3
- name: delete-exception-group
cp_mgmt_exception_group:
name: exception_group_2
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 |
| --- | --- | --- |
| **cp\_mgmt\_exception\_group** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_group_with_exclusion_facts β Get group-with-exclusion objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_group\_with\_exclusion\_facts β Get group-with-exclusion objects facts on Check Point over Web Services API
=======================================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_group_with_exclusion_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get group-with-exclusion objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_as\_ranges** boolean | **Choices:*** no
* yes
| When true, the group with exclusion's matched content is displayed as ranges of IP addresses rather than network objects.<br />Objects that are not represented using IP addresses are presented as objects.<br />The 'include' and 'except' parameters are omitted from the response and instead the 'ranges' parameter is displayed. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-group-with-exclusion
cp_mgmt_group_with_exclusion_facts:
name: Group with exclusion
- name: show-groups-with-exclusion
cp_mgmt_group_with_exclusion_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.checkpoint_object_facts β Get object facts on Check Point over Web Services API check\_point.mgmt.checkpoint\_object\_facts β Get object facts on Check Point over Web Services API
===================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.checkpoint_object_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Get object facts on Check Point devices. All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **ip\_only** boolean | **Choices:*** **no** β
* yes
| Filter only by IP address. |
| **object\_filter** string | | Filter expression for search. It accepts AND/OR logical operators and performs a textual and IP address search. To search only by IP address, set ip\_only argument to True. which can be filtered with the filter argument. |
| **object\_type** string | | Type of the object to search. Must be a valid API resource name |
| **uid** string | | UID of the object. If UID is not provided, it will do a full search which can be filtered with the filter argument. |
Examples
--------
```
- name: Get object facts
checkpoint_object_facts:
object_filter: 192.168.30.30
ip_only: 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 |
| --- | --- | --- |
| **ansible\_hosts** list / elements=string | always. | The checkpoint object facts. |
### Authors
* Ansible by Red Hat (@rcarrillocruz)
ansible check_point.mgmt.cp_mgmt_service_sctp_facts β Get service-sctp objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_sctp\_facts β Get service-sctp objects facts on Check Point over Web Services API
======================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_sctp_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get service-sctp objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-service-sctp
cp_mgmt_service_sctp_facts:
name: New_SCTP_Service_1
- name: show-services-sctp
cp_mgmt_service_sctp_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_time β Manages time objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_time β Manages time objects on Check Point over Web Services API
============================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_time`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages time objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **end** dictionary | | End time. Note, Each gateway may interpret this time differently according to its time zone. |
| | **date** string | | Date in format dd-MMM-yyyy. |
| | **iso\_8601** string | | Date and time represented in international ISO 8601 format. Time zone information is ignored. |
| | **posix** integer | | Number of milliseconds that have elapsed since 00,00,00, 1 January 1970. |
| | **time** string | | Time in format HH,mm. |
| **end\_never** boolean | **Choices:*** no
* yes
| End never. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **hours\_ranges** list / elements=string | | Hours recurrence. Note, Each gateway may interpret this time differently according to its time zone. |
| | **enabled** boolean | **Choices:*** no
* yes
| Is hour range enabled. |
| | **from** string | | Time in format HH,MM. |
| | **index** integer | | Hour range index. |
| | **to** string | | Time in format HH,MM. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string / required | | Object name. |
| **recurrence** dictionary | | Days recurrence. |
| | **days** list / elements=string | | Valid on specific days. Multiple options, support range of days in months. Example,["1","3","9-20"]. |
| | **month** string | | Valid on month. Example, "1", "2","12","Any". |
| | **pattern** string | | Valid on "Daily", "Weekly", "Monthly" base. |
| | **weekdays** list / elements=string | | Valid on weekdays. Example, "Sun", "Mon"..."Sat". |
| **start** dictionary | | Starting time. Note, Each gateway may interpret this time differently according to its time zone. |
| | **date** string | | Date in format dd-MMM-yyyy. |
| | **iso\_8601** string | | Date and time represented in international ISO 8601 format. Time zone information is ignored. |
| | **posix** integer | | Number of milliseconds that have elapsed since 00,00,00, 1 January 1970. |
| | **time** string | | Time in format HH,mm. |
| **start\_now** boolean | **Choices:*** no
* yes
| Start immediately. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-time
cp_mgmt_time:
end:
date: 24-Nov-2014
time: '21:22'
end_never: 'false'
hours_ranges:
- enabled: true
from: 00:00
index: 1
to: 00:00
- enabled: false
from: 00:00
index: 2
to: 00:00
name: timeObject1
recurrence:
days:
- '1'
month: Any
pattern: Daily
weekdays:
- Sun
- Mon
start_now: 'true'
state: present
- name: set-time
cp_mgmt_time:
hours_ranges:
- from: 00:22
to: 00:33
name: timeObject1
recurrence:
month: Any
pattern: Weekly
weekdays:
- Fri
state: present
- name: delete-time
cp_mgmt_time:
name: timeObject1
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 |
| --- | --- | --- |
| **cp\_mgmt\_time** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_verify_software_package β Verifies the software package on target machines. check\_point.mgmt.cp\_mgmt\_verify\_software\_package β Verifies the software package on target machines.
=========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_verify_software_package`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Verifies the software package on target machines.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **concurrency\_limit** integer | | The number of targets, on which the same package is installed at the same time. |
| **download\_package** boolean | **Choices:*** no
* yes
| NOTE, Supported from Check Point version R81 Should the package be downloaded before verification. |
| **download\_package\_from** string | **Choices:*** automatic
* central
* target-machine
| NOTE, Supported from Check Point version R81 Where is the package located. |
| **name** string | | The name of the software package. |
| **targets** list / elements=string | | On what targets to execute this command. Targets may be identified by their name, or object unique identifier. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: verify-software-package
cp_mgmt_verify_software_package:
download_package: 'true'
download_package_from: target-machine
name: Check_Point_R80_40_JHF_MCD_DEMO_019_MAIN_Bundle_T1_VISIBLE_FULL.tgz
targets.1: corporate-gateway
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_verify\_software\_package** dictionary | always. | The checkpoint verify-software-package output. |
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_service_icmp β Manages service-icmp objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_icmp β Manages service-icmp objects on Check Point over Web Services API
=============================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_icmp`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages service-icmp objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **icmp\_code** integer | | As listed in, <a href="http,//www.iana.org/assignments/icmp-parameters" target="\_blank">RFC 792</a>. |
| **icmp\_type** integer | | As listed in, <a href="http,//www.iana.org/assignments/icmp-parameters" target="\_blank">RFC 792</a>. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **keep\_connections\_open\_after\_policy\_installation** boolean | **Choices:*** no
* yes
| Keep connections open after policy has been installed even if they are not allowed under the new policy. This overrides the settings in the Connection Persistence page. If you change this property, the change will not affect open connections, but only future connections. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-service-icmp
cp_mgmt_service_icmp:
icmp_code: 7
icmp_type: 5
name: Icmp1
state: present
- name: set-service-icmp
cp_mgmt_service_icmp:
icmp_code: 13
icmp_type: 45
name: icmp1
state: present
- name: delete-service-icmp
cp_mgmt_service_icmp:
name: icmp3
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 |
| --- | --- | --- |
| **cp\_mgmt\_service\_icmp** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_threat_layer β Manages threat-layer objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_threat\_layer β Manages threat-layer objects on Check Point over Web Services API
=============================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_threat_layer`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages threat-layer objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **add\_default\_rule** boolean | **Choices:*** no
* yes
| Indicates whether to include a default rule in the new layer. |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-threat-layer
cp_mgmt_threat_layer:
name: New Layer 1
state: present
- name: delete-threat-layer
cp_mgmt_threat_layer:
name: New Layer 2
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 |
| --- | --- | --- |
| **cp\_mgmt\_threat\_layer** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_service_icmp6 β Manages service-icmp6 objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_icmp6 β Manages service-icmp6 objects on Check Point over Web Services API
===============================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_icmp6`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages service-icmp6 objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **icmp\_code** integer | | As listed in, <a href="http,//www.iana.org/assignments/icmp-parameters" target="\_blank">RFC 792</a>. |
| **icmp\_type** integer | | As listed in, <a href="http,//www.iana.org/assignments/icmp-parameters" target="\_blank">RFC 792</a>. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **keep\_connections\_open\_after\_policy\_installation** boolean | **Choices:*** no
* yes
| Keep connections open after policy has been installed even if they are not allowed under the new policy. This overrides the settings in the Connection Persistence page. If you change this property, the change will not affect open connections, but only future connections. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-service-icmp6
cp_mgmt_service_icmp6:
icmp_code: 7
icmp_type: 5
name: Icmp1
state: present
- name: set-service-icmp6
cp_mgmt_service_icmp6:
icmp_code: 13
icmp_type: 45
name: icmp1
state: present
- name: delete-service-icmp6
cp_mgmt_service_icmp6:
name: icmp2
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 |
| --- | --- | --- |
| **cp\_mgmt\_service\_icmp6** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_group_facts β Get group objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_group\_facts β Get group objects facts on Check Point over Web Services API
=======================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_group_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get group objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dereference\_group\_members** boolean | **Choices:*** no
* yes
| Indicates whether to dereference "members" field by details level for every object in reply. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_as\_ranges** boolean | **Choices:*** no
* yes
| When true, the group's matched content is displayed as ranges of IP addresses rather than network objects.<br />Objects that are not represented using IP addresses are presented as objects.<br />The 'members' parameter is omitted from the response and instead the 'ranges' parameter is displayed. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-group
cp_mgmt_group_facts:
name: Demo_Group
- name: show-groups
cp_mgmt_group_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_package β Manages package objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_package β Manages package objects on Check Point over Web Services API
==================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_package`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages package objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access** boolean | **Choices:*** no
* yes
| True - enables, False - disables access & NAT policies, empty - nothing is changed. |
| **access\_layers** dictionary | | Access policy layers. |
| | **add** list / elements=string | | Collection of Access layer objects to be added identified by the name or UID. |
| | | **name** string | | Layer name or UID. |
| | | **position** integer | | Layer position. |
| | **remove** list / elements=string | | Collection of Access layer objects to be removed identified by the name or UID. |
| | **value** list / elements=string | | Collection of Access layer objects to be set identified by the name or UID. Replaces existing Access layers. |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **desktop\_security** boolean | **Choices:*** no
* yes
| True - enables, False - disables Desktop security policy, empty - nothing is changed. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **installation\_targets** list / elements=string | | Which Gateways identified by the name or UID to install the policy on. |
| **name** string / required | | Object name. |
| **qos** boolean | **Choices:*** no
* yes
| True - enables, False - disables QoS policy, empty - nothing is changed. |
| **qos\_policy\_type** string | **Choices:*** recommended
* express
| QoS policy type. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **threat\_layers** dictionary | | Threat policy layers. |
| | **add** list / elements=string | | Collection of Threat layer objects to be added identified by the name or UID. |
| | | **name** string | | Layer name or UID. |
| | | **position** integer | | Layer position. |
| | **remove** list / elements=string | | Collection of Threat layer objects to be removed identified by the name or UID. |
| | **value** list / elements=string | | Collection of Threat layer objects to be set identified by the name or UID. Replaces existing Threat layers. |
| **threat\_prevention** boolean | **Choices:*** no
* yes
| True - enables, False - disables Threat policy, empty - nothing is changed. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **vpn\_traditional\_mode** boolean | **Choices:*** no
* yes
| True - enables, False - disables VPN traditional mode, empty - nothing is changed. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-package
cp_mgmt_package:
access: true
color: green
comments: My Comments
name: New_Standard_Package_1
state: present
threat_prevention: false
- name: set-package
cp_mgmt_package:
access_layers:
add:
- name: New Access Layer 1
position: 1
name: Standard
state: present
threat_layers:
add:
- name: New Layer 1
position: 2
- name: delete-package
cp_mgmt_package:
name: New Standard Package 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 |
| --- | --- | --- |
| **cp\_mgmt\_package** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_identity_tag β Manages identity-tag objects on Checkpoint over Web Services API check\_point.mgmt.cp\_mgmt\_identity\_tag β Manages identity-tag objects on Checkpoint over Web Services API
============================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_identity_tag`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages identity-tag objects on Checkpoint devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **external\_identifier** string | | External identifier. For example, Cisco ISE security group tag. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-identity-tag
cp_mgmt_identity_tag:
external_identifier: some external identifier
name: mytag
state: present
- name: set-identity-tag
cp_mgmt_identity_tag:
external_identifier: Cisco ISE security group tag
name: mytag
state: present
- name: delete-identity-tag
cp_mgmt_identity_tag:
name: myidentitytag
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 |
| --- | --- | --- |
| **cp\_mgmt\_identity\_tag** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_publish β All the changes done by this user will be seen by all users only after publish is called. check\_point.mgmt.cp\_mgmt\_publish β All the changes done by this user will be seen by all users only after publish is called.
===============================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_publish`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* All the changes done by this user will be seen by all users only after publish is called.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **uid** string | | Session unique identifier. Specify it to publish a different session than the one you currently use. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: publish
cp_mgmt_publish:
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_publish** dictionary | always. | The checkpoint publish output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_verify_policy β Verifies the policy of the selected package. check\_point.mgmt.cp\_mgmt\_verify\_policy β Verifies the policy of the selected package.
=========================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_verify_policy`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Verifies the policy of the selected package.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **policy\_package** string | | Policy package identified by the name or UID. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: verify-policy
cp_mgmt_verify_policy:
policy_package: standard
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_verify\_policy** dictionary | always. | The checkpoint verify-policy output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_add_nat_rule β Create new object. check\_point.mgmt.cp\_mgmt\_add\_nat\_rule β Create new object.
===============================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_add_nat_rule`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create new object.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **enabled** boolean | **Choices:*** no
* yes
| Enable/Disable the rule. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **install\_on** list / elements=string | | Which Gateways identified by the name or UID to install the policy on. |
| **method** string | **Choices:*** static
* hide
* nat64
* nat46
| Nat method. |
| **original\_destination** string | | Original destination. |
| **original\_service** string | | Original service. |
| **original\_source** string | | Original source. |
| **package** string | | Name of the package. |
| **position** string | | Position in the rulebase. |
| **translated\_destination** string | | Translated destination. |
| **translated\_service** string | | Translated service. |
| **translated\_source** string | | Translated source. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-nat-rule
cp_mgmt_add_nat_rule:
comments: comment example1 nat999
enabled: false
install_on:
- Policy Targets
original_destination: All_Internet
original_source: Any
package: standard
position: 1
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 |
| --- | --- | --- |
| **cp\_mgmt\_add\_nat\_rule** dictionary | always. | The checkpoint add-nat-rule output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_mds β Manages mds objects on Checkpoint over Web Services API check\_point.mgmt.cp\_mgmt\_mds β Manages mds objects on Checkpoint over Web Services API
=========================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_mds`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages mds objects on Checkpoint devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **hardware** string | | Hardware name. For example, Open server, Smart-1, Other. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **ip\_address** string | | IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. |
| **ip\_pool\_first** string | | First IP address in the range. |
| **ip\_pool\_last** string | | Last IP address in the range. |
| **ipv4\_address** string | | IPv4 address. |
| **ipv4\_pool\_first** string | | First IPv4 address in the range. |
| **ipv4\_pool\_last** string | | Last IPv4 address in the range. |
| **ipv6\_address** string | | IPv6 address. |
| **ipv6\_pool\_first** string | | First IPv6 address in the range. |
| **ipv6\_pool\_last** string | | Last IPv6 address in the range. |
| **name** string / required | | Object name. |
| **one\_time\_password** string | | Secure internal connection one time password. |
| **os** string | | Operating system name. For example, Gaia, Linux, SecurePlatform. |
| **server\_type** string | **Choices:*** multi-domain server
* multi-domain log server
| Type of the management server. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | System version. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-mds
cp_mgmt_mds:
hardware: open server
ip_address: 1.1.1.1
ip_pool_first: 2.2.2.2
ip_pool_last: 3.3.3.3
name: mymds
os: gaia
server_type: multi-domain server
state: present
- name: set-mds
cp_mgmt_mds:
hardware: Smart-1
ip_address: 1.2.3.4
name: mymds
os: linux
state: present
- name: delete-mds
cp_mgmt_mds:
name: mymds
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 |
| --- | --- | --- |
| **cp\_mgmt\_mds** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_wildcard_facts β Get wildcard objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_wildcard\_facts β Get wildcard objects facts on Check Point over Web Services API
=============================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_wildcard_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get wildcard objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-wildcard
cp_mgmt_wildcard_facts:
name: New Wildcard 1
- name: show-wildcards
cp_mgmt_wildcard_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_install_policy β install policy on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_install\_policy β install policy on Check Point over Web Services API
=================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_install_policy`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* install policy on Check Point over Web Services API
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access** boolean | **Choices:*** no
* yes
| Set to be true in order to install the Access Control policy. By default, the value is true if Access Control policy is enabled on the input policy package, otherwise false. |
| **desktop\_security** boolean | **Choices:*** no
* yes
| Set to be true in order to install the Desktop Security policy. By default, the value is true if desktop security policy is enabled on the input policy package, otherwise false. |
| **install\_on\_all\_cluster\_members\_or\_fail** boolean | **Choices:*** no
* yes
| Relevant for the gateway clusters. If true, the policy is installed on all the cluster members. If the installation on a cluster member fails, don't install on that cluster. |
| **policy\_package** string | | The name of the Policy Package to be installed. |
| **prepare\_only** boolean | **Choices:*** no
* yes
| If true, prepares the policy for the installation, but doesn't install it on an installation target. |
| **qos** boolean | **Choices:*** no
* yes
| Set to be true in order to install the QoS policy. By default, the value is true if Quality-of-Service policy is enabled on the input policy package, otherwise false. |
| **revision** string | | The UID of the revision of the policy to install. |
| **targets** list / elements=string | | On what targets to execute this command. Targets may be identified by their name, or object unique identifier. |
| **threat\_prevention** boolean | **Choices:*** no
* yes
| Set to be true in order to install the Threat Prevention policy. By default, the value is true if Threat Prevention policy is enabled on the input policy package, otherwise false. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: install-policy
cp_mgmt_install_policy:
access: true
policy_package: standard
targets:
- corporate-gateway
threat_prevention: 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 |
| --- | --- | --- |
| **cp\_mgmt\_install\_policy** dictionary | always. | The checkpoint install-policy output. |
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_access_rule_facts β Get access-rule objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_access\_rule\_facts β Get access-rule objects facts on Check Point over Web Services API
====================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_access_rule_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get access-rule objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dereference\_group\_members** boolean | **Choices:*** no
* yes
| Indicates whether to dereference "members" field by details level for every object in reply. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **filter** string | | Search expression to filter the rulebase. The provided text should be exactly the same as it would be given in Smart Console. The logical operators in the expression ('AND', 'OR') should be provided in capital letters. If an operator is not used, the default OR operator applies. |
| **filter\_settings** dictionary | | Sets filter preferences. |
| | **packet\_search\_settings** dictionary | | When 'search-mode' is set to 'packet', this object allows to set the packet search preferences. |
| | | **expand\_group\_members** boolean | **Choices:*** no
* yes
| When true, if the search expression contains a UID or a name of a group object, results will include rules that match on at least one member of the group. |
| | | **expand\_group\_with\_exclusion\_members** boolean | **Choices:*** no
* yes
| When true, if the search expression contains a UID or a name of a group-with-exclusion object, results will include rules that match at least one member of the "include" part and is not a member of the "except" part. |
| | | **match\_on\_any** boolean | **Choices:*** no
* yes
| Whether to match on 'Any' object. |
| | | **match\_on\_group\_with\_exclusion** boolean | **Choices:*** no
* yes
| Whether to match on a group-with-exclusion. |
| | | **match\_on\_negate** boolean | **Choices:*** no
* yes
| Whether to match on a negated cell. |
| | **search\_mode** string | **Choices:*** general
* packet
| When set to 'general', both the Full Text Search and Packet Search are enabled. In this mode, Packet Search will not match on 'Any' object, a negated cell or a group-with-exclusion. When the search-mode is set to 'packet', by default, the match on 'Any' object, a negated cell or a group-with-exclusion are enabled. packet-search-settings may be provided to change the default behavior. |
| **hits\_settings** dictionary | | N/A |
| | **from\_date** string | | Format, 'YYYY-MM-DD', 'YYYY-mm-ddThh:mm:ss'. |
| | **target** string | | Target gateway name or UID. |
| | **to\_date** string | | Format, 'YYYY-MM-DD', 'YYYY-mm-ddThh:mm:ss'. |
| **layer** string | | Layer that the rule belongs to identified by the name or UID. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. Should be unique in the domain. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **package** string | | Name of the package. |
| **show\_as\_ranges** boolean | **Choices:*** no
* yes
| When true, the source, destination and services & applications parameters are displayed as ranges of IP addresses and port numbers rather than network objects.<br /> Objects that are not represented using IP addresses or port numbers are presented as objects.<br /> In addition, the response of each rule does not contain the parameters, source, source-negate, destination, destination-negate, service and service-negate, but instead it contains the parameters, source-ranges, destination-ranges and service-ranges.<br /><br /> Note, Requesting to show rules as ranges is limited up to 20 rules per request, otherwise an error is returned. If you wish to request more rules, use the offset and limit parameters to limit your request. |
| **show\_hits** boolean | **Choices:*** no
* yes
| N/A |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **use\_object\_dictionary** boolean | **Choices:*** no
* yes
| N/A |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-access-rule
cp_mgmt_access_rule_facts:
layer: Network
name: Rule 1
- name: show-access-rulebase
cp_mgmt_access_rule_facts:
details_level: standard
limit: 20
name: Network
offset: 0
use_object_dictionary: true
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_data_center_object_facts β Get data-center-object objects facts on Checkpoint over Web Services API check\_point.mgmt.cp\_mgmt\_data\_center\_object\_facts β Get data-center-object objects facts on Checkpoint over Web Services API
==================================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_data_center_object_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get data-center-object objects facts on Checkpoint devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | The maximal number of returned results. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Number of the results to initially skip. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts the results by search criteria. Automatically sorts the results by Name, in the ascending order. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-data-center-object
cp_mgmt_data_center_object_facts:
name: VM1 mgmt name
- name: show-data-center-objects
cp_mgmt_data_center_object_facts:
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_host_facts β Get host objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_host\_facts β Get host objects facts on Check Point over Web Services API
=====================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_host_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get host objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-host
cp_mgmt_host_facts:
name: New Host 1
- name: show-hosts
cp_mgmt_host_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_delete_data_center_object β Delete existing object using object name or uid. check\_point.mgmt.cp\_mgmt\_delete\_data\_center\_object β Delete existing object using object name or uid.
===========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_delete_data_center_object`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Delete existing object using object name or uid.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string | | Object name. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: delete-data-center-object
cp_mgmt_delete_data_center_object:
name: VM1 mgmt name
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 |
| --- | --- | --- |
| **cp\_mgmt\_delete\_data\_center\_object** dictionary | always. | The checkpoint delete-data-center-object output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_set_session β Edit userβs current session. check\_point.mgmt.cp\_mgmt\_set\_session β Edit userβs current session.
=======================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_set_session`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Edit userβs current session.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **description** string | | Session description. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **new\_name** string | | New name of the object. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: set-session
cp_mgmt_set_session:
description: Session to work on ticket number CR00323665
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 |
| --- | --- | --- |
| **cp\_mgmt\_set\_session** dictionary | always. | The checkpoint set-session output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_domain_facts β Get domain objects facts on Checkpoint over Web Services API check\_point.mgmt.cp\_mgmt\_domain\_facts β Get domain objects facts on Checkpoint over Web Services API
========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_domain_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get domain objects facts on Checkpoint devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **filter** string | | Search expression to filter objects by. The provided text should be exactly the same as it would be given in SmartConsole Object Explorer. The logical operators in the expression ('AND', 'OR') should be provided in capital letters. The search involves both a IP search and a textual search in name, comment, tags etc. |
| **limit** integer | | The maximal number of returned results. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Number of the results to initially skip. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts the results by search criteria. Automatically sorts the results by Name, in the ascending order. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-domain
cp_mgmt_domain_facts:
name: domain1
- name: show-domains
cp_mgmt_domain_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_service_udp_facts β Get service-udp objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_udp\_facts β Get service-udp objects facts on Check Point over Web Services API
====================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_udp_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get service-udp objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-service-udp
cp_mgmt_service_udp_facts:
name: bootp
- name: show-services-udp
cp_mgmt_service_udp_facts:
details_level: standard
limit: 10
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_set_nat_rule β Edit existing object using object name or uid. check\_point.mgmt.cp\_mgmt\_set\_nat\_rule β Edit existing object using object name or uid.
===========================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_set_nat_rule`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Edit existing object using object name or uid.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **enabled** boolean | **Choices:*** no
* yes
| Enable/Disable the rule. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **install\_on** list / elements=string | | Which Gateways identified by the name or UID to install the policy on. |
| **method** string | **Choices:*** static
* hide
* nat64
* nat46
| Nat method. |
| **new\_position** string | | New position in the rulebase. |
| **original\_destination** string | | Original destination. |
| **original\_service** string | | Original service. |
| **original\_source** string | | Original source. |
| **package** string | | Name of the package. |
| **rule\_number** string | | Rule number. |
| **translated\_destination** string | | Translated destination. |
| **translated\_service** string | | Translated service. |
| **translated\_source** string | | Translated source. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: set-nat-rule
cp_mgmt_set_nat_rule:
comments: rule for RND members RNDNetwork-> RND to Internal Network
enabled: false
original_service: ssh_version_2
original_source: Any
package: standard
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 |
| --- | --- | --- |
| **cp\_mgmt\_set\_nat\_rule** dictionary | always. | The checkpoint set-nat-rule output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_trusted_client β Manages trusted-client objects on Checkpoint over Web Services API check\_point.mgmt.cp\_mgmt\_trusted\_client β Manages trusted-client objects on Checkpoint over Web Services API
================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_trusted_client`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages trusted-client objects on Checkpoint devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **domains\_assignment** list / elements=string | | Domains to be added to this profile. Use domain name only. See example below, "add-trusted-client (with domain)". |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **ip\_address** string | | IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. |
| **ip\_address\_first** string | | First IP address in the range. If both IPv4 and IPv6 address ranges are required, use the ipv4-address-first and the ipv6-address-first fields instead. |
| **ip\_address\_last** string | | Last IP address in the range. If both IPv4 and IPv6 address ranges are required, use the ipv4-address-first and the ipv6-address-first fields instead. |
| **ipv4\_address** string | | IPv4 address. |
| **ipv4\_address\_first** string | | First IPv4 address in the range. |
| **ipv4\_address\_last** string | | Last IPv4 address in the range. |
| **ipv6\_address** string | | IPv6 address. |
| **ipv6\_address\_first** string | | First IPv6 address in the range. |
| **ipv6\_address\_last** string | | Last IPv6 address in the range. |
| **mask\_length** integer | | IPv4 or IPv6 mask length. If both masks are required use mask-length4 and mask-length6 fields explicitly. |
| **mask\_length4** integer | | IPv4 mask length. |
| **mask\_length6** integer | | IPv6 mask length. |
| **multi\_domain\_server\_trusted\_client** boolean | **Choices:*** no
* yes
| Let this trusted client connect to all Multi-Domain Servers in the deployment. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **type** string | **Choices:*** any
* domain
* ipv4 address
* ipv4 address range
* ipv4 netmask
* ipv6 address
* ipv6 address range
* ipv6 netmask
* name
* wild cards (ip only)
| Trusted client type. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
| **wild\_card** string | | IP wild card (e.g. 192.0.2.\*). |
Examples
--------
```
- name: add-trusted-client
cp_mgmt_trusted_client:
name: my client
state: present
type: ANY
- name: set-trusted-client
cp_mgmt_trusted_client:
ip_address: 192.0.2.1
mask_length: '24'
name: my client
state: present
type: NETMASK
- name: delete-trusted-client
cp_mgmt_trusted_client:
name: my 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 |
| --- | --- | --- |
| **cp\_mgmt\_trusted\_client** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_vpn_community_star_facts β Get vpn-community-star objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_vpn\_community\_star\_facts β Get vpn-community-star objects facts on Check Point over Web Services API
===================================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_vpn_community_star_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get vpn-community-star objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-vpn-community-star
cp_mgmt_vpn_community_star_facts:
name: New_VPN_Community_Meshed_1
- name: show-vpn-communities-star
cp_mgmt_vpn_community_star_facts:
details_level: full
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.checkpoint_host_facts β Get host objects facts on Check Point over Web Services API check\_point.mgmt.checkpoint\_host\_facts β Get host objects facts on Check Point over Web Services API
=======================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.checkpoint_host_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Get host objects facts on Check Point devices. All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name** string | | Name of the host object. If name is not provided, UID is required. |
| **uid** string | | UID of the host object. If UID is not provided, name is required. |
Examples
--------
```
- name: Get host object facts
checkpoint_host_facts:
name: attacker
```
Return Values
-------------
Common return 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\_hosts** list / elements=string | always. | The checkpoint host object facts. |
### Authors
* Ansible by Red Hat (@rcarrillocruz)
ansible check_point.mgmt.cp_mgmt_service_dce_rpc β Manages service-dce-rpc objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_dce\_rpc β Manages service-dce-rpc objects on Check Point over Web Services API
====================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_dce_rpc`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages service-dce-rpc objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **interface\_uuid** string | | Network interface UUID. |
| **keep\_connections\_open\_after\_policy\_installation** boolean | **Choices:*** no
* yes
| Keep connections open after policy has been installed even if they are not allowed under the new policy. This overrides the settings in the Connection Persistence page. If you change this property, the change will not affect open connections, but only future connections. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-service-dce-rpc
cp_mgmt_service_dce_rpc:
interface_uuid: 97aeb460-9aea-11d5-bd16-0090272ccb30
keep_connections_open_after_policy_installation: false
name: New_DCE-RPC_Service_1
state: present
- name: set-service-dce-rpc
cp_mgmt_service_dce_rpc:
color: green
interface_uuid: 44aeb460-9aea-11d5-bd16-009027266b30
name: New_DCE-RPC_Service_1
state: present
- name: delete-service-dce-rpc
cp_mgmt_service_dce_rpc:
name: New_DCE-RPC_Service_2
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 |
| --- | --- | --- |
| **cp\_mgmt\_service\_dce\_rpc** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_threat_indicator β Manages threat-indicator objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_threat\_indicator β Manages threat-indicator objects on Check Point over Web Services API
=====================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_threat_indicator`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages threat-indicator objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string | **Choices:*** Inactive
* Ask
* Prevent
* Detect
| The indicator's action. |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string / required | | Object name. |
| **observables** list / elements=string | | The indicator's observables. |
| | **comments** string | | Comments string. |
| | **confidence** string | **Choices:*** low
* medium
* high
* critical
| The confidence level the indicator has that a real threat has been uncovered. |
| | **domain** string | | The name of a domain. |
| | **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| | **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| | **ip\_address** string | | A valid IP-Address. |
| | **ip\_address\_first** string | | A valid IP-Address, the beginning of the range. If you configure this parameter with a value, you must also configure the value of the 'ip-address-last' parameter. |
| | **ip\_address\_last** string | | A valid IP-Address, the end of the range. If you configure this parameter with a value, you must also configure the value of the 'ip-address-first' parameter. |
| | **mail\_cc** string | | A valid E-Mail address, cc field. |
| | **mail\_from** string | | A valid E-Mail address, sender field. |
| | **mail\_reply\_to** string | | A valid E-Mail address, reply-to field. |
| | **mail\_subject** string | | Subject of E-Mail. |
| | **mail\_to** string | | A valid E-Mail address, recipient filed. |
| | **md5** string | | A valid MD5 sequence. |
| | **name** string | | Object name. Should be unique in the domain. |
| | **product** string | **Choices:*** AV
* AB
| The software blade that processes the observable, AV - AntiVirus, AB - AntiBot. |
| | **severity** string | **Choices:*** low
* medium
* high
* critical
| The severity level of the threat. |
| | **url** string | | A valid URL. |
| **observables\_raw\_data** string | | The contents of a file containing the indicator's observables. |
| **profile\_overrides** list / elements=string | | Profiles in which to override the indicator's default action. |
| | **action** string | **Choices:*** Inactive
* Ask
* Prevent
* Detect
| The indicator's action in this profile. |
| | **profile** string | | The profile in which to override the indicator's action. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-threat-indicator
cp_mgmt_threat_indicator:
action: ask
ignore_warnings: true
name: My_Indicator
observables:
- confidence: medium
mail_to: [email protected]
name: My_Observable
product: AV
severity: low
profile_overrides:
- action: detect
profile: My_Profile
state: present
- name: set-threat-indicator
cp_mgmt_threat_indicator:
action: prevent
ignore_warnings: true
name: My_Indicator
state: present
- name: delete-threat-indicator
cp_mgmt_threat_indicator:
name: My_Indicator
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 |
| --- | --- | --- |
| **cp\_mgmt\_threat\_indicator** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_application_site β Manages application-site objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_application\_site β Manages application-site objects on Check Point over Web Services API
=====================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_application_site`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages application-site objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **additional\_categories** list / elements=string | | Used to configure or edit the additional categories of a custom application / site used in the Application and URL Filtering or Threat Prevention. |
| **application\_signature** string | | Application signature generated by <a href="https,//supportcenter.checkpoint.com/supportcenter/portal?eventSubmit\_doGoviewsolutiondetails=&solutionid=sk103051">Signature Tool</a>. |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **description** string | | A description for the application. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string / required | | Object name. |
| **primary\_category** string | | Each application is assigned to one primary category based on its most defining aspect. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **url\_list** list / elements=string | | URLs that determine this particular application. |
| **urls\_defined\_as\_regular\_expression** boolean | **Choices:*** no
* yes
| States whether the URL is defined as a Regular Expression or not. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-application-site
cp_mgmt_application_site:
additional_categories:
- Instant Chat
- Supports Streaming
- New Application Site Category 1
description: My Application Site
name: New Application Site 1
primary_category: Social Networking
state: present
url_list:
- www.cnet.com
- www.stackoverflow.com
urls_defined_as_regular_expression: false
- name: set-application-site
cp_mgmt_application_site:
description: My New Application Site
name: New Application Site 1
primary_category: Instant Chat
state: present
urls_defined_as_regular_expression: true
- name: delete-application-site
cp_mgmt_application_site:
name: New Application Site 2
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 |
| --- | --- | --- |
| **cp\_mgmt\_application\_site** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_threat_protection_override β Edit existing object using object name or uid. check\_point.mgmt.cp\_mgmt\_threat\_protection\_override β Edit existing object using object name or uid.
=========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_threat_protection_override`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Edit existing object using object name or uid.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **comments** string | | Protection comments. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **follow\_up** boolean | **Choices:*** no
* yes
| Tag the protection with pre-defined follow-up flag. |
| **name** string | | Object name. |
| **overrides** list / elements=string | | Overrides per profile for this protection<br> Note, Remove override for Core protections removes only the action's override. Remove override for Threat Cloud protections removes the action, track and packet captures. |
| | **action** string | **Choices:*** Threat Cloud: Inactive
* Detect
* Prevent <br> Core: Drop
* Inactive
* Accept
| Protection action. |
| | **capture\_packets** boolean | **Choices:*** no
* yes
| Capture packets. |
| | **profile** string | | Profile name. |
| | **track** string | **Choices:*** none
* log
* alert
* mail
* snmp trap
* user alert
* user alert 1
* user alert 2
| Tracking method for protection. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: threat_protection_override
cp_mgmt_threat_protection_override:
name: FTP Commands
overrides:
- action: inactive
capture_packets: true
profile: New Profile 1
track: None
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 |
| --- | --- | --- |
| **cp\_mgmt\_threat\_protection\_override** dictionary | always. | The checkpoint threat\_protection\_override output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_multicast_address_range_facts β Get multicast-address-range objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_multicast\_address\_range\_facts β Get multicast-address-range objects facts on Check Point over Web Services API
=============================================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_multicast_address_range_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get multicast-address-range objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-multicast-address-range
cp_mgmt_multicast_address_range_facts:
name: New Multicast Address Range
- name: show-multicast-address-ranges
cp_mgmt_multicast_address_range_facts:
details_level: full
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_session_facts β Get session objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_session\_facts β Get session objects facts on Check Point over Web Services API
===========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_session_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get session objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the descending order by the session publish time. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **view\_published\_sessions** boolean | **Choices:*** no
* yes
| Show a list of published sessions. |
Examples
--------
```
- name: show-session
cp_mgmt_session_facts:
- name: show-sessions
cp_mgmt_session_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_administrator_facts β Get administrator objects facts on Checkpoint over Web Services API check\_point.mgmt.cp\_mgmt\_administrator\_facts β Get administrator objects facts on Checkpoint over Web Services API
======================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_administrator_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get administrator objects facts on Checkpoint devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | The maximal number of returned results. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Number of the results to initially skip. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts the results by search criteria. Automatically sorts the results by Name, in the ascending order. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-administrator
cp_mgmt_administrator_facts:
name: admin
- name: show-administrators
cp_mgmt_administrator_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_access_rule β Manages access-rule objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_access\_rule β Manages access-rule objects on Check Point over Web Services API
===========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_access_rule`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages access-rule objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string | | a "Accept", "Drop", "Ask", "Inform", "Reject", "User Auth", "Client Auth", "Apply Layer". |
| **action\_settings** dictionary | | Action settings. |
| | **enable\_identity\_captive\_portal** boolean | **Choices:*** no
* yes
| N/A |
| | **limit** string | | N/A |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **comments** string | | Comments string. |
| **content** list / elements=string | | List of processed file types that this rule applies on. |
| **content\_direction** string | **Choices:*** any
* up
* down
| On which direction the file types processing is applied. |
| **content\_negate** boolean | **Choices:*** no
* yes
| True if negate is set for data. |
| **custom\_fields** dictionary | | Custom fields. |
| | **field\_1** string | | First custom field. |
| | **field\_2** string | | Second custom field. |
| | **field\_3** string | | Third custom field. |
| **destination** list / elements=string | | Collection of Network objects identified by the name or UID. |
| **destination\_negate** boolean | **Choices:*** no
* yes
| True if negate is set for destination. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **enabled** boolean | **Choices:*** no
* yes
| Enable/Disable the rule. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **inline\_layer** string | | Inline Layer identified by the name or UID. Relevant only if "Action" was set to "Apply Layer". |
| **install\_on** list / elements=string | | Which Gateways identified by the name or UID to install the policy on. |
| **layer** string | | Layer that the rule belongs to identified by the name or UID. |
| **name** string / required | | Object name. |
| **position** string | | Position in the rulebase. |
| **service** list / elements=string | | Collection of Network objects identified by the name or UID. |
| **service\_negate** boolean | **Choices:*** no
* yes
| True if negate is set for service. |
| **source** list / elements=string | | Collection of Network objects identified by the name or UID. |
| **source\_negate** boolean | **Choices:*** no
* yes
| True if negate is set for source. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **time** list / elements=string | | List of time objects. For example, "Weekend", "Off-Work", "Every-Day". |
| **track** dictionary | | Track Settings. |
| | **accounting** boolean | **Choices:*** no
* yes
| Turns accounting for track on and off. |
| | **alert** string | **Choices:*** none
* alert
* snmp
* mail
* user alert 1
* user alert 2
* user alert 3
| Type of alert for the track. |
| | **enable\_firewall\_session** boolean | **Choices:*** no
* yes
| Determine whether to generate session log to firewall only connections. |
| | **per\_connection** boolean | **Choices:*** no
* yes
| Determines whether to perform the log per connection. |
| | **per\_session** boolean | **Choices:*** no
* yes
| Determines whether to perform the log per session. |
| | **type** string | | a "Log", "Extended Log", "Detailed Log", "None". |
| **user\_check** dictionary | | User check settings. |
| | **confirm** string | **Choices:*** per rule
* per category
* per application/site
* per data type
| N/A |
| | **custom\_frequency** dictionary | | N/A |
| | | **every** integer | | N/A |
| | | **unit** string | **Choices:*** hours
* days
* weeks
* months
| N/A |
| | **frequency** string | **Choices:*** once a day
* once a week
* once a month
* custom frequency...
| N/A |
| | **interaction** string | | N/A |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **vpn** list / elements=string | | Communities or Directional. |
| | **community** list / elements=string | | List of community name or UID. |
| | **directional** list / elements=string | | Communities directional match condition. |
| | | **from** string | | From community name or UID. |
| | | **to** string | | To community name or UID. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-access-rule
cp_mgmt_access_rule:
layer: Network
name: Rule 1
position: 1
service:
- SMTP
- AOL
state: present
- name: set-access-rule
cp_mgmt_access_rule:
action: Ask
action_settings:
enable_identity_captive_portal: true
limit: Upload_1Gbps
layer: Network
name: Rule 1
state: present
- name: delete-access-rule
cp_mgmt_access_rule:
layer: Network
name: Rule 2
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 |
| --- | --- | --- |
| **cp\_mgmt\_access\_rule** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_vpn_community_meshed_facts β Get vpn-community-meshed objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_vpn\_community\_meshed\_facts β Get vpn-community-meshed objects facts on Check Point over Web Services API
=======================================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_vpn_community_meshed_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get vpn-community-meshed objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-vpn-community-meshed
cp_mgmt_vpn_community_meshed_facts:
name: New_VPN_Community_Meshed_1
- name: show-vpn-communities-meshed
cp_mgmt_vpn_community_meshed_facts:
details_level: full
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_application_site_group_facts β Get application-site-group objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_application\_site\_group\_facts β Get application-site-group objects facts on Check Point over Web Services API
===========================================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_application_site_group_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get application-site-group objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dereference\_group\_members** boolean | **Choices:*** no
* yes
| Indicates whether to dereference "members" field by details level for every object in reply. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-application-site-group
cp_mgmt_application_site_group_facts:
name: New Application Site Group 1
- name: show-application-site-groups
cp_mgmt_application_site_group_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_add_domain β Create new object check\_point.mgmt.cp\_mgmt\_add\_domain β Create new object
===========================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_add_domain`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create new object
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string / required | | Object name. |
| **servers** list / elements=string | | Domain servers. When this field is provided, 'set-domain' command is executed asynchronously. |
| | **active** boolean | **Choices:*** no
* yes
| Activate domain server. Only one domain server is allowed to be active |
| | **ip\_address** string | | IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. |
| | **ipv4\_address** string | | IPv4 address. |
| | **ipv6\_address** string | | IPv6 address. |
| | **multi\_domain\_server** string | | Multi Domain server name or UID. |
| | **name** string | | Object name. Must be unique in the domain. |
| | **skip\_start\_domain\_server** boolean | **Choices:*** no
* yes
| Set this value to be true to prevent starting the new created domain. |
| | **type** string | **Choices:*** management server
* log server
* smc
| Domain server type. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-domain
cp_mgmt_add_domain:
name: domain1
servers:
ip_address: 192.0.2.1
multi_domain_server: MDM_Server
name: domain1_ManagementServer_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 |
| --- | --- | --- |
| **cp\_mgmt\_domain** dictionary | always. | The checkpoint add-domain output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_group_with_exclusion β Manages group-with-exclusion objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_group\_with\_exclusion β Manages group-with-exclusion objects on Check Point over Web Services API
==============================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_group_with_exclusion`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages group-with-exclusion objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **except** string | | Name or UID of an object which the group excludes. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **include** string | | Name or UID of an object which the group includes. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-group-with-exclusion
cp_mgmt_group_with_exclusion:
except: New Group 2
include: New Group 1
name: Group with exclusion
state: present
- name: set-group-with-exclusion
cp_mgmt_group_with_exclusion:
except: New Group 1
include: New Group 2
name: Group with exclusion
state: present
- name: delete-group-with-exclusion
cp_mgmt_group_with_exclusion:
name: Group with exclusion
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 |
| --- | --- | --- |
| **cp\_mgmt\_group\_with\_exclusion** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_show_logs β Showing logs according to the given filter. check\_point.mgmt.cp\_mgmt\_show\_logs β Showing logs according to the given filter.
====================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_show_logs`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Showing logs according to the given filter.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Ignore warnings if exist. |
| **new\_query** dictionary | | Running a new query. |
| | **custom\_end** string | | This option is only applicable when using the custom time-frame option. |
| | **custom\_start** string | | This option is only applicable when using the custom time-frame option. |
| | **filter** string | | The filter as entered in SmartConsole/SmartView. |
| | **log\_servers** list / elements=string | | List of IP's of logs servers to query. |
| | **max\_logs\_per\_request** integer | | Limit the number of logs to be retrieved. |
| | **time\_frame** string | **Choices:*** last-7-days
* last-hour
* today
* last-24-hours
* yesterday
* this-week
* this-month
* last-30-days
* all-time
* custom
| Specify the time frame to query logs. |
| | **top** dictionary | | Top results configuration. |
| | | **count** integer | | The number of results to retrieve. |
| | | **field** string | **Choices:*** sources
* destinations
* services
* actions
* blades
* origins
* users
* applications
| The field on which the top command is executed. |
| | **type** string | **Choices:*** logs
* audit
| Type of logs to return. |
| **query\_id** string | | Get the next page of last run query with specified limit. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: show-logs
cp_mgmt_show_logs:
new_query:
filter: blade:"Threat Emulation"
max_logs_per_request: '2'
time_frame: today
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_show\_logs** dictionary | always. | The checkpoint show-logs output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.checkpoint β HttpApi Plugin for Checkpoint devices check\_point.mgmt.checkpoint β HttpApi Plugin for Checkpoint devices
====================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.checkpoint`.
New in version 2.8: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
Synopsis
--------
* This HttpApi plugin provides methods to connect to Checkpoint devices over a HTTP(S)-based api.
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **api\_key** string | | var: ansible\_api\_key | Login with api-key instead of user & password |
| **domain** string | | var: ansible\_checkpoint\_domain | Specifies the domain of the Check Point device |
### Authors
* Ansible Networking Team
ansible check_point.mgmt.cp_mgmt_application_site_facts β Get application-site objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_application\_site\_facts β Get application-site objects facts on Check Point over Web Services API
==============================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_application_site_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get application-site objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **application\_id** string | | Object application identifier. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-application-site
cp_mgmt_application_site_facts:
name: facebook
- name: show-application-sites
cp_mgmt_application_site_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_global_assignment_facts β Get global-assignment objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_global\_assignment\_facts β Get global-assignment objects facts on Check Point over Web Services API
================================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_global_assignment_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get global-assignment objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dependent\_domain** string | | N/A |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **global\_domain** string | | N/A |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-global-assignment
cp_mgmt_global_assignment_facts:
dependent_domain: domain1
global_domain: Global2
- name: show-global-assignments
cp_mgmt_global_assignment_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_threat_rule β Manages threat-rule objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_threat\_rule β Manages threat-rule objects on Check Point over Web Services API
===========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_threat_rule`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages threat-rule objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string | | Action-the enforced profile. |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **comments** string | | Comments string. |
| **destination** list / elements=string | | Collection of Network objects identified by the name or UID. |
| **destination\_negate** boolean | **Choices:*** no
* yes
| True if negate is set for destination. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **enabled** boolean | **Choices:*** no
* yes
| Enable/Disable the rule. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **install\_on** list / elements=string | | Which Gateways identified by the name or UID to install the policy on. |
| **layer** string | | Layer that the rule belongs to identified by the name or UID. |
| **name** string / required | | Object name. |
| **position** string | | Position in the rulebase. |
| **protected\_scope** list / elements=string | | Collection of objects defining Protected Scope identified by the name or UID. |
| **protected\_scope\_negate** boolean | **Choices:*** no
* yes
| True if negate is set for Protected Scope. |
| **service** list / elements=string | | Collection of Network objects identified by the name or UID. |
| **service\_negate** boolean | **Choices:*** no
* yes
| True if negate is set for Service. |
| **source** list / elements=string | | Collection of Network objects identified by the name or UID. |
| **source\_negate** boolean | **Choices:*** no
* yes
| True if negate is set for source. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **track** string | | Packet tracking. |
| **track\_settings** dictionary | | Threat rule track settings. |
| | **packet\_capture** boolean | **Choices:*** no
* yes
| Packet capture. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-threat-rule
cp_mgmt_threat_rule:
comments: ''
install_on: Policy Targets
layer: New Layer 1
name: First threat rule
position: 1
protected_scope: All_Internet
state: present
track: None
- name: set-threat-rule
cp_mgmt_threat_rule:
action: New Profile 1
comments: commnet for the first rule
install_on: Policy Targets
layer: New Layer 1
name: Rule Name
position: 1
protected_scope: All_Internet
state: present
- name: delete-threat-rule
cp_mgmt_threat_rule:
layer: New Layer 1
name: Rule Name
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 |
| --- | --- | --- |
| **cp\_mgmt\_threat\_rule** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_threat_exception_facts β Get threat-exception objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_threat\_exception\_facts β Get threat-exception objects facts on Check Point over Web Services API
==============================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_threat_exception_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get threat-exception objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dereference\_group\_members** boolean | **Choices:*** no
* yes
| Indicates whether to dereference "members" field by details level for every object in reply. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **exception\_group\_name** string | | The name of the exception-group. |
| **exception\_group\_uid** string | | The UID of the exception-group. |
| **filter** string | | Search expression to filter the rulebase. The provided text should be exactly the same as it would be given in Smart Console. The logical operators in the expression ('AND', 'OR') should be provided in capital letters. If an operator is not used, the default OR operator applies. |
| **filter\_settings** dictionary | | Sets filter preferences. |
| | **packet\_search\_settings** dictionary | | When 'search-mode' is set to 'packet', this object allows to set the packet search preferences. |
| | | **expand\_group\_members** boolean | **Choices:*** no
* yes
| When true, if the search expression contains a UID or a name of a group object, results will include rules that match on at least one member of the group. |
| | | **expand\_group\_with\_exclusion\_members** boolean | **Choices:*** no
* yes
| When true, if the search expression contains a UID or a name of a group-with-exclusion object, results will include rules that match at least one member of the "include" part and is not a member of the "except" part. |
| | | **match\_on\_any** boolean | **Choices:*** no
* yes
| Whether to match on 'Any' object. |
| | | **match\_on\_group\_with\_exclusion** boolean | **Choices:*** no
* yes
| Whether to match on a group-with-exclusion. |
| | | **match\_on\_negate** boolean | **Choices:*** no
* yes
| Whether to match on a negated cell. |
| | **search\_mode** string | **Choices:*** general
* packet
| When set to 'general', both the Full Text Search and Packet Search are enabled. In this mode, Packet Search will not match on 'Any' object, a negated cell or a group-with-exclusion. When the search-mode is set to 'packet', by default, the match on 'Any' object, a negated cell or a group-with-exclusion are enabled. packet-search-settings may be provided to change the default behavior. |
| **layer** string | | Layer that the rule belongs to identified by the name or UID. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | The name of the layer containing the parent threat rule. This parameter is relevant only for getting few objects. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **package** string | | Name of the package. |
| **rule\_name** string | | The name of the parent rule. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **use\_object\_dictionary** boolean | **Choices:*** no
* yes
| N/A |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-threat-exception
cp_mgmt_threat_exception_facts:
name: Exception Rule
layer: New Layer 1
rule_name: Threat Rule 1
- name: show-threat-rule-exception-rulebase
cp_mgmt_threat_exception_facts:
name: Standard Threat Prevention
rule_name: Threat Rule 1
```
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_nat_section β Manages nat-section objects on Checkpoint over Web Services API check\_point.mgmt.cp\_mgmt\_nat\_section β Manages nat-section objects on Checkpoint over Web Services API
==========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_nat_section`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages nat-section objects on Checkpoint devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string / required | | Object name. |
| **package** string | | Name of the package. |
| **position** string | | Position in the rulebase. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-nat-section
cp_mgmt_nat_section:
name: New Section 1
package: standard
position: 1
state: present
- name: set-nat-section
cp_mgmt_nat_section:
name: New Section 1
package: standard
state: present
- name: delete-nat-section
cp_mgmt_nat_section:
name: New Section 1
package: standard
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 |
| --- | --- | --- |
| **cp\_mgmt\_nat\_section** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_application_site_category_facts β Get application-site-category objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_application\_site\_category\_facts β Get application-site-category objects facts on Check Point over Web Services API
=================================================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_application_site_category_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get application-site-category objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-application-site-category
cp_mgmt_application_site_category_facts:
name: Social Networking
- name: show-application-site-categories
cp_mgmt_application_site_category_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_tag_facts β Get tag objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_tag\_facts β Get tag objects facts on Check Point over Web Services API
===================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_tag_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get tag objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-tag
cp_mgmt_tag_facts:
name: f96b37ec-e22e-4945-8bbf-d37b117914e0
- name: show-tags
cp_mgmt_tag_facts:
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_address_range β Manages address-range objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_address\_range β Manages address-range objects on Check Point over Web Services API
===============================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_address_range`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages address-range objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **ip\_address\_first** string | | First IP address in the range. If both IPv4 and IPv6 address ranges are required, use the ipv4-address-first and the ipv6-address-first fields instead. |
| **ip\_address\_last** string | | Last IP address in the range. If both IPv4 and IPv6 address ranges are required, use the ipv4-address-first and the ipv6-address-first fields instead. |
| **ipv4\_address\_first** string | | First IPv4 address in the range. |
| **ipv4\_address\_last** string | | Last IPv4 address in the range. |
| **ipv6\_address\_first** string | | First IPv6 address in the range. |
| **ipv6\_address\_last** string | | Last IPv6 address in the range. |
| **name** string / required | | Object name. |
| **nat\_settings** dictionary | | NAT settings. |
| | **auto\_rule** boolean | **Choices:*** no
* yes
| Whether to add automatic address translation rules. |
| | **hide\_behind** string | **Choices:*** gateway
* ip-address
| Hide behind method. This parameter is not required in case "method" parameter is "static". |
| | **install\_on** string | | Which gateway should apply the NAT translation. |
| | **ip\_address** string | | IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. This parameter is not required in case "method" parameter is "hide" and "hide-behind" parameter is "gateway". |
| | **ipv4\_address** string | | IPv4 address. |
| | **ipv6\_address** string | | IPv6 address. |
| | **method** string | **Choices:*** hide
* static
| NAT translation method. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-address-range
cp_mgmt_address_range:
ip_address_first: 192.0.2.1
ip_address_last: 192.0.2.10
name: New Address Range 1
state: present
- name: set-address-range
cp_mgmt_address_range:
color: green
ip_address_first: 192.0.2.1
ip_address_last: 192.0.2.1
name: New Address Range 1
new_name: New Address Range 2
state: present
- name: delete-address-range
cp_mgmt_address_range:
name: New Address Range 2
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 |
| --- | --- | --- |
| **cp\_mgmt\_address\_range** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_address_range_facts β Get address-range objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_address\_range\_facts β Get address-range objects facts on Check Point over Web Services API
========================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_address_range_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get address-range objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-address-range
cp_mgmt_address_range_facts:
name: New Address Range 1
- name: show-address-ranges
cp_mgmt_address_range_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_access_layer_facts β Get access-layer objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_access\_layer\_facts β Get access-layer objects facts on Check Point over Web Services API
======================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_access_layer_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get access-layer objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-access-layer
cp_mgmt_access_layer_facts:
name: New Layer 1
- name: show-access-layers
cp_mgmt_access_layer_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_network β Manages network objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_network β Manages network objects on Check Point over Web Services API
==================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_network`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages network objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **broadcast** string | **Choices:*** disallow
* allow
| Allow broadcast address inclusion. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **mask\_length** integer | | IPv4 or IPv6 network mask length. If both masks are required use mask-length4 and mask-length6 fields explicitly. Instead of IPv4 mask length it is possible to specify IPv4 mask itself in subnet-mask field. |
| **mask\_length4** integer | | IPv4 network mask length. |
| **mask\_length6** integer | | IPv6 network mask length. |
| **name** string / required | | Object name. |
| **nat\_settings** dictionary | | NAT settings. |
| | **auto\_rule** boolean | **Choices:*** no
* yes
| Whether to add automatic address translation rules. |
| | **hide\_behind** string | **Choices:*** gateway
* ip-address
| Hide behind method. This parameter is not required in case "method" parameter is "static". |
| | **install\_on** string | | Which gateway should apply the NAT translation. |
| | **ip\_address** string | | IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. This parameter is not required in case "method" parameter is "hide" and "hide-behind" parameter is "gateway". |
| | **ipv4\_address** string | | IPv4 address. |
| | **ipv6\_address** string | | IPv6 address. |
| | **method** string | **Choices:*** hide
* static
| NAT translation method. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **subnet** string | | IPv4 or IPv6 network address. If both addresses are required use subnet4 and subnet6 fields explicitly. |
| **subnet4** string | | IPv4 network address. |
| **subnet6** string | | IPv6 network address. |
| **subnet\_mask** string | | IPv4 network mask. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-network
cp_mgmt_network:
name: New Network 1
state: present
subnet: 192.0.2.0
subnet_mask: 255.255.255.0
- name: set-network
cp_mgmt_network:
color: green
mask_length: 16
name: New Network 1
new_name: New Network 2
state: present
subnet: 192.0.0.0
- name: delete-network
cp_mgmt_network:
name: New Network 2
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 |
| --- | --- | --- |
| **cp\_mgmt\_network** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_service_rpc β Manages service-rpc objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_rpc β Manages service-rpc objects on Check Point over Web Services API
===========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_rpc`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages service-rpc objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **keep\_connections\_open\_after\_policy\_installation** boolean | **Choices:*** no
* yes
| Keep connections open after policy has been installed even if they are not allowed under the new policy. This overrides the settings in the Connection Persistence page. If you change this property, the change will not affect open connections, but only future connections. |
| **name** string / required | | Object name. |
| **program\_number** integer | | N/A |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-service-rpc
cp_mgmt_service_rpc:
keep_connections_open_after_policy_installation: false
name: New_RPC_Service_1
program_number: 5669
state: present
- name: set-service-rpc
cp_mgmt_service_rpc:
color: green
name: New_RPC_Service_1
program_number: 5656
state: present
- name: delete-service-rpc
cp_mgmt_service_rpc:
name: New_RPC_Service_2
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 |
| --- | --- | --- |
| **cp\_mgmt\_service\_rpc** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_security_zone_facts β Get security-zone objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_security\_zone\_facts β Get security-zone objects facts on Check Point over Web Services API
========================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_security_zone_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get security-zone objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-security-zone
cp_mgmt_security_zone_facts:
name: SZone1
- name: show-security-zones
cp_mgmt_security_zone_facts:
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.checkpoint_task_facts β Get task objects facts on Check Point over Web Services API check\_point.mgmt.checkpoint\_task\_facts β Get task objects facts on Check Point over Web Services API
=======================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.checkpoint_task_facts`.
New in version 2.7: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get task objects facts on Check Point devices. All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **task\_id** string / required | | ID of the task object. |
Examples
--------
```
- name: Get task facts
checkpoint_task_facts:
task_id: 2eec70e5-78a8-4bdb-9a76-cfb5601d0bcb
```
### Authors
* Ansible by Red Hat (@rcarrillocruz)
ansible check_point.mgmt.cp_mgmt_service_rpc_facts β Get service-rpc objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_rpc\_facts β Get service-rpc objects facts on Check Point over Web Services API
====================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_rpc_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get service-rpc objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-service-rpc
cp_mgmt_service_rpc_facts:
name: nisplus
- name: show-services-rpc
cp_mgmt_service_rpc_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_show_tasks β Retrieve all tasks and show their progress and details. check\_point.mgmt.cp\_mgmt\_show\_tasks β Retrieve all tasks and show their progress and details.
=================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_show_tasks`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve all tasks and show their progress and details.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **from\_date** string | | The date from which tracking tasks is to be performed, by the task's last update date. ISO 8601. If timezone isn't specified in the input, the Management server's timezone is used. |
| **initiator** string | | Initiator's name. If name isn't specified, tasks from all initiators will be shown. |
| **limit** integer | | The maximal number of returned results. |
| **offset** integer | | Number of the results to initially skip. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the descending order by the task's last update date. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **status** string | **Choices:*** successful
* failed
* in-progress
* all
| Status. |
| **to\_date** string | | The date until which tracking tasks is to be performed, by the task's last update date. ISO 8601. If timezone isn't specified in the input, the Management server's timezone is used. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: show-tasks
cp_mgmt_show_tasks:
from_date: '2018-05-23T08:00:00'
initiator: admin1
status: successful
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_show\_tasks** dictionary | always. | The checkpoint show-tasks output. |
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_exception_group_facts β Get exception-group objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_exception\_group\_facts β Get exception-group objects facts on Check Point over Web Services API
============================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_exception_group_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get exception-group objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-exception-group
cp_mgmt_exception_group_facts:
name: exception_group_2
- name: show-exception-groups
cp_mgmt_exception_group_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_identity_tag_facts β Get identity-tag objects facts on Checkpoint over Web Services API check\_point.mgmt.cp\_mgmt\_identity\_tag\_facts β Get identity-tag objects facts on Checkpoint over Web Services API
=====================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_identity_tag_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get identity-tag objects facts on Checkpoint devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **domains\_to\_process** list / elements=string | | Indicates which domains to process the commands on. It cannot be used with the details-level full, must be run from the System Domain only and with ignore-warnings true. Valid values are, CURRENT\_DOMAIN, ALL\_DOMAINS\_ON\_THIS\_SERVER. |
| **filter** string | | Search expression to filter objects by. The provided text should be exactly the same as it would be given in SmartConsole Object Explorer. The logical operators in the expression ('AND', 'OR') should be provided in capital letters. The search involves both a IP search and a textual search in name, comment, tags etc. |
| **limit** integer | | The maximal number of returned results. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Number of the results to initially skip. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts the results by search criteria. Automatically sorts the results by Name, in the ascending order. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-identity-tag
cp_mgmt_identity_tag_facts:
name: myidentitytag
- name: show-identity-tags
cp_mgmt_identity_tag_facts:
details_level: full
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_host β Manages host objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_host β Manages host objects on Check Point over Web Services API
============================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_host`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages host objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **host\_servers** dictionary | | Servers Configuration. |
| | **dns\_server** boolean | **Choices:*** no
* yes
| Gets True if this server is a DNS Server. |
| | **mail\_server** boolean | **Choices:*** no
* yes
| Gets True if this server is a Mail Server. |
| | **web\_server** boolean | **Choices:*** no
* yes
| Gets True if this server is a Web Server. |
| | **web\_server\_config** dictionary | | Web Server configuration. |
| | | **additional\_ports** list / elements=string | | Server additional ports. |
| | | **application\_engines** list / elements=string | | Application engines of this web server. |
| | | **listen\_standard\_port** boolean | **Choices:*** no
* yes
| Whether server listens to standard port. |
| | | **operating\_system** string | **Choices:*** sparc linux
* windows
* other
* x86 linux
* sparc solaris
| Operating System. |
| | | **protected\_by** string | | Network object which protects this server identified by the name or UID. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **interfaces** list / elements=string | | Host interfaces. |
| | **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| | **comments** string | | Comments string. |
| | **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| | **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| | **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| | **mask\_length** integer | | IPv4 or IPv6 network mask length. If both masks are required use mask-length4 and mask-length6 fields explicitly. Instead of IPv4 mask length it is possible to specify IPv4 mask itself in subnet-mask field. |
| | **mask\_length4** integer | | IPv4 network mask length. |
| | **mask\_length6** integer | | IPv6 network mask length. |
| | **name** string | | Interface name. |
| | **subnet** string | | IPv4 or IPv6 network address. If both addresses are required use subnet4 and subnet6 fields explicitly. |
| | **subnet4** string | | IPv4 network address. |
| | **subnet6** string | | IPv6 network address. |
| | **subnet\_mask** string | | IPv4 network mask. |
| **ip\_address** string | | IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. |
| **ipv4\_address** string | | IPv4 address. |
| **ipv6\_address** string | | IPv6 address. |
| **name** string / required | | Object name. |
| **nat\_settings** dictionary | | NAT settings. |
| | **auto\_rule** boolean | **Choices:*** no
* yes
| Whether to add automatic address translation rules. |
| | **hide\_behind** string | **Choices:*** gateway
* ip-address
| Hide behind method. This parameter is not required in case "method" parameter is "static". |
| | **install\_on** string | | Which gateway should apply the NAT translation. |
| | **ip\_address** string | | IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. This parameter is not required in case "method" parameter is "hide" and "hide-behind" parameter is "gateway". |
| | **ipv4\_address** string | | IPv4 address. |
| | **ipv6\_address** string | | IPv6 address. |
| | **method** string | **Choices:*** hide
* static
| NAT translation method. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-host
cp_mgmt_host:
ip_address: 192.0.2.1
name: New Host 1
state: present
- name: set-host
cp_mgmt_host:
color: green
ipv4_address: 192.0.2.2
name: New Host 1
state: present
- name: delete-host
cp_mgmt_host:
name: New Host 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 |
| --- | --- | --- |
| **cp\_mgmt\_host** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_threat_profile β Manages threat-profile objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_threat\_profile β Manages threat-profile objects on Check Point over Web Services API
=================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_threat_profile`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages threat-profile objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **activate\_protections\_by\_extended\_attributes** list / elements=string | | Activate protections by these extended attributes. |
| | **category** string | | IPS tag category name. |
| | **name** string | | IPS tag name. |
| **active\_protections\_performance\_impact** string | **Choices:*** high
* medium
* low
* very\_low
| Protections with this performance impact only will be activated in the profile. |
| **active\_protections\_severity** string | **Choices:*** Critical
* High
* Medium or above
* Low or above
| Protections with this severity only will be activated in the profile. |
| **anti\_bot** boolean | **Choices:*** no
* yes
| Is Anti-Bot blade activated. |
| **anti\_virus** boolean | **Choices:*** no
* yes
| Is Anti-Virus blade activated. |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **confidence\_level\_high** string | **Choices:*** Inactive
* Ask
* Prevent
* Detect
| Action for protections with high confidence level. |
| **confidence\_level\_low** string | **Choices:*** Inactive
* Ask
* Prevent
* Detect
| Action for protections with low confidence level. |
| **confidence\_level\_medium** string | **Choices:*** Inactive
* Ask
* Prevent
* Detect
| Action for protections with medium confidence level. |
| **deactivate\_protections\_by\_extended\_attributes** list / elements=string | | Deactivate protections by these extended attributes. |
| | **category** string | | IPS tag category name. |
| | **name** string | | IPS tag name. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **indicator\_overrides** list / elements=string | | Indicators whose action will be overridden in this profile. |
| | **action** string | **Choices:*** Inactive
* Ask
* Prevent
* Detect
| The indicator's action in this profile. |
| | **indicator** string | | The indicator whose action is to be overridden. |
| **ips** boolean | **Choices:*** no
* yes
| Is IPS blade activated. |
| **ips\_settings** dictionary | | IPS blade settings. |
| | **exclude\_protection\_with\_performance\_impact** boolean | **Choices:*** no
* yes
| Whether to exclude protections depending on their level of performance impact. |
| | **exclude\_protection\_with\_performance\_impact\_mode** string | **Choices:*** very low
* low or lower
* medium or lower
* high or lower
| Exclude protections with this level of performance impact. |
| | **exclude\_protection\_with\_severity** boolean | **Choices:*** no
* yes
| Whether to exclude protections depending on their level of severity. |
| | **exclude\_protection\_with\_severity\_mode** string | **Choices:*** low or above
* medium or above
* high or above
* critical
| Exclude protections with this level of severity. |
| | **newly\_updated\_protections** string | **Choices:*** active
* inactive
* staging
| Activation of newly updated protections. |
| **malicious\_mail\_policy\_settings** dictionary | | Malicious Mail Policy for MTA Gateways. |
| | **add\_customized\_text\_to\_email\_body** boolean | **Choices:*** no
* yes
| Add customized text to the malicious email body. |
| | **add\_email\_subject\_prefix** boolean | **Choices:*** no
* yes
| Add a prefix to the malicious email subject. |
| | **add\_x\_header\_to\_email** boolean | **Choices:*** no
* yes
| Add an X-Header to the malicious email. |
| | **email\_action** string | **Choices:*** allow
* block
| Block - block the entire malicious email<br>Allow - pass the malicious email and apply email changes (like, remove attachments and links, add x-header, etc...). |
| | **email\_body\_customized\_text** string | | Customized text for the malicious email body.<br> Available predefined fields,<br> $verdicts$ - the malicious/error attachments/links verdict. |
| | **email\_subject\_prefix\_text** string | | Prefix for the malicious email subject. |
| | **failed\_to\_scan\_attachments\_text** string | | Replace attachments that failed to be scanned with this text.<br> Available predefined fields,<br> $filename$ - the malicious file name.<br> $md5$ - MD5 of the malicious file. |
| | **malicious\_attachments\_text** string | | Replace malicious attachments with this text.<br> Available predefined fields,<br> $filename$ - the malicious file name.<br> $md5$ - MD5 of the malicious file. |
| | **malicious\_links\_text** string | | Replace malicious links with this text.<br> Available predefined fields,<br> $neutralized\_url$ - neutralized malicious link. |
| | **remove\_attachments\_and\_links** boolean | **Choices:*** no
* yes
| Remove attachments and links from the malicious email. |
| | **send\_copy** boolean | **Choices:*** no
* yes
| Send a copy of the malicious email to the recipient list. |
| | **send\_copy\_list** list / elements=string | | Recipient list to send a copy of the malicious email. |
| **name** string / required | | Object name. |
| **overrides** list / elements=string | | Overrides per profile for this protection. |
| | **action** string | **Choices:*** Threat Cloud: Inactive
* Detect
* Prevent <br> Core: Drop
* Inactive
* Accept
| Protection action. |
| | **capture\_packets** boolean | **Choices:*** no
* yes
| Capture packets. |
| | **protection** string | | IPS protection identified by name or UID. |
| | **track** string | **Choices:*** none
* log
* alert
* mail
* snmp trap
* user alert
* user alert 1
* user alert 2
| Tracking method for protection. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **threat\_emulation** boolean | **Choices:*** no
* yes
| Is Threat Emulation blade activated. |
| **use\_extended\_attributes** boolean | **Choices:*** no
* yes
| Whether to activate/deactivate IPS protections according to the extended attributes. |
| **use\_indicators** boolean | **Choices:*** no
* yes
| Indicates whether the profile should make use of indicators. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-threat-profile
cp_mgmt_threat_profile:
active_protections_performance_impact: low
active_protections_severity: low or above
anti_bot: true
anti_virus: true
confidence_level_high: prevent
confidence_level_medium: prevent
ips: true
ips_settings:
exclude_protection_with_performance_impact: true
exclude_protection_with_performance_impact_mode: high or lower
newly_updated_protections: staging
name: New Profile 1
state: present
threat_emulation: true
- name: set-threat-profile
cp_mgmt_threat_profile:
active_protections_performance_impact: low
active_protections_severity: low or above
anti_bot: true
anti_virus: false
comments: update recommended profile
confidence_level_high: prevent
confidence_level_low: prevent
confidence_level_medium: prevent
ips: false
ips_settings:
exclude_protection_with_performance_impact: true
exclude_protection_with_performance_impact_mode: high or lower
newly_updated_protections: active
name: New Profile 1
state: present
threat_emulation: true
- name: delete-threat-profile
cp_mgmt_threat_profile:
name: New Profile 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 |
| --- | --- | --- |
| **cp\_mgmt\_threat\_profile** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.checkpoint_access_rule β Manages access rules on Check Point over Web Services API check\_point.mgmt.checkpoint\_access\_rule β Manages access rules on Check Point over Web Services API
======================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.checkpoint_access_rule`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages access rules on Check Point devices including creating, updating, removing access rules objects, All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string | **Default:**"drop" | Action of the access rule (accept, drop, inform, etc). |
| **auto\_install\_policy** boolean | **Choices:*** no
* **yes** β
| Install the package policy if changes have been performed after the task completes. |
| **auto\_publish\_session** boolean | **Choices:*** no
* **yes** β
| Publish the current session if changes have been performed after task completes. |
| **destination** string | | Destination object of the access rule. |
| **enabled** boolean | **Choices:*** no
* **yes** β
| Enabled or disabled flag. |
| **layer** string | | Layer to attach the access rule to. |
| **name** string / required | | Name of the access rule. |
| **policy\_package** string | **Default:**"standard" | Package policy name to be installed. |
| **position** string | | Position of the access rule. |
| **source** string | | Source object of the access rule. |
| **state** string | **Default:**"present" | State of the access rule (present or absent). Defaults to present. |
| **targets** list / elements=string | | Targets to install the package policy on. |
Examples
--------
```
- name: Create access rule
checkpoint_access_rule:
layer: Network
name: "Drop attacker"
position: top
source: attacker
destination: Any
action: Drop
- name: Delete access rule
checkpoint_access_rule:
layer: Network
name: "Drop attacker"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **checkpoint\_access\_rules** list / elements=string | always, except when deleting the access rule. | The checkpoint access rule object created or updated. |
### Authors
* Ansible by Red Hat (@rcarrillocruz)
ansible check_point.mgmt.cp_mgmt_service_sctp β Manages service-sctp objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_sctp β Manages service-sctp objects on Check Point over Web Services API
=============================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_sctp`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages service-sctp objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aggressive\_aging** dictionary | | Sets short (aggressive) timeouts for idle connections. |
| | **default\_timeout** integer | | Default aggressive aging timeout in seconds. |
| | **enable** boolean | **Choices:*** no
* yes
| N/A |
| | **timeout** integer | | Aggressive aging timeout in seconds. |
| | **use\_default\_timeout** boolean | **Choices:*** no
* yes
| N/A |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **keep\_connections\_open\_after\_policy\_installation** boolean | **Choices:*** no
* yes
| Keep connections open after policy has been installed even if they are not allowed under the new policy. This overrides the settings in the Connection Persistence page. If you change this property, the change will not affect open connections, but only future connections. |
| **match\_for\_any** boolean | **Choices:*** no
* yes
| Indicates whether this service is used when 'Any' is set as the rule's service and there are several service objects with the same source port and protocol. |
| **name** string / required | | Object name. |
| **port** string | | Port number. To specify a port range add a hyphen between the lowest and the highest port numbers, for example 44-45. |
| **session\_timeout** integer | | Time (in seconds) before the session times out. |
| **source\_port** string | | Source port number. To specify a port range add a hyphen between the lowest and the highest port numbers, for example 44-45. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **sync\_connections\_on\_cluster** boolean | **Choices:*** no
* yes
| Enables state-synchronized High Availability or Load Sharing on a ClusterXL or OPSEC-certified cluster. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **use\_default\_session\_timeout** boolean | **Choices:*** no
* yes
| Use default virtual session timeout. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-service-sctp
cp_mgmt_service_sctp:
aggressive_aging:
enable: true
timeout: 360
use_default_timeout: false
keep_connections_open_after_policy_installation: false
match_for_any: true
name: New_SCTP_Service_1
port: 5669
session_timeout: 0
state: present
sync_connections_on_cluster: true
- name: set-service-sctp
cp_mgmt_service_sctp:
aggressive_aging:
default_timeout: 3600
color: green
name: New_SCTP_Service_1
port: 5656
state: present
- name: delete-service-sctp
cp_mgmt_service_sctp:
name: New_SCTP_Service_2
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 |
| --- | --- | --- |
| **cp\_mgmt\_service\_sctp** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_threat_layer_facts β Get threat-layer objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_threat\_layer\_facts β Get threat-layer objects facts on Check Point over Web Services API
======================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_threat_layer_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get threat-layer objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-threat-layer
cp_mgmt_threat_layer_facts:
name: New Layer 1
- name: show-threat-layers
cp_mgmt_threat_layer_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_trusted_client_facts β Get trusted-client objects facts on Checkpoint over Web Services API check\_point.mgmt.cp\_mgmt\_trusted\_client\_facts β Get trusted-client objects facts on Checkpoint over Web Services API
=========================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_trusted_client_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get trusted-client objects facts on Checkpoint devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **filter** string | | Search expression to filter objects by. The provided text should be exactly the same as it would be given in SmartConsole Object Explorer. The logical operators in the expression ('AND', 'OR') should be provided in capital letters. The search involves both a IP search and a textual search in name, comment, tags etc. |
| **limit** integer | | The maximal number of returned results. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Number of the results to initially skip. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts the results by search criteria. Automatically sorts the results by Name, in the ascending order. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-trusted-client
cp_mgmt_trusted_client_facts:
name: anyHost
- name: show-trusted-clients
cp_mgmt_trusted_client_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_put_file β put file on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_put\_file β put file on Check Point over Web Services API
=====================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_put_file`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* put file on Check Point over Web Services API
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **comments** string | | Comments string. |
| **file\_content** string | | N/A |
| **file\_name** string | | N/A |
| **file\_path** string | | N/A |
| **targets** list / elements=string | | On what targets to execute this command. Targets may be identified by their name, or object unique identifier. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: put-file
cp_mgmt_put_file:
file_content: 'vs ip 192.0.2.1
vs2 ip 192.0.2.2'
file_name: vsx_conf
file_path: /home/admin/
targets:
- corporate-gateway
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_put\_file** dictionary | always. | The checkpoint put-file output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_threat_indicator_facts β Get threat-indicator objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_threat\_indicator\_facts β Get threat-indicator objects facts on Check Point over Web Services API
==============================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_threat_indicator_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get threat-indicator objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-threat-indicator
cp_mgmt_threat_indicator_facts:
name: My_Indicator
- name: show-threat-indicators
cp_mgmt_threat_indicator_facts:
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_assign_global_assignment β assign global assignment on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_assign\_global\_assignment β assign global assignment on Check Point over Web Services API
======================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_assign_global_assignment`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* assign global assignment on Check Point over Web Services API
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dependent\_domains** list / elements=string | | N/A |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **global\_domains** list / elements=string | | N/A |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: assign-global-assignment
cp_mgmt_assign_global_assignment:
dependent_domains: domain1
global_domains: Global2
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_assign\_global\_assignment** dictionary | always. | The checkpoint assign-global-assignment output. |
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_set_domain β Edit existing object using object name or uid. check\_point.mgmt.cp\_mgmt\_set\_domain β Edit existing object using object name or uid.
========================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_set_domain`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Edit existing object using object name or uid.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string / required | | Object name. |
| **servers** dictionary | | Domain servers. When this field is provided, 'set-domain' command is executed asynchronously. |
| | **add** list / elements=string | | Adds to collection of values |
| | | **ip\_address** string | | IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. |
| | | **ipv4\_address** string | | IPv4 address. |
| | | **ipv6\_address** string | | IPv6 address. |
| | | **multi\_domain\_server** string | | Multi Domain server name or UID. |
| | | **name** string | | Object name. Must be unique in the domain. |
| | | **skip\_start\_domain\_server** boolean | **Choices:*** no
* yes
| Set this value to be true to prevent starting the new created domain. |
| | | **type** string | **Choices:*** management server
* log server
* smc
| Domain server type. |
| | **remove** list / elements=string | | Remove from collection of values |
| | | **name** string | | Object name. Must be unique in the domain. |
| **tags** list / elements=string | | Collection of tag identifiers. Note, The list of tags can not be modified in a single command together with the domain servers. To modify tags, please use the separate 'set-domain' command, without providing the list of domain servers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: set-domain
cp_mgmt_set_domain:
comments: This is domain1 comment
name: domain1
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_domain** dictionary | always. | The checkpoint set-domain output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_threat_rule_facts β Get threat-rule objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_threat\_rule\_facts β Get threat-rule objects facts on Check Point over Web Services API
====================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_threat_rule_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get threat-rule objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **dereference\_group\_members** boolean | **Choices:*** no
* yes
| Indicates whether to dereference "members" field by details level for every object in reply. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **filter** string | | Search expression to filter the rulebase. The provided text should be exactly the same as it would be given in Smart Console. The logical operators in the expression ('AND', 'OR') should be provided in capital letters. If an operator is not used, the default OR operator applies. |
| **filter\_settings** dictionary | | Sets filter preferences. |
| | **packet\_search\_settings** dictionary | | When 'search-mode' is set to 'packet', this object allows to set the packet search preferences. |
| | | **expand\_group\_members** boolean | **Choices:*** no
* yes
| When true, if the search expression contains a UID or a name of a group object, results will include rules that match on at least one member of the group. |
| | | **expand\_group\_with\_exclusion\_members** boolean | **Choices:*** no
* yes
| When true, if the search expression contains a UID or a name of a group-with-exclusion object, results will include rules that match at least one member of the "include" part and is not a member of the "except" part. |
| | | **match\_on\_any** boolean | **Choices:*** no
* yes
| Whether to match on 'Any' object. |
| | | **match\_on\_group\_with\_exclusion** boolean | **Choices:*** no
* yes
| Whether to match on a group-with-exclusion. |
| | | **match\_on\_negate** boolean | **Choices:*** no
* yes
| Whether to match on a negated cell. |
| | **search\_mode** string | **Choices:*** general
* packet
| When set to 'general', both the Full Text Search and Packet Search are enabled. In this mode, Packet Search will not match on 'Any' object, a negated cell or a group-with-exclusion. When the search-mode is set to 'packet', by default, the match on 'Any' object, a negated cell or a group-with-exclusion are enabled. packet-search-settings may be provided to change the default behavior. |
| **layer** string | | Layer that the rule belongs to identified by the name or UID. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. Should be unique in the domain. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **package** string | | Name of the package. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **use\_object\_dictionary** boolean | **Choices:*** no
* yes
| N/A |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-threat-rule
cp_mgmt_threat_rule_facts:
layer: New Layer 1
name: Rule Name
- name: show-threat-rulebase
cp_mgmt_threat_rule_facts:
details_level: standard
filter: ''
limit: 20
name: Threat Prevention
offset: 0
use_object_dictionary: false
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_dns_domain β Manages dns-domain objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_dns\_domain β Manages dns-domain objects on Check Point over Web Services API
=========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_dns_domain`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages dns-domain objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **is\_sub\_domain** boolean | **Choices:*** no
* yes
| Whether to match sub-domains in addition to the domain itself. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-dns-domain
cp_mgmt_dns_domain:
is_sub_domain: false
name: .www.example.com
state: present
- name: set-dns-domain
cp_mgmt_dns_domain:
is_sub_domain: true
name: .www.example.com
state: present
- name: delete-dns-domain
cp_mgmt_dns_domain:
name: .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 |
| --- | --- | --- |
| **cp\_mgmt\_dns\_domain** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_tag β Manages tag objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_tag β Manages tag objects on Check Point over Web Services API
==========================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_tag`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages tag objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-tag
cp_mgmt_tag:
name: My New Tag1
state: present
tags:
- tag1
- tag2
- name: delete-tag
cp_mgmt_tag:
name: My New Tag1
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 |
| --- | --- | --- |
| **cp\_mgmt\_tag** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_show_software_package_details β Gets the software package information from the cloud. check\_point.mgmt.cp\_mgmt\_show\_software\_package\_details β Gets the software package information from the cloud.
====================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_show_software_package_details`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gets the software package information from the cloud.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name** string | | The name of the software package. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: show-software-package-details
cp_mgmt_show_software_package_details:
name: Check_Point_R80_40_JHF_MCD_DEMO_019_MAIN_Bundle_T1_VISIBLE_FULL.tgz
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_show\_software\_package\_details** dictionary | always. | The checkpoint show-software-package-details output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_dns_domain_facts β Get dns-domain objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_dns\_domain\_facts β Get dns-domain objects facts on Check Point over Web Services API
==================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_dns_domain_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get dns-domain objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-dns-domain
cp_mgmt_dns_domain_facts:
name: .www.example.com
- name: show-dns-domains
cp_mgmt_dns_domain_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_security_zone β Manages security-zone objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_security\_zone β Manages security-zone objects on Check Point over Web Services API
===============================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_security_zone`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages security-zone objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-security-zone
cp_mgmt_security_zone:
color: yellow
comments: My Security Zone 1
name: SZone1
state: present
- name: set-security-zone
cp_mgmt_security_zone:
name: SZone1
state: present
- name: delete-security-zone
cp_mgmt_security_zone:
name: SZone2
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 |
| --- | --- | --- |
| **cp\_mgmt\_security\_zone** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.checkpoint_session β Manages session objects on Check Point over Web Services API check\_point.mgmt.checkpoint\_session β Manages session objects on Check Point over Web Services API
====================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.checkpoint_session`.
New in version 2.7: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages session objects on Check Point devices performing actions like publish and discard. All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **state** string | **Choices:*** **published** β
* discarded
| Action to perform on the session object. Valid choices are published and discarded. |
| **uid** string / required | | UID of the session. |
Examples
--------
```
- name: Publish session
checkpoint_session:
uid: 7a13a360-9b24-40d7-acd3-5b50247be33e
state: published
- name: Discard session
checkpoint_session:
uid: 7a13a360-9b24-40d7-acd3-5b50247be33e
state: discarded
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **checkpoint\_session** list / elements=string | always. | The checkpoint session output per return from API. It will differ depending on action. |
### Authors
* Ansible by Red Hat (@rcarrillocruz)
ansible check_point.mgmt.cp_mgmt_threat_exception β Manages threat-exception objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_threat\_exception β Manages threat-exception objects on Check Point over Web Services API
=====================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_threat_exception`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages threat-exception objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string | | Action-the enforced profile. |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **comments** string | | Comments string. |
| **destination** list / elements=string | | Collection of Network objects identified by the name or UID. |
| **destination\_negate** boolean | **Choices:*** no
* yes
| True if negate is set for destination. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **enabled** boolean | **Choices:*** no
* yes
| Enable/Disable the rule. |
| **exception\_group\_name** string | | The name of the exception-group. |
| **exception\_group\_uid** string | | The UID of the exception-group. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **install\_on** list / elements=string | | Which Gateways identified by the name or UID to install the policy on. |
| **layer** string | | Layer that the rule belongs to identified by the name or UID. |
| **name** string / required | | The name of the exception. |
| **position** string | | Position in the rulebase. |
| **protected\_scope** list / elements=string | | Collection of objects defining Protected Scope identified by the name or UID. |
| **protected\_scope\_negate** boolean | **Choices:*** no
* yes
| True if negate is set for Protected Scope. |
| **protection\_or\_site** list / elements=string | | Name of the protection or site. |
| **rule\_name** string | | The name of the parent rule. |
| **service** list / elements=string | | Collection of Network objects identified by the name or UID. |
| **service\_negate** boolean | **Choices:*** no
* yes
| True if negate is set for Service. |
| **source** list / elements=string | | Collection of Network objects identified by the name or UID. |
| **source\_negate** boolean | **Choices:*** no
* yes
| True if negate is set for source. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **track** string | | Packet tracking. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-threat-exception
cp_mgmt_threat_exception:
layer: New Layer 1
name: Exception Rule
position: 1
protected_scope: All_Internet
rule_name: Threat Rule 1
state: present
track: Log
- name: set-threat-exception
cp_mgmt_threat_exception:
layer: New Layer 1
name: Exception Rule
rule_name: Threat Rule 1
state: present
- name: delete-threat-exception
cp_mgmt_threat_exception:
name: Exception Rule
layer: New Layer 1
rule_name: Threat Rule 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 |
| --- | --- | --- |
| **cp\_mgmt\_threat\_exception** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_wildcard β Manages wildcard objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_wildcard β Manages wildcard objects on Check Point over Web Services API
====================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_wildcard`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages wildcard objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **ipv4\_address** string | | IPv4 address. |
| **ipv4\_mask\_wildcard** string | | IPv4 mask wildcard. |
| **ipv6\_address** string | | IPv6 address. |
| **ipv6\_mask\_wildcard** string | | IPv6 mask wildcard. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-wildcard
cp_mgmt_wildcard:
ipv4_address: 192.168.2.1
ipv4_mask_wildcard: 0.0.0.128
name: New Wildcard 1
state: present
- name: set-wildcard
cp_mgmt_wildcard:
color: green
ipv6_address: 2001:db8::1111
ipv6_mask_wildcard: ffff:ffff::f0f0
name: New Wildcard 1
state: present
- name: delete-wildcard
cp_mgmt_wildcard:
name: New Wildcard 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 |
| --- | --- | --- |
| **cp\_mgmt\_wildcard** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_run_script β Executes the script on a given list of targets. check\_point.mgmt.cp\_mgmt\_run\_script β Executes the script on a given list of targets.
=========================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_run_script`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Executes the script on a given list of targets.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **args** string | | Script arguments. |
| **comments** string | | Comments string. |
| **script** string | | Script body. |
| **script\_name** string | | Script name. |
| **targets** list / elements=string | | On what targets to execute this command. Targets may be identified by their name, or object unique identifier. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: run-script
cp_mgmt_run_script:
script: ls -l /
script_name: 'Script Example: List files under / dir'
targets:
- corporate-gateway
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_run\_script** dictionary | always. | The checkpoint run-script output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_time_facts β Get time objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_time\_facts β Get time objects facts on Check Point over Web Services API
=====================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_time_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get time objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-time
cp_mgmt_time_facts:
name: timeObject1
- name: show-times
cp_mgmt_time_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_threat_profile_facts β Get threat-profile objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_threat\_profile\_facts β Get threat-profile objects facts on Check Point over Web Services API
==========================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_threat_profile_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get threat-profile objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-threat-profile
cp_mgmt_threat_profile_facts:
name: Recommended_Profile
- name: show-threat-profiles
cp_mgmt_threat_profile_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_delete_nat_rule β Delete existing object using object name or uid. check\_point.mgmt.cp\_mgmt\_delete\_nat\_rule β Delete existing object using object name or uid.
================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_delete_nat_rule`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Delete existing object using object name or uid.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **package** string | | Name of the package. |
| **rule\_number** string | | Rule number. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: delete-nat-rule
cp_mgmt_delete_nat_rule:
package: standard
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 |
| --- | --- | --- |
| **cp\_mgmt\_delete\_nat\_rule** dictionary | always. | The checkpoint delete-nat-rule output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_add_data_center_object β Imports a Data Center Object from a Data Center Server.<br> Data Center Object represents an object in the cloud environment. check\_point.mgmt.cp\_mgmt\_add\_data\_center\_object β Imports a Data Center Object from a Data Center Server.<br> Data Center Object represents an object in the cloud environment.
=====================================================================================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_add_data_center_object`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Imports a Data Center Object from a Data Center Server.<br> Data Center Object represents an object in the cloud environment, e.g. a virtual machine, cluster, network and more.<br> Use the show-data-center-content command to see the Data Center Objects that can be imported from a Data Center Server.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **data\_center\_name** string | | Name of the Data Center Server the object is in. |
| **data\_center\_uid** string | | Unique identifier of the Data Center Server the object is in. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string | | Override default name on data-center. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **uid\_in\_data\_center** string | | Unique identifier of the object in the Data Center Server. |
| **uri** string | | URI of the object in the Data Center Server. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-data-center-object
cp_mgmt_add_data_center_object:
data_center_name: vCenter 1
name: VM1 mgmt name
state: present
uri: /Datacenters/VMs/My VM1
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_add\_data\_center\_object** dictionary | always. | The checkpoint add-data-center-object output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_application_site_group β Manages application-site-group objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_application\_site\_group β Manages application-site-group objects on Check Point over Web Services API
==================================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_application_site_group`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages application-site-group objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **members** list / elements=string | | Collection of application and URL filtering objects identified by the name or UID. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-application-site-group
cp_mgmt_application_site_group:
members:
- facebook
- Social Networking
- New Application Site 1
- New Application Site Category 1
name: New Application Site Group 1
state: present
- name: set-application-site-group
cp_mgmt_application_site_group:
name: New Application Site Group 1
members:
- AliveProxy
state: present
- name: delete-application-site-group
cp_mgmt_application_site_group:
name: New Application Site Group 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 |
| --- | --- | --- |
| **cp\_mgmt\_application\_site\_group** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_network_facts β Get network objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_network\_facts β Get network objects facts on Check Point over Web Services API
===========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_network_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get network objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-network
cp_mgmt_network_facts:
name: New Network 1
- name: show-networks
cp_mgmt_network_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.checkpoint_host β Manages host objects on Check Point over Web Services API check\_point.mgmt.checkpoint\_host β Manages host objects on Check Point over Web Services API
==============================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.checkpoint_host`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages host objects on Check Point devices including creating, updating, removing access rules objects. All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_install\_policy** boolean | **Choices:*** no
* **yes** β
| Install the package policy if changes have been performed after the task completes. |
| **auto\_publish\_session** boolean | **Choices:*** no
* **yes** β
| Publish the current session if changes have been performed after task completes. |
| **ip\_address** string | | IP address of the host object. |
| **name** string / required | | Name of the access rule. |
| **policy\_package** string | **Default:**"standard" | Package policy name to be installed. |
| **state** string | **Default:**"present" | State of the access rule (present or absent). Defaults to present. |
| **targets** list / elements=string | | Targets to install the package policy on. |
Examples
--------
```
- name: Create host object
checkpoint_host:
name: attacker
ip_address: 192.168.0.15
- name: Delete host object
checkpoint_host:
name: attacker
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 |
| --- | --- | --- |
| **checkpoint\_hosts** list / elements=string | always, except when deleting the host. | The checkpoint host object created or updated. |
### Authors
* Ansible by Red Hat (@rcarrillocruz)
ansible check_point.mgmt.cp_mgmt_dynamic_object_facts β Get dynamic-object objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_dynamic\_object\_facts β Get dynamic-object objects facts on Check Point over Web Services API
==========================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_dynamic_object_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get dynamic-object objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-dynamic-object
cp_mgmt_dynamic_object_facts:
name: Dynamic_Object_1
- name: show-dynamic-objects
cp_mgmt_dynamic_object_facts:
```
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.cp_mgmt_simple_gateway_facts β Get simple-gateway objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_simple\_gateway\_facts β Get simple-gateway objects facts on Check Point over Web Services API
==========================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_simple_gateway_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get simple-gateway objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-simple-gateway
cp_mgmt_simple_gateway_facts:
name: gw1
- name: show-simple-gateways
cp_mgmt_simple_gateway_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.checkpoint_run_script β Run scripts on Check Point devices over Web Services API check\_point.mgmt.checkpoint\_run\_script β Run scripts on Check Point devices over Web Services API
====================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.checkpoint_run_script`.
New in version 2.7: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Run scripts on Check Point devices. All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **script** string / required | | Script body contents. |
| **script\_name** string / required | | Name of the script. |
| **targets** list / elements=string / required | | Targets the script should be run against. Can reference either name or UID. |
Examples
--------
```
- name: Run script
checkpoint_run_script:
script_name: "List root"
script: ls -l /
targets:
- mycheckpointgw
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **checkpoint\_run\_script** list / elements=string | always. | The checkpoint run script output. |
### Authors
* Ansible by Red Hat (@rcarrillocruz)
ansible check_point.mgmt.cp_mgmt_show_nat_section β Retrieve existing object using object name or uid. check\_point.mgmt.cp\_mgmt\_show\_nat\_section β Retrieve existing object using object name or uid.
===================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_show_nat_section`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve existing object using object name or uid.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **name** string | | Object name. |
| **package** string | | Name of the package. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: show-nat-section
cp_mgmt_show_nat_section:
name: New Section 1
package: standard
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_show\_nat\_section** dictionary | always. | The checkpoint show-nat-section output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_service_dce_rpc_facts β Get service-dce-rpc objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_dce\_rpc\_facts β Get service-dce-rpc objects facts on Check Point over Web Services API
=============================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_dce_rpc_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get service-dce-rpc objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-service-dce-rpc
cp_mgmt_service_dce_rpc_facts:
name: HP-OpCdistm
- name: show-services-dce-rpc
cp_mgmt_service_dce_rpc_facts:
details_level: standard
limit: 50
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_group β Manages group objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_group β Manages group objects on Check Point over Web Services API
==============================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_group`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages group objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **members** list / elements=string | | Collection of Network objects identified by the name or UID. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-group
cp_mgmt_group:
members:
- New Host 1
- My Test Host 3
name: New Group 5
state: present
- name: set-group
cp_mgmt_group:
name: New Group 1
state: present
- name: delete-group
cp_mgmt_group:
name: New Group 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 |
| --- | --- | --- |
| **cp\_mgmt\_group** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_install_database β Copies the user database and network objects information to specified targets. check\_point.mgmt.cp\_mgmt\_install\_database β Copies the user database and network objects information to specified targets.
==============================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_install_database`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Copies the user database and network objects information to specified targets.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **targets** list / elements=string | | Check Point host(s) with one or more Management Software Blades enabled. The targets can be identified by their name or unique identifier. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: install-database
cp_mgmt_install_database:
targets:
- checkpointhost1
- checkpointhost2
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_install\_database** dictionary | always. | The checkpoint install-database output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.checkpoint_access_layer_facts β Get access layer facts on Check Point over Web Services API check\_point.mgmt.checkpoint\_access\_layer\_facts β Get access layer facts on Check Point over Web Services API
================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.checkpoint_access_layer_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get access layer facts on Check Point devices. All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name** string | | Name of the access layer object. |
| **uid** string | | UID of access layer object. |
Examples
--------
```
- name: Get object facts
checkpoint_access_layer_facts:
```
### Authors
* Ansible by Red Hat (@rcarrillocruz)
ansible check_point.mgmt.cp_mgmt_service_udp β Manages service-udp objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_udp β Manages service-udp objects on Check Point over Web Services API
===========================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_udp`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages service-udp objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **accept\_replies** boolean | **Choices:*** no
* yes
| N/A |
| **aggressive\_aging** dictionary | | Sets short (aggressive) timeouts for idle connections. |
| | **default\_timeout** integer | | Default aggressive aging timeout in seconds. |
| | **enable** boolean | **Choices:*** no
* yes
| N/A |
| | **timeout** integer | | Aggressive aging timeout in seconds. |
| | **use\_default\_timeout** boolean | **Choices:*** no
* yes
| N/A |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **keep\_connections\_open\_after\_policy\_installation** boolean | **Choices:*** no
* yes
| Keep connections open after policy has been installed even if they are not allowed under the new policy. This overrides the settings in the Connection Persistence page. If you change this property, the change will not affect open connections, but only future connections. |
| **match\_by\_protocol\_signature** boolean | **Choices:*** no
* yes
| A value of true enables matching by the selected protocol's signature - the signature identifies the protocol as genuine. Select this option to limit the port to the specified protocol. If the selected protocol does not support matching by signature, this field cannot be set to true. |
| **match\_for\_any** boolean | **Choices:*** no
* yes
| Indicates whether this service is used when 'Any' is set as the rule's service and there are several service objects with the same source port and protocol. |
| **name** string / required | | Object name. |
| **override\_default\_settings** boolean | **Choices:*** no
* yes
| Indicates whether this service is a Data Domain service which has been overridden. |
| **port** string | | The number of the port used to provide this service. To specify a port range, place a hyphen between the lowest and highest port numbers, for example 44-55. |
| **protocol** string | | Select the protocol type associated with the service, and by implication, the management server (if any) that enforces Content Security and Authentication for the service. Selecting a Protocol Type invokes the specific protocol handlers for each protocol type, thus enabling higher level of security by parsing the protocol, and higher level of connectivity by tracking dynamic actions (such as opening of ports). |
| **session\_timeout** integer | | Time (in seconds) before the session times out. |
| **source\_port** string | | Port number for the client side service. If specified, only those Source port Numbers will be Accepted, Dropped, or Rejected during packet inspection. Otherwise, the source port is not inspected. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **sync\_connections\_on\_cluster** boolean | **Choices:*** no
* yes
| Enables state-synchronized High Availability or Load Sharing on a ClusterXL or OPSEC-certified cluster. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **use\_default\_session\_timeout** boolean | **Choices:*** no
* yes
| Use default virtual session timeout. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-service-udp
cp_mgmt_service_udp:
accept_replies: false
aggressive_aging:
enable: true
timeout: 360
use_default_timeout: false
keep_connections_open_after_policy_installation: false
match_for_any: true
name: New_UDP_Service_1
port: 5669
session_timeout: 0
state: present
sync_connections_on_cluster: true
- name: set-service-udp
cp_mgmt_service_udp:
accept_replies: true
aggressive_aging:
default_timeout: 3600
color: green
name: New_UDP_Service_1
port: 5656
state: present
- name: delete-service-udp
cp_mgmt_service_udp:
name: New_UDP_Service_2
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 |
| --- | --- | --- |
| **cp\_mgmt\_service\_udp** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
| programming_docs |
ansible check_point.mgmt.checkpoint_access_rule_facts β Get access rules objects facts on Check Point over Web Services API check\_point.mgmt.checkpoint\_access\_rule\_facts β Get access rules objects facts on Check Point over Web Services API
=======================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.checkpoint_access_rule_facts`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get access rules objects facts on Check Point devices. All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **layer** string / required | | Layer the access rule is attached to. |
| **name** string | | Name of the access rule. If not provided, UID is required. |
| **uid** string | | UID of the access rule. If not provided, name is required. |
Examples
--------
```
- name: Get access rule facts
checkpoint_access_rule_facts:
layer: Network
name: "Drop attacker"
```
### Authors
* Ansible by Red Hat (@rcarrillocruz)
ansible check_point.mgmt.cp_mgmt_multicast_address_range β Manages multicast-address-range objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_multicast\_address\_range β Manages multicast-address-range objects on Check Point over Web Services API
====================================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_multicast_address_range`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages multicast-address-range objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **groups** list / elements=string | | Collection of group identifiers. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **ip\_address** string | | IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. |
| **ip\_address\_first** string | | First IP address in the range. If both IPv4 and IPv6 address ranges are required, use the ipv4-address-first and the ipv6-address-first fields instead. |
| **ip\_address\_last** string | | Last IP address in the range. If both IPv4 and IPv6 address ranges are required, use the ipv4-address-first and the ipv6-address-first fields instead. |
| **ipv4\_address** string | | IPv4 address. |
| **ipv4\_address\_first** string | | First IPv4 address in the range. |
| **ipv4\_address\_last** string | | Last IPv4 address in the range. |
| **ipv6\_address** string | | IPv6 address. |
| **ipv6\_address\_first** string | | First IPv6 address in the range. |
| **ipv6\_address\_last** string | | Last IPv6 address in the range. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-multicast-address-range
cp_mgmt_multicast_address_range:
ip_address_first: 224.0.0.1
ip_address_last: 224.0.0.4
name: New Multicast Address Range
state: present
- name: set-multicast-address-range
cp_mgmt_multicast_address_range:
ip_address_first: 224.0.0.7
ip_address_last: 224.0.0.10
name: New Multicast Address Range
state: present
- name: delete-multicast-address-range
cp_mgmt_multicast_address_range:
name: New Multicast Address Range
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 |
| --- | --- | --- |
| **cp\_mgmt\_multicast\_address\_range** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_show_task β Show task progress and details. check\_point.mgmt.cp\_mgmt\_show\_task β Show task progress and details.
========================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_show_task`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Show task progress and details.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **task\_id** list / elements=string | | Unique identifier of one or more tasks. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: show-task
cp_mgmt_show_task:
task_id: 2eec70e5-78a8-4bdb-9a76-cfb5601d0bcb
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cp\_mgmt\_show\_task** dictionary | always. | The checkpoint show-task output. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_dynamic_object β Manages dynamic-object objects on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_dynamic\_object β Manages dynamic-object objects on Check Point over Web Services API
=================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_dynamic_object`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages dynamic-object objects on Check Point devices including creating, updating and removing objects.
* All operations are performed over Web Services API.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auto\_publish\_session** boolean | **Choices:*** no
* yes
| Publish the current session if changes have been performed after task completes. |
| **color** string | **Choices:*** aquamarine
* black
* blue
* crete blue
* burlywood
* cyan
* dark green
* khaki
* orchid
* dark orange
* dark sea green
* pink
* turquoise
* dark blue
* firebrick
* brown
* forest green
* gold
* dark gold
* gray
* dark gray
* light green
* lemon chiffon
* coral
* sea green
* sky blue
* magenta
* purple
* slate blue
* violet red
* navy blue
* olive
* orange
* red
* sienna
* yellow
| Color of the object. Should be one of existing colors. |
| **comments** string | | Comments string. |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **ignore\_errors** boolean | **Choices:*** no
* yes
| Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| **ignore\_warnings** boolean | **Choices:*** no
* yes
| Apply changes ignoring warnings. |
| **name** string / required | | Object name. |
| **state** string | **Choices:*** **present** β
* absent
| State of the access rule (present or absent). Defaults to present. |
| **tags** list / elements=string | | Collection of tag identifiers. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
| **wait\_for\_task** boolean | **Choices:*** no
* **yes** β
| Wait for the task to end. Such as publish task. |
| **wait\_for\_task\_timeout** integer | **Default:**30 | How many minutes to wait until throwing a timeout error. |
Examples
--------
```
- name: add-dynamic-object
cp_mgmt_dynamic_object:
color: yellow
comments: My Dynamic Object 1
name: Dynamic_Object_1
state: present
- name: delete-dynamic-object
cp_mgmt_dynamic_object:
name: Dynamic_Object_2
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 |
| --- | --- | --- |
| **cp\_mgmt\_dynamic\_object** dictionary | always, except when deleting the object. | The checkpoint object created or updated. |
### Authors
* Or Soffer (@chkp-orso)
ansible check_point.mgmt.cp_mgmt_service_tcp_facts β Get service-tcp objects facts on Check Point over Web Services API check\_point.mgmt.cp\_mgmt\_service\_tcp\_facts β Get service-tcp objects facts on Check Point over Web Services API
====================================================================================================================
Note
This plugin is part of the [check\_point.mgmt collection](https://galaxy.ansible.com/check_point/mgmt) (version 2.1.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 check_point.mgmt`.
To use it in a playbook, specify: `check_point.mgmt.cp_mgmt_service_tcp_facts`.
New in version 2.9: of check\_point.mgmt
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get service-tcp objects facts on Check Point devices.
* All operations are performed over Web Services API.
* This module handles both operations, get a specific object and get several objects, For getting a specific object use the parameter βnameβ.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **details\_level** string | **Choices:*** uid
* standard
* full
| The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. |
| **limit** integer | | No more than that many results will be returned. This parameter is relevant only for getting few objects. |
| **name** string | | Object name. This parameter is relevant only for getting a specific object. |
| **offset** integer | | Skip that many results before beginning to return them. This parameter is relevant only for getting few objects. |
| **order** list / elements=string | | Sorts results by the given field. By default the results are sorted in the ascending order by name. This parameter is relevant only for getting few objects. |
| | **ASC** string | **Choices:*** name
| Sorts results by the given field in ascending order. |
| | **DESC** string | **Choices:*** name
| Sorts results by the given field in descending order. |
| **show\_membership** boolean | **Choices:*** no
* yes
| Indicates whether to calculate and show "groups" field for every object in reply. |
| **version** string | | Version of checkpoint. If not given one, the latest version taken. |
Examples
--------
```
- name: show-service-tcp
cp_mgmt_service_tcp_facts:
name: https
- name: show-services-tcp
cp_mgmt_service_tcp_facts:
details_level: standard
limit: 10
offset: 0
```
### Authors
* Or Soffer (@chkp-orso)
ansible Collections in the Ovirt Namespace Collections in the Ovirt Namespace
==================================
These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **ovirt** namespace.
* [ovirt.ovirt](ovirt/index#plugins-in-ovirt-ovirt)
ansible ovirt.ovirt.ovirt_storage_domain β Module to manage storage domains in oVirt/RHV ovirt.ovirt.ovirt\_storage\_domain β Module to manage storage domains in oVirt/RHV
==================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_storage_domain`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage storage domains in oVirt/RHV
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **backup** boolean | **Choices:*** no
* yes
| Boolean flag which indicates whether the storage domain is configured as backup or not. |
| **comment** string | | Comment of the storage domain. |
| **critical\_space\_action\_blocker** integer | | Indicates the minimal free space the storage domain should contain in percentages. |
| **data\_center** string | | Data center name where storage domain should be attached. This parameter isn't idempotent, it's not possible to change data center of storage domain. |
| **description** string | | Description of the storage domain. |
| **destroy** boolean | **Choices:*** no
* yes
| Logical remove of the storage domain. If *true* retains the storage domain's data for import. This parameter is relevant only when `state` is *absent*. |
| **discard\_after\_delete** boolean | **Choices:*** no
* yes
| If *True* storage domain blocks will be discarded upon deletion. Enabled by default. This parameter is relevant only for block based storage domains. |
| **domain\_function** string | **Choices:*** **data** β
* iso
* export
| Function of the storage domain. This parameter isn't idempotent, it's not possible to change domain function of storage domain.
aliases: type |
| **fcp** dictionary | | Dictionary with values for fibre channel storage type: Note that these parameters are not idempotent. |
| | **lun\_id** string | | LUN id. |
| | **override\_luns** boolean | **Choices:*** no
* yes
| If *True* FCP storage domain LUNs will be overridden before adding. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **format** boolean | **Choices:*** no
* yes
| If *True* storage domain will be formatted after removing it from oVirt/RHV. This parameter is relevant only when `state` is *absent*. |
| **glusterfs** dictionary | | Dictionary with values for GlusterFS storage type: Note that these parameters are not idempotent. |
| | **address** string | | Address of the Gluster server. E.g.: myserver.mydomain.com |
| | **mount\_options** string | | Option which will be passed when mounting storage. |
| | **path** string | | Path of the mount point. E.g.: /path/to/my/data |
| **host** string | | Host to be used to mount storage. |
| **id** string | | Id of the storage domain to be imported. |
| **iscsi** dictionary | | Dictionary with values for iSCSI storage type: Note that these parameters are not idempotent. |
| | **address** string | | Address of the iSCSI storage server. |
| | **lun\_id** string | | LUN id(s). |
| | **override\_luns** boolean | **Choices:*** no
* yes
| If *True* ISCSI storage domain luns will be overridden before adding. |
| | **password** string | | A CHAP password for logging into a target. |
| | **port** string | | Port of the iSCSI storage server. |
| | **target** string | | The target IQN for the storage device. |
| | **target\_lun\_map** string | | List of dictionary containing targets and LUNs. |
| | **username** string | | A CHAP user name for logging into a target. |
| **localfs** dictionary | | Dictionary with values for localfs storage type: Note that these parameters are not idempotent. |
| | **path** string | | Path of the mount point. E.g.: /path/to/my/data |
| **managed\_block\_storage** dictionary | | Dictionary with values for managed block storage type Note: available from ovirt 4.3 |
| | **driver\_options** list / elements=dictionary | | The options to be passed when creating a storage domain using a cinder driver. List of dictionary containing `name` and `value` of driver option |
| | **driver\_sensitive\_options** list / elements=dictionary | | Parameters containing sensitive information, to be passed when creating a storage domain using a cinder driver. List of dictionary containing `name` and `value` of driver sensitive option |
| **name** string | | Name of the storage domain to manage. (Not required when state is *imported*) |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **nfs** dictionary | | Dictionary with values for NFS storage type: Note that these parameters are not idempotent. |
| | **address** string | | Address of the NFS server. E.g.: myserver.mydomain.com |
| | **mount\_options** string | | Option which will be passed when mounting storage. |
| | **path** string | | Path of the mount point. E.g.: /path/to/my/data |
| | **retrans** string | | The number of times to retry a request before attempting further recovery actions. Range 0 to 65535. |
| | **timeout** string | | The time in tenths of a second to wait for a response before retrying NFS requests. Range 0 to 65535. |
| | **version** string | | NFS version. One of: *auto*, *v3*, *v4* or *v4\_1*. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **posixfs** dictionary | | Dictionary with values for PosixFS storage type: Note that these parameters are not idempotent. |
| | **mount\_options** string | | Option which will be passed when mounting storage. |
| | **path** string | | Path of the mount point. E.g.: /path/to/my/data |
| | **vfs\_type** string | | Virtual File System type. |
| **state** string | **Choices:*** **present** β
* absent
* maintenance
* unattached
* imported
* update\_ovf\_store
| Should the storage domain be present/absent/maintenance/unattached/imported/update\_ovf\_store
*imported* is supported since version 2.4.
*update\_ovf\_store* is supported since version 2.5, currently if `wait` is (true), we don't wait for update. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
| **warning\_low\_space** integer | | Indicates the minimum percentage of a free space in a storage domain to present a warning. |
| **wipe\_after\_delete** boolean | **Choices:*** no
* yes
| Boolean flag which indicates whether the storage domain should wipe the data after delete. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Add data NFS storage domain
- ovirt.ovirt.ovirt_storage_domain:
name: data_nfs
host: myhost
data_center: mydatacenter
nfs:
address: 10.34.63.199
path: /path/data
# Add data NFS storage domain with id for data center
- ovirt.ovirt.ovirt_storage_domain:
name: data_nfs
host: myhost
data_center: 11111
nfs:
address: 10.34.63.199
path: /path/data
mount_options: noexec,nosuid
# Add data localfs storage domain
- ovirt.ovirt.ovirt_storage_domain:
name: data_localfs
host: myhost
data_center: mydatacenter
localfs:
path: /path/to/data
# Add data iSCSI storage domain:
- ovirt.ovirt.ovirt_storage_domain:
name: data_iscsi
host: myhost
data_center: mydatacenter
iscsi:
target: iqn.2016-08-09.domain-01:nickname
lun_id:
- 1IET_000d0001
- 1IET_000d0002
address: 10.34.63.204
discard_after_delete: True
backup: False
critical_space_action_blocker: 5
warning_low_space: 10
# Since Ansible 2.5 you can specify multiple targets for storage domain,
# Add data iSCSI storage domain with multiple targets:
- ovirt.ovirt.ovirt_storage_domain:
name: data_iscsi
host: myhost
data_center: mydatacenter
iscsi:
target_lun_map:
- target: iqn.2016-08-09.domain-01:nickname
lun_id: 1IET_000d0001
- target: iqn.2016-08-09.domain-02:nickname
lun_id: 1IET_000d0002
address: 10.34.63.204
discard_after_delete: True
# Add data glusterfs storage domain
- ovirt.ovirt.ovirt_storage_domain:
name: glusterfs_1
host: myhost
data_center: mydatacenter
glusterfs:
address: 10.10.10.10
path: /path/data
# Create export NFS storage domain:
- ovirt.ovirt.ovirt_storage_domain:
name: myexportdomain
domain_function: export
host: myhost
data_center: mydatacenter
nfs:
address: 10.34.63.199
path: /path/export
wipe_after_delete: False
backup: True
critical_space_action_blocker: 2
warning_low_space: 5
# Import export NFS storage domain:
- ovirt.ovirt.ovirt_storage_domain:
state: imported
domain_function: export
host: myhost
data_center: mydatacenter
nfs:
address: 10.34.63.199
path: /path/export
# Import FCP storage domain:
- ovirt.ovirt.ovirt_storage_domain:
state: imported
name: data_fcp
host: myhost
data_center: mydatacenter
fcp: {}
# Update OVF_STORE:
- ovirt.ovirt.ovirt_storage_domain:
state: update_ovf_store
name: domain
# Create ISO NFS storage domain
- ovirt.ovirt.ovirt_storage_domain:
name: myiso
domain_function: iso
host: myhost
data_center: mydatacenter
nfs:
address: 10.34.63.199
path: /path/iso
# Create managed storage domain
# Available from ovirt 4.3 and ansible 2.9
- ovirt.ovirt.ovirt_storage_domain:
name: my_managed_domain
host: myhost
data_center: mydatacenter
managed_block_storage:
driver_options:
- name: rbd_pool
value: pool1
- name: rbd_user
value: admin
- name: volume_driver
value: cinder.volume.drivers.rbd.RBDDriver
- name: rbd_keyring_conf
value: /etc/ceph/keyring
driver_sensitive_options:
- name: secret_password
value: password
# Remove storage domain
- ovirt.ovirt.ovirt_storage_domain:
state: absent
name: mystorage_domain
format: 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 |
| --- | --- | --- |
| **id** string | On success if storage domain is found. | ID of the storage domain which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **storage\_domain** dictionary | On success if storage domain is found. | Dictionary of all the storage domain attributes. Storage domain attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/storage\_domain. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
| programming_docs |
ansible ovirt.ovirt.ovirt_template β Module to manage virtual machine templates in oVirt/RHV ovirt.ovirt.ovirt\_template β Module to manage virtual machine templates in oVirt/RHV
=====================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_template`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage virtual machine templates in oVirt/RHV.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_partial\_import** boolean | **Choices:*** no
* yes
| Boolean indication whether to allow partial registration of a template when `state` is registered. |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **ballooning\_enabled** boolean | **Choices:*** no
* yes
| If *true*, use memory ballooning. Memory balloon is a guest device, which may be used to re-distribute / reclaim the host memory based on VM needs in a dynamic way. In this way it's possible to create memory over commitment states. |
| **clone\_name** string | | Name for importing Template from storage domain. If not defined, `name` will be used. |
| **clone\_permissions** boolean | **Choices:*** no
* yes
| If *True* then the permissions of the VM (only the direct ones, not the inherited ones) will be copied to the created template. This parameter is used only when `state` *present*. |
| **cloud\_init** dictionary | | Dictionary with values for Unix-like Virtual Machine initialization using cloud init. |
| | **authorized\_ssh\_keys** string | | Use this SSH keys to login to Virtual Machine. |
| | **custom\_script** string | | Cloud-init script which will be executed on Virtual Machine when deployed. This is appended to the end of the cloud-init script generated by any other options. For further information, refer to cloud-init User-Data documentation. |
| | **dns\_search** string | | DNS search domains to be configured on Virtual Machine. |
| | **dns\_servers** string | | DNS servers to be configured on Virtual Machine, maximum of two, space-separated. |
| | **host\_name** string | | Hostname to be set to Virtual Machine when deployed. |
| | **nic\_boot\_protocol** string | **Choices:*** none
* dhcp
* static
| Set boot protocol of the network interface of Virtual Machine. |
| | **nic\_gateway** string | | If boot protocol is static, set this gateway to network interface of Virtual Machine. |
| | **nic\_ip\_address** string | | If boot protocol is static, set this IP address to network interface of Virtual Machine. |
| | **nic\_name** string | | Set name to network interface of Virtual Machine. |
| | **nic\_netmask** string | | If boot protocol is static, set this netmask to network interface of Virtual Machine. |
| | **regenerate\_ssh\_keys** boolean | **Choices:*** no
* yes
| If *True* SSH keys will be regenerated on Virtual Machine. |
| | **root\_password** string | | Password to be set for user specified by `user_name` parameter. |
| | **timezone** string | | Timezone to be set to Virtual Machine when deployed. |
| | **user\_name** string | | Username to be used to set password to Virtual Machine when deployed. |
| **cloud\_init\_nics** list / elements=dictionary | | List of dictionaries representing network interfaces to be setup by cloud init. This option is used, when user needs to setup more network interfaces via cloud init. If one network interface is enough, user should use `cloud_init` *nic\_\** parameters. `cloud_init` *nic\_\** parameters are merged with `cloud_init_nics` parameters. |
| | **nic\_boot\_protocol** string | | Set boot protocol of the network interface of Virtual Machine. Can be one of `none`, `dhcp` or `static`. |
| | **nic\_gateway** string | | If boot protocol is static, set this gateway to network interface of Virtual Machine. |
| | **nic\_ip\_address** string | | If boot protocol is static, set this IP address to network interface of Virtual Machine. |
| | **nic\_name** string | | Set name to network interface of Virtual Machine. |
| | **nic\_netmask** string | | If boot protocol is static, set this netmask to network interface of Virtual Machine. |
| **cluster** string | | Name of the cluster, where template should be created/imported. |
| **cluster\_mappings** list / elements=dictionary | | Mapper which maps cluster name between Template's OVF and the destination cluster this Template should be registered to, relevant when `state` is registered. Cluster mapping is described by the following dictionary: |
| | **dest\_name** string | | The name of the destination cluster. |
| | **source\_name** string | | The name of the source cluster. |
| **cpu\_profile** string | | CPU profile to be set to template. |
| **description** string | | Description of the template. |
| **domain\_mappings** list / elements=dictionary | | Mapper which maps aaa domain name between Template's OVF and the destination aaa domain this Template should be registered to, relevant when `state` is registered. The aaa domain mapping is described by the following dictionary: |
| | **dest\_name** string | | The name of the destination aaa domain. |
| | **source\_name** string | | The name of the source aaa domain. |
| **exclusive** boolean | **Choices:*** no
* yes
| When `state` is *exported* this parameter indicates if the existing templates with the same name should be overwritten. |
| **export\_domain** string | | When `state` is *exported* or *imported* this parameter specifies the name of the export storage domain. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **id** string | | ID of the template to be registered. |
| **image\_disk** string | | When `state` is *imported* and `image_provider` is used this parameter specifies the name of disk to be imported as template.
aliases: glance\_image\_disk\_name |
| **image\_provider** string | | When `state` is *imported* this parameter specifies the name of the image provider to be used. |
| **io\_threads** integer | | Number of IO threads used by virtual machine. *0* means IO threading disabled. |
| **memory** string | | Amount of memory of the template. Prefix uses IEC 60027-2 standard (for example 1GiB, 1024MiB). |
| **memory\_guaranteed** string | | Amount of minimal guaranteed memory of the template. Prefix uses IEC 60027-2 standard (for example 1GiB, 1024MiB).
`memory_guaranteed` parameter can't be lower than `memory` parameter. |
| **memory\_max** string | | Upper bound of template memory up to which memory hot-plug can be performed. Prefix uses IEC 60027-2 standard (for example 1GiB, 1024MiB). |
| **name** string | | Name of the template to manage. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **nics** list / elements=dictionary | | List of NICs, which should be attached to Virtual Machine. NIC is described by following dictionary. |
| | **interface** string | **Choices:*** **virtio** β
* e1000
* rtl8139
| Type of the network interface. |
| | **mac\_address** string | | Custom MAC address of the network interface, by default it's obtained from MAC pool. |
| | **name** string | | Name of the NIC. |
| | **profile\_name** string | | Profile name where NIC should be attached. |
| **operating\_system** string | | Operating system of the template, for example 'rhel\_8x64'. Default value is set by oVirt/RHV engine. Use the M(ovirt\_vm\_os\_info) module to obtain the current list. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **role\_mappings** list / elements=dictionary | | Mapper which maps role name between Template's OVF and the destination role this Template should be registered to, relevant when `state` is registered. Role mapping is described by the following dictionary: |
| | **dest\_name** string | | The name of the destination role. |
| | **source\_name** string | | The name of the source role. |
| **seal** boolean | **Choices:*** no
* yes
| 'Sealing' is an operation that erases all machine-specific configurations from a filesystem: This includes SSH keys, UDEV rules, MAC addresses, system ID, hostname, etc. If *true* subsequent virtual machines made from this template will avoid configuration inheritance. This parameter is used only when `state` *present*. |
| **smartcard\_enabled** boolean | **Choices:*** no
* yes
| If *true*, use smart card authentication. |
| **soundcard\_enabled** boolean | **Choices:*** no
* yes
| If *true*, the sound card is added to the virtual machine. |
| **sso** boolean | **Choices:*** no
* yes
|
*True* enable Single Sign On by Guest Agent, *False* to disable it. By default is chosen by oVirt/RHV engine. |
| **state** string | **Choices:*** **present** β
* absent
* exported
* imported
* registered
| Should the template be present/absent/exported/imported/registered. When `state` is *registered* and the unregistered template's name belongs to an already registered in engine template in the same DC then we fail to register the unregistered template. |
| **storage\_domain** string | | When `state` is *imported* this parameter specifies the name of the destination data storage domain. When `state` is *registered* this parameter specifies the name of the data storage domain of the unregistered template. |
| **sysprep** dictionary | | Dictionary with values for Windows Virtual Machine initialization using sysprep. |
| | **active\_directory\_ou** string | | Active Directory Organizational Unit, to be used for login of user. |
| | **custom\_script** string | | A custom Sysprep definition in the format of a complete unattended installation answer file. |
| | **domain** string | | Domain to be set to Windows Virtual Machine. |
| | **host\_name** string | | Hostname to be set to Virtual Machine when deployed. |
| | **input\_locale** string | | Input localization of the Windows Virtual Machine. |
| | **org\_name** string | | Organization name to be set to Windows Virtual Machine. |
| | **root\_password** string | | Password to be set for username to Windows Virtual Machine. |
| | **system\_locale** string | | System localization of the Windows Virtual Machine. |
| | **timezone** string | | Timezone to be set to Windows Virtual Machine. |
| | **ui\_language** string | | UI language of the Windows Virtual Machine. |
| | **user\_name** string | | Username to be used for set password to Windows Virtual Machine. |
| | **windows\_license\_key** string | | License key to be set to Windows Virtual Machine. |
| **template\_image\_disk\_name** string | | When `state` is *imported* and `image_provider` is used this parameter specifies the new name for imported disk, if omitted then *image\_disk* name is used by default. This parameter is used only in case of importing disk image from Glance domain. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **timezone** string | | Sets time zone offset of the guest hardware clock. For example `Etc/GMT`
|
| **usb\_support** boolean | **Choices:*** no
* yes
|
*True* enable USB support, *False* to disable it. By default is chosen by oVirt/RHV engine. |
| **version** dictionary | |
`name` - The name of this version.
`number` - The index of this version in the versions hierarchy of the template. Used for editing of sub template. |
| **vm** string | | Name of the VM, which will be used to create template. |
| **vnic\_profile\_mappings** list / elements=dictionary | | Mapper which maps an external virtual NIC profile to one that exists in the engine when `state` is registered. vnic\_profile is described by the following dictionary: |
| | **source\_network\_name** string | | The network name of the source network. |
| | **source\_profile\_name** string | | The profile name related to the source network. |
| | **target\_profile\_id** string | | The id of the target profile id to be mapped to in the engine. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Create template from vm
- ovirt.ovirt.ovirt_template:
cluster: Default
name: mytemplate
vm: rhel7
cpu_profile: Default
description: Test
# Import template
- ovirt.ovirt.ovirt_template:
state: imported
name: mytemplate
export_domain: myexport
storage_domain: mystorage
cluster: mycluster
# Remove template
- ovirt.ovirt.ovirt_template:
state: absent
name: mytemplate
# Change Template Name
- ovirt.ovirt.ovirt_template:
id: 00000000-0000-0000-0000-000000000000
name: "new_template_name"
# Register template
- ovirt.ovirt.ovirt_template:
state: registered
storage_domain: mystorage
cluster: mycluster
name: mytemplate
# Register template using id
- ovirt.ovirt.ovirt_template:
state: registered
storage_domain: mystorage
cluster: mycluster
id: 1111-1111-1111-1111
# Register template, allowing partial import
- ovirt.ovirt.ovirt_template:
state: registered
storage_domain: mystorage
allow_partial_import: "True"
cluster: mycluster
id: 1111-1111-1111-1111
# Register template with vnic profile mappings
- ovirt.ovirt.ovirt_template:
state: registered
storage_domain: mystorage
cluster: mycluster
id: 1111-1111-1111-1111
vnic_profile_mappings:
- source_network_name: mynetwork
source_profile_name: mynetwork
target_profile_id: 3333-3333-3333-3333
- source_network_name: mynetwork2
source_profile_name: mynetwork2
target_profile_id: 4444-4444-4444-4444
# Register template with mapping
- ovirt.ovirt.ovirt_template:
state: registered
storage_domain: mystorage
cluster: mycluster
id: 1111-1111-1111-1111
role_mappings:
- source_name: Role_A
dest_name: Role_B
domain_mappings:
- source_name: Domain_A
dest_name: Domain_B
cluster_mappings:
- source_name: cluster_A
dest_name: cluster_B
# Import image from Glance s a template
- ovirt.ovirt.ovirt_template:
state: imported
name: mytemplate
image_disk: "centos7"
template_image_disk_name: centos7_from_glance
image_provider: "glance_domain"
storage_domain: mystorage
cluster: mycluster
# Edit template subversion
- ovirt.ovirt.ovirt_template:
cluster: mycluster
name: mytemplate
vm: rhel7
version:
number: 2
name: subversion
# Create new template subversion
- ovirt.ovirt.ovirt_template:
cluster: mycluster
name: mytemplate
vm: rhel7
version:
name: subversion
- name: Template with cloud init
ovirt.ovirt.ovirt_template:
name: mytemplate
cluster: Default
vm: rhel8
memory: 1GiB
cloud_init:
dns_servers: '8.8.8.8 8.8.4.4'
nic_boot_protocol: static
nic_ip_address: 10.34.60.86
nic_netmask: 255.255.252.0
nic_gateway: 10.34.63.254
nic_name: eth1
host_name: example.com
custom_script: |
write_files:
- content: |
Hello, world!
path: /tmp/greeting.txt
permissions: '0644'
user_name: root
root_password: super_password
- name: Template with cloud init, with multiple network interfaces
ovirt.ovirt.ovirt_template:
name: mytemplate
cluster: mycluster
vm: rhel8
cloud_init_nics:
- nic_name: eth0
nic_boot_protocol: dhcp
- nic_name: eth1
nic_boot_protocol: static
nic_ip_address: 10.34.60.86
nic_netmask: 255.255.252.0
nic_gateway: 10.34.63.254
- name: Template with timezone and nic
ovirt.ovirt.ovirt_template:
cluster: MyCluster
name: mytemplate
vm: rhel8
timezone: America/Godthab
memory_max: 2Gib
nics:
- name: nic1
- name: Template with sysprep
ovirt.ovirt.ovirt_template:
name: windows2012R2_AD
cluster: Default
vm: windows2012
memory: 3GiB
sysprep:
host_name: windowsad.example.com
user_name: Administrator
root_password: SuperPassword123
```
Return Values
-------------
Common return 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 | On success if template is found. | ID of the template which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **template** dictionary | On success if template is found. | Dictionary of all the template attributes. Template attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/template. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
| programming_docs |
ansible ovirt.ovirt.ovirt_host_storage_info β Retrieve information about one or more oVirt/RHV HostStorages (applicable only for block storage) ovirt.ovirt.ovirt\_host\_storage\_info β Retrieve information about one or more oVirt/RHV HostStorages (applicable only for block storage)
==========================================================================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_host_storage_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV HostStorages (applicable only for block storage).
* This module was called `ovirt_host_storage_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_host\_storage\_info](#ansible-collections-ovirt-ovirt-ovirt-host-storage-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fcp** dictionary | | Dictionary with values for fibre channel storage type: |
| | **address** string | | Address of the fibre channel storage server. |
| | **lun\_id** string | | LUN id. |
| | **port** string | | Port of the fibre channel storage server. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **host** string / required | | Host to get device list from. |
| **iscsi** dictionary | | Dictionary with values for iSCSI storage type: |
| | **address** string | | Address of the iSCSI storage server. |
| | **password** string | | A CHAP password for logging into a target. |
| | **portal** string | | The portal being used to connect with iscsi. |
| | **target** string | | The target IQN for the storage device. |
| | **username** string | | A CHAP user name for logging into a target. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about HostStorages with specified target and address:
- ovirt.ovirt.ovirt_host_storage_info:
host: myhost
iscsi:
target: iqn.2016-08-09.domain-01:nickname
address: 10.34.63.204
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_host_storages }}"
- name: Gather information about all storages
ovirt.ovirt.ovirt_host_storage_info:
host: myhost
- name: Gather information about all iscsi storages
ovirt.ovirt.ovirt_host_storage_info:
host: myhost
iscsi: {}
- name: Gather information about all fcp storages
ovirt.ovirt.ovirt_host_storage_info:
host: myhost
fcp: {}
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_host\_storages** list / elements=string | On success. | List of dictionaries describing the HostStorage. HostStorage attributes are mapped to dictionary keys, all HostStorage attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/host\_storage. |
### Authors
* Daniel Erez (@derez)
ansible ovirt.ovirt.ovirt_vnic_profile β Module to manage vNIC profile of network in oVirt/RHV ovirt.ovirt.ovirt\_vnic\_profile β Module to manage vNIC profile of network in oVirt/RHV
========================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_vnic_profile`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage vNIC profile of network in oVirt/RHV
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **custom\_properties** list / elements=dictionary | | Custom properties applied to the vNIC profile. Custom properties is a list of dictionary which can have following values: |
| | **name** string | | Name of the custom property. For example: *hugepages*, *vhost*, *sap\_agent*, etc. |
| | **regexp** string | | Regular expression to set for custom property. |
| | **value** string | | Value to set for custom property. |
| **data\_center** string / required | | Datacenter name where network reside. |
| **description** string | | A human-readable description in plain text. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **migratable** boolean | **Choices:*** no
* yes
| Marks whether pass\_through NIC is migratable or not. |
| **name** string / required | | A human-readable name in plain text. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **network** string / required | | Name of network to which is vNIC attached. |
| **network\_filter** string | | The network filter enables to filter packets send to/from the VM's nic according to defined rules. |
| **pass\_through** string | **Choices:*** disabled
* enabled
| Enables passthrough to an SR-IOV-enabled host NIC. When enabled `qos` and `network_filter` are automatically set to None and `port_mirroring` to False. When enabled and `migratable` not specified then `migratable` is enabled. Port mirroring, QoS and network filters are not supported on passthrough profiles. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **port\_mirroring** boolean | **Choices:*** no
* yes
| Enables port mirroring. |
| **qos** string | | Quality of Service attributes regulate inbound and outbound network traffic of the NIC. |
| **state** string | **Choices:*** absent
* **present** β
| Should the vNIC be absent/present. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
- name: Add vNIC
ovirt.ovirt.ovirt_vnic_profile:
name: myvnic
network: mynetwork
state: present
data_center: datacenter
- name: Editing vNICs network_filter, custom_properties, qos
ovirt.ovirt.ovirt_vnic_profile:
name: myvnic
network: mynetwork
data_center: datacenter
qos: myqos
custom_properties:
- name: SecurityGroups
value: 9bd9bde9-39da-44a8-9541-aa39e1a81c9d
network_filter: allow-dhcp
- name: Remove vNICs network_filter, custom_properties, qos
ovirt.ovirt.ovirt_vnic_profile:
name: myvnic
network: mynetwork
data_center: datacenter
qos: ""
custom_properties: ""
network_filter: ""
- name: Dont use migratable
ovirt.ovirt.ovirt_vnic_profile:
name: myvnic
network: mynetwork
data_center: datacenter
migratable: False
pass_through: enabled
- name: Remove vNIC
ovirt.ovirt.ovirt_vnic_profile:
name: myvnic
network: mynetwork
state: absent
data_center: datacenter
```
Return Values
-------------
Common return 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 | On success if vNIC profile is found. | ID of the vNIC profile which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **vnic** dictionary | On success if vNIC profile is found. | Dictionary of all the vNIC profile attributes. Network interface attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/nic. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_snapshot_info β Retrieve information about one or more oVirt/RHV virtual machine snapshots ovirt.ovirt.ovirt\_snapshot\_info β Retrieve information about one or more oVirt/RHV virtual machine snapshots
==============================================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_snapshot_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV virtual machine snapshots.
* This module was called `ovirt_snapshot_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_snapshot\_info](#ansible-collections-ovirt-ovirt-ovirt-snapshot-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **description** string | | Description of the snapshot, can be used as glob expression. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **snapshot\_id** string | | Id of the snapshot we want to retrieve information about. |
| **vm** string / required | | Name of the VM with snapshot. |
Notes
-----
Note
* This module returns a variable `ovirt_snapshots`, which contains a list of snapshots. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all snapshots which description start with C(update) for VM named C(centos7):
- ovirt.ovirt.ovirt_snapshot_info:
vm: centos7
description: update*
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_snapshots }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_snapshots** list / elements=string | On success. | List of dictionaries describing the snapshot. Snapshot attributes are mapped to dictionary keys, all snapshot attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/snapshot. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
| programming_docs |
ansible ovirt.ovirt.ovirt_snapshot β Module to manage Virtual Machine Snapshots in oVirt/RHV ovirt.ovirt.ovirt\_snapshot β Module to manage Virtual Machine Snapshots in oVirt/RHV
=====================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_snapshot`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage Virtual Machine Snapshots in oVirt/RHV
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **description** string | | Description of the snapshot. |
| **disk\_id** string | | Disk id which you want to upload or download To get disk, you need to define disk\_id or disk\_name |
| **disk\_name** string | | Disk name which you want to upload or download |
| **disks** list / elements=dictionary | | List of disks which should be created with snapshot. |
| | **id** string | | Id of the disk which should will be created. |
| | **name** string | | Name of the disk which should will be created. |
| **download\_image\_path** string | | Path on a file system where snapshot should be downloaded. Note that you must have an valid oVirt/RHV engine CA in your system trust store or you must provide it in `ca_file` parameter. Note that the snapshot is not downloaded when the file already exists, but you can forcibly download the snapshot when using `force` I (true). |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **keep\_days\_old** integer | | Number of days after which should snapshot be deleted. It will check all snapshots of virtual machine and delete them, if they are older. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **snapshot\_id** string | | ID of the snapshot to manage. |
| **state** string | **Choices:*** restore
* **present** β
* absent
| Should the Virtual Machine snapshot be restore/present/absent. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **upload\_image\_path** string | | Path to disk image, which should be uploaded. |
| **use\_memory** boolean | **Choices:*** no
* yes
| If *true* and `state` is *present* save memory of the Virtual Machine if it's running. If *true* and `state` is *restore* restore memory of the Virtual Machine. Note that Virtual Machine will be paused while saving the memory.
aliases: restore\_memory, save\_memory |
| **vm\_name** string / required | | Name of the Virtual Machine to manage. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* Note that without a guest agent the data on the created snapshot may be inconsistent.
* Deleting a snapshot does not remove any information from the virtual machine - it simply removes a return-point. However, restoring a virtual machine from a snapshot deletes any content that was written to the virtual machine after the time the snapshot was taken.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Create snapshot:
- ovirt.ovirt.ovirt_snapshot:
vm_name: rhel7
description: MySnapshot
register: snapshot
# Create snapshot and save memory:
- ovirt.ovirt.ovirt_snapshot:
vm_name: rhel7
description: SnapWithMem
use_memory: true
register: snapshot
# Restore snapshot:
- ovirt.ovirt.ovirt_snapshot:
state: restore
vm_name: rhel7
snapshot_id: "{{ snapshot.id }}"
# Remove snapshot:
- ovirt.ovirt.ovirt_snapshot:
state: absent
vm_name: rhel7
snapshot_id: "{{ snapshot.id }}"
# Upload local image to disk and attach it to vm:
# Since Ansible 2.8
- ovirt.ovirt.ovirt_snapshot:
name: mydisk
vm_name: myvm
upload_image_path: /path/to/mydisk.qcow2
# Download snapshot to local file system:
# Since Ansible 2.8
- ovirt.ovirt.ovirt_snapshot:
snapshot_id: 7de90f31-222c-436c-a1ca-7e655bd5b60c
disk_name: DiskName
vm_name: myvm
download_image_path: /home/user/mysnaphost.qcow2
# Delete all snapshots older than 2 days
- ovirt.ovirt.ovirt_snapshot:
vm_name: test
keep_days_old: 2
- name: Select which disks should be add to snapshot
ovirt.ovirt.ovirt_snapshot:
vm_name: test
disks:
- id: 7de90f31-222c-436c-a1ca-7e655bd5b60c
- name: my_disk_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 |
| --- | --- | --- |
| **id** string | On success if snapshot is found. | ID of the snapshot which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **snapshot** dictionary | On success if snapshot is found. | Dictionary of all the snapshot attributes. Snapshot attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/snapshot. |
| **snapshots** list / elements=string | On success returns deleted snapshots | List of deleted snapshots when keep\_days\_old is defined and snapshot is older than the input days |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_external_provider_info β Retrieve information about one or more oVirt/RHV external providers ovirt.ovirt.ovirt\_external\_provider\_info β Retrieve information about one or more oVirt/RHV external providers
=================================================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_external_provider_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV external providers.
* This module was called `ovirt_external_provider_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_external\_provider\_info](#ansible-collections-ovirt-ovirt-ovirt-external-provider-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **name** string | | Name of the external provider, can be used as glob expression. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **type** string / required | **Choices:*** os\_image
* os\_network
* os\_volume
* foreman
| Type of the external provider.
aliases: provider |
Notes
-----
Note
* This module returns a variable `ovirt_external_providers`, which contains a list of external\_providers. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all image external providers named C<glance>:
- ovirt.ovirt.ovirt_external_provider_info:
type: os_image
name: glance
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_external_providers }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_external\_providers** list / elements=string | On success | List of dictionaries. Content depends on *type*. For type `foreman`, attributes appearing in the dictionary can be found on your oVirt/RHV instance at the following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/external\_host\_provider. For type `os_image`, attributes appearing in the dictionary can be found on your oVirt/RHV instance at the following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/openstack\_image\_provider. For type `os_volume`, attributes appearing in the dictionary can be found on your oVirt/RHV instance at the following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/openstack\_volume\_provider. For type `os_network`, attributes appearing in the dictionary can be found on your oVirt/RHV instance at the following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/openstack\_network\_provider. |
### Authors
* Ondra Machacek (@machacekondra)
ansible ovirt.ovirt.ovirt_host β Module to manage hosts in oVirt/RHV ovirt.ovirt.ovirt\_host β Module to manage hosts in oVirt/RHV
=============================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_host`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage hosts in oVirt/RHV
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **activate** boolean | **Choices:*** no
* **yes** β
| If `state` is *present* activate the host. This parameter is good to disable, when you don't want to change the state of host when using *present* `state`. |
| **address** string | | Host address. It can be either FQDN (preferred) or IP address. |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **check\_upgrade** boolean | **Choices:*** no
* **yes** β
| If *true* and `state` is *upgraded* run check for upgrade action before executing upgrade action. |
| **cluster** string | | Name of the cluster, where host should be created. |
| **comment** string | | Description of the host. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **force** boolean | **Choices:*** **no** β
* yes
| Indicates that the host should be removed even if it is non-responsive, or if it is part of a Gluster Storage cluster and has volume bricks on it. WARNING: It doesn't forcibly remove the host if another host related operation is being executed on the host at the same time. |
| **hosted\_engine** string | **Choices:*** deploy
* undeploy
| If *deploy* it means this host should deploy also hosted engine components. If *undeploy* it means this host should un-deploy hosted engine components and this host will not function as part of the High Availability cluster. |
| **id** string | | ID of the host to manage. |
| **iscsi** dictionary | | If `state` is *iscsidiscover* it means that the iscsi attribute is being used to discover targets If `state` is *iscsilogin* it means that the iscsi attribute is being used to login to the specified targets passed as part of the iscsi attribute |
| | **address** string | | Address of the iSCSI storage server. |
| | **password** string | | A CHAP password for logging into a target. |
| | **port** string | | The port being used to connect with iscsi. |
| | **portal** string | | The portal being used to connect with iscsi. |
| | **target** string | | The target IQN for the storage device. |
| | **username** string | | A CHAP user name for logging into a target. |
| **kdump\_integration** string | **Choices:*** enabled
* disabled
| Specify if host will have enabled Kdump integration. |
| **kernel\_params** list / elements=dictionary | | List of kernel boot parameters. Following are most common kernel parameters used for host: Hostdev Passthrough & SR-IOV: intel\_iommu=on Nested Virtualization: kvm-intel.nested=1 Unsafe Interrupts: vfio\_iommu\_type1.allow\_unsafe\_interrupts=1 PCI Reallocation: pci=realloc `Note:` Modifying kernel boot parameters settings can lead to a host boot failure. Please consult the product documentation before doing any changes. Kernel boot parameters changes require host deploy and restart. The host needs to be *reinstalled* successfully and then to be *rebooted* for kernel boot parameters to be applied. |
| **name** string / required | | Name of the host to manage. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **override\_display** string | | Override the display address of all VMs on this host with specified address. |
| **override\_iptables** boolean | **Choices:*** no
* yes
| If True host iptables will be overridden by host deploy script. Note that `override_iptables` is *false* by default in oVirt/RHV. |
| **password** string | | Password of the root. It's required in case `public_key` is set to *False*. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **power\_management\_enabled** boolean | **Choices:*** no
* yes
| Enable or disable power management of the host. For more comprehensive setup of PM use `ovirt_host_pm` module. |
| **public\_key** boolean | **Choices:*** **no** β
* yes
|
*True* if the public key should be used to authenticate to host. It's required in case `password` is not set.
aliases: ssh\_public\_key |
| **reboot\_after\_installation** boolean | **Choices:*** no
* yes
| If *true* reboot host after successful installation. Default value on engine is *true*. |
| **reboot\_after\_upgrade** boolean | **Choices:*** no
* **yes** β
| If *true* and `state` is *upgraded* reboot host after successful upgrade. |
| **spm\_priority** integer | | SPM priority of the host. Integer value from 1 to 10, where higher number means higher priority. |
| **ssh\_port** integer | | The host SSH port. |
| **state** string | **Choices:*** **present** β
* absent
* maintenance
* upgraded
* started
* restarted
* stopped
* reinstalled
* iscsidiscover
* iscsilogin
| State which should a host to be in after successful completion.
*iscsilogin* and *iscsidiscover* are supported since version 2.4. |
| **timeout** integer | **Default:**600 | The amount of time in seconds the module should wait for the host to get into desired state. |
| **vgpu\_placement** string | **Choices:*** consolidated
* separated
| If *consolidated*, each vGPU is placed on the first physical card with available space. This is the default placement, utilizing all available space on the physical cards. If *separated*, each vGPU is placed on a separate physical card, if possible. This can be useful for improving vGPU performance. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Add host with username/password supporting SR-IOV.
# Note that override_iptables is false by default in oVirt/RHV:
- ovirt.ovirt.ovirt_host:
cluster: Default
name: myhost
address: 10.34.61.145
password: secret
override_iptables: true
kernel_params:
- intel_iommu=on
# Add host using public key
- ovirt.ovirt.ovirt_host:
public_key: true
cluster: Default
name: myhost2
address: 10.34.61.145
override_iptables: true
# Deploy hosted engine host
- ovirt.ovirt.ovirt_host:
cluster: Default
name: myhost2
password: secret
address: 10.34.61.145
override_iptables: true
hosted_engine: deploy
# Maintenance
- ovirt.ovirt.ovirt_host:
state: maintenance
name: myhost
# Restart host using power management:
- ovirt.ovirt.ovirt_host:
state: restarted
name: myhost
# Upgrade host
- ovirt.ovirt.ovirt_host:
state: upgraded
name: myhost
# discover iscsi targets
- ovirt.ovirt.ovirt_host:
state: iscsidiscover
name: myhost
iscsi:
username: iscsi_user
password: secret
address: 10.34.61.145
port: 3260
# login to iscsi targets
- ovirt.ovirt.ovirt_host:
state: iscsilogin
name: myhost
iscsi:
username: iscsi_user
password: secret
address: 10.34.61.145
target: "iqn.2015-07.com.mlipchuk2.redhat:444"
port: 3260
# Reinstall host using public key
- ovirt.ovirt.ovirt_host:
state: reinstalled
name: myhost
public_key: true
# Remove host
- ovirt.ovirt.ovirt_host:
state: absent
name: myhost
force: True
# Retry removing host when failed (https://bugzilla.redhat.com/show_bug.cgi?id=1719271)
- ovirt.ovirt.ovirt_host:
state: absent
name: myhost
register: result
until: not result.failed
retries: 6
delay: 20
# Change host Name
- ovirt.ovirt.ovirt_host:
id: 00000000-0000-0000-0000-000000000000
name: "new host 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 |
| --- | --- | --- |
| **host** dictionary | On success if host is found. | Dictionary of all the host attributes. Host attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/host. |
| **id** string | On success if host is found. | ID of the host which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **iscsi\_targets** list / elements=string | On success if host is found and state is iscsidiscover. | List of host iscsi targets |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
| programming_docs |
ansible ovirt.ovirt.ovirt_nic_info β Retrieve information about one or more oVirt/RHV virtual machine network interfaces ovirt.ovirt.ovirt\_nic\_info β Retrieve information about one or more oVirt/RHV virtual machine network interfaces
==================================================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_nic_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV virtual machine network interfaces.
* This module was called `ovirt_nic_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_nic\_info](#ansible-collections-ovirt-ovirt-ovirt-nic-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **name** string | | Name of the NIC, can be used as glob expression. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **template** string added in 1.2.0 of ovirt.ovirt | | Name of the template where NIC is attached. You must provide either `vm` parameter or `template` parameter. |
| **vm** string | | Name of the VM where NIC is attached. You must provide either `vm` parameter or `template` parameter. |
Notes
-----
Note
* This module returns a variable `ovirt_nics`, which contains a list of NICs. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all NICs which names start with C(eth) for VM named C(centos7):
- ovirt.ovirt.ovirt_nic_info:
vm: centos7
name: eth*
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_nics }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_nics** list / elements=string | On success. | List of dictionaries describing the network interfaces. NIC attributes are mapped to dictionary keys, all NICs attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/nic. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible Ovirt.Ovirt Ovirt.Ovirt
===========
Collection version 1.6.4
Plugin Index
------------
These are the plugins in the ovirt.ovirt collection
### Callback Plugins
* [stdout](stdout_callback#ansible-collections-ovirt-ovirt-stdout-callback) β Output the log of ansible
### Inventory Plugins
* [ovirt](ovirt_inventory#ansible-collections-ovirt-ovirt-ovirt-inventory) β oVirt inventory source
### Modules
* [ovirt\_affinity\_group](ovirt_affinity_group_module#ansible-collections-ovirt-ovirt-ovirt-affinity-group-module) β Module to manage affinity groups in oVirt/RHV
* [ovirt\_affinity\_label](ovirt_affinity_label_module#ansible-collections-ovirt-ovirt-ovirt-affinity-label-module) β Module to manage affinity labels in oVirt/RHV
* [ovirt\_affinity\_label\_info](ovirt_affinity_label_info_module#ansible-collections-ovirt-ovirt-ovirt-affinity-label-info-module) β Retrieve information about one or more oVirt/RHV affinity labels
* [ovirt\_api\_info](ovirt_api_info_module#ansible-collections-ovirt-ovirt-ovirt-api-info-module) β Retrieve information about the oVirt/RHV API
* [ovirt\_auth](ovirt_auth_module#ansible-collections-ovirt-ovirt-ovirt-auth-module) β Module to manage authentication to oVirt/RHV
* [ovirt\_cluster](ovirt_cluster_module#ansible-collections-ovirt-ovirt-ovirt-cluster-module) β Module to manage clusters in oVirt/RHV
* [ovirt\_cluster\_info](ovirt_cluster_info_module#ansible-collections-ovirt-ovirt-ovirt-cluster-info-module) β Retrieve information about one or more oVirt/RHV clusters
* [ovirt\_datacenter](ovirt_datacenter_module#ansible-collections-ovirt-ovirt-ovirt-datacenter-module) β Module to manage data centers in oVirt/RHV
* [ovirt\_datacenter\_info](ovirt_datacenter_info_module#ansible-collections-ovirt-ovirt-ovirt-datacenter-info-module) β Retrieve information about one or more oVirt/RHV datacenters
* [ovirt\_disk](ovirt_disk_module#ansible-collections-ovirt-ovirt-ovirt-disk-module) β Module to manage Virtual Machine and floating disks in oVirt/RHV
* [ovirt\_disk\_info](ovirt_disk_info_module#ansible-collections-ovirt-ovirt-ovirt-disk-info-module) β Retrieve information about one or more oVirt/RHV disks
* [ovirt\_event](ovirt_event_module#ansible-collections-ovirt-ovirt-ovirt-event-module) β Create or delete an event in oVirt/RHV
* [ovirt\_event\_info](ovirt_event_info_module#ansible-collections-ovirt-ovirt-ovirt-event-info-module) β This module can be used to retrieve information about one or more oVirt/RHV events
* [ovirt\_external\_provider](ovirt_external_provider_module#ansible-collections-ovirt-ovirt-ovirt-external-provider-module) β Module to manage external providers in oVirt/RHV
* [ovirt\_external\_provider\_info](ovirt_external_provider_info_module#ansible-collections-ovirt-ovirt-ovirt-external-provider-info-module) β Retrieve information about one or more oVirt/RHV external providers
* [ovirt\_group](ovirt_group_module#ansible-collections-ovirt-ovirt-ovirt-group-module) β Module to manage groups in oVirt/RHV
* [ovirt\_group\_info](ovirt_group_info_module#ansible-collections-ovirt-ovirt-ovirt-group-info-module) β Retrieve information about one or more oVirt/RHV groups
* [ovirt\_host](ovirt_host_module#ansible-collections-ovirt-ovirt-ovirt-host-module) β Module to manage hosts in oVirt/RHV
* [ovirt\_host\_info](ovirt_host_info_module#ansible-collections-ovirt-ovirt-ovirt-host-info-module) β Retrieve information about one or more oVirt/RHV hosts
* [ovirt\_host\_network](ovirt_host_network_module#ansible-collections-ovirt-ovirt-ovirt-host-network-module) β Module to manage host networks in oVirt/RHV
* [ovirt\_host\_pm](ovirt_host_pm_module#ansible-collections-ovirt-ovirt-ovirt-host-pm-module) β Module to manage power management of hosts in oVirt/RHV
* [ovirt\_host\_storage\_info](ovirt_host_storage_info_module#ansible-collections-ovirt-ovirt-ovirt-host-storage-info-module) β Retrieve information about one or more oVirt/RHV HostStorages (applicable only for block storage)
* [ovirt\_instance\_type](ovirt_instance_type_module#ansible-collections-ovirt-ovirt-ovirt-instance-type-module) β Module to manage Instance Types in oVirt/RHV
* [ovirt\_job](ovirt_job_module#ansible-collections-ovirt-ovirt-ovirt-job-module) β Module to manage jobs in oVirt/RHV
* [ovirt\_mac\_pool](ovirt_mac_pool_module#ansible-collections-ovirt-ovirt-ovirt-mac-pool-module) β Module to manage MAC pools in oVirt/RHV
* [ovirt\_network](ovirt_network_module#ansible-collections-ovirt-ovirt-ovirt-network-module) β Module to manage logical networks in oVirt/RHV
* [ovirt\_network\_info](ovirt_network_info_module#ansible-collections-ovirt-ovirt-ovirt-network-info-module) β Retrieve information about one or more oVirt/RHV networks
* [ovirt\_nic](ovirt_nic_module#ansible-collections-ovirt-ovirt-ovirt-nic-module) β Module to manage network interfaces of Virtual Machines in oVirt/RHV
* [ovirt\_nic\_info](ovirt_nic_info_module#ansible-collections-ovirt-ovirt-ovirt-nic-info-module) β Retrieve information about one or more oVirt/RHV virtual machine network interfaces
* [ovirt\_permission](ovirt_permission_module#ansible-collections-ovirt-ovirt-ovirt-permission-module) β Module to manage permissions of users/groups in oVirt/RHV
* [ovirt\_permission\_info](ovirt_permission_info_module#ansible-collections-ovirt-ovirt-ovirt-permission-info-module) β Retrieve information about one or more oVirt/RHV permissions
* [ovirt\_quota](ovirt_quota_module#ansible-collections-ovirt-ovirt-ovirt-quota-module) β Module to manage datacenter quotas in oVirt/RHV
* [ovirt\_quota\_info](ovirt_quota_info_module#ansible-collections-ovirt-ovirt-ovirt-quota-info-module) β Retrieve information about one or more oVirt/RHV quotas
* [ovirt\_role](ovirt_role_module#ansible-collections-ovirt-ovirt-ovirt-role-module) β Module to manage roles in oVirt/RHV
* [ovirt\_scheduling\_policy\_info](ovirt_scheduling_policy_info_module#ansible-collections-ovirt-ovirt-ovirt-scheduling-policy-info-module) β Retrieve information about one or more oVirt scheduling policies
* [ovirt\_snapshot](ovirt_snapshot_module#ansible-collections-ovirt-ovirt-ovirt-snapshot-module) β Module to manage Virtual Machine Snapshots in oVirt/RHV
* [ovirt\_snapshot\_info](ovirt_snapshot_info_module#ansible-collections-ovirt-ovirt-ovirt-snapshot-info-module) β Retrieve information about one or more oVirt/RHV virtual machine snapshots
* [ovirt\_storage\_connection](ovirt_storage_connection_module#ansible-collections-ovirt-ovirt-ovirt-storage-connection-module) β Module to manage storage connections in oVirt
* [ovirt\_storage\_domain](ovirt_storage_domain_module#ansible-collections-ovirt-ovirt-ovirt-storage-domain-module) β Module to manage storage domains in oVirt/RHV
* [ovirt\_storage\_domain\_info](ovirt_storage_domain_info_module#ansible-collections-ovirt-ovirt-ovirt-storage-domain-info-module) β Retrieve information about one or more oVirt/RHV storage domains
* [ovirt\_storage\_template\_info](ovirt_storage_template_info_module#ansible-collections-ovirt-ovirt-ovirt-storage-template-info-module) β Retrieve information about one or more oVirt/RHV templates relate to a storage domain.
* [ovirt\_storage\_vm\_info](ovirt_storage_vm_info_module#ansible-collections-ovirt-ovirt-ovirt-storage-vm-info-module) β Retrieve information about one or more oVirt/RHV virtual machines relate to a storage domain.
* [ovirt\_system\_option\_info](ovirt_system_option_info_module#ansible-collections-ovirt-ovirt-ovirt-system-option-info-module) β Retrieve information about one oVirt/RHV system options.
* [ovirt\_tag](ovirt_tag_module#ansible-collections-ovirt-ovirt-ovirt-tag-module) β Module to manage tags in oVirt/RHV
* [ovirt\_tag\_info](ovirt_tag_info_module#ansible-collections-ovirt-ovirt-ovirt-tag-info-module) β Retrieve information about one or more oVirt/RHV tags
* [ovirt\_template](ovirt_template_module#ansible-collections-ovirt-ovirt-ovirt-template-module) β Module to manage virtual machine templates in oVirt/RHV
* [ovirt\_template\_info](ovirt_template_info_module#ansible-collections-ovirt-ovirt-ovirt-template-info-module) β Retrieve information about one or more oVirt/RHV templates
* [ovirt\_user](ovirt_user_module#ansible-collections-ovirt-ovirt-ovirt-user-module) β Module to manage users in oVirt/RHV
* [ovirt\_user\_info](ovirt_user_info_module#ansible-collections-ovirt-ovirt-ovirt-user-info-module) β Retrieve information about one or more oVirt/RHV users
* [ovirt\_vm](ovirt_vm_module#ansible-collections-ovirt-ovirt-ovirt-vm-module) β Module to manage Virtual Machines in oVirt/RHV
* [ovirt\_vm\_info](ovirt_vm_info_module#ansible-collections-ovirt-ovirt-ovirt-vm-info-module) β Retrieve information about one or more oVirt/RHV virtual machines
* [ovirt\_vm\_os\_info](ovirt_vm_os_info_module#ansible-collections-ovirt-ovirt-ovirt-vm-os-info-module) β Retrieve information on all supported oVirt/RHV operating systems
* [ovirt\_vmpool](ovirt_vmpool_module#ansible-collections-ovirt-ovirt-ovirt-vmpool-module) β Module to manage VM pools in oVirt/RHV
* [ovirt\_vmpool\_info](ovirt_vmpool_info_module#ansible-collections-ovirt-ovirt-ovirt-vmpool-info-module) β Retrieve information about one or more oVirt/RHV vmpools
* [ovirt\_vnic\_profile](ovirt_vnic_profile_module#ansible-collections-ovirt-ovirt-ovirt-vnic-profile-module) β Module to manage vNIC profile of network in oVirt/RHV
* [ovirt\_vnic\_profile\_info](ovirt_vnic_profile_info_module#ansible-collections-ovirt-ovirt-ovirt-vnic-profile-info-module) β Retrieve information about one or more oVirt/RHV vnic profiles
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
ansible ovirt.ovirt.ovirt_role β Module to manage roles in oVirt/RHV ovirt.ovirt.ovirt\_role β Module to manage roles in oVirt/RHV
=============================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_role`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage roles in oVirt/RHV.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **administrative** boolean | **Choices:*** **no** β
* yes
| Defines the role as administrative-only or not. |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **description** string | | Description of the role. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **id** string | | ID of the role to manage. |
| **name** string | | Name of the role to manage. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **permits** list / elements=string | | List of permits which role will have Permit 'login' is default and all roles will have it. List can contain name of permit. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **state** string | **Choices:*** **present** β
* absent
| Should the role be present/absent. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Create administrative role with two permits
- ovirt.ovirt.ovirt_role:
name: role
administrative: true
permits:
- manipulate_permissions
- create_instance
# Remove role
- ovirt.ovirt.ovirt_role:
name: role
state: absent
# Remove all permit
- ovirt.ovirt.ovirt_role:
name: role
administrative: ture
permits:
- login
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_role** list / elements=string | On success. | List of dictionaries describing the Roles. Role attributes are mapped to dictionary keys, all Roles attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/role. |
### Authors
* Martin Necas (@mnecas)
| programming_docs |
ansible ovirt.ovirt.ovirt_affinity_label_info β Retrieve information about one or more oVirt/RHV affinity labels ovirt.ovirt.ovirt\_affinity\_label\_info β Retrieve information about one or more oVirt/RHV affinity labels
===========================================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_affinity_label_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV affinity labels.
* This module was called `ovirt_affinity_label_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_affinity\_label\_info](#ansible-collections-ovirt-ovirt-ovirt-affinity-label-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **host** string | | Name of the host, which affinity labels should be listed. |
| **name** string | | Name of the affinity labels which should be listed. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **vm** string | | Name of the VM, which affinity labels should be listed. |
Notes
-----
Note
* This module returns a variable `ovirt_affinity_labels`, which contains a list of affinity labels. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all affinity labels, which names start with C(label):
- ovirt.ovirt.ovirt_affinity_label_info:
name: label*
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_affinity_labels }}"
# Gather information about all affinity labels, which are assigned to VMs
# which names start with C(postgres):
- ovirt.ovirt.ovirt_affinity_label_info:
vm: postgres*
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_affinity_labels }}"
# Gather information about all affinity labels, which are assigned to hosts
# which names start with C(west):
- ovirt.ovirt.ovirt_affinity_label_info:
host: west*
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_affinity_labels }}"
# Gather information about all affinity labels, which are assigned to hosts
# which names start with C(west) or VMs which names start with C(postgres):
- ovirt.ovirt.ovirt_affinity_label_info:
host: west*
vm: postgres*
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_affinity_labels }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_affinity\_labels** list / elements=string | On success. | List of dictionaries describing the affinity labels. Affinity labels attributes are mapped to dictionary keys, all affinity labels attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/affinity\_label. |
### Authors
* Ondra Machacek (@machacekondra)
ansible ovirt.ovirt.ovirt_vnic_profile_info β Retrieve information about one or more oVirt/RHV vnic profiles ovirt.ovirt.ovirt\_vnic\_profile\_info β Retrieve information about one or more oVirt/RHV vnic profiles
=======================================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_vnic_profile_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV vnic profiles.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **max** integer | | The maximum number of results to return. |
| **name** string | | Name of vnic profile. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
Notes
-----
Note
* This module returns a variable `ovirt_vnic_profiles`, which contains a list of vnic profiles. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information 10 vnic profiles
- ovirt.ovirt.ovirt_vnic_profile_info:
max: 10
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_vnic_profiles }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_vnic\_profiles** list / elements=string | On success. | List of dictionaries describing the vnic profiles. Vnic\_profile attributes are mapped to dictionary keys, all vnic profiles attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/vnic\_profile. |
### Authors
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_host_network β Module to manage host networks in oVirt/RHV ovirt.ovirt.ovirt\_host\_network β Module to manage host networks in oVirt/RHV
==============================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_host_network`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage host networks in oVirt/RHV.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **bond** dictionary | | Dictionary describing network bond: |
| | **interfaces** string | | List of interfaces to create a bond. |
| | **mode** string | | Bonding mode. |
| | **name** string | | Bond name. |
| | **options** string | | Bonding options. |
| **check** boolean | **Choices:*** no
* yes
| If *true* verify connectivity between host and engine. Network configuration changes will be rolled back if connectivity between engine and the host is lost after changing network configuration. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **interface** string | | Name of the network interface where logical network should be attached. |
| **labels** list / elements=string | | List of names of the network label to be assigned to bond or interface. |
| **name** string / required | | Name of the host to manage networks for.
aliases: host |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **networks** list / elements=dictionary | | List of dictionary describing networks to be attached to interface or bond: |
| | **address** string | | IP address in case of *static* boot protocol is used. |
| | **boot\_protocol** string | **Choices:*** none
* static
* dhcp
| Boot protocol. |
| | **custom\_properties** string | | Custom properties applied to the host network. Custom properties is a list of dictionary which can have following values. |
| | | **name** string | | Name of custom property. |
| | | **value** string | | Value of custom property. |
| | **gateway** string | | Gateway in case of *static* boot protocol is used. |
| | **name** string | | Name of the logical network to be assigned to bond or interface. |
| | **netmask** string | | Subnet mask in case of *static* boot protocol is used. |
| | **version** string | | IP version. Either v4 or v6. Default is v4. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **save** boolean | **Choices:*** no
* **yes** β
| If *true* network configuration will be persistent, otherwise it is temporary. Default *true* since Ansible 2.8. |
| **state** string | **Choices:*** **present** β
* absent
| Should the host be present/absent. |
| **sync\_networks** boolean | **Choices:*** **no** β
* yes
| If *true* all networks will be synchronized before modification |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# In all examples the durability of the configuration created is dependent on the 'save' option value:
# Create bond on eth0 and eth1 interface, and put 'myvlan' network on top of it and persist the new configuration:
- name: Bonds
ovirt.ovirt.ovirt_host_network:
name: myhost
save: yes
bond:
name: bond0
mode: 2
interfaces:
- eth1
- eth2
networks:
- name: myvlan
boot_protocol: static
address: 1.2.3.4
netmask: 255.255.255.0
gateway: 1.2.3.4
version: v4
# Create bond on eth1 and eth2 interface, specifying both mode and miimon:
- name: Bonds
ovirt.ovirt.ovirt_host_network:
name: myhost
bond:
name: bond0
mode: 1
options:
miimon: 200
interfaces:
- eth1
- eth2
# Remove bond0 bond from host interfaces:
- ovirt.ovirt.ovirt_host_network:
state: absent
name: myhost
bond:
name: bond0
# Assign myvlan1 and myvlan2 vlans to host eth0 interface:
- ovirt.ovirt.ovirt_host_network:
name: myhost
interface: eth0
networks:
- name: myvlan1
- name: myvlan2
# Remove myvlan2 vlan from host eth0 interface:
- ovirt.ovirt.ovirt_host_network:
state: absent
name: myhost
interface: eth0
networks:
- name: myvlan2
# Remove all networks/vlans from host eth0 interface:
- ovirt.ovirt.ovirt_host_network:
state: absent
name: myhost
interface: eth0
# Add custom_properties to network:
- ovirt.ovirt.ovirt_host_network:
name: myhost
interface: eth0
networks:
- name: myvlan1
custom_properties:
- name: bridge_opts
value: gc_timer=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 |
| --- | --- | --- |
| **host\_nic** dictionary | On success if host NIC is found. | Dictionary of all the host NIC attributes. Host NIC attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/host\_nic. |
| **id** string | On success if host NIC is found. | ID of the host NIC which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
| programming_docs |
ansible ovirt.ovirt.ovirt_group_info β Retrieve information about one or more oVirt/RHV groups ovirt.ovirt.ovirt\_group\_info β Retrieve information about one or more oVirt/RHV groups
========================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_group_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV groups.
* This module was called `ovirt_group_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_group\_info](#ansible-collections-ovirt-ovirt-ovirt-group-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **pattern** string | | Search term which is accepted by oVirt/RHV search backend. For example to search group X use following pattern: name=X |
Notes
-----
Note
* This module returns a variable `ovirt_groups`, which contains a list of groups. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all groups which names start with C(admin):
- ovirt.ovirt.ovirt_group_info:
pattern: name=admin*
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_groups }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_groups** list / elements=string | On success. | List of dictionaries describing the groups. Group attributes are mapped to dictionary keys, all groups attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/group. |
### Authors
* Ondra Machacek (@machacekondra)
ansible ovirt.ovirt.ovirt_nic β Module to manage network interfaces of Virtual Machines in oVirt/RHV ovirt.ovirt.ovirt\_nic β Module to manage network interfaces of Virtual Machines in oVirt/RHV
=============================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_nic`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage network interfaces of Virtual Machines in oVirt/RHV.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **id** string | | ID of the nic to manage. |
| **interface** string | | Type of the network interface. For example e1000, pci\_passthrough, rtl8139, rtl8139\_virtio, spapr\_vlan or virtio. It's required parameter when creating the new NIC. |
| **linked** boolean | **Choices:*** no
* yes
| Defines if the NIC is linked to the virtual machine. |
| **mac\_address** string | | Custom MAC address of the network interface, by default it's obtained from MAC pool. |
| **name** string / required | | Name of the network interface to manage. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **network** string | | Logical network to which the VM network interface should use, by default Empty network is used if network is not specified. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **profile** string | | Virtual network interface profile to be attached to VM network interface. When not specified and network has only single profile it will be auto-selected, otherwise you must specify profile. |
| **state** string | **Choices:*** absent
* plugged
* **present** β
* unplugged
| Should the Virtual Machine NIC be present/absent/plugged/unplugged. |
| **template** string | | Name of the template to manage. You must provide either `vm` parameter or `template` parameter. |
| **template\_version** integer added in 1.2.0 of ovirt.ovirt | | Version number of the template. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **vm** string | | Name of the Virtual Machine to manage. You must provide either `vm` parameter or `template` parameter. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
- name: Add NIC to VM
ovirt.ovirt.ovirt_nic:
state: present
vm: myvm
name: mynic
interface: e1000
mac_address: 00:1a:4a:16:01:56
profile: ovirtmgmt
network: ovirtmgmt
- name: Plug NIC to VM
ovirt.ovirt.ovirt_nic:
state: plugged
vm: myvm
name: mynic
- name: Unplug NIC from VM
ovirt.ovirt.ovirt_nic:
state: unplugged
linked: false
vm: myvm
name: mynic
- name: Add NIC to template
ovirt.ovirt.ovirt_nic:
auth: "{{ ovirt_auth }}"
state: present
template: my_template
name: nic1
interface: virtio
profile: ovirtmgmt
network: ovirtmgmt
- name: Remove NIC from VM
ovirt.ovirt.ovirt_nic:
state: absent
vm: myvm
name: mynic
# Change NIC Name
- ovirt.ovirt.ovirt_nic:
id: 00000000-0000-0000-0000-000000000000
name: "new_nic_name"
vm: myvm
```
Return Values
-------------
Common return 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 | On success if network interface is found. | ID of the network interface which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **nic** dictionary | On success if network interface is found. | Dictionary of all the network interface attributes. Network interface attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/nic. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_host_pm β Module to manage power management of hosts in oVirt/RHV ovirt.ovirt.ovirt\_host\_pm β Module to manage power management of hosts in oVirt/RHV
=====================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_host_pm`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage power management of hosts in oVirt/RHV.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string | | Address of the power management interface. |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **encrypt\_options** boolean | **Choices:*** no
* yes
| If *true* options will be encrypted when send to agent.
aliases: encrypt |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **name** string / required | | Name of the host to manage.
aliases: host |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **options** dictionary | | Dictionary of additional fence agent options (including Power Management slot). Additional information about options can be found at <https://github.com/ClusterLabs/fence-agents/blob/master/doc/FenceAgentAPI.md>. |
| **order** integer | | Integer value specifying, by default it's added at the end. |
| **password** string | | Password of the user specified in `username` parameter. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **port** integer | | Power management interface port. |
| **state** string | **Choices:*** **present** β
* absent
| Should the host be present/absent. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **type** string | | Type of the power management. oVirt/RHV predefined values are *drac5*, *ipmilan*, *rsa*, *bladecenter*, *alom*, *apc*, *apc\_snmp*, *eps*, *wti*, *rsb*, *cisco\_ucs*, *drac7*, *hpblade*, *ilo*, *ilo2*, *ilo3*, *ilo4*, *ilo\_ssh*, but user can have defined custom type. |
| **username** string | | Username to be used to connect to power management interface. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Add fence agent to host 'myhost'
- ovirt.ovirt.ovirt_host_pm:
name: myhost
address: 1.2.3.4
options:
myoption1: x
myoption2: y
username: admin
password: admin
port: 3333
type: ipmilan
# Add fence agent to host 'myhost' using 'slot' option
- ovirt.ovirt.ovirt_host_pm:
name: myhost
address: 1.2.3.4
options:
myoption1: x
myoption2: y
slot: myslot
username: admin
password: admin
port: 3333
type: ipmilan
# Remove ipmilan fence agent with address 1.2.3.4 on host 'myhost'
- ovirt.ovirt.ovirt_host_pm:
state: absent
name: myhost
address: 1.2.3.4
type: ipmilan
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **agent** dictionary | On success if agent is found. | Dictionary of all the agent attributes. Agent attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/agent. |
| **id** string | On success if agent is found. | ID of the agent which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
### Authors
* Ondra Machacek (@machacekondra)
| programming_docs |
ansible ovirt.ovirt.ovirt_event β Create or delete an event in oVirt/RHV ovirt.ovirt.ovirt\_event β Create or delete an event in oVirt/RHV
=================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_event`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module can be used to create or delete an event in oVirt/RHV.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **cluster** string | | The id of the cluster associated with this event. |
| **custom\_id** integer | | Custom ID for the event. This ID must be unique for each event. Required when state is present. |
| **data\_center** string | | The id of the data center associated with this event. |
| **description** string | | Message for the event. Required when state is present. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **host** string | | The id of the host associated with this event. |
| **id** string | | The event ID in the oVirt/RHV audit\_log table. This ID is not the same as custom\_id and is only used when state is absent. Required when state is absent. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **origin** string | | Originator of the event. Required when state is present. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **severity** string | **Choices:*** error
* **normal** β
* warning
| Severity of the event. Required when state is present. |
| **state** string | **Choices:*** **present** β
* absent
| Should the event be present/absent. The `wait` option must be set to false when state is absent. |
| **storage\_domain** string | | The id of the storage domain associated with this event. |
| **template** string | | The id of the template associated with this event. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **user** string | | The id of the user associated with this event. |
| **vm** string | | The id of the VM associated with this event. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain the auth parameter for simplicity,
# look at the ovirt_auth module to see how to reuse authentication.
- name: Create an event
ovirt.ovirt.ovirt_event:
state: present
description: "The file system /home on host xyz is almost full!"
origin: "mymonitor"
custom_id: 123456789
severity: warning
- name: Create an event and link it to a specific object
ovirt.ovirt.ovirt_event:
state: present
description: "The file system /home is almost full!"
origin: "mymonitor"
custom_id: 123456789
severity: warning
vm: "c79db183-46ef-44d1-95f9-1a368c516c19"
- name: Remove an event
ovirt.ovirt.ovirt_event:
state: absent
id: 123456789
wait: 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 |
| --- | --- | --- |
| **event** dictionary | On success. | Dictionary of all the Event attributes. All event attributes can be found at the following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/event |
| **id** string | On success. | ID of the event that was created. |
### Authors
* Chris Keller (@nasx)
ansible ovirt.ovirt.ovirt_storage_template_info β Retrieve information about one or more oVirt/RHV templates relate to a storage domain. ovirt.ovirt.ovirt\_storage\_template\_info β Retrieve information about one or more oVirt/RHV templates relate to a storage domain.
===================================================================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_storage_template_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV templates relate to a storage domain.
* This module was called `ovirt_storage_template_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_storage\_template\_info](#ansible-collections-ovirt-ovirt-ovirt-storage-template-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **max** integer | | Sets the maximum number of templates to return. If not specified all the templates are returned. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **storage\_domain** string | | The storage domain name where the templates should be listed. |
| **unregistered** boolean | **Choices:*** **no** β
* yes
| Flag which indicates whether to get unregistered templates which contain one or more disks which reside on a storage domain or diskless templates. |
Notes
-----
Note
* This module returns a variable `ovirt_storage_templates`, which contains a list of templates. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all Templates which relate to a storage domain and
# are unregistered:
- ovirt.ovirt.ovirt_storage_template_info:
unregistered=True
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_storage_templates }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_storage\_templates** list / elements=string | On success. | List of dictionaries describing the Templates. Template attributes are mapped to dictionary keys, all Templates attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/template. |
### Authors
* Maor Lipchuk (@machacekondra)
ansible ovirt.ovirt.ovirt_user β Module to manage users in oVirt/RHV ovirt.ovirt.ovirt\_user β Module to manage users in oVirt/RHV
=============================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_user`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage users in oVirt/RHV.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **authz\_name** string / required | | Authorization provider of the user. In previous versions of oVirt/RHV known as domain.
aliases: domain |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **name** string / required | | Name of the user to manage. In most LDAPs it's *uid* of the user, but in Active Directory you must specify *UPN* of the user. |
| **namespace** string | | Namespace where the user resides. When using the authorization provider that stores users in the LDAP server, this attribute equals the naming context of the LDAP server. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **ssh\_public\_key** string added in 1.4.0 of ovirt.ovirt | | The user public key. |
| **state** string | **Choices:*** **present** β
* absent
| Should the user be present/absent. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Add user user1 from authorization provider example.com-authz
- ovirt.ovirt.ovirt_user:
name: user1
domain: example.com-authz
# Add user user1 from authorization provider example.com-authz
# In case of Active Directory specify UPN:
- ovirt.ovirt.ovirt_user:
name: [email protected]
domain: example.com-authz
# Remove user user1 with authorization provider example.com-authz
- ovirt.ovirt.ovirt_user:
state: absent
name: user1
authz_name: example.com-authz
# Remove ssh_public_key
- ovirt.ovirt.ovirt_user:
name: user1
authz_name: example.com-authz
ssh_public_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 module:
| Key | Returned | Description |
| --- | --- | --- |
| **id** string | On success if user is found. | ID of the user which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **user** dictionary | On success if user is found. | Dictionary of all the user attributes. User attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/user. |
### Authors
* Ondra Machacek (@machacekondra)
ansible ovirt.ovirt.ovirt_permission_info β Retrieve information about one or more oVirt/RHV permissions ovirt.ovirt.ovirt\_permission\_info β Retrieve information about one or more oVirt/RHV permissions
==================================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_permission_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV permissions.
* This module was called `ovirt_permission_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_permission\_info](#ansible-collections-ovirt-ovirt-ovirt-permission-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **authz\_name** string / required | | Authorization provider of the user/group. In previous versions of oVirt/RHV known as domain.
aliases: domain |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **group\_name** string | | Name of the group to manage. |
| **namespace** string | | Namespace of the authorization provider, where user/group resides. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **user\_name** string | | Username of the user to manage. In most LDAPs it's *uid* of the user, but in Active Directory you must specify *UPN* of the user. |
Notes
-----
Note
* This module returns a variable `ovirt_permissions`, which contains a list of permissions. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all permissions of user with username C(john):
- ovirt.ovirt.ovirt_permission_info:
user_name: john
authz_name: example.com-authz
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_permissions }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_permissions** list / elements=string | On success. | List of dictionaries describing the permissions. Permission attributes are mapped to dictionary keys, all permissions attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/permission. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
| programming_docs |
ansible ovirt.ovirt.ovirt_vmpool β Module to manage VM pools in oVirt/RHV ovirt.ovirt.ovirt\_vmpool β Module to manage VM pools in oVirt/RHV
==================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_vmpool`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage VM pools in oVirt/RHV.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **cluster** string | | Name of the cluster, where VM pool should be created. |
| **comment** string | | Comment of the Virtual Machine pool. |
| **description** string | | Description of the VM pool. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **id** string | | ID of the vmpool to manage. |
| **name** string / required | | Name of the VM pool to manage. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **prestarted** integer | | Number of pre-started VMs defines the number of VMs in run state, that are waiting to be attached to Users. Default value is set by engine. |
| **state** string | **Choices:*** **present** β
* absent
| Should the VM pool be present/absent. Note that when `state` is *absent* all VMs in VM pool are stopped and removed. |
| **template** string | | Name of the template, which will be used to create VM pool. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **type** string | **Choices:*** manual
* automatic
| Type of the VM pool. Either manual or automatic.
`manual` - The administrator is responsible for explicitly returning the virtual machine to the pool. The virtual machine reverts to the original base image after the administrator returns it to the pool.
`Automatic` - When the virtual machine is shut down, it automatically reverts to its base image and is returned to the virtual machine pool. Default value is set by engine. |
| **vm** dictionary | | For creating vm pool without editing template. Note: You can use `vm` only for creating vm pool. |
| | **cloud\_init** string | | Dictionary with values for Unix-like Virtual Machine initialization using cloud init.
`host_name` - Hostname to be set to Virtual Machine when deployed.
`timezone` - Timezone to be set to Virtual Machine when deployed.
`user_name` - Username to be used to set password to Virtual Machine when deployed.
`root_password` - Password to be set for user specified by `user_name` parameter.
`authorized_ssh_keys` - Use this SSH keys to login to Virtual Machine.
`regenerate_ssh_keys` - If *True* SSH keys will be regenerated on Virtual Machine.
`custom_script` - Cloud-init script which will be executed on Virtual Machine when deployed. This is appended to the end of the cloud-init script generated by any other options. For further information, refer to cloud-init User-Data documentation.
`dns_servers` - DNS servers to be configured on Virtual Machine, maximum of two, space-separated.
`dns_search` - DNS search domains to be configured on Virtual Machine.
`nic_boot_protocol` - Set boot protocol of the network interface of Virtual Machine. Can be one of `none`, `dhcp` or `static`.
`nic_ip_address` - If boot protocol is static, set this IP address to network interface of Virtual Machine.
`nic_netmask` - If boot protocol is static, set this netmask to network interface of Virtual Machine.
`nic_gateway` - If boot protocol is static, set this gateway to network interface of Virtual Machine.
`nic_name` - Set name to network interface of Virtual Machine. |
| | **comment** string | | Comment of the Virtual Machine. |
| | **memory** string | | Amount of memory of the Virtual Machine. Prefix uses IEC 60027-2 standard (for example 1GiB, 1024MiB). Default value is set by engine. |
| | **memory\_guaranteed** string | | Amount of minimal guaranteed memory of the Virtual Machine. Prefix uses IEC 60027-2 standard (for example 1GiB, 1024MiB).
`memory_guaranteed` parameter can't be lower than `memory` parameter. Default value is set by engine. |
| | **memory\_max** string | | Upper bound of virtual machine memory up to which memory hot-plug can be performed. Prefix uses IEC 60027-2 standard (for example 1GiB, 1024MiB). Default value is set by engine. |
| | **nics** string | | List of NICs, which should be attached to Virtual Machine. NIC is described by following dictionary.
`name` - Name of the NIC.
`profile_name` - Profile name where NIC should be attached.
`interface` - Type of the network interface. One of following *virtio*, *e1000*, *rtl8139*, default is *virtio*.
`mac_address` - Custom MAC address of the network interface, by default it's obtained from MAC pool. NOTE - This parameter is used only when `state` is *running* or *present* and is able to only create NICs. To manage NICs of the VM in more depth please use [ovirt.ovirt.ovirt\_nics](ovirt_nics_module) module instead. |
| | **smartcard\_enabled** boolean | **Choices:*** no
* yes
| If *true*, use smart card authentication. |
| | **sso** boolean | **Choices:*** no
* yes
|
*True* enable Single Sign On by Guest Agent, *False* to disable it. By default is chosen by oVirt/RHV engine. |
| | **timezone** string | | Sets time zone offset of the guest hardware clock. For example `Etc/GMT`
|
| **vm\_count** integer | | Number of VMs in the pool. Default value is set by engine. |
| **vm\_per\_user** integer | | Maximum number of VMs a single user can attach to from this pool. Default value is set by engine. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
- name: Create VM pool from template
ovirt.ovirt.ovirt_vmpool:
cluster: mycluster
name: myvmpool
template: rhel7
vm_count: 2
prestarted: 2
vm_per_user: 1
- name: Remove vmpool, note that all VMs in pool will be stopped and removed
ovirt.ovirt.ovirt_vmpool:
state: absent
name: myvmpool
- name: Change Pool Name
ovirt.ovirt.ovirt_vmpool:
id: 00000000-0000-0000-0000-000000000000
name: "new_pool_name"
- name: Create vm pool and override the pool values
ovirt.ovirt.ovirt_vmpool:
cluster: mycluster
name: vmpool
template: blank
vm_count: 2
prestarted: 1
vm_per_user: 1
vm:
memory: 4GiB
memory_guaranteed: 4GiB
memory_max: 10GiB
comment: vncomment
cloud_init:
nic_boot_protocol: static
nic_ip_address: 10.34.60.86
nic_netmask: 255.255.252.0
nic_gateway: 10.34.63.254
nic_name: eth1
host_name: example.com
custom_script: |
write_files:
- content: |
Hello, world!
path: /tmp/greeting.txt
permissions: '0644'
user_name: root
root_password: super_password
nics:
- name: nicname
interface: virtio
profile_name: 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 |
| --- | --- | --- |
| **id** string | On success if VM pool is found. | ID of the VM pool which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **vm\_pool** dictionary | On success if VM pool is found. | Dictionary of all the VM pool attributes. VM pool attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/vm\_pool. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_affinity_group β Module to manage affinity groups in oVirt/RHV ovirt.ovirt.ovirt\_affinity\_group β Module to manage affinity groups in oVirt/RHV
==================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_affinity_group`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module manage affinity groups in oVirt/RHV. It can also manage assignments of those groups to VMs.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **cluster** string / required | | Name of the cluster of the affinity group. |
| **description** string | | Description of the affinity group. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **host\_enforcing** boolean | **Choices:*** no
* yes
| If *yes* VM cannot start on host if it does not satisfy the `host_rule`. This parameter is support since oVirt/RHV 4.1 version. |
| **host\_rule** string | **Choices:*** disabled
* negative
* positive
| If *positive* *all* VMs in this group should run on the this host. If *negative* *no* VMs in this group should run on the this host. If *disabled* this affinity group doesn't take effect. This parameter is support since oVirt/RHV 4.1 version. |
| **hosts** list / elements=string | | List of the hosts names, which should have assigned this affinity group. This parameter is support since oVirt/RHV 4.1 version. |
| **name** string / required | | Name of the affinity group to manage. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **state** string | **Choices:*** absent
* **present** β
| Should the affinity group be present or absent. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **vm\_enforcing** boolean | **Choices:*** no
* yes
| If *yes* VM cannot start if it does not satisfy the `vm_rule`. |
| **vm\_rule** string | **Choices:*** disabled
* negative
* positive
| If *positive* *all* VMs in this group should run on the host defined by `host_rule`. If *negative* *no* VMs in this group should run on the host defined by `host_rule`. If *disabled* this affinity group doesn't take effect. |
| **vms** list / elements=string | | List of the VMs names, which should have assigned this affinity group. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
- name: Create(if not exists) and assign affinity group to VMs vm1 and vm2 and host host1
ovirt.ovirt.ovirt_affinity_group:
name: mygroup
cluster: mycluster
vm_enforcing: true
vm_rule: positive
host_enforcing: true
host_rule: positive
vms:
- vm1
- vm2
hosts:
- host1
- name: Detach VMs from affinity group and disable VM rule
ovirt.ovirt.ovirt_affinity_group:
name: mygroup
cluster: mycluster
vm_enforcing: false
vm_rule: disabled
host_enforcing: true
host_rule: positive
vms: []
hosts:
- host1
- host2
- name: Remove affinity group
ovirt.ovirt.ovirt_affinity_group:
state: absent
cluster: mycluster
name: mygroup
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **affinity\_group** string | On success if affinity group is found. | Dictionary of all the affinity group attributes. Affinity group attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/affinity\_group. |
| **id** string | On success if affinity group is found. | ID of the affinity group which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_event_info β This module can be used to retrieve information about one or more oVirt/RHV events ovirt.ovirt.ovirt\_event\_info β This module can be used to retrieve information about one or more oVirt/RHV events
===================================================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_event_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV events.
* This module was called `ovirt_event_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_event\_info](#ansible-collections-ovirt-ovirt-ovirt-event-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **case\_sensitive** boolean | **Choices:*** no
* **yes** β
| Indicates if the search performed using the search parameter should be performed taking case into account. The default value is true, which means that case is taken into account. If you want to search ignoring case set it to false. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **from\_** integer | | Indicates the event index after which events should be returned. The indexes of events are strictly increasing, so when this parameter is used only the events with greater indexes will be returned. |
| **headers** string | | Additional HTTP headers. |
| **max** integer | | Sets the maximum number of events to return. If not specified all the events are returned. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **query** string | | Additional URL query parameters. |
| **search** string | | Search term which is accepted by the oVirt/RHV API. For example to search for events of severity alert use the following pattern: severity=alert |
| **wait** boolean | **Choices:*** no
* **yes** β
| If True wait for the response. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain the auth parameter for simplicity,
# look at the ovirt_auth module to see how to reuse authentication.
- name: Return all events
ovirt.ovirt.ovirt_event_info:
register: result
- name: Return the last 10 events
ovirt.ovirt.ovirt_event_info:
max: 10
register: result
- name: Return all events of type alert
ovirt.ovirt.ovirt_event_info:
search: "severity=alert"
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_events }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_events** list / elements=string | On success." | List of dictionaries describing the events. Event attributes are mapped to dictionary keys. All event attributes can be found at the following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/event |
### Authors
* Chris Keller (@nasx)
| programming_docs |
ansible ovirt.ovirt.ovirt_mac_pool β Module to manage MAC pools in oVirt/RHV ovirt.ovirt.ovirt\_mac\_pool β Module to manage MAC pools in oVirt/RHV
======================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_mac_pool`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module manage MAC pools in oVirt/RHV.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_duplicates** boolean | **Choices:*** no
* yes
| If *true* allow a MAC address to be used multiple times in a pool. Default value is set by oVirt/RHV engine to *false*. |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **description** string | | Description of the MAC pool. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **id** string | | ID of the mac pool to manage. |
| **name** string / required | | Name of the MAC pool to manage. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **ranges** list / elements=string | | List of MAC ranges. The from and to should be split by comma. For example: 00:1a:4a:16:01:51,00:1a:4a:16:01:61 |
| **state** string | **Choices:*** **present** β
* absent
| Should the mac pool be present or absent. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Create MAC pool:
- ovirt.ovirt.ovirt_mac_pool:
name: mymacpool
allow_duplicates: false
ranges:
- 00:1a:4a:16:01:51,00:1a:4a:16:01:61
- 00:1a:4a:16:02:51,00:1a:4a:16:02:61
# Remove MAC pool:
- ovirt.ovirt.ovirt_mac_pool:
state: absent
name: mymacpool
# Change MAC pool Name
- ovirt.ovirt.ovirt_nic:
id: 00000000-0000-0000-0000-000000000000
name: "new_mac_pool_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 |
| --- | --- | --- |
| **id** string | On success if MAC pool is found. | ID of the MAC pool which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **template** dictionary | On success if MAC pool is found. | Dictionary of all the MAC pool attributes. MAC pool attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/mac\_pool. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_vm_info β Retrieve information about one or more oVirt/RHV virtual machines ovirt.ovirt.ovirt\_vm\_info β Retrieve information about one or more oVirt/RHV virtual machines
===============================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_vm_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV virtual machines.
* This module was called `ovirt_vm_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_vm\_info](#ansible-collections-ovirt-ovirt-ovirt-vm-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **all\_content** boolean | **Choices:*** **no** β
* yes
| If *true* all the attributes of the virtual machines should be included in the response. |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **case\_sensitive** boolean | **Choices:*** no
* **yes** β
| If *true* performed search will take case into account. |
| **current\_cd** boolean added in 1.2.0 of ovirt.ovirt | **Choices:*** **no** β
* yes
| If *true* it will get from all virtual machines current attached cd. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **max** integer | | The maximum number of results to return. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **next\_run** boolean | **Choices:*** no
* yes
| Indicates if the returned result describes the virtual machine as it is currently running or if describes the virtual machine with the modifications that have already been performed but that will only come into effect when the virtual machine is restarted. By default the value is set by engine. |
| **pattern** string | | Search term which is accepted by oVirt/RHV search backend. For example to search VM X from cluster Y use following pattern: name=X and cluster=Y |
Notes
-----
Note
* This module returns a variable `ovirt_vms`, which contains a list of virtual machines. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all VMs which names start with C(centos) and
# belong to cluster C(west):
- ovirt.ovirt.ovirt_vm_info:
pattern: name=centos* and cluster=west
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_vms }}"
# Gather info about next run configuration of virtual machine named myvm
- ovirt.ovirt.ovirt_vm_info:
pattern: name=myvm
next_run: true
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_vms[0] }}"
# Gather info about VMs original template with follow parameter
- ovirt.ovirt.ovirt_vm_info:
pattern: name=myvm
follows: ['original_template.permissions', 'original_template.nics.vnic_profile']
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_vms[0] }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_vms** list / elements=string | On success. | List of dictionaries describing the VMs. VM attributes are mapped to dictionary keys, all VMs attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/vm. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_cluster β Module to manage clusters in oVirt/RHV ovirt.ovirt.ovirt\_cluster β Module to manage clusters in oVirt/RHV
===================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_cluster`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage clusters in oVirt/RHV
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **ballooning** boolean | **Choices:*** no
* yes
| If *True* enable memory balloon optimization. Memory balloon is used to re-distribute / reclaim the host memory based on VM needs in a dynamic way.
aliases: balloon |
| **comment** string | | Comment of the cluster. |
| **compatibility\_version** string | | The compatibility version of the cluster. All hosts in this cluster must support at least this compatibility version. |
| **cpu\_arch** string | **Choices:*** x86\_64
* ppc64
* undefined
| CPU architecture of cluster. |
| **cpu\_type** string | | CPU codename. For example *Intel SandyBridge Family*. |
| **data\_center** string | | Datacenter name where cluster reside. |
| **description** string | | Description of the cluster. |
| **external\_network\_providers** list / elements=dictionary | | List of references to the external network providers available in the cluster. If the automatic deployment of the external network provider is supported, the networks of the referenced network provider are available on every host in the cluster. This is supported since oVirt version 4.2. |
| | **id** string | | ID of the external network provider. Either `name` or `id` is required. |
| | **name** string | | Name of the external network provider. Either `name` or `id` is required. |
| **fence\_connectivity\_threshold** integer | | The threshold used by `fence_skip_if_connectivity_broken`. |
| **fence\_enabled** boolean | **Choices:*** no
* yes
| If *True* enables fencing on the cluster. Fencing is enabled by default. |
| **fence\_skip\_if\_connectivity\_broken** boolean | **Choices:*** no
* yes
| If *True* fencing will be temporarily disabled if the percentage of hosts in the cluster that are experiencing connectivity issues is greater than or equal to the defined threshold. The threshold can be specified by `fence_connectivity_threshold`. |
| **fence\_skip\_if\_gluster\_bricks\_up** boolean | **Choices:*** no
* yes
| A flag indicating if fencing should be skipped if Gluster bricks are up and running in the host being fenced. This flag is optional, and the default value is `false`. |
| **fence\_skip\_if\_gluster\_quorum\_not\_met** boolean | **Choices:*** no
* yes
| A flag indicating if fencing should be skipped if Gluster bricks are up and running and Gluster quorum will not be met without those bricks. This flag is optional, and the default value is `false`. |
| **fence\_skip\_if\_sd\_active** boolean | **Choices:*** no
* yes
| If *True* any hosts in the cluster that are Non Responsive and still connected to storage will not be fenced. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **firewall\_type** string | **Choices:*** firewalld
* iptables
| The type of firewall to be used on hosts in this cluster. Up to version 4.1, it was always *iptables*. Since version 4.2, you can choose between *iptables* and *firewalld*. For clusters with a compatibility version of 4.2 and higher, the default firewall type is *firewalld*. |
| **gluster** boolean | **Choices:*** no
* yes
| If *True*, hosts in this cluster will be used as Gluster Storage server nodes, and not for running virtual machines. By default the cluster is created for virtual machine hosts. |
| **gluster\_tuned\_profile** string | | The name of the <https://fedorahosted.org/tuned> to set on all the hosts in the cluster. This is not mandatory and relevant only for clusters with Gluster service. Could be for example *virtual-host*, *rhgs-sequential-io*, *rhgs-random-io*
|
| **ha\_reservation** boolean | **Choices:*** no
* yes
| If *True* enables the oVirt/RHV to monitor cluster capacity for highly available virtual machines. |
| **host\_reason** boolean | **Choices:*** no
* yes
| If *True* enables an optional reason field when a host is placed into maintenance mode from the Manager, allowing the administrator to provide an explanation for the maintenance. |
| **id** string | | ID of the cluster to manage. |
| **ksm** boolean | **Choices:*** no
* yes
| I *True* MoM enables to run Kernel Same-page Merging *KSM* when necessary and when it can yield a memory saving benefit that outweighs its CPU cost. |
| **ksm\_numa** boolean | **Choices:*** no
* yes
| If *True* enables KSM `ksm` for best performance inside NUMA nodes. |
| **mac\_pool** string | | MAC pool to be used by this cluster. `Note:` This is supported since oVirt version 4.1. |
| **memory\_policy** string | **Choices:*** disabled
* server
* desktop
|
*disabled* - Disables memory page sharing.
*server* - Sets the memory page sharing threshold to 150% of the system memory on each host.
*desktop* - Sets the memory page sharing threshold to 200% of the system memory on each host.
aliases: performance\_preset |
| **migration\_auto\_converge** string | **Choices:*** true
* false
* inherit
| If *True* auto-convergence is used during live migration of virtual machines. Used only when `migration_policy` is set to *legacy*. Following options are supported:
`true` - Override the global setting to *true*.
`false` - Override the global setting to *false*.
`inherit` - Use value which is set globally. |
| **migration\_bandwidth** string | **Choices:*** auto
* hypervisor\_default
* custom
| The bandwidth settings define the maximum bandwidth of both outgoing and incoming migrations per host. Following bandwidth options are supported:
`auto` - Bandwidth is copied from the *rate limit* [Mbps] setting in the data center host network QoS.
`hypervisor_default` - Bandwidth is controlled by local VDSM setting on sending host.
`custom` - Defined by user (in Mbps). |
| **migration\_bandwidth\_limit** integer | | Set the *custom* migration bandwidth limit. This parameter is used only when `migration_bandwidth` is *custom*. |
| **migration\_compressed** string | **Choices:*** true
* false
* inherit
| If *True* compression is used during live migration of the virtual machine. Used only when `migration_policy` is set to *legacy*. Following options are supported:
`true` - Override the global setting to *true*.
`false` - Override the global setting to *false*.
`inherit` - Use value which is set globally. |
| **migration\_encrypted** string | **Choices:*** true
* false
* inherit
| If *True* encryption is used during live migration of the virtual machine. Following options are supported:
`true` - Override the global setting to *true*.
`false` - Override the global setting to *false*.
`inherit` - Use value which is set globally. |
| **migration\_policy** string | **Choices:*** legacy
* minimal\_downtime
* suspend\_workload
* post\_copy
| A migration policy defines the conditions for live migrating virtual machines in the event of host failure. Following policies are supported:
`legacy` - Legacy behavior of 3.6 version.
`minimal_downtime` - Virtual machines should not experience any significant downtime.
`suspend_workload` - Virtual machines may experience a more significant downtime.
`post_copy` - Virtual machines should not experience any significant downtime. If the VM migration is not converging for a long time, the migration will be switched to post-copy. Added in version *2.4*. |
| **name** string / required | | Name of the cluster to manage. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **network** string | | Management network of cluster to access cluster hosts. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **resilience\_policy** string | **Choices:*** do\_not\_migrate
* migrate
* migrate\_highly\_available
| The resilience policy defines how the virtual machines are prioritized in the migration. Following values are supported:
`do_not_migrate` - Prevents virtual machines from being migrated.
`migrate` - Migrates all virtual machines in order of their defined priority.
`migrate_highly_available` - Migrates only highly available virtual machines to prevent overloading other hosts. |
| **rng\_sources** list / elements=string | | List that specify the random number generator devices that all hosts in the cluster will use. Supported generators are: *hwrng* and *random*. |
| **scheduling\_policy** string | | Name of the scheduling policy to be used for cluster. |
| **scheduling\_policy\_properties** list / elements=dictionary | | Custom scheduling policy properties of the cluster. These optional properties override the properties of the scheduling policy specified by the `scheduling_policy` parameter. |
| | **name** string | | Name of the scheduling policy property. |
| | **value** string | | Value of scheduling policy property. |
| **serial\_policy** string | **Choices:*** vm
* host
* custom
| Specify a serial number policy for the virtual machines in the cluster. Following options are supported:
`vm` - Sets the virtual machine's UUID as its serial number.
`host` - Sets the host's UUID as the virtual machine's serial number.
`custom` - Allows you to specify a custom serial number in `serial_policy_value`. |
| **serial\_policy\_value** string | | Allows you to specify a custom serial number. This parameter is used only when `serial_policy` is *custom*. |
| **spice\_proxy** string | | The proxy by which the SPICE client will connect to virtual machines. The address must be in the following format: *protocol://[host]:[port]*
|
| **state** string | **Choices:*** **present** β
* absent
| Should the cluster be present or absent. |
| **switch\_type** string | **Choices:*** legacy
* ovs
| Type of switch to be used by all networks in given cluster. Either *legacy* which is using linux bridge or *ovs* using Open vSwitch. |
| **threads\_as\_cores** boolean | **Choices:*** no
* yes
| If *True* the exposed host threads would be treated as cores which can be utilized by virtual machines. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **trusted\_service** boolean | **Choices:*** no
* yes
| If *True* enables integration with an OpenAttestation server. |
| **virt** boolean | **Choices:*** no
* yes
| If *True*, hosts in this cluster will be used to run virtual machines. |
| **vm\_reason** boolean | **Choices:*** no
* yes
| If *True* enables an optional reason field when a virtual machine is shut down from the Manager, allowing the administrator to provide an explanation for the maintenance. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Create cluster
- ovirt.ovirt.ovirt_cluster:
data_center: mydatacenter
name: mycluster
cpu_type: Intel SandyBridge Family
description: mycluster
compatibility_version: 4.0
# Create virt service cluster:
- ovirt.ovirt.ovirt_cluster:
data_center: mydatacenter
name: mycluster
cpu_type: Intel Nehalem Family
description: mycluster
switch_type: legacy
compatibility_version: 4.0
ballooning: true
gluster: false
threads_as_cores: true
ha_reservation: true
trusted_service: false
host_reason: false
vm_reason: true
ksm_numa: true
memory_policy: server
rng_sources:
- hwrng
- random
# Create cluster with default network provider
- ovirt.ovirt.ovirt_cluster:
name: mycluster
data_center: Default
cpu_type: Intel SandyBridge Family
external_network_providers:
- name: ovirt-provider-ovn
# Remove cluster
- ovirt.ovirt.ovirt_cluster:
state: absent
name: mycluster
# Change cluster Name
- ovirt.ovirt.ovirt_cluster:
id: 00000000-0000-0000-0000-000000000000
name: "new_cluster_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 |
| --- | --- | --- |
| **cluster** dictionary | On success if cluster is found. | Dictionary of all the cluster attributes. Cluster attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/cluster. |
| **id** string | On success if cluster is found. | ID of the cluster which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
| programming_docs |
ansible ovirt.ovirt.ovirt_disk_info β Retrieve information about one or more oVirt/RHV disks ovirt.ovirt.ovirt\_disk\_info β Retrieve information about one or more oVirt/RHV disks
======================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_disk_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV disks.
* This module was called `ovirt_disk_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_disk\_info](#ansible-collections-ovirt-ovirt-ovirt-disk-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **pattern** string | | Search term which is accepted by oVirt/RHV search backend. For example to search Disk X from storage Y use following pattern: name=X and storage.name=Y |
Notes
-----
Note
* This module returns a variable `ovirt_disks`, which contains a list of disks. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all Disks which names start with C(centos)
- ovirt.ovirt.ovirt_disk_info:
pattern: name=centos*
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_disks }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_disks** list / elements=string | On success. | List of dictionaries describing the Disks. Disk attributes are mapped to dictionary keys, all Disks attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/disk. |
### Authors
* Katerina Koukiou (@KKoukiou)
ansible ovirt.ovirt.ovirt_host_info β Retrieve information about one or more oVirt/RHV hosts ovirt.ovirt.ovirt\_host\_info β Retrieve information about one or more oVirt/RHV hosts
======================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_host_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV hosts.
* This module was called `ovirt_host_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_host\_info](#ansible-collections-ovirt-ovirt-ovirt-host-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **all\_content** boolean | **Choices:*** **no** β
* yes
| If *true* all the attributes of the hosts should be included in the response. |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **cluster\_version** string | | Filter the hosts based on the cluster version. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **pattern** string | | Search term which is accepted by oVirt/RHV search backend. For example to search host X from datacenter Y use following pattern: name=X and datacenter=Y |
Notes
-----
Note
* This module returns a variable `ovirt_hosts`, which contains a list of hosts. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all hosts which names start with C(host) and
# belong to data center C(west):
- ovirt.ovirt.ovirt_host_info:
pattern: name=host* and datacenter=west
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_hosts }}"
# All hosts with cluster version 4.2:
- ovirt.ovirt.ovirt_host_info:
pattern: name=host*
cluster_version: "4.2"
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_hosts }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_hosts** list / elements=string | On success. | List of dictionaries describing the hosts. Host attributes are mapped to dictionary keys, all hosts attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/host. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_disk β Module to manage Virtual Machine and floating disks in oVirt/RHV ovirt.ovirt.ovirt\_disk β Module to manage Virtual Machine and floating disks in oVirt/RHV
==========================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_disk`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage Virtual Machine and floating disks in oVirt/RHV.
* WARNING: If you are installing the collection from ansible galaxy you need to install βqemu-imgβ package.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **activate** boolean | **Choices:*** no
* yes
|
*True* if the disk should be activated. When creating disk of virtual machine it is set to *True*. |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **backup** string added in 1.1.0 of ovirt.ovirt | **Choices:*** incremental
| The backup behavior supported by the disk. |
| **bootable** boolean | **Choices:*** no
* yes
|
*True* if the disk should be bootable. By default when disk is created it isn't bootable. |
| **content\_type** string | **Choices:*** **data** β
* iso
* hosted\_engine
* hosted\_engine\_sanlock
* hosted\_engine\_metadata
* hosted\_engine\_configuration
| Specify if the disk is a data disk or ISO image or a one of a the Hosted Engine disk types The Hosted Engine disk content types are available with Engine 4.3+ and Ansible 2.8 |
| **description** string | | Description of the disk image to manage. |
| **download\_image\_path** string | | Path on a file system where disk should be downloaded. Note that you must have an valid oVirt/RHV engine CA in your system trust store or you must provide it in `ca_file` parameter. Note that the disk is not downloaded when the file already exists, but you can forcibly download the disk when using `force` I (true). |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **force** boolean | **Choices:*** **no** β
* yes
| Please take a look at `image_path` documentation to see the correct usage of this parameter. |
| **format** string | **Choices:*** raw
* **cow** β
| Specify format of the disk. Note that this option isn't idempotent as it's not currently possible to change format of the disk via API. |
| **host** string | | When the hypervisor name is specified the newly created disk or an existing disk will refresh its information about the underlying storage( Disk size, Serial, Product ID, Vendor ID ...) The specified host will be used for gathering the storage related information. This option is only valid for passthrough disks. This option requires at least the logical\_unit.id to be specified |
| **id** string | | ID of the disk to manage. Either `id` or `name` is required. |
| **image\_provider** string | | When `state` is *exported* disk is exported to given Glance image provider. When `state` is *imported* disk is imported from given Glance image provider. `**IMPORTANT**` There is no reliable way to achieve idempotency, so every time you specify this parameter the disk is exported, so please handle your playbook accordingly to not export the disk all the time. This option is valid only for template disks. |
| **interface** string | **Choices:*** virtio
* ide
* sata
* virtio\_scsi
| Driver of the storage interface. It's required parameter when creating the new disk. |
| **logical\_unit** dictionary | | Dictionary which describes LUN to be directly attached to VM: |
| | **address** string | | Address of the storage server. Used by iSCSI. |
| | **lun\_id** string | | LUN id. |
| | **password** string | | CHAP Password of the user to be used to access storage server. Used by iSCSI. |
| | **port** string | | Port of the storage server. Used by iSCSI. |
| | **storage\_type** string | | Storage type either *fcp* or *iscsi*. |
| | **target** string | | iSCSI target. |
| | **username** string | | CHAP Username to be used to access storage server. Used by iSCSI. |
| **name** string | | Name of the disk to manage. Either `id` or `name`/`alias` is required.
aliases: alias |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **openstack\_volume\_type** string | | Name of the openstack volume type. This is valid when working with cinder. |
| **pass\_discard** boolean added in 1.2.0 of ovirt.ovirt | **Choices:*** no
* yes
| Defines whether the virtual machine passes discard commands to the storage. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **profile** string | | Disk profile name to be attached to disk. By default profile is chosen by oVirt/RHV engine. |
| **propagate\_errors** boolean added in 1.2.0 of ovirt.ovirt | **Choices:*** no
* yes
| Indicates if disk errors should cause virtual machine to be paused or if disk errors should be propagated to the the guest operating system instead. |
| **quota\_id** string | | Disk quota ID to be used for disk. By default quota is chosen by oVirt/RHV engine. |
| **scsi\_passthrough** string added in 1.2.0 of ovirt.ovirt | **Choices:*** disabled
* filtered
* unfiltered
| Indicates whether SCSI passthrough is enable and its policy. Setting a value of `filtered`/`unfiltered` will enable SCSI passthrough for a LUN disk with unprivileged/privileged SCSI I/O. To disable SCSI passthrough the value should be set to `disabled` |
| **shareable** boolean | **Choices:*** no
* yes
|
*True* if the disk should be shareable. By default when disk is created it isn't shareable. |
| **size** string | | Size of the disk. Size should be specified using IEC standard units. For example 10GiB, 1024MiB, etc. Size can be only increased, not decreased. |
| **sparse** boolean | **Choices:*** no
* yes
|
*True* if the disk should be sparse (also known as *thin provision*). If the parameter is omitted, cow disks will be created as sparse and raw disks as *preallocated*
Note that this option isn't idempotent as it's not currently possible to change sparseness of the disk via API. |
| **sparsify** boolean | **Choices:*** no
* yes
|
*True* if the disk should be sparsified. Sparsification frees space in the disk image that is not used by its filesystem. As a result, the image will occupy less space on the storage. Note that this parameter isn't idempotent, as it's not possible to check if the disk should be or should not be sparsified. |
| **state** string | **Choices:*** **present** β
* absent
* attached
* detached
* exported
* imported
| Should the Virtual Machine disk be present/absent/attached/detached/exported/imported. |
| **storage\_domain** string | | Storage domain name where disk should be created. |
| **storage\_domains** list / elements=string | | Storage domain names where disk should be copied. `**IMPORTANT**` There is no reliable way to achieve idempotency, so every time you specify this parameter the disks are copied, so please handle your playbook accordingly to not copy the disks all the time. This is valid only for VM and floating disks, template disks works as expected. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **upload\_image\_path** string | | Path to disk image, which should be uploaded. Note if `size` is not specified the size of the disk will be determined by the size of the specified image. Note that currently we support only compatibility version 0.10 of the qcow disk. Note that you must have an valid oVirt/RHV engine CA in your system trust store or you must provide it in `ca_file` parameter. Note that there is no reliable way to achieve idempotency, so if you want to upload the disk even if the disk with `id` or `name` exists, then please use `force` *true*. If you will use `force` *false*, which is default, then the disk image won't be uploaded. Note that to upload iso the `format` should be 'raw'
aliases: image\_path |
| **uses\_scsi\_reservation** boolean added in 1.2.0 of ovirt.ovirt | **Choices:*** no
* yes
| Defines whether SCSI reservation is enabled for this disk. |
| **vm\_id** string | | ID of the Virtual Machine to manage. Either `vm_id` or `vm_name` is required if `state` is *attached* or *detached*. |
| **vm\_name** string | | Name of the Virtual Machine to manage. Either `vm_id` or `vm_name` is required if `state` is *attached* or *detached*. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
| **wipe\_after\_delete** boolean | **Choices:*** no
* yes
| If the disk's Wipe After Delete is enabled, then the disk is first wiped. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Create and attach new disk to VM
- ovirt.ovirt.ovirt_disk:
name: myvm_disk
vm_name: rhel7
size: 10GiB
format: cow
interface: virtio
storage_domain: data
# Attach logical unit to VM rhel7
- ovirt.ovirt.ovirt_disk:
vm_name: rhel7
logical_unit:
target: iqn.2016-08-09.brq.str-01:omachace
id: 1IET_000d0001
address: 10.34.63.204
interface: virtio
# Detach disk from VM
- ovirt.ovirt.ovirt_disk:
state: detached
name: myvm_disk
vm_name: rhel7
size: 10GiB
format: cow
interface: virtio
# Change Disk Name
- ovirt.ovirt.ovirt_disk:
id: 00000000-0000-0000-0000-000000000000
storage_domain: data
name: "new_disk_name"
vm_name: rhel7
# Upload local image to disk and attach it to vm:
# Since Ansible 2.3
- ovirt.ovirt.ovirt_disk:
name: mydisk
vm_name: myvm
interface: virtio
size: 10GiB
format: cow
image_path: /path/to/mydisk.qcow2
storage_domain: data
# Download disk to local file system:
# Since Ansible 2.3
- ovirt.ovirt.ovirt_disk:
id: 7de90f31-222c-436c-a1ca-7e655bd5b60c
download_image_path: /home/user/mydisk.qcow2
# Export disk as image to Glance domain
# Since Ansible 2.4
- ovirt.ovirt.ovirt_disk:
id: 7de90f31-222c-436c-a1ca-7e655bd5b60c
image_provider: myglance
state: exported
# Defining a specific quota while creating a disk image:
# Since Ansible 2.5
- ovirt.ovirt.ovirt_quotas_info:
data_center: Default
name: myquota
register: quota
- ovirt.ovirt.ovirt_disk:
name: mydisk
size: 10GiB
storage_domain: data
description: somedescriptionhere
quota_id: "{{ quota.ovirt_quotas[0]['id'] }}"
# Upload an ISO image
# Since Ansible 2.8
- ovirt.ovirt.ovirt_disk:
name: myiso
upload_image_path: /path/to/iso/image
storage_domain: data
size: 4 GiB
wait: true
bootable: true
format: raw
content_type: iso
# Add fiber chanel disk
- name: Create disk
ovirt.ovirt.ovirt_disk:
name: fcp_disk
host: my_host
logical_unit:
id: 3600a09803830447a4f244c4657597777
storage_type: fcp
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **disk** dictionary | On success if disk is found and `vm_id` or `vm_name` wasn't passed. | Dictionary of all the disk attributes. Disk attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/disk. |
| **disk\_attachment** dictionary | On success if disk is found and `vm_id` or `vm_name` was passed and VM was found. | Dictionary of all the disk attachment attributes. Disk attachment attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/disk\_attachment. |
| **id** string | On success if disk is found. | ID of the managed disk **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
| programming_docs |
ansible ovirt.ovirt.ovirt_quota β Module to manage datacenter quotas in oVirt/RHV ovirt.ovirt.ovirt\_quota β Module to manage datacenter quotas in oVirt/RHV
==========================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_quota`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage datacenter quotas in oVirt/RHV
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **cluster\_grace** integer | | Cluster grace(hard limit) defined in percentage (1-100).
aliases: cluster\_hard\_limit |
| **cluster\_threshold** integer | | Cluster threshold(soft limit) defined in percentage (0-100).
aliases: cluster\_soft\_limit |
| **clusters** list / elements=dictionary | | List of dictionary of cluster limits, which is valid to specific cluster. If cluster isn't specified it's valid to all clusters in system: |
| | **cluster** string | | Name of the cluster. |
| | **cpu** string | | CPU limit. |
| | **memory** string | | Memory limit (in GiB). |
| **data\_center** string / required | | Name of the datacenter where quota should be managed. |
| **description** string | | Description of the quota to manage. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **id** string | | ID of the quota to manage. |
| **name** string / required | | Name of the quota to manage. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **state** string | **Choices:*** **present** β
* absent
| Should the quota be present/absent. |
| **storage\_grace** integer | | Storage grace(hard limit) defined in percentage (1-100).
aliases: storage\_hard\_limit |
| **storage\_threshold** integer | | Storage threshold(soft limit) defined in percentage (0-100).
aliases: storage\_soft\_limit |
| **storages** list / elements=dictionary | | List of dictionary of storage limits, which is valid to specific storage. If storage isn't specified it's valid to all storages in system: |
| | **size** string | | Size limit (in GiB). |
| | **storage** string | | Name of the storage. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Add cluster quota to cluster cluster1 with memory limit 20GiB and CPU limit to 10:
- ovirt.ovirt.ovirt_quota:
name: quota1
data_center: dcX
clusters:
- name: cluster1
memory: 20
cpu: 10
# Add cluster quota to all clusters with memory limit 30GiB and CPU limit to 15:
- ovirt.ovirt.ovirt_quota:
name: quota2
data_center: dcX
clusters:
- memory: 30
cpu: 15
# Add storage quota to storage data1 with size limit to 100GiB
- ovirt.ovirt.ovirt_quota:
name: quota3
data_center: dcX
storage_grace: 40
storage_threshold: 60
storages:
- name: data1
size: 100
# Remove quota quota1 (Note the quota must not be assigned to any VM/disk):
- ovirt.ovirt.ovirt_quota:
state: absent
data_center: dcX
name: quota1
# Change Quota Name
- ovirt.ovirt.ovirt_quota:
id: 00000000-0000-0000-0000-000000000000
name: "new_quota_name"
data_center: dcX
```
Return Values
-------------
Common return 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 | On success if quota is found. | ID of the quota which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **quota** dictionary | On success if quota is found. | Dictionary of all the quota attributes. Quota attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/quota. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_vm β Module to manage Virtual Machines in oVirt/RHV ovirt.ovirt.ovirt\_vm β Module to manage Virtual Machines in oVirt/RHV
======================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_vm`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module manages whole lifecycle of the Virtual Machine(VM) in oVirt/RHV.
* Since VM can hold many states in oVirt/RHV, this see notes to see how the states of the VM are handled.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **affinity\_group\_mappings** list / elements=dictionary | | Mapper which maps affinity name between VM's OVF and the destination affinity this VM should be registered to, relevant when `state` is registered. |
| **affinity\_label\_mappings** list / elements=dictionary | | Mapper which maps affinity label name between VM's OVF and the destination label this VM should be registered to, relevant when `state` is registered. |
| **allow\_partial\_import** boolean | **Choices:*** no
* yes
| Boolean indication whether to allow partial registration of Virtual Machine when `state` is registered. |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **ballooning\_enabled** boolean | **Choices:*** no
* yes
| If *true*, use memory ballooning. Memory balloon is a guest device, which may be used to re-distribute / reclaim the host memory based on VM needs in a dynamic way. In this way it's possible to create memory over commitment states. |
| **bios\_type** string | **Choices:*** i440fx\_sea\_bios
* q35\_ovmf
* q35\_sea\_bios
* q35\_secure\_boot
| Set bios type, necessary for some operating systems and secure boot. If no value is passed, default value is set from cluster. NOTE - Supported since oVirt 4.3. |
| **boot\_devices** list / elements=string | **Choices:*** cdrom
* hd
* network
| List of boot devices which should be used to boot. For example `[ cdrom, hd ]`. Default value is set by oVirt/RHV engine. |
| **boot\_menu** boolean | **Choices:*** no
* yes
|
*True* enable menu to select boot device, *False* to disable it. By default is chosen by oVirt/RHV engine. |
| **cd\_iso** string | | ISO file from ISO storage domain which should be attached to Virtual Machine. If you have multiple ISO disks with the same name use disk ID to specify which should be used or use `storage_domain` to filter disks. If you pass empty string the CD will be ejected from VM. If used with `state` *running* or *present* and VM is running the CD will be attached to VM. If used with `state` *running* or *present* and VM is down the CD will be attached to VM persistently. |
| **clone** boolean | **Choices:*** **no** β
* yes
| If *yes* then the disks of the created virtual machine will be cloned and independent of the template. This parameter is used only when `state` is *running* or *present* and VM didn't exist before. |
| **clone\_permissions** boolean | **Choices:*** **no** β
* yes
| If *yes* then the permissions of the template (only the direct ones, not the inherited ones) will be copied to the created virtual machine. This parameter is used only when `state` is *running* or *present* and VM didn't exist before. |
| **cloud\_init** dictionary | | Dictionary with values for Unix-like Virtual Machine initialization using cloud init. |
| | **authorized\_ssh\_keys** string | | Use this SSH keys to login to Virtual Machine. |
| | **custom\_script** string | | Cloud-init script which will be executed on Virtual Machine when deployed. This is appended to the end of the cloud-init script generated by any other options. For further information, refer to cloud-init User-Data documentation. |
| | **dns\_search** string | | DNS search domains to be configured on Virtual Machine. |
| | **dns\_servers** string | | DNS servers to be configured on Virtual Machine, maximum of two, space-separated. |
| | **host\_name** string | | Hostname to be set to Virtual Machine when deployed. |
| | **nic\_boot\_protocol** string | **Choices:*** none
* dhcp
* static
| Set boot protocol of the network interface of Virtual Machine. |
| | **nic\_boot\_protocol\_v6** string | **Choices:*** none
* dhcp
* static
| Set boot protocol of the network interface of Virtual Machine. |
| | **nic\_gateway** string | | If boot protocol is static, set this gateway to network interface of Virtual Machine. |
| | **nic\_gateway\_v6** string | | If boot protocol is static, set this gateway to network interface of Virtual Machine. For IPv6 addresses the value is an integer in the range of 0-128, which represents the subnet prefix. |
| | **nic\_ip\_address** string | | If boot protocol is static, set this IP address to network interface of Virtual Machine. |
| | **nic\_ip\_address\_v6** string | | If boot protocol is static, set this IP address to network interface of Virtual Machine. |
| | **nic\_name** string | | Set name to network interface of Virtual Machine. |
| | **nic\_netmask** string | | If boot protocol is static, set this netmask to network interface of Virtual Machine. |
| | **nic\_netmask\_v6** string | | If boot protocol is static, set this netmask to network interface of Virtual Machine. |
| | **regenerate\_ssh\_keys** boolean | **Choices:*** no
* yes
| If *True* SSH keys will be regenerated on Virtual Machine. |
| | **root\_password** string | | Password to be set for user specified by `user_name` parameter. |
| | **timezone** string | | Timezone to be set to Virtual Machine when deployed. |
| | **user\_name** string | | Username to be used to set password to Virtual Machine when deployed. |
| **cloud\_init\_nics** list / elements=dictionary | | List of dictionaries representing network interfaces to be setup by cloud init. This option is used, when user needs to setup more network interfaces via cloud init. If one network interface is enough, user should use `cloud_init` *nic\_\** parameters. `cloud_init` *nic\_\** parameters are merged with `cloud_init_nics` parameters. |
| | **nic\_boot\_protocol** string | | Set boot protocol of the network interface of Virtual Machine. Can be one of `none`, `dhcp` or `static`. |
| | **nic\_boot\_protocol\_v6** string | | Set boot protocol of the network interface of Virtual Machine. Can be one of `none`, `dhcp` or `static`. |
| | **nic\_gateway** string | | If boot protocol is static, set this gateway to network interface of Virtual Machine. |
| | **nic\_gateway\_v6** string | | If boot protocol is static, set this gateway to network interface of Virtual Machine. For IPv6 addresses the value is an integer in the range of 0-128, which represents the subnet prefix. |
| | **nic\_ip\_address** string | | If boot protocol is static, set this IP address to network interface of Virtual Machine. |
| | **nic\_ip\_address\_v6** string | | If boot protocol is static, set this IP address to network interface of Virtual Machine. |
| | **nic\_name** string | | Set name to network interface of Virtual Machine. |
| | **nic\_netmask** string | | If boot protocol is static, set this netmask to network interface of Virtual Machine. |
| | **nic\_netmask\_v6** string | | If boot protocol is static, set this netmask to network interface of Virtual Machine. |
| **cloud\_init\_persist** boolean | **Choices:*** **no** β
* yes
| If *yes* the `cloud_init` or `sysprep` parameters will be saved for the virtual machine and the virtual machine won't be started as run-once.
aliases: sysprep\_persist |
| **cluster** string | | Name of the cluster, where Virtual Machine should be created. Required if creating VM. |
| **cluster\_mappings** list / elements=dictionary | | Mapper which maps cluster name between VM's OVF and the destination cluster this VM should be registered to, relevant when `state` is registered. Cluster mapping is described by the following dictionary: |
| | **dest\_name** string | | The name of the destination cluster. |
| | **source\_name** string | | The name of the source cluster. |
| **comment** string | | Comment of the Virtual Machine. |
| **cpu\_cores** integer | | Number of virtual CPUs cores of the Virtual Machine. Default value is set by oVirt/RHV engine. |
| **cpu\_mode** string | | CPU mode of the virtual machine. It can be some of the following: *host\_passthrough*, *host\_model* or *custom*. For *host\_passthrough* CPU type you need to set `placement_policy` to *pinned*. If no value is passed, default value is set by oVirt/RHV engine. |
| **cpu\_pinning** list / elements=dictionary | | CPU Pinning topology to map virtual machine CPU to host CPU. CPU Pinning topology is a list of dictionary which can have following values: |
| | **cpu** string | | Number of the host CPU. |
| | **vcpu** string | | Number of the virtual machine CPU. |
| **cpu\_shares** integer | | Set a CPU shares for this Virtual Machine. Default value is set by oVirt/RHV engine. |
| **cpu\_sockets** integer | | Number of virtual CPUs sockets of the Virtual Machine. Default value is set by oVirt/RHV engine. |
| **cpu\_threads** integer | | Number of threads per core of the Virtual Machine. Default value is set by oVirt/RHV engine. |
| **custom\_compatibility\_version** string | | Enables a virtual machine to be customized to its own compatibility version. If '`custom_compatibility_version`' is set, it overrides the cluster's compatibility version for this particular virtual machine. |
| **custom\_emulated\_machine** string | | Sets the value of the custom\_emulated\_machine attribute. |
| **custom\_properties** list / elements=dictionary | | Properties sent to VDSM to configure various hooks. Custom properties is a list of dictionary which can have following values: |
| | **name** string | | Name of the custom property. For example: *hugepages*, *vhost*, *sap\_agent*, etc. |
| | **regexp** string | | Regular expression to set for custom property. |
| | **value** string | | Value to set for custom property. |
| **delete\_protected** boolean | **Choices:*** no
* yes
| If *yes* Virtual Machine will be set as delete protected. If *no* Virtual Machine won't be set as delete protected. If no value is passed, default value is set by oVirt/RHV engine. |
| **description** string | | Description of the Virtual Machine. |
| **disk\_format** string | **Choices:*** **cow** β
* raw
| Specify format of the disk. If `cow` format is used, disk will by created as sparse, so space will be allocated for the volume as needed, also known as *thin provision*. If `raw` format is used, disk storage will be allocated right away, also known as *preallocated*. Note that this option isn't idempotent as it's not currently possible to change format of the disk via API. This parameter is considered only when `template` and `storage domain` is provided. |
| **disks** list / elements=dictionary | | List of disks, which should be attached to Virtual Machine. Disk is described by following dictionary. |
| | **activate** boolean | **Choices:*** no
* yes
|
*True* if the disk should be activated, default is activated. NOTE - This parameter is used only when `state` is *running* or *present* and is able to only attach disks. To manage disks of the VM in more depth please use [ovirt.ovirt.ovirt\_disk](ovirt_disk_module) module instead. |
| | **bootable** boolean | **Choices:*** no
* yes
|
*True* if the disk should be bootable, default is non bootable. |
| | **id** string | | ID of the disk. Either `name` or `id` is required. |
| | **interface** string | **Choices:*** **virtio** β
* ide
| Interface of the disk. |
| | **name** string | | Name of the disk. Either `name` or `id` is required. |
| **domain\_mappings** list / elements=dictionary | | Mapper which maps aaa domain name between VM's OVF and the destination aaa domain this VM should be registered to, relevant when `state` is registered. The aaa domain mapping is described by the following dictionary: |
| | **dest\_name** string | | The name of the destination aaa domain. |
| | **source\_name** string | | The name of the source aaa domain. |
| **exclusive** boolean | **Choices:*** no
* yes
| When `state` is *exported* this parameter indicates if the existing VM with the same name should be overwritten. |
| **export\_domain** string | | When `state` is *exported*this parameter specifies the name of the export storage domain. |
| **export\_ova** dictionary | | Dictionary of values to be used to export VM as OVA. |
| | **directory** string | | The name of the directory where the OVA has to be exported. |
| | **filename** string | | The name of the exported OVA file. |
| | **host** string | | The name of the destination host where the OVA has to be exported. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **force** boolean | **Choices:*** **no** β
* yes
| Please check to *Synopsis* to more detailed description of force parameter, it can behave differently in different situations. |
| **force\_migrate** boolean | **Choices:*** no
* yes
| If *true*, the VM will migrate when *placement\_policy=user-migratable* but not when *placement\_policy=pinned*. |
| **graphical\_console** dictionary | | Assign graphical console to the virtual machine. |
| | **disconnect\_action** string | | Returns the action that will take place when the graphic console(SPICE only) is disconnected. The options are:
*none* No action is taken.
*lock\_screen* Locks the currently active user session.
*logout* Logs out the currently active user session.
*reboot* Initiates a graceful virtual machine reboot.
*shutdown* Initiates a graceful virtual machine shutdown. |
| | **headless\_mode** boolean | **Choices:*** no
* yes
| If *true* disable the graphics console for this virtual machine. |
| | **keyboard\_layout** string | | The keyboard layout to use with this graphic console. This option is only available for the VNC console type. If no keyboard is enabled then it won't be reported. |
| | **monitors** integer | | The number of monitors opened for this graphic console. This option is only available for the SPICE protocol. Possible values are 1, 2 or 4. |
| | **protocol** list / elements=string | | Graphical protocol, a list of *spice*, *vnc*, or both. |
| **high\_availability** boolean | **Choices:*** no
* yes
| If *yes* Virtual Machine will be set as highly available. If *no* Virtual Machine won't be set as highly available. If no value is passed, default value is set by oVirt/RHV engine. |
| **high\_availability\_priority** integer | | Indicates the priority of the virtual machine inside the run and migration queues. Virtual machines with higher priorities will be started and migrated before virtual machines with lower priorities. The value is an integer between 0 and 100. The higher the value, the higher the priority. If no value is passed, default value is set by oVirt/RHV engine. |
| **host** string | | Specify host where Virtual Machine should be running. By default the host is chosen by engine scheduler. This parameter is used only when `state` is *running* or *present*. |
| **host\_devices** list / elements=dictionary | | Single Root I/O Virtualization - technology that allows single device to expose multiple endpoints that can be passed to VMs host\_devices is an list which contain dictionary with name and state of device |
| **id** string | | ID of the Virtual Machine to manage. |
| **initrd\_path** string | | Path to an initial ramdisk to be used with the kernel specified by `kernel_path` option. Ramdisk image must be stored on either the ISO domain or on the host's storage. |
| **instance\_type** string | | Name of virtual machine's hardware configuration. By default no instance type is used. |
| **io\_threads** integer | | Number of IO threads used by virtual machine. *0* means IO threading disabled. |
| **kernel\_params** string | | Kernel command line parameters (formatted as string) to be used with the kernel specified by `kernel_path` option. |
| **kernel\_params\_persist** boolean | **Choices:*** **no** β
* yes
| If *true* `kernel_params`, `initrd_path` and `kernel_path` will persist in virtual machine configuration, if *False* it will be used for run once. |
| **kernel\_path** string | | Path to a kernel image used to boot the virtual machine. Kernel image must be stored on either the ISO domain or on the host's storage. |
| **kvm** dictionary | | Dictionary of values to be used to connect to kvm and import a virtual machine to oVirt. |
| | **drivers\_iso** string | | The name of the ISO containing drivers that can be used during the *virt-v2v* conversion process. |
| | **name** string | | The name of the KVM virtual machine. |
| | **password** string | | The password to authenticate against the KVM. |
| | **sparse** boolean | **Choices:*** no
* **yes** β
| Specifies the disk allocation policy of the resulting virtual machine. *true* for sparse, *false* for preallocated. |
| | **storage\_domain** string | | Specifies the target storage domain for converted disks. This is required parameter. |
| | **url** string | | The URL to be passed to the *virt-v2v* tool for conversion. For example *qemu:///system*. This is required parameter. |
| | **username** string | | The username to authenticate against the KVM. |
| **lease** string | | Name of the storage domain this virtual machine lease reside on. Pass an empty string to remove the lease. NOTE - Supported since oVirt 4.1. |
| **lun\_mappings** list / elements=dictionary | | Mapper which maps lun between VM's OVF and the destination lun this VM should contain, relevant when `state` is registered. lun\_mappings is described by the following dictionary: |
| | **logical\_unit\_address** string | | The address of the block storage host. |
| | **logical\_unit\_id** string | | The logical unit number to identify a logical unit, |
| | **logical\_unit\_password)** string | | Password to be used to connect to the block storage host. |
| | **logical\_unit\_port** string | | The port being used to connect with the LUN disk. |
| | **logical\_unit\_portal** string | | The portal being used to connect with the LUN disk. |
| | **logical\_unit\_target** string | | The iSCSI specification located on an iSCSI server |
| | **logical\_unit\_username** string | | Username to be used to connect to the block storage host. |
| | **storage\_type** string | | The storage type which the LUN reside on (iscsi or fcp)" |
| **memory** string | | Amount of memory of the Virtual Machine. Prefix uses IEC 60027-2 standard (for example 1GiB, 1024MiB). Default value is set by engine. |
| **memory\_guaranteed** string | | Amount of minimal guaranteed memory of the Virtual Machine. Prefix uses IEC 60027-2 standard (for example 1GiB, 1024MiB).
`memory_guaranteed` parameter can't be lower than `memory` parameter. Default value is set by engine. |
| **memory\_max** string | | Upper bound of virtual machine memory up to which memory hot-plug can be performed. Prefix uses IEC 60027-2 standard (for example 1GiB, 1024MiB). Default value is set by engine. |
| **migrate** boolean | **Choices:*** no
* yes
| If *true*, the VM will migrate to any available host. |
| **name** string | | Name of the Virtual Machine to manage. If VM don't exists `name` is required. Otherwise `id` or `name` can be used. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **next\_run** boolean | **Choices:*** no
* yes
| If *true*, the update will not be applied to the VM immediately and will be only applied when virtual machine is restarted. NOTE - If there are multiple next run configuration changes on the VM, the first change may get reverted if this option is not passed. |
| **nics** list / elements=dictionary | | List of NICs, which should be attached to Virtual Machine. NIC is described by following dictionary. |
| | **interface** string | **Choices:*** **virtio** β
* e1000
* rtl8139
| Type of the network interface. |
| | **mac\_address** string | | Custom MAC address of the network interface, by default it's obtained from MAC pool. NOTE - This parameter is used only when `state` is *running* or *present* and is able to only create NICs. To manage NICs of the VM in more depth please use [ovirt.ovirt.ovirt\_nic](ovirt_nic_module) module instead. |
| | **name** string | | Name of the NIC. |
| | **profile\_name** string | | Profile name where NIC should be attached. |
| **numa\_nodes** list / elements=dictionary | | List of vNUMA Nodes to set for this VM and pin them to assigned host's physical NUMA node. Each vNUMA node is described by following dictionary: |
| | **cores** list / elements=string / required | | List of VM CPU cores indexes to be included in this NUMA node. |
| | **index** string / required | | The index of this NUMA node. |
| | **memory** string / required | | Memory size of the NUMA node in MiB. |
| | **numa\_node\_pins** list / elements=string | | List of physical NUMA node indexes to pin this virtual NUMA node to. |
| **numa\_tune\_mode** string | **Choices:*** interleave
* preferred
* strict
| Set how the memory allocation for NUMA nodes of this VM is applied (relevant if NUMA nodes are set for this VM). It can be one of the following: *interleave*, *preferred* or *strict*. If no value is passed, default value is set by oVirt/RHV engine. |
| **operating\_system** string | | Operating system of the Virtual Machine, for example 'rhel\_8x64'. Default value is set by oVirt/RHV engine. Use the [ovirt.ovirt.ovirt\_vm\_os\_info](ovirt_vm_os_info_module) module to obtain the current list. |
| **placement\_policy** string | | The configuration of the virtual machine's placement policy. If no value is passed, default value is set by oVirt/RHV engine. Placement policy can be one of the following values: |
| | **migratable** string | | Allow manual and automatic migration. |
| | **pinned** string | | Do not allow migration. |
| | **user\_migratable** string | | Allow manual migration only. |
| **placement\_policy\_hosts** list / elements=string | | List of host names. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **quota\_id** string | | Virtual Machine quota ID to be used for disk. By default quota is chosen by oVirt/RHV engine. |
| **reassign\_bad\_macs** boolean | **Choices:*** no
* yes
| Boolean indication whether to reassign bad macs when `state` is registered. |
| **rng\_device** string | | Random number generator (RNG). You can choose of one the following devices *urandom*, *random* or *hwrng*. In order to select *hwrng*, you must have it enabled on cluster first. /dev/urandom is used for cluster version >= 4.1, and /dev/random for cluster version <= 4.0 |
| **role\_mappings** list / elements=dictionary | | Mapper which maps role name between VM's OVF and the destination role this VM should be registered to, relevant when `state` is registered. Role mapping is described by the following dictionary: |
| | **dest\_name** string | | The name of the destination role. |
| | **source\_name** string | | The name of the source role. |
| **serial\_console** boolean | **Choices:*** no
* yes
|
*True* enable VirtIO serial console, *False* to disable it. By default is chosen by oVirt/RHV engine. |
| **serial\_policy** string | **Choices:*** vm
* host
* custom
| Specify a serial number policy for the Virtual Machine. Following options are supported.
`vm` - Sets the Virtual Machine's UUID as its serial number.
`host` - Sets the host's UUID as the Virtual Machine's serial number.
`custom` - Allows you to specify a custom serial number in `serial_policy_value`. |
| **serial\_policy\_value** string | | Allows you to specify a custom serial number. This parameter is used only when `serial_policy` is *custom*. |
| **smartcard\_enabled** boolean | **Choices:*** no
* yes
| If *true*, use smart card authentication. |
| **snapshot\_name** string | | Snapshot to clone VM from. Snapshot with description specified should exist. You have to specify `snapshot_vm` parameter with virtual machine name of this snapshot. |
| **snapshot\_vm** string | | Source VM to clone VM from. VM should have snapshot specified by `snapshot`. If `snapshot_name` specified `snapshot_vm` is required. |
| **soundcard\_enabled** boolean | **Choices:*** no
* yes
| If *true*, the sound card is added to the virtual machine. |
| **sso** boolean | **Choices:*** no
* yes
|
*True* enable Single Sign On by Guest Agent, *False* to disable it. By default is chosen by oVirt/RHV engine. |
| **state** string | **Choices:*** absent
* next\_run
* **present** β
* registered
* running
* stopped
* suspended
* exported
* reboot
| Should the Virtual Machine be running/stopped/present/absent/suspended/next\_run/registered/exported/reboot. When `state` is *registered* and the unregistered VM's name belongs to an already registered in engine VM in the same DC then we fail to register the unregistered template.
*present* state will create/update VM and don't change its state if it already exists.
*running* state will create/update VM and start it.
*next\_run* state updates the VM and if the VM has next run configuration it will be rebooted. Please check *notes* to more detailed description of states.
*exported* state will export the VM to export domain or as OVA.
*registered* is supported since 2.4.
*reboot* is supported since 2.10, virtual machine is rebooted only if it's in up state. |
| **stateless** boolean | **Choices:*** no
* yes
| If *yes* Virtual Machine will be set as stateless. If *no* Virtual Machine will be unset as stateless. If no value is passed, default value is set by oVirt/RHV engine. |
| **storage\_domain** string | | Name of the storage domain where all template disks should be created. This parameter is considered only when `template` is provided. IMPORTANT - This parameter is not idempotent, if the VM exists and you specify different storage domain, disk won't move. |
| **sysprep** dictionary | | Dictionary with values for Windows Virtual Machine initialization using sysprep. |
| | **active\_directory\_ou** string | | Active Directory Organizational Unit, to be used for login of user. |
| | **custom\_script** string | | A custom Sysprep definition in the format of a complete unattended installation answer file. |
| | **domain** string | | Domain to be set to Windows Virtual Machine. |
| | **host\_name** string | | Hostname to be set to Virtual Machine when deployed. |
| | **input\_locale** string | | Input localization of the Windows Virtual Machine. |
| | **org\_name** string | | Organization name to be set to Windows Virtual Machine. |
| | **root\_password** string | | Password to be set for username to Windows Virtual Machine. |
| | **system\_locale** string | | System localization of the Windows Virtual Machine. |
| | **timezone** string | | Timezone to be set to Windows Virtual Machine. |
| | **ui\_language** string | | UI language of the Windows Virtual Machine. |
| | **user\_name** string | | Username to be used for set password to Windows Virtual Machine. |
| | **windows\_license\_key** string | | License key to be set to Windows Virtual Machine. |
| **template** string | | Name of the template, which should be used to create Virtual Machine. Required if creating VM. If template is not specified and VM doesn't exist, VM will be created from *Blank* template. |
| **template\_version** integer | | Version number of the template to be used for VM. By default the latest available version of the template is used. |
| **ticket** boolean | **Choices:*** no
* yes
| If *true*, in addition return *remote\_vv\_file* inside *vm* dictionary, which contains compatible content for remote-viewer application. Works only `state` is *running*. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **timezone** string | | Sets time zone offset of the guest hardware clock. For example `Etc/GMT`
|
| **type** string | **Choices:*** desktop
* server
* high\_performance
| Type of the Virtual Machine. Default value is set by oVirt/RHV engine.
*high\_performance* is supported since Ansible 2.5 and oVirt/RHV 4.2. |
| **usb\_support** boolean | **Choices:*** no
* yes
|
*True* enable USB support, *False* to disable it. By default is chosen by oVirt/RHV engine. |
| **use\_latest\_template\_version** boolean | **Choices:*** no
* yes
| Specify if latest template version should be used, when running a stateless VM. If this parameter is set to *yes* stateless VM is created. |
| **vmware** dictionary | | Dictionary of values to be used to connect to VMware and import a virtual machine to oVirt. |
| | **drivers\_iso** string | | The name of the ISO containing drivers that can be used during the *virt-v2v* conversion process. |
| | **password** string | | The password to authenticate against the VMware. |
| | **sparse** boolean | **Choices:*** no
* **yes** β
| Specifies the disk allocation policy of the resulting virtual machine. *true* for sparse, *false* for preallocated. |
| | **storage\_domain** string | | Specifies the target storage domain for converted disks. This is required parameter. |
| | **url** string | | The URL to be passed to the *virt-v2v* tool for conversion. For example *vpx://wmware\_user@vcenter-host/DataCenter/Cluster/esxi-host?no\_verify=1*
|
| | **username** string | | The username to authenticate against the VMware. |
| **vnic\_profile\_mappings** list / elements=dictionary | | Mapper which maps an external virtual NIC profile to one that exists in the engine when `state` is registered. vnic\_profile is described by the following dictionary: |
| | **source\_network\_name** string | | The network name of the source network. |
| | **source\_profile\_name** string | | The profile name related to the source network. |
| | **target\_profile\_id** string | | The id of the target profile id to be mapped to in the engine. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
| **watchdog** dictionary | | Assign watchdog device for the virtual machine. Watchdogs is a dictionary which can have following values: |
| | **action** string | | Watchdog action to be performed when watchdog is triggered. For example: *none*, *reset*, *poweroff*, *pause* or *dump*. |
| | **model** string | | Model of the watchdog device. For example: *i6300esb*, *diag288* or *null*. |
| **xen** dictionary | | Dictionary of values to be used to connect to XEN and import a virtual machine to oVirt. |
| | **drivers\_iso** string | | The name of the ISO containing drivers that can be used during the *virt-v2v* conversion process. |
| | **sparse** boolean | **Choices:*** no
* **yes** β
| Specifies the disk allocation policy of the resulting virtual machine. *true* for sparse, *false* for preallocated. |
| | **storage\_domain** string | | Specifies the target storage domain for converted disks. This is required parameter. |
| | **url** string | | The URL to be passed to the *virt-v2v* tool for conversion. For example *xen+ssh://[email protected]*. This is required parameter. |
Notes
-----
Note
* If VM is in *UNASSIGNED* or *UNKNOWN* state before any operation, the module will fail. If VM is in *IMAGE\_LOCKED* state before any operation, we try to wait for VM to be *DOWN*. If VM is in *SAVING\_STATE* state before any operation, we try to wait for VM to be *SUSPENDED*. If VM is in *POWERING\_DOWN* state before any operation, we try to wait for VM to be *UP* or *DOWN*. VM can get into *UP* state from *POWERING\_DOWN* state, when there is no ACPI or guest agent running inside VM, or if the shutdown operation fails. When user specify *UP* `state`, we always wait to VM to be in *UP* state in case VM is *MIGRATING*, *REBOOTING*, *POWERING\_UP*, *RESTORING\_STATE*, *WAIT\_FOR\_LAUNCH*. In other states we run start operation on VM. When user specify *stopped* `state`, and If user pass `force` parameter set to *true* we forcibly stop the VM in any state. If user donβt pass `force` parameter, we always wait to VM to be in UP state in case VM is *MIGRATING*, *REBOOTING*, *POWERING\_UP*, *RESTORING\_STATE*, *WAIT\_FOR\_LAUNCH*. If VM is in *PAUSED* or *SUSPENDED* state, we start the VM. Then we gracefully shutdown the VM. When user specify *suspended* `state`, we always wait to VM to be in UP state in case VM is *MIGRATING*, *REBOOTING*, *POWERING\_UP*, *RESTORING\_STATE*, *WAIT\_FOR\_LAUNCH*. If VM is in *PAUSED* or *DOWN* state, we start the VM. Then we suspend the VM. When user specify *absent* `state`, we forcibly stop the VM in any state and remove it.
* If you update a VM parameter that requires a reboot, the oVirt engine always creates a new snapshot for the VM, and an Ansible playbook will report this as changed.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
- name: Creates a new Virtual Machine from template named 'rhel7_template'
ovirt.ovirt.ovirt_vm:
state: present
name: myvm
template: rhel7_template
cluster: mycluster
- name: Register VM
ovirt.ovirt.ovirt_vm:
state: registered
storage_domain: mystorage
cluster: mycluster
name: myvm
- name: Register VM using id
ovirt.ovirt.ovirt_vm:
state: registered
storage_domain: mystorage
cluster: mycluster
id: 1111-1111-1111-1111
- name: Register VM, allowing partial import
ovirt.ovirt.ovirt_vm:
state: registered
storage_domain: mystorage
allow_partial_import: "True"
cluster: mycluster
id: 1111-1111-1111-1111
- name: Register VM with vnic profile mappings and reassign bad macs
ovirt.ovirt.ovirt_vm:
state: registered
storage_domain: mystorage
cluster: mycluster
id: 1111-1111-1111-1111
vnic_profile_mappings:
- source_network_name: mynetwork
source_profile_name: mynetwork
target_profile_id: 3333-3333-3333-3333
- source_network_name: mynetwork2
source_profile_name: mynetwork2
target_profile_id: 4444-4444-4444-4444
reassign_bad_macs: "True"
- name: Register VM with mappings
ovirt.ovirt.ovirt_vm:
state: registered
storage_domain: mystorage
cluster: mycluster
id: 1111-1111-1111-1111
role_mappings:
- source_name: Role_A
dest_name: Role_B
domain_mappings:
- source_name: Domain_A
dest_name: Domain_B
lun_mappings:
- source_storage_type: iscsi
source_logical_unit_id: 1IET_000d0001
source_logical_unit_port: 3260
source_logical_unit_portal: 1
source_logical_unit_address: 10.34.63.203
source_logical_unit_target: iqn.2016-08-09.brq.str-01:omachace
dest_storage_type: iscsi
dest_logical_unit_id: 1IET_000d0002
dest_logical_unit_port: 3260
dest_logical_unit_portal: 1
dest_logical_unit_address: 10.34.63.204
dest_logical_unit_target: iqn.2016-08-09.brq.str-02:omachace
affinity_group_mappings:
- source_name: Affinity_A
dest_name: Affinity_B
affinity_label_mappings:
- source_name: Label_A
dest_name: Label_B
cluster_mappings:
- source_name: cluster_A
dest_name: cluster_B
- name: Creates a stateless VM which will always use latest template version
ovirt.ovirt.ovirt_vm:
name: myvm
template: rhel7
cluster: mycluster
use_latest_template_version: true
# Creates a new server rhel7 Virtual Machine from Blank template
# on brq01 cluster with 2GiB memory and 2 vcpu cores/sockets
# and attach bootable disk with name rhel7_disk and attach virtio NIC
- ovirt.ovirt.ovirt_vm:
state: present
cluster: brq01
name: myvm
memory: 2GiB
cpu_cores: 2
cpu_sockets: 2
cpu_shares: 1024
type: server
operating_system: rhel_7x64
disks:
- name: rhel7_disk
bootable: True
nics:
- name: nic1
# Change VM Name
- ovirt.ovirt.ovirt_vm:
id: 00000000-0000-0000-0000-000000000000
name: "new_vm_name"
- name: Run VM with cloud init
ovirt.ovirt.ovirt_vm:
name: rhel7
template: rhel7
cluster: Default
memory: 1GiB
high_availability: true
high_availability_priority: 50 # Available from Ansible 2.5
cloud_init:
dns_servers: '8.8.8.8 8.8.4.4'
nic_boot_protocol: static
nic_ip_address: 10.34.60.86
nic_netmask: 255.255.252.0
nic_gateway: 10.34.63.254
nic_name: eth1
host_name: example.com
custom_script: |
write_files:
- content: |
Hello, world!
path: /tmp/greeting.txt
permissions: '0644'
user_name: root
root_password: super_password
- name: Run VM with cloud init, with multiple network interfaces
ovirt.ovirt.ovirt_vm:
name: rhel7_4
template: rhel7
cluster: mycluster
cloud_init_nics:
- nic_name: eth0
nic_boot_protocol: dhcp
- nic_name: eth1
nic_boot_protocol: static
nic_ip_address: 10.34.60.86
nic_netmask: 255.255.252.0
nic_gateway: 10.34.63.254
# IP version 6 parameters are supported since ansible 2.9
- nic_name: eth2
nic_boot_protocol_v6: static
nic_ip_address_v6: '2620:52:0:2282:b898:1f69:6512:36c5'
nic_gateway_v6: '2620:52:0:2282:b898:1f69:6512:36c9'
nic_netmask_v6: '120'
- nic_name: eth3
nic_boot_protocol_v6: dhcp
- name: Run VM with sysprep
ovirt.ovirt.ovirt_vm:
name: windows2012R2_AD
template: windows2012R2
cluster: Default
memory: 3GiB
high_availability: true
sysprep:
host_name: windowsad.example.com
user_name: Administrator
root_password: SuperPassword123
- name: Migrate/Run VM to/on host named 'host1'
ovirt.ovirt.ovirt_vm:
state: running
name: myvm
host: host1
- name: Migrate/Run VM to/on host named 'host1' on cluster 'cluster1'
ovirt.ovirt.ovirt_vm:
state: running
name: myvm
host: host1
cluster: cluster1
- name: Migrate VM to any available host
ovirt.ovirt.ovirt_vm:
state: running
name: myvm
migrate: true
- name: Change VMs CD
ovirt.ovirt.ovirt_vm:
name: myvm
cd_iso: drivers.iso
- name: Eject VMs CD
ovirt.ovirt.ovirt_vm:
name: myvm
cd_iso: ''
- name: Boot VM from CD
ovirt.ovirt.ovirt_vm:
name: myvm
cd_iso: centos7_x64.iso
boot_devices:
- cdrom
- name: Stop vm
ovirt.ovirt.ovirt_vm:
state: stopped
name: myvm
- name: Upgrade memory to already created VM
ovirt.ovirt.ovirt_vm:
name: myvm
memory: 4GiB
- name: Hot plug memory to already created and running VM (VM won't be restarted)
ovirt.ovirt.ovirt_vm:
name: myvm
memory: 4GiB
# Create/update a VM to run with two vNUMA nodes and pin them to physical NUMA nodes as follows:
# vnuma index 0-> numa index 0, vnuma index 1-> numa index 1
- name: Create a VM to run with two vNUMA nodes
ovirt.ovirt.ovirt_vm:
name: myvm
cluster: mycluster
numa_tune_mode: "interleave"
numa_nodes:
- index: 0
cores: [0]
memory: 20
numa_node_pins: [0]
- index: 1
cores: [1]
memory: 30
numa_node_pins: [1]
- name: Update an existing VM to run without previously created vNUMA nodes (i.e. remove all vNUMA nodes+NUMA pinning setting)
ovirt.ovirt.ovirt_vm:
name: myvm
cluster: mycluster
state: "present"
numa_tune_mode: "interleave"
numa_nodes:
- index: -1
# When change on the VM needs restart of the VM, use next_run state,
# The VM will be updated and rebooted if there are any changes.
# If present state would be used, VM won't be restarted.
- ovirt.ovirt.ovirt_vm:
state: next_run
name: myvm
boot_devices:
- network
- name: Import virtual machine from VMware
ovirt.ovirt.ovirt_vm:
state: stopped
cluster: mycluster
name: vmware_win10
timeout: 1800
poll_interval: 30
vmware:
url: vpx://[email protected]/Folder1/Cluster1/2.3.4.5?no_verify=1
name: windows10
storage_domain: mynfs
username: user
password: password
- name: Create vm from template and create all disks on specific storage domain
ovirt.ovirt.ovirt_vm:
name: vm_test
cluster: mycluster
template: mytemplate
storage_domain: mynfs
nics:
- name: nic1
- name: Remove VM, if VM is running it will be stopped
ovirt.ovirt.ovirt_vm:
state: absent
name: myvm
# Defining a specific quota for a VM:
# Since Ansible 2.5
- ovirt.ovirt.ovirt_quotas_info:
data_center: Default
name: myquota
register: ovirt_quotas
- ovirt.ovirt.ovirt_vm:
name: myvm
sso: False
boot_menu: True
bios_type: q35_ovmf
usb_support: True
serial_console: True
quota_id: "{{ ovirt_quotas[0]['id'] }}"
- name: Create a VM that has the console configured for both Spice and VNC
ovirt.ovirt.ovirt_vm:
name: myvm
template: mytemplate
cluster: mycluster
graphical_console:
protocol:
- spice
- vnc
# Execute remote viewer to VM
- block:
- name: Create a ticket for console for a running VM
ovirt.ovirt.ovirt_vm:
name: myvm
ticket: true
state: running
register: myvm
- name: Save ticket to file
ansible.builtin.copy:
content: "{{ myvm.vm.remote_vv_file }}"
dest: ~/vvfile.vv
- name: Run remote viewer with file
ansible.builtin.command: remote-viewer ~/vvfile.vv
# Default value of host_device state is present
- name: Attach host devices to virtual machine
ovirt.ovirt.ovirt_vm:
name: myvm
host: myhost
placement_policy: pinned
host_devices:
- name: pci_0000_00_06_0
- name: pci_0000_00_07_0
state: absent
- name: pci_0000_00_08_0
state: present
- name: Add placement policy with multiple hosts
ovirt.ovirt.ovirt_vm:
name: myvm
placement_policy: migratable
placement_policy_hosts:
- host1
- host2
- name: Export the VM as OVA
ovirt.ovirt.ovirt_vm:
name: myvm
state: exported
cluster: mycluster
export_ova:
host: myhost
filename: myvm.ova
directory: /tmp/
- name: Clone VM from snapshot
ovirt.ovirt.ovirt_vm:
snapshot_vm: myvm
snapshot_name: myvm_snap
name: myvm_clone
state: present
- name: Import external ova VM
ovirt.ovirt.ovirt_vm:
cluster: mycluster
name: myvm
host: myhost
timeout: 1800
poll_interval: 30
kvm:
name: myvm
url: ova:///path/myvm.ova
storage_domain: mystorage
- name: Cpu pinning of 0#12_1#13_2#14_3#15
ovirt.ovirt.ovirt_vm:
state: present
cluster: mycluster
name: myvm
cpu_pinning:
- cpu: 12
vcpu: 0
- cpu: 13
vcpu: 1
- cpu: 14
vcpu: 2
- cpu: 15
vcpu: 3
```
Return Values
-------------
Common return 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 | On success if VM is found. | ID of the VM which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **vm** dictionary | On success if VM is found. | Dictionary of all the VM attributes. VM attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/vm. Additionally when user sent ticket=true, this module will return also remote\_vv\_file parameter in vm dictionary, which contains remote-viewer compatible file to open virtual machine console. Please note that this file contains sensible information. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
| programming_docs |
ansible ovirt.ovirt.ovirt_network β Module to manage logical networks in oVirt/RHV ovirt.ovirt.ovirt\_network β Module to manage logical networks in oVirt/RHV
===========================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_network`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage logical networks in oVirt/RHV
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **clusters** list / elements=dictionary | | List of dictionaries describing how the network is managed in specific cluster. |
| | **assigned** boolean | **Choices:*** no
* yes
|
*true* if the network should be assigned to cluster. Default is *true*. |
| | **display** boolean | **Choices:*** no
* yes
|
*true* if the network should marked as display network. |
| | **gluster** boolean | **Choices:*** no
* yes
|
*true* if the network should marked as gluster network. |
| | **migration** boolean | **Choices:*** no
* yes
|
*true* if the network should marked as migration network. |
| | **name** string | | Cluster name. |
| | **required** boolean | **Choices:*** no
* yes
|
*true* if the network must remain operational for all hosts associated with this network. |
| **comment** string | | Comment of the network. |
| **data\_center** string / required | | Datacenter name where network reside. |
| **description** string | | Description of the network. |
| **external\_provider** string | | Name of external network provider. At first it tries to import the network when not found it will create network in external provider. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **id** string | | ID of the network to manage. |
| **label** string | | Name of the label to assign to the network. |
| **mtu** integer | | Maximum transmission unit (MTU) of the network. |
| **name** string / required | | Name of the network to manage. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **state** string | **Choices:*** **present** β
* absent
| Should the network be present or absent |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **vlan\_tag** integer | | Specify VLAN tag. NOTE - To remove the vlan\_tag use -1. |
| **vm\_network** boolean | **Choices:*** no
* yes
| If *True* network will be marked as network for VM. VM network carries traffic relevant to the virtual machine. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Create network
- ovirt.ovirt.ovirt_network:
data_center: mydatacenter
name: mynetwork
vlan_tag: 10
vm_network: true
# Remove network
- ovirt.ovirt.ovirt_network:
state: absent
name: mynetwork
# Change Network Name
- ovirt.ovirt.ovirt_network:
id: 00000000-0000-0000-0000-000000000000
name: "new_network_name"
data_center: mydatacenter
# Add network from external provider
- ovirt.ovirt.ovirt_network:
data_center: mydatacenter
name: mynetwork
external_provider: ovirt-provider-ovn
# Remove vlan_tag
- ovirt.ovirt.ovirt_network:
data_center: mydatacenter
name: mynetwork
vlan_tag: -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 |
| --- | --- | --- |
| **id** string | On success if network is found. | ID of the managed network **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **network** dictionary | On success if network is found. | Dictionary of all the network attributes. Network attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/network. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_quota_info β Retrieve information about one or more oVirt/RHV quotas ovirt.ovirt.ovirt\_quota\_info β Retrieve information about one or more oVirt/RHV quotas
========================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_quota_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV quotas.
* This module was called `ovirt_quota_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_quota\_info](#ansible-collections-ovirt-ovirt-ovirt-quota-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **data\_center** string / required | | Name of the datacenter where quota resides. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **name** string | | Name of the quota, can be used as glob expression. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
Notes
-----
Note
* This module returns a variable `ovirt_quotas`, which contains a list of quotas. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about quota named C<myquota> in Default datacenter:
- ovirt.ovirt.ovirt_quota_info:
data_center: Default
name: myquota
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_quotas }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_quotas** list / elements=string | On success. | List of dictionaries describing the quotas. Quota attributes are mapped to dictionary keys, all quotas attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/quota. |
### Authors
* Maor Lipchuk (@machacekondra)
ansible ovirt.ovirt.ovirt_storage_connection β Module to manage storage connections in oVirt ovirt.ovirt.ovirt\_storage\_connection β Module to manage storage connections in oVirt
======================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_storage_connection`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage storage connections in oVirt
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string | | Address of the storage server. E.g.: myserver.mydomain.com |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **force** boolean | **Choices:*** **no** β
* yes
| This parameter is relevant only when updating a connection. If *true* the storage domain don't have to be in *MAINTENANCE* state, so the storage connection is updated. |
| **id** string | | Id of the storage connection to manage. |
| **mount\_options** string | | Option which will be passed when mounting storage. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **nfs\_retrans** integer | | The number of times to retry a request before attempting further recovery actions. Range 0 to 65535. |
| **nfs\_timeout** integer | | The time in tenths of a second to wait for a response before retrying NFS requests. Range 0 to 65535. |
| **nfs\_version** string | | NFS version. One of: *auto*, *v3*, *v4* or *v4\_1*. |
| **password** string | | A CHAP password for logging into a target. |
| **path** string | | Path of the mount point of the storage. E.g.: /path/to/my/data |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **port** integer | | Port of the iSCSI storage server. |
| **state** string | **Choices:*** **present** β
* absent
| Should the storage connection be present or absent. |
| **storage** string | | Name of the storage domain to be used with storage connection. |
| **target** string | | The target IQN for the storage device. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **type** string | | Storage type. For example: *nfs*, *iscsi*, etc. |
| **username** string | | A CHAP username for logging into a target. |
| **vfs\_type** string | | Virtual File System type. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Add new storage connection:
- ovirt.ovirt.ovirt_storage_connection:
storage: myiscsi
address: 10.34.63.199
target: iqn.2016-08-09.domain-01:nickname
port: 3260
type: iscsi
# Update the existing storage connection address:
- ovirt.ovirt.ovirt_storage_connection:
id: 26915c96-92ff-47e5-9e77-b581db2f2d36
address: 10.34.63.204
force: true
# Remove storage connection:
- ovirt.ovirt.ovirt_storage_connection:
id: 26915c96-92ff-47e5-9e77-b581db2f2d36
```
Return Values
-------------
Common return 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 | On success if storage connection is found. | ID of the storage connection which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **storage\_connection** dictionary | On success if storage connection is found. | Dictionary of all the storage connection attributes. Storage connection attributes can be found on your oVirt instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/storage\_connection. |
### Authors
* Ondra Machacek (@machacekondra)
| programming_docs |
ansible ovirt.ovirt.ovirt_cluster_info β Retrieve information about one or more oVirt/RHV clusters ovirt.ovirt.ovirt\_cluster\_info β Retrieve information about one or more oVirt/RHV clusters
============================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_cluster_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV clusters.
* This module was called `ovirt_cluster_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_cluster\_info](#ansible-collections-ovirt-ovirt-ovirt-cluster-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **pattern** string | | Search term which is accepted by oVirt/RHV search backend. For example to search cluster X from datacenter Y use following pattern: name=X and datacenter=Y |
Notes
-----
Note
* This module returns a variable `ovirt_clusters`, which contains a list of clusters. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all clusters which names start with C<production>:
- ovirt.ovirt.ovirt_cluster_info:
pattern:
name: 'production*'
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_clusters }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_clusters** list / elements=string | On success. | List of dictionaries describing the clusters. Cluster attributes are mapped to dictionary keys, all clusters attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/cluster. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_scheduling_policy_info β Retrieve information about one or more oVirt scheduling policies ovirt.ovirt.ovirt\_scheduling\_policy\_info β Retrieve information about one or more oVirt scheduling policies
==============================================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_scheduling_policy_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt scheduling policies.
* This module was called `ovirt_scheduling_policy_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_scheduling\_policy\_info](#ansible-collections-ovirt-ovirt-ovirt-scheduling-policy-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **id** string | | ID of the scheduling policy. |
| **name** string | | Name of the scheduling policy, can be used as glob expression. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
Notes
-----
Note
* This module returns a variable `ovirt_scheduling_policies`, which contains a list of scheduling policies. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all scheduling policies with name InClusterUpgrade:
- ovirt.ovirt.ovirt_scheduling_policy_info:
name: InClusterUpgrade
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_scheduling_policies }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_scheduling\_policies** list / elements=string | On success. | List of dictionaries describing the scheduling policies. Scheduling policies attributes are mapped to dictionary keys, all scheduling policies attributes can be found at following url: https://ovirt.example.com/ovirt-engine/api/model#types/scheduling\_policy. |
### Authors
* Ondra Machacek (@machacekondra)
ansible ovirt.ovirt.ovirt_affinity_label β Module to manage affinity labels in oVirt/RHV ovirt.ovirt.ovirt\_affinity\_label β Module to manage affinity labels in oVirt/RHV
==================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_affinity_label`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module manage affinity labels in oVirt/RHV. It can also manage assignments of those labels to hosts and VMs.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **cluster** string | | Name of the cluster where vms and hosts resides. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **hosts** list / elements=string | | List of the hosts names, which should have assigned this affinity label. |
| **name** string / required | | Name of the affinity label to manage. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **state** string | **Choices:*** **present** β
* absent
| Should the affinity label be present or absent. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **vms** list / elements=string | | List of the VMs names, which should have assigned this affinity label. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Create(if not exists) and assign affinity label to vms vm1 and vm2 and host host1
- ovirt.ovirt.ovirt_affinity_label:
name: mylabel
cluster: mycluster
vms:
- vm1
- vm2
hosts:
- host1
# To detach all VMs from label
- ovirt.ovirt.ovirt_affinity_label:
name: mylabel
cluster: mycluster
vms: []
# Remove affinity label
- ovirt.ovirt.ovirt_affinity_label:
state: absent
name: mylabel
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **affinity\_label** dictionary | On success if affinity label is found. | Dictionary of all the affinity label attributes. Affinity label attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/affinity\_label. |
| **id** string | On success if affinity label is found. | ID of the affinity label which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible ovirt.ovirt.stdout β Output the log of ansible ovirt.ovirt.stdout β Output the log of ansible
==============================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.stdout`.
New in version 2.0: of ovirt.ovirt
Synopsis
--------
* This callback output the log of ansible play tasks.
ansible ovirt.ovirt.ovirt_datacenter_info β Retrieve information about one or more oVirt/RHV datacenters ovirt.ovirt.ovirt\_datacenter\_info β Retrieve information about one or more oVirt/RHV datacenters
==================================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_datacenter_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV datacenters.
* This module was called `ovirt_datacenter_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_datacenter\_info](#ansible-collections-ovirt-ovirt-ovirt-datacenter-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **pattern** string | | Search term which is accepted by oVirt/RHV search backend. For example to search datacenter *X* use following pattern: *name=X*
|
Notes
-----
Note
* This module returns a variable `ovirt_datacenters`, which contains a list of datacenters. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all data centers which names start with C(production):
- ovirt.ovirt.ovirt_datacenter_info:
pattern: name=production*
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_datacenters }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_datacenters** list / elements=string | On success. | List of dictionaries describing the datacenters. Datacenter attributes are mapped to dictionary keys, all datacenters attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/data\_center. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
| programming_docs |
ansible ovirt.ovirt.ovirt_tag β Module to manage tags in oVirt/RHV ovirt.ovirt.ovirt\_tag β Module to manage tags in oVirt/RHV
===========================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_tag`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module manage tags in oVirt/RHV. It can also manage assignments of those tags to entities.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **description** string | | Description of the tag to manage. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **hosts** list / elements=string | | List of the hosts names, which should have assigned this tag. |
| **id** string | | ID of the tag to manage. |
| **name** string / required | | Name of the tag to manage. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **parent** string | | Name of the parent tag. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **state** string | **Choices:*** **present** β
* absent
* attached
* detached
| Should the tag be present/absent/attached/detached.
`Note`: *attached* and *detached* states are supported since version 2.4. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **vms** list / elements=string | | List of the VMs names, which should have assigned this tag. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Create(if not exists) and assign tag to vms vm1 and vm2:
- ovirt.ovirt.ovirt_tag:
name: mytag
vms:
- vm1
- vm2
# Attach a tag to VM 'vm3', keeping the rest already attached tags on VM:
- ovirt.ovirt.ovirt_tag:
name: mytag
state: attached
vms:
- vm3
# Detach a tag from VM 'vm3', keeping the rest already attached tags on VM:
- ovirt.ovirt.ovirt_tag:
name: mytag
state: detached
vms:
- vm3
# To detach all VMs from tag:
- ovirt.ovirt.ovirt_tag:
name: mytag
vms: []
# Remove tag
- ovirt.ovirt.ovirt_tag:
state: absent
name: mytag
# Change Tag Name
- ovirt.ovirt.ovirt_tag:
id: 00000000-0000-0000-0000-000000000000
name: "new_tag_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 |
| --- | --- | --- |
| **id** string | On success if tag is found. | ID of the tag which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **tag** dictionary | On success if tag is found. | Dictionary of all the tag attributes. Tag attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/tag. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_job β Module to manage jobs in oVirt/RHV ovirt.ovirt.ovirt\_job β Module to manage jobs in oVirt/RHV
===========================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_job`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module manage jobs in oVirt/RHV. It can also manage steps of the job.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **description** string / required | | Description of the job. When task with same description has already finished and you rerun taks it will create new job. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **state** string | **Choices:*** **present** β
* absent
* started
* finished
* failed
| Should the job be `present`/`absent`/`failed`.
`started` is alias for `present`. `finished` is alias for `absent`. Same in the steps. Note when `finished`/`failed` it will finish/fail all steps. |
| **steps** list / elements=dictionary | | The steps of the job. |
| | **description** string / required | | Description of the step. |
| | **state** string | **Choices:*** **present** β
* absent
* started
* finished
* failed
| Should the step be present/absent/failed. Note when one step fail whole job will fail Note when all steps are finished it will finish job. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
- name: Create job with two steps
ovirt.ovirt.ovirt_job:
description: job_name
steps:
- description: step_name_A
- description: step_name_B
- name: Finish one step
ovirt.ovirt.ovirt_job:
description: job_name
steps:
- description: step_name_A
state: finished
- name: When you fail one step whole job will stop
ovirt.ovirt.ovirt_job:
description: job_name
steps:
- description: step_name_B
state: failed
- name: Finish all steps
ovirt.ovirt.ovirt_job:
description: job_name
state: 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 |
| --- | --- | --- |
| **id** string | On success if job is found. | ID of the job which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **job** dictionary | On success if job is found. | Dictionary of all the job attributes. Job attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/job. |
### Authors
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_system_option_info β Retrieve information about one oVirt/RHV system options. ovirt.ovirt.ovirt\_system\_option\_info β Retrieve information about one oVirt/RHV system options.
==================================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_system_option_info`.
New in version 1.3.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one oVirt/RHV system options.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **name** string | | Name of system option. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **version** string | | The version of the option. |
Notes
-----
Note
* This module returns a variable `ovirt_system_option_info`, which contains a dict of system option. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
- ovirt.ovirt.ovirt_system_option_info:
name: "ServerCPUList"
version: "4.4"
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_system_option }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_system\_option** dictionary | On success. | Dictionary describing the system option. Option attributes are mapped to dictionary keys, all option attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/system\_option. |
### Authors
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_tag_info β Retrieve information about one or more oVirt/RHV tags ovirt.ovirt.ovirt\_tag\_info β Retrieve information about one or more oVirt/RHV tags
====================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_tag_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV tags.
* This module was called `ovirt_tag_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_tag\_info](#ansible-collections-ovirt-ovirt-ovirt-tag-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **host** string | | Name of the host, which tags should be listed. |
| **name** string | | Name of the tag which should be listed. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **vm** string | | Name of the VM, which tags should be listed. |
Notes
-----
Note
* This module returns a variable `ovirt_tags`, which contains a list of tags. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all tags, which names start with C(tag):
- ovirt.ovirt.ovirt_tag_info:
name: tag*
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_tags }}"
# Gather information about all tags, which are assigned to VM C(postgres):
- ovirt.ovirt.ovirt_tag_info:
vm: postgres
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_tags }}"
# Gather information about all tags, which are assigned to host C(west):
- ovirt.ovirt.ovirt_tag_info:
host: west
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_tags }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_tags** list / elements=string | On success. | List of dictionaries describing the tags. Tags attributes are mapped to dictionary keys, all tags attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/tag. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
| programming_docs |
ansible ovirt.ovirt.ovirt_storage_vm_info β Retrieve information about one or more oVirt/RHV virtual machines relate to a storage domain. ovirt.ovirt.ovirt\_storage\_vm\_info β Retrieve information about one or more oVirt/RHV virtual machines relate to a storage domain.
====================================================================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_storage_vm_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV virtual machines relate to a storage domain.
* This module was called `ovirt_storage_vm_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_storage\_vm\_info](#ansible-collections-ovirt-ovirt-ovirt-storage-vm-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **max** integer | | Sets the maximum number of virtual machines to return. If not specified all the virtual machines are returned. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **storage\_domain** string | | The storage domain name where the virtual machines should be listed. |
| **unregistered** boolean | **Choices:*** **no** β
* yes
| Flag which indicates whether to get unregistered virtual machines which contain one or more disks which reside on a storage domain or diskless virtual machines. |
Notes
-----
Note
* This module returns a variable `ovirt_storage_vms`, which contains a list of virtual machines. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all VMs which relate to a storage domain and
# are unregistered:
- ovirt.ovirt.ovirt_storage_vm_info:
unregistered=True
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_storage_vms }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_storage\_vms** list / elements=string | On success. | List of dictionaries describing the VMs. VM attributes are mapped to dictionary keys, all VMs attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/vm. |
### Authors
* Maor Lipchuk (@machacekondra)
ansible ovirt.ovirt.ovirt_external_provider β Module to manage external providers in oVirt/RHV ovirt.ovirt.ovirt\_external\_provider β Module to manage external providers in oVirt/RHV
========================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_external_provider`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage external providers in oVirt/RHV
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **authentication\_keys** list / elements=dictionary | **Default:**[] | List of authentication keys. When you will not pass these keys and there are already some of them defined in the system they will be removed. Applicable for *os\_volume*.
aliases: auth\_keys |
| | **uuid** string | | The uuid which will be used. |
| | **value** string | | The value which will be used. |
| **authentication\_url** string | | Keystone authentication URL of the openstack provider. Applicable for those types: *os\_image*, *os\_volume* and *network*.
aliases: auth\_url |
| **data\_center** string | | Name of the data center where provider should be attached. Applicable for those type: *os\_volume*. |
| **description** string | | Description of the external provider. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **name** string | | Name of the external provider to manage. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **network\_type** string | **Choices:*** **external** β
* neutron
| Type of the external network provider either external (for example OVN) or neutron. Applicable if `type` is *network*. |
| **password** string | | Password of the user specified in `username` parameter. Applicable for all types. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **read\_only** boolean | **Choices:*** no
* yes
| Specify if the network should be read only. Applicable if `type` is *network*. |
| **state** string | **Choices:*** **present** β
* absent
| Should the external be present or absent When you are using absent for *os\_volume*, you need to make sure that SD is not attached to the data center! |
| **tenant\_name** string | | Name of the tenant. Applicable for those types: *os\_image*, *os\_volume* and *network*.
aliases: tenant |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **type** string / required | **Choices:*** os\_image
* network
* os\_volume
* foreman
| Type of the external provider.
aliases: provider |
| **url** string | | URL where external provider is hosted. Applicable for those types: *os\_image*, *os\_volume*, *network* and *foreman*. |
| **username** string | | Username to be used for login to external provider. Applicable for all types. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Add image external provider:
- ovirt.ovirt.ovirt_external_provider:
name: image_provider
type: os_image
url: http://1.2.3.4:9292
username: admin
password: 123456
tenant: admin
auth_url: http://1.2.3.4:35357/v2.0
# Add volume external provider:
- ovirt.ovirt.ovirt_external_provider:
name: image_provider
type: os_volume
url: http://1.2.3.4:9292
username: admin
password: 123456
tenant: admin
auth_url: http://1.2.3.4:5000/v2.0
authentication_keys:
-
uuid: "1234567-a1234-12a3-a234-123abc45678"
value: "ABCD00000000111111222333445w=="
# Add foreman provider:
- ovirt.ovirt.ovirt_external_provider:
name: foreman_provider
type: foreman
url: https://foreman.example.com
username: admin
password: 123456
# Add external network provider for OVN:
- ovirt.ovirt.ovirt_external_provider:
name: ovn_provider
type: network
network_type: external
url: http://1.2.3.4:9696
# Remove image external provider:
- ovirt.ovirt.ovirt_external_provider:
state: absent
name: image_provider
type: os_image
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **external\_host\_provider** dictionary | On success and if parameter 'type: foreman' is used. | Dictionary of all the external\_host\_provider attributes. External provider attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/external\_host\_provider. |
| **id** string | On success if external provider is found. | ID of the external provider which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **openstack\_image\_provider** dictionary | On success and if parameter 'type: os\_image' is used. | Dictionary of all the openstack\_image\_provider attributes. External provider attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/openstack\_image\_provider. |
| **openstack\_network\_provider** dictionary | On success and if parameter 'type: network' is used. | Dictionary of all the openstack\_network\_provider attributes. External provider attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/openstack\_network\_provider. |
| **openstack\_volume\_provider** dictionary | On success and if parameter 'type: os\_volume' is used. | Dictionary of all the openstack\_volume\_provider attributes. External provider attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/openstack\_volume\_provider. |
### Authors
* Ondra Machacek (@machacekondra)
ansible ovirt.ovirt.ovirt_template_info β Retrieve information about one or more oVirt/RHV templates ovirt.ovirt.ovirt\_template\_info β Retrieve information about one or more oVirt/RHV templates
==============================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_template_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV templates.
* This module was called `ovirt_template_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_template\_info](#ansible-collections-ovirt-ovirt-ovirt-template-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **pattern** string | | Search term which is accepted by oVirt/RHV search backend. For example to search template X from datacenter Y use following pattern: name=X and datacenter=Y |
Notes
-----
Note
* This module returns a variable `ovirt_templates`, which contains a list of templates. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all templates which names start with C(centos) and
# belongs to data center C(west):
- ovirt.ovirt.ovirt_template_info:
pattern: name=centos* and datacenter=west
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_templates }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_templates** list / elements=string | On success. | List of dictionaries describing the templates. Template attributes are mapped to dictionary keys, all templates attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/template. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
| programming_docs |
ansible ovirt.ovirt.ovirt_auth β Module to manage authentication to oVirt/RHV ovirt.ovirt.ovirt\_auth β Module to manage authentication to oVirt/RHV
======================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_auth`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module authenticates to oVirt/RHV engine and creates SSO token, which should be later used in all other oVirt/RHV modules, so all modules donβt need to perform login and logout. This module returns an Ansible fact called *ovirt\_auth*. Every module can use this fact as `auth` parameter, to perform authentication.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **ca\_file** path | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by *OVIRT\_CAFILE* environment variable. |
| **compress** boolean | **Choices:*** no
* **yes** β
| A boolean flag indicating if the SDK should ask the server to send compressed responses. The default is *True*. Note that this is a hint for the server, and that it may return uncompressed data even when this parameter is set to *True*. |
| **headers** dictionary | | A dictionary of HTTP headers to be added to each API call. |
| **hostname** string | | A string containing the hostname of the server. For example: *server.example.com*. Default value is set by *OVIRT\_HOSTNAME* environment variable. Either `url` or `hostname` is required. |
| **insecure** boolean | **Choices:*** no
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| **kerberos** boolean | **Choices:*** **no** β
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| **ovirt\_auth** dictionary | | Previous run of the ovirt\_auth used with `state` absent Closes connection with the engine. |
| **password** string | | The password of the user. Default value is set by *OVIRT\_PASSWORD* environment variable. |
| **state** string | **Choices:*** **present** β
* absent
| Specifies if a token should be created or revoked. |
| **timeout** integer | | The maximum total time to wait for the response, in seconds. A value of zero (the default) means wait forever. If the timeout expires before the response is received an exception will be raised. |
| **token** string | | SSO token to be used instead of login with username/password. Default value is set by *OVIRT\_TOKEN* environment variable. |
| **url** string | | A string containing the API URL of the server. For example: *https://server.example.com/ovirt-engine/api*. Default value is set by *OVIRT\_URL* environment variable. Either `url` or `hostname` is required. |
| **username** string | | The name of the user. For example: *admin@internal* Default value is set by *OVIRT\_USERNAME* environment variable. |
Notes
-----
Note
* Everytime you use ovirt\_auth module to obtain ticket, you need to also revoke the ticket, when you no longer need it, otherwise the ticket would be revoked by engine when it expires. For an example of how to achieve that, please take a look at *examples* section.
* In order to use this module you have to install oVirt/RHV Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
* Note that in oVirt/RHV 4.1 if you want to use a user which is not administrator you must enable the *ENGINE\_API\_FILTER\_BY\_DEFAULT* variable in engine. In oVirt/RHV 4.2 and later itβs enabled by default.
Examples
--------
```
- block:
# Create a vault with `ovirt_password` variable which store your
# oVirt/RHV user's password, and include that yaml file with variable:
- ansible.builtin.include_vars: ovirt_password.yml
- name: Obtain SSO token with using username/password credentials
ovirt.ovirt.ovirt_auth:
url: https://ovirt.example.com/ovirt-engine/api
username: admin@internal
ca_file: ca.pem
password: "{{ ovirt_password }}"
# Previous task generated I(ovirt_auth) fact, which you can later use
# in different modules as follows:
- ovirt.ovirt.ovirt_vm:
auth: "{{ ovirt_auth }}"
state: absent
name: myvm
always:
- name: Always revoke the SSO token
ovirt.ovirt.ovirt_auth:
state: absent
ovirt_auth: "{{ ovirt_auth }}"
# When user will set following environment variables:
# OVIRT_URL = https://fqdn/ovirt-engine/api
# OVIRT_USERNAME = admin@internal
# OVIRT_PASSWORD = the_password
# User can login the oVirt using environment variable instead of variables
# in yaml file.
# This is mainly useful when using Ansible Tower or AWX, as it will work
# for Red Hat Virtualization credentials type.
- name: Obtain SSO token
ovirt_auth:
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 |
| --- | --- | --- |
| **ovirt\_auth** complex | success | Authentication facts, needed to perform authentication to oVirt/RHV. |
| | **ca\_file** string | success | CA file, which is used to verify SSL/TLS connection. **Sample:** ca.pem |
| | **compress** boolean | success | Flag indicating if compression is used for connection. **Sample:** True |
| | **headers** dictionary | success | Dictionary of HTTP headers to be added to each API call. |
| | **insecure** boolean | success | Flag indicating if insecure connection is used. |
| | **kerberos** boolean | success | Flag indicating if kerberos is used for authentication. |
| | **timeout** integer | success | Number of seconds to wait for response. |
| | **token** string | success | SSO token which is used for connection to oVirt/RHV engine. **Sample:** kdfVWp9ZgeewBXV-iq3Js1-xQJZPSEQ334FLb3eksoEPRaab07DhZ8ED8ghz9lJd-MQ2GqtRIeqhvhCkrUWQPw |
| | **url** string | success | URL of the oVirt/RHV engine API endpoint. **Sample:** https://ovirt.example.com/ovirt-engine/api |
### Authors
* Ondra Machacek (@machacekondra)
ansible ovirt.ovirt.ovirt_user_info β Retrieve information about one or more oVirt/RHV users ovirt.ovirt.ovirt\_user\_info β Retrieve information about one or more oVirt/RHV users
======================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_user_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV users.
* This module was called `ovirt_user_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_user\_info](#ansible-collections-ovirt-ovirt-ovirt-user-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **pattern** string | | Search term which is accepted by oVirt/RHV search backend. For example to search user X use following pattern: name=X |
Notes
-----
Note
* This module returns a variable `ovirt_users`, which contains a list of users. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all users which first names start with C(john):
- ovirt.ovirt.ovirt_user_info:
pattern: name=john*
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_users }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_users** list / elements=string | On success. | List of dictionaries describing the users. User attributes are mapped to dictionary keys, all users attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/user. |
### Authors
* Ondra Machacek (@machacekondra)
ansible ovirt.ovirt.ovirt_group β Module to manage groups in oVirt/RHV ovirt.ovirt.ovirt\_group β Module to manage groups in oVirt/RHV
===============================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_group`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage groups in oVirt/RHV
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **authz\_name** string / required | | Authorization provider of the group. In previous versions of oVirt/RHV known as domain.
aliases: domain |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **name** string / required | | Name of the group to manage. |
| **namespace** string | | Namespace of the authorization provider, where group resides. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **state** string | **Choices:*** **present** β
* absent
| Should the group be present/absent. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Add group group1 from authorization provider example.com-authz
- ovirt.ovirt.ovirt_group:
name: group1
domain: example.com-authz
# Add group group1 from authorization provider example.com-authz
# In case of multi-domain Active Directory setup, you should pass
# also namespace, so it adds correct group:
- ovirt.ovirt.ovirt_group:
name: group1
namespace: dc=ad2,dc=example,dc=com
domain: example.com-authz
# Remove group group1 with authorization provider example.com-authz
- ovirt.ovirt.ovirt_group:
state: absent
name: group1
domain: example.com-authz
```
Return Values
-------------
Common return 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 | On success if group is found. | Dictionary of all the group attributes. Group attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/group. |
| **id** string | On success if group is found. | ID of the group which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
### Authors
* Ondra Machacek (@machacekondra)
ansible ovirt.ovirt.ovirt_permission β Module to manage permissions of users/groups in oVirt/RHV ovirt.ovirt.ovirt\_permission β Module to manage permissions of users/groups in oVirt/RHV
=========================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_permission`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage permissions of users/groups in oVirt/RHV.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **authz\_name** string / required | | Authorization provider of the user/group.
aliases: domain |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **group\_name** string | | Name of the group to manage. Note that if group does not exist in the system this module will fail, you should ensure the group exists by using [ovirt.ovirt.ovirt\_groups](ovirt_groups_module) module. |
| **namespace** string | | Namespace of the authorization provider, where user/group resides. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **object\_id** string | | ID of the object where the permissions should be managed. |
| **object\_name** string | | Name of the object where the permissions should be managed. |
| **object\_type** string | **Choices:*** cluster
* cpu\_profile
* data\_center
* disk
* disk\_profile
* host
* network
* storage\_domain
* system
* template
* **vm** β
* vm\_pool
* vnic\_profile
| The object where the permissions should be managed. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **quota\_name** string | | Name of the quota to assign permission. Works only with `object_type` *data\_center*. |
| **role** string | **Default:**"UserRole" | Name of the role to be assigned to user/group on specific object. |
| **state** string | **Choices:*** absent
* **present** β
| Should the permission be present/absent. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **user\_name** string | | Username of the user to manage. In most LDAPs it's *uid* of the user, but in Active Directory you must specify *UPN* of the user. Note that if user does not exist in the system this module will fail, you should ensure the user exists by using [ovirt.ovirt.ovirt\_users](ovirt_users_module) module. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
- name: Add user user1 from authorization provider example.com-authz
ovirt.ovirt.ovirt_permission:
user_name: user1
authz_name: example.com-authz
object_type: vm
object_name: myvm
role: UserVmManager
- name: Remove permission from user
ovirt.ovirt.ovirt_permission:
state: absent
user_name: user1
authz_name: example.com-authz
object_type: cluster
object_name: mycluster
role: ClusterAdmin
- name: Assign QuotaConsumer role to user
ovirt.ovirt.ovirt_permissions:
state: present
user_name: user1
authz_name: example.com-authz
object_type: data_center
object_name: mydatacenter
quota_name: myquota
role: QuotaConsumer
- name: Assign QuotaConsumer role to group
ovirt.ovirt.ovirt_permissions:
state: present
group_name: group1
authz_name: example.com-authz
object_type: data_center
object_name: mydatacenter
quota_name: myquota
role: QuotaConsumer
```
Return Values
-------------
Common return 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 | On success if permission is found. | ID of the permission which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **permission** dictionary | On success if permission is found. | Dictionary of all the permission attributes. Permission attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/permission. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
| programming_docs |
ansible ovirt.ovirt.ovirt_storage_domain_info β Retrieve information about one or more oVirt/RHV storage domains ovirt.ovirt.ovirt\_storage\_domain\_info β Retrieve information about one or more oVirt/RHV storage domains
===========================================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_storage_domain_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV storage domains.
* This module was called `ovirt_storage_domain_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_storage\_domain\_info](#ansible-collections-ovirt-ovirt-ovirt-storage-domain-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **pattern** string | | Search term which is accepted by oVirt/RHV search backend. For example to search storage domain X from datacenter Y use following pattern: name=X and datacenter=Y |
Notes
-----
Note
* This module returns a variable `ovirt_storage_domains`, which contains a list of storage domains. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all storage domains which names start with C(data) and
# belong to data center C(west):
- ovirt.ovirt.ovirt_storage_domain_info:
pattern: name=data* and datacenter=west
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_storage_domains }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_storage\_domains** list / elements=string | On success. | List of dictionaries describing the storage domains. Storage\_domain attributes are mapped to dictionary keys, all storage domains attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/storage\_domain. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_api_info β Retrieve information about the oVirt/RHV API ovirt.ovirt.ovirt\_api\_info β Retrieve information about the oVirt/RHV API
===========================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_api_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about the oVirt/RHV API.
* This module was called `ovirt_api_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_api\_info](#ansible-collections-ovirt-ovirt-ovirt-api-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
Notes
-----
Note
* This module returns a variable `ovirt_api`, which contains a information about oVirt/RHV API. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information oVirt API:
- ovirt.ovirt.ovirt_api_info:
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_api }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_api** dictionary | On success. | Dictionary describing the oVirt API information. Api attributes are mapped to dictionary keys, all API attributes can be found at following url: https://ovirt.example.com/ovirt-engine/api/model#types/api. |
### Authors
* Ondra Machacek (@machacekondra)
ansible ovirt.ovirt.ovirt_vm_os_info β Retrieve information on all supported oVirt/RHV operating systems ovirt.ovirt.ovirt\_vm\_os\_info β Retrieve information on all supported oVirt/RHV operating systems
===================================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_vm_os_info`.
New in version 1.1.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information on all supported oVirt/RHV operating systems.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **filter\_keys** list / elements=string | | List of attributes which should be in returned. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **name** string | | Name of the operating system which should be returned. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
Notes
-----
Note
* This module returns a variable `ovirt_operating_systems`, which contains a list of operating systems. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Look at ovirt_auth module to see how to reuse authentication:
- ovirt.ovirt.ovirt_vm_os_info:
auth: "{{ ovirt_auth }}"
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_operating_systems }}"
- ovirt.ovirt.ovirt_vm_os_info:
auth: "{{ ovirt_auth }}"
filter_keys: name,architecture
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_operating_systems }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_operating\_systems** list / elements=string | On success. | List of dictionaries describing the operating systems. Operating system attributes are mapped to dictionary keys, all operating systems attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/operating\_system\_info. |
### Authors
* Martin Necas (@mnecas)
* Chris Brown (@snecklifter)
ansible ovirt.ovirt.ovirt_datacenter β Module to manage data centers in oVirt/RHV ovirt.ovirt.ovirt\_datacenter β Module to manage data centers in oVirt/RHV
==========================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_datacenter`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Module to manage data centers in oVirt/RHV
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **comment** string | | Comment of the data center. |
| **compatibility\_version** string | | Compatibility version of the data center. |
| **description** string | | Description of the data center. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **force** boolean | **Choices:*** no
* yes
| This parameter can be used only when removing a data center. If *True* data center will be forcibly removed, even though it contains some clusters. Default value is *False*, which means that only empty data center can be removed. |
| **id** string | | ID of the datacenter to manage. |
| **iscsi\_bonds** list / elements=dictionary | | List of iscsi bonds, which should be created in datacenter. |
| | **name** string | | Name of the iscsi bond. |
| | **networks** list / elements=string | | List of network names in bond. |
| | **storage\_connections** list / elements=string | **Default:**[] | List of storage\_connection IDs. Used when you want to use specific storage connection instead of all in storage domain. |
| | **storage\_domains** list / elements=string | **Default:**[] | List of storage domain names and it will automatically get all storage\_connections in the domain. |
| **local** boolean | **Choices:*** no
* yes
|
*True* if the data center should be local, *False* if should be shared. Default value is set by engine. |
| **mac\_pool** string | | MAC pool to be used by this datacenter. IMPORTANT: This option is deprecated in oVirt/RHV 4.1. You should use `mac_pool` in `ovirt_clusters` module, as MAC pools are set per cluster since 4.1. |
| **name** string / required | | Name of the data center to manage. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **quota\_mode** string | **Choices:*** disabled
* audit
* enabled
| Quota mode of the data center. One of *disabled*, *audit* or *enabled*
|
| **state** string | **Choices:*** **present** β
* absent
| Should the data center be present or absent. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Create datacenter
- ovirt.ovirt.ovirt_datacenter:
name: mydatacenter
local: True
compatibility_version: 4.0
quota_mode: enabled
# Remove datacenter
- ovirt.ovirt.ovirt_datacenter:
state: absent
name: mydatacenter
# Change Datacenter Name
- ovirt.ovirt.ovirt_datacenter:
id: 00000000-0000-0000-0000-000000000000
name: "new_datacenter_name"
# Create datacenter with iscsi bond
- ovirt.ovirt.ovirt_datacenter:
name: mydatacenter
iscsi_bonds:
- name: bond1
networks:
- network1
- network2
storage_domains:
- storage1
- name: bond2
networks:
- network3
storage_connections:
- cf780201-6a4f-43c1-a019-e65c4220ab73
# Remove all iscsi bonds
- ovirt.ovirt.ovirt_datacenter:
name: mydatacenter
iscsi_bonds: []
```
Return Values
-------------
Common return 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\_center** dictionary | On success if datacenter is found. | Dictionary of all the datacenter attributes. Datacenter attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/datacenter. |
| **id** string | On success if datacenter is found. | ID of the managed datacenter **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
| programming_docs |
ansible ovirt.ovirt.ovirt β oVirt inventory source ovirt.ovirt.ovirt β oVirt inventory source
==========================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get inventory hosts from the ovirt service.
* Requires a YAML file ending in βovirt.ymlβ, βovirt4.ymlβ, βovirt.yamlβ, βovirt4.yamlβ.
Requirements
------------
The below requirements are needed on the local controller node that executes this inventory.
* ovirt-engine-sdk-python >= 4.2.4
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. |
| **ovirt\_cafile** string | | | path to ovirt-engine CA file. If `ovirt_cafile` parameter is not set and `ovirt_insecure` is not True, system wide CA certificate store is used. |
| **ovirt\_hostname\_preference** list / elements=string | **Default:**["fqdn", "name"] | | list of options that describe the ordering for which hostnames should be assigned. See <https://ovirt.github.io/ovirt-engine-api-model/master/#types/vm> for available attributes. |
| **ovirt\_insecure** string | | | A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| **ovirt\_password** string / required | | env:OVIRT\_PASSWORD | ovirt authentication password. |
| **ovirt\_query\_filter** string | | | dictionary of filter key-values to query VM's. See <https://ovirt.github.io/ovirt-engine-sdk/master/services.m.html#ovirtsdk4.services.VmsService.list> for filter parameters. |
| **ovirt\_url** string / required | | env:OVIRT\_URL | URL to ovirt-engine API. |
| **ovirt\_username** string / required | | env:OVIRT\_USERNAME | ovirt authentication user. |
| **plugin** string / required | **Choices:*** ovirt
* ovirt.ovirt.ovirt
* redhat.rhv.ovirt
| | the name of this plugin, it should always be set to 'ovirt' for this plugin to recognise it as it's own. |
| **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
--------
```
# Ensure the CA is available:
# $ wget "https://engine/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA" -O /path/to/ca.pem
# Sample content of ovirt.yml:
plugin: ovirt.ovirt.ovirt
ovirt_url: https://engine/ovirt-engine/api
ovirt_cafile: /path/to/ca.pem
ovirt_username: ansible-tester
ovirt_password: secure
ovirt_query_filter:
search: 'name=myvm AND cluster=mycluster'
case_sensitive: no
max: 15
keyed_groups:
- key: cluster
prefix: 'cluster'
groups:
dev: "'dev' in tags"
compose:
ansible_host: devices["eth0"][0]
```
### Authors
* Bram Verschueren (@bverschueren)
ansible ovirt.ovirt.ovirt_vmpool_info β Retrieve information about one or more oVirt/RHV vmpools ovirt.ovirt.ovirt\_vmpool\_info β Retrieve information about one or more oVirt/RHV vmpools
==========================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_vmpool_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV vmpools.
* This module was called `ovirt_vmpool_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_vmpool\_info](#ansible-collections-ovirt-ovirt-ovirt-vmpool-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **pattern** string | | Search term which is accepted by oVirt/RHV search backend. For example to search vmpool X: name=X |
Notes
-----
Note
* This module returns a variable `ovirt_vmpools`, which contains a list of vmpools. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all vm pools which names start with C(centos):
- ovirt.ovirt.ovirt_vmpool_info:
pattern: name=centos*
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_vm_pools }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_vm\_pools** list / elements=string | On success. | List of dictionaries describing the vmpools. Vm pool attributes are mapped to dictionary keys, all vmpools attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/vm\_pool. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible ovirt.ovirt.ovirt_instance_type β Module to manage Instance Types in oVirt/RHV ovirt.ovirt.ovirt\_instance\_type β Module to manage Instance Types in oVirt/RHV
================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_instance_type`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module manages whole lifecycle of the Instance Type in oVirt/RHV.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **ballooning\_enabled** boolean | **Choices:*** no
* yes
| If *true*, use memory ballooning. Memory balloon is a guest device, which may be used to re-distribute / reclaim the host memory based on instance type needs in a dynamic way. In this way it's possible to create memory over commitment states. |
| **boot\_devices** list / elements=string | **Choices:*** cdrom
* hd
* network
| List of boot devices which should be used to boot. For example `[ cdrom, hd ]`. Default value is set by oVirt/RHV engine. |
| **cpu\_cores** integer | | Number of virtual CPUs cores of the Instance Type. Default value is set by oVirt/RHV engine. |
| **cpu\_mode** string | | CPU mode of the instance type. It can be some of the following: *host\_passthrough*, *host\_model* or *custom*. For *host\_passthrough* CPU type you need to set `placement_policy` to *pinned*. If no value is passed, default value is set by oVirt/RHV engine. |
| **cpu\_pinning** list / elements=dictionary | | CPU Pinning topology to map instance type CPU to host CPU. CPU Pinning topology is a list of dictionary which can have following values: |
| | **cpu** string | | Number of the host CPU. |
| | **vcpu** string | | Number of the instance type CPU. |
| **cpu\_sockets** integer | | Number of virtual CPUs sockets of the Instance Type. Default value is set by oVirt/RHV engine. |
| **cpu\_threads** integer | | Number of virtual CPUs sockets of the Instance Type. Default value is set by oVirt/RHV engine. |
| **description** string | | Description of the instance type. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *True* the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. |
| **graphical\_console** dictionary | | Assign graphical console to the instance type. Graphical console is a dictionary which can have following values:
`headless_mode` - If *true* disable the graphics console for this instance type.
`protocol` - Graphical protocol, a list of *spice*, *vnc*, or both. |
| **high\_availability** boolean | **Choices:*** no
* yes
| If *yes* Instance Type will be set as highly available. If *no* Instance Type won't be set as highly available. If no value is passed, default value is set by oVirt/RHV engine. |
| **high\_availability\_priority** integer | | Indicates the priority of the instance type inside the run and migration queues. Instance Type with higher priorities will be started and migrated before instance types with lower priorities. The value is an integer between 0 and 100. The higher the value, the higher the priority. If no value is passed, default value is set by oVirt/RHV engine. |
| **host** string | | Specify host where Instance Type should be running. By default the host is chosen by engine scheduler. This parameter is used only when `state` is *running* or *present*. |
| **id** string | | ID of the Instance Type to manage. |
| **io\_threads** integer | | Number of IO threads used by instance type. *0* means IO threading disabled. |
| **memory** string | | Amount of memory of the Instance Type. Prefix uses IEC 60027-2 standard (for example 1GiB, 1024MiB). Default value is set by engine. |
| **memory\_guaranteed** string | | Amount of minimal guaranteed memory of the Instance Type. Prefix uses IEC 60027-2 standard (for example 1GiB, 1024MiB).
`memory_guaranteed` parameter can't be lower than `memory` parameter. Default value is set by engine. |
| **memory\_max** string | | Upper bound of instance type memory up to which memory hot-plug can be performed. Prefix uses IEC 60027-2 standard (for example 1GiB, 1024MiB). Default value is set by engine. |
| **name** string | | Name of the Instance Type to manage. If instance type don't exists `name` is required. Otherwise `id` or `name` can be used. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. |
| **nics** list / elements=dictionary | | List of NICs, which should be attached to Virtual Machine. NIC is described by following dictionary. NOTE - This parameter is used only when `state` is *running* or *present* and is able to only create NICs. To manage NICs of the instance type in more depth please use [ovirt.ovirt.ovirt\_nic](ovirt_nic_module) module instead. |
| | **interface** string | **Choices:*** **virtio** β
* e1000
* rtl8139
| Type of the network interface. |
| | **mac\_address** string | | Custom MAC address of the network interface, by default it's obtained from MAC pool. |
| | **name** string | | Name of the NIC. |
| | **profile\_name** string | | Profile name where NIC should be attached. |
| **operating\_system** string | | Operating system of the Instance Type, for example 'rhel\_8x64'. Default value is set by oVirt/RHV engine. Use the [ovirt.ovirt.ovirt\_vm\_os\_info](ovirt_vm_os_info_module) module to obtain the current list. |
| **placement\_policy** string | | The configuration of the instance type's placement policy. Placement policy can be one of the following values:
`migratable` - Allow manual and automatic migration.
`pinned` - Do not allow migration.
`user_migratable` - Allow manual migration only. If no value is passed, default value is set by oVirt/RHV engine. |
| **poll\_interval** integer | **Default:**3 | Number of the seconds the module waits until another poll request on entity status is sent. |
| **rng\_bytes** integer | | Number of bytes allowed to consume per period. |
| **rng\_device** string | | Random number generator (RNG). You can choose of one the following devices *urandom*, *random* or *hwrng*. In order to select *hwrng*, you must have it enabled on cluster first. /dev/urandom is used for cluster version >= 4.1, and /dev/random for cluster version <= 4.0 |
| **rng\_period** integer | | Duration of one period in milliseconds. |
| **serial\_console** boolean | **Choices:*** no
* yes
|
*True* enable VirtIO serial console, *False* to disable it. By default is chosen by oVirt/RHV engine. |
| **smartcard\_enabled** boolean | **Choices:*** no
* yes
| If *true*, use smart card authentication. |
| **soundcard\_enabled** boolean | **Choices:*** no
* yes
| If *true*, the sound card is added to the instance type. |
| **state** string | **Choices:*** absent
* **present** β
| Should the Instance Type be present/absent.
*present* state will create/update instance type and don't change its state if it already exists. |
| **timeout** integer | **Default:**180 | The amount of time in seconds the module should wait for the instance to get into desired state. |
| **usb\_support** boolean | **Choices:*** no
* yes
|
*True* enable USB support, *False* to disable it. By default is chosen by oVirt/RHV engine. |
| **virtio\_scsi** boolean | **Choices:*** no
* yes
| If *true*, virtio scsi will be enabled. |
| **wait** boolean | **Choices:*** no
* **yes** β
|
`yes` if the module should wait for the entity to get into desired state. |
| **watchdog** dictionary | | Assign watchdog device for the instance type. Watchdogs is a dictionary which can have following values:
`model` - Model of the watchdog device. For example: *i6300esb*, *diag288* or *null*.
`action` - Watchdog action to be performed when watchdog is triggered. For example: *none*, *reset*, *poweroff*, *pause* or *dump*. |
Notes
-----
Note
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: *pip: name=ovirt-engine-sdk-python version=4.4.0*
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Create instance type
- name: Create instance type
ovirt.ovirt.ovirt_instance_type:
state: present
name: myit
rng_device: hwrng
rng_bytes: 200
rng_period: 200
soundcard_enabled: true
virtio_scsi: true
boot_devices:
- network
# Remove instance type
- ovirt.ovirt.ovirt_instance_type:
state: absent
name: myit
# Create instance type with predefined memory and cpu limits.
- ovirt.ovirt.ovirt_instance_type:
state: present
name: myit
memory: 2GiB
cpu_cores: 2
cpu_sockets: 2
nics:
- name: nic1
# Enable usb support and serial console
- ovirt.ovirt.ovirt_instance_type:
name: myit
usb_support: True
serial_console: True
# Use graphical console with spice and vnc
- name: Create a instance type that has the console configured for both Spice and VNC
ovirt.ovirt.ovirt_instance_type:
name: myit
graphical_console:
protocol:
- spice
- vnc
```
Return Values
-------------
Common return 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 | On success if instance type is found. | ID of the instance type which is managed **Sample:** 7de90f31-222c-436c-a1ca-7e655bd5b60c |
| **instancetype** dictionary | On success if instance type is found. | Dictionary of all the instance type attributes. instance type attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/instance\_type. |
### Authors
* Martin Necas (@mnecas)
* Ondra Machacek (@machacekondra)
| programming_docs |
ansible ovirt.ovirt.ovirt_network_info β Retrieve information about one or more oVirt/RHV networks ovirt.ovirt.ovirt\_network\_info β Retrieve information about one or more oVirt/RHV networks
============================================================================================
Note
This plugin is part of the [ovirt.ovirt collection](https://galaxy.ansible.com/ovirt/ovirt) (version 1.6.4).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ovirt.ovirt`.
To use it in a playbook, specify: `ovirt.ovirt.ovirt_network_info`.
New in version 1.0.0: of ovirt.ovirt
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about one or more oVirt/RHV networks.
* This module was called `ovirt_network_facts` before Ansible 2.9, returning `ansible_facts`. Note that the [ovirt.ovirt.ovirt\_network\_info](#ansible-collections-ovirt-ovirt-ovirt-network-info-module) module no longer returns `ansible_facts`!
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* ovirt-engine-sdk-python >= 4.4.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary / required | | Dictionary with values needed to create HTTP/HTTPS connection to oVirt: |
| | **ca\_file** string | | A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by `OVIRT_CAFILE` environment variable. |
| | **compress** boolean | **Choices:*** no
* **yes** β
| Flag indicating if compression is used for connection. |
| | **headers** dictionary | | Dictionary of HTTP headers to be added to each API call. |
| | **hostname** string | | A string containing the hostname of the server, usually something like `*server.example.com*`. Default value is set by `OVIRT_HOSTNAME` environment variable. Either `url` or `hostname` is required. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| A boolean flag that indicates if the server TLS certificate and host name should be checked. |
| | **kerberos** boolean | **Choices:*** no
* yes
| A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. |
| | **password** string | | The password of the user. Default value is set by `OVIRT_PASSWORD` environment variable. |
| | **timeout** integer | | Number of seconds to wait for response. |
| | **token** string | | Token to be used instead of login with username/password. Default value is set by `OVIRT_TOKEN` environment variable. |
| | **url** string | | A string containing the API URL of the server, usually something like `*https://server.example.com/ovirt-engine/api*`. Default value is set by `OVIRT_URL` environment variable. Either `url` or `hostname` is required. |
| | **username** string | | The name of the user, something like *admin@internal*. Default value is set by `OVIRT_USERNAME` environment variable. |
| **fetch\_nested** boolean | **Choices:*** **no** β
* yes
| If *yes* the module will fetch additional data from the API. It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested attributes. Only the attributes of the current entity. User can configure to fetch other attributes of the nested entities by specifying `nested_attributes`. This parameter is deprecated and replaced by `follows`. |
| **follows** list / elements=string added in 1.5.0 of ovirt.ovirt | | List of linked entities, which should be fetched along with the main entity. This parameter replaces usage of `fetch_nested` and `nested_attributes`. |
| **nested\_attributes** list / elements=string | | Specifies list of the attributes which should be fetched from the API. This parameter apply only when `fetch_nested` is *true*. This parameter is deprecated and replaced by `follows`. |
| **pattern** string | | Search term which is accepted by oVirt/RHV search backend. For example to search network starting with string vlan1 use: name=vlan1\* |
Notes
-----
Note
* This module returns a variable `ovirt_networks`, which contains a list of networks. You need to register the result with the *register* keyword to use it.
* In order to use this module you have to install oVirt Python SDK. To ensure itβs installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.4.0
Examples
--------
```
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
# Gather information about all networks which names start with C(vlan1):
- ovirt.ovirt.ovirt_network_info:
pattern: name=vlan1*
register: result
- ansible.builtin.debug:
msg: "{{ result.ovirt_networks }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ovirt\_networks** list / elements=string | On success. | List of dictionaries describing the networks. Network attributes are mapped to dictionary keys, all networks attributes can be found at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/network. |
### Authors
* Ondra Machacek (@machacekondra)
* Martin Necas (@mnecas)
ansible Collections in the Chocolatey Namespace Collections in the Chocolatey Namespace
=======================================
These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **chocolatey** namespace.
* [chocolatey.chocolatey](chocolatey/index#plugins-in-chocolatey-chocolatey)
ansible Chocolatey.Chocolatey Chocolatey.Chocolatey
=====================
Collection version 1.1.0
Plugin Index
------------
These are the plugins in the chocolatey.chocolatey collection
### Modules
* [win\_chocolatey](win_chocolatey_module#ansible-collections-chocolatey-chocolatey-win-chocolatey-module) β Manage packages using chocolatey
* [win\_chocolatey\_config](win_chocolatey_config_module#ansible-collections-chocolatey-chocolatey-win-chocolatey-config-module) β Manages Chocolatey config settings
* [win\_chocolatey\_facts](win_chocolatey_facts_module#ansible-collections-chocolatey-chocolatey-win-chocolatey-facts-module) β Create a facts collection for Chocolatey
* [win\_chocolatey\_feature](win_chocolatey_feature_module#ansible-collections-chocolatey-chocolatey-win-chocolatey-feature-module) β Manages Chocolatey features
* [win\_chocolatey\_source](win_chocolatey_source_module#ansible-collections-chocolatey-chocolatey-win-chocolatey-source-module) β Manages Chocolatey sources
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
ansible chocolatey.chocolatey.win_chocolatey_source β Manages Chocolatey sources chocolatey.chocolatey.win\_chocolatey\_source β Manages Chocolatey sources
==========================================================================
Note
This plugin is part of the [chocolatey.chocolatey collection](https://galaxy.ansible.com/chocolatey/chocolatey) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install chocolatey.chocolatey`.
To use it in a playbook, specify: `chocolatey.chocolatey.win_chocolatey_source`.
New in version 0.2.7: of chocolatey.chocolatey
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
Synopsis
--------
* Used to managed Chocolatey sources configured on the client.
* Requires Chocolatey to be already installed on the remote host.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **admin\_only** boolean | **Choices:*** no
* yes
| Makes the source visible to Administrators only. Requires Chocolatey >= 0.10.8. When creating a new source, this defaults to `no`. |
| **allow\_self\_service** boolean | **Choices:*** no
* yes
| Allow the source to be used with self-service Requires Chocolatey >= 0.10.4. When creating a new source, this defaults to `no`. |
| **bypass\_proxy** boolean | **Choices:*** no
* yes
| Bypass the proxy when using this source. Requires Chocolatey >= 0.10.4. When creating a new source, this defaults to `no`. |
| **certificate** string | | The path to a .pfx file to use for X509 authenticated feeds. Requires Chocolatey >= 0.9.10. |
| **certificate\_password** string | | The password for *certificate* if required. Requires Chocolatey >= 0.9.10. |
| **name** string / required | | The name of the source to configure. |
| **priority** integer | | The priority order of this source compared to other sources, lower is better. All priorities above `0` will be evaluated first, then zero-based values will be evaluated in config file order. Requires Chocolatey >= 0.9.9.9. When creating a new source, this defaults to `0`. |
| **source** string | | The file/folder/url of the source. Required when *state* is `present` or `disabled` and the source does not already exist. |
| **source\_password** string | | The password for *source\_username*. Required if *source\_username* is set. |
| **source\_username** string | | The username used to access *source*. |
| **state** string | **Choices:*** absent
* disabled
* **present** β
| When `absent`, will remove the source. When `disabled`, will ensure the source exists but is disabled. When `present`, will ensure the source exists and is enabled. |
| **update\_password** string | **Choices:*** **always** β
* on\_create
| When `always`, the module will always set the password and report a change if *certificate\_password* or *source\_password* is set. When `on_create`, the module will only set the password if the source is being created. |
See Also
--------
See also
M(win\_chocolatey)
The official documentation on the **win\_chocolatey** module.
M(win\_chocolatey\_config)
The official documentation on the **win\_chocolatey\_config** module.
M(win\_chocolatey\_facts)
The official documentation on the **win\_chocolatey\_facts** module.
M(win\_chocolatey\_feature)
The official documentation on the **win\_chocolatey\_feature** module.
Examples
--------
```
- name: Remove the default public source
win_chocolatey_source:
name: chocolatey
state: absent
- name: Add new internal source
win_chocolatey_source:
name: internal repo
state: present
source: http://chocolatey-server/chocolatey
- name: Create HTTP source with credentials
win_chocolatey_source:
name: internal repo
state: present
source: https://chocolatey-server/chocolatey
source_username: username
source_password: password
- name: Disable Chocolatey source
win_chocolatey_source:
name: chocolatey
state: disabled
```
### Authors
* Jordan Borean (@jborean93)
ansible chocolatey.chocolatey.win_chocolatey_feature β Manages Chocolatey features chocolatey.chocolatey.win\_chocolatey\_feature β Manages Chocolatey features
============================================================================
Note
This plugin is part of the [chocolatey.chocolatey collection](https://galaxy.ansible.com/chocolatey/chocolatey) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install chocolatey.chocolatey`.
To use it in a playbook, specify: `chocolatey.chocolatey.win_chocolatey_feature`.
New in version 0.2.7: of chocolatey.chocolatey
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
Synopsis
--------
* Used to enable or disable features in Chocolatey.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name** string / required | | The name of the feature to manage. Run `choco.exe feature list` to get a list of features that can be managed. For a list of options see [Chocolatey feature docs](https://chocolatey.org/docs/chocolatey-configuration#features)
|
| **state** string | **Choices:*** disabled
* **enabled** β
| When `disabled` then the feature will be disabled. When `enabled` then the feature will be enabled. |
See Also
--------
See also
M(win\_chocolatey)
The official documentation on the **win\_chocolatey** module.
M(win\_chocolatey\_config)
The official documentation on the **win\_chocolatey\_config** module.
M(win\_chocolatey\_facts)
The official documentation on the **win\_chocolatey\_facts** module.
M(win\_chocolatey\_source)
The official documentation on the **win\_chocolatey\_source** module.
Examples
--------
```
- name: Disable file checksum matching
win_chocolatey_feature:
name: checksumFiles
state: disabled
- name: Stop Chocolatey on the first package failure
win_chocolatey_feature:
name: stopOnFirstPackageFailure
state: enabled
```
### Authors
* Jordan Borean (@jborean93)
ansible chocolatey.chocolatey.win_chocolatey_facts β Create a facts collection for Chocolatey chocolatey.chocolatey.win\_chocolatey\_facts β Create a facts collection for Chocolatey
=======================================================================================
Note
This plugin is part of the [chocolatey.chocolatey collection](https://galaxy.ansible.com/chocolatey/chocolatey) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install chocolatey.chocolatey`.
To use it in a playbook, specify: `chocolatey.chocolatey.win_chocolatey_facts`.
New in version 0.2.8: of chocolatey.chocolatey
* [Synopsis](#synopsis)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Returned Facts](#returned-facts)
Synopsis
--------
* This module shows information from Chocolatey, such as installed packages, configuration, feature and sources.
Notes
-----
Note
* Chocolatey must be installed beforehand, use M(win\_chocolatey) to do this.
See Also
--------
See also
M(win\_chocolatey)
The official documentation on the **win\_chocolatey** module.
M(win\_chocolatey\_config)
The official documentation on the **win\_chocolatey\_config** module.
M(win\_chocolatey\_feature)
The official documentation on the **win\_chocolatey\_feature** module.
M(win\_chocolatey\_source)
The official documentation on the **win\_chocolatey\_source** module.
Examples
--------
```
- name: Gather facts from chocolatey
win_chocolatey_facts:
- name: Displays the Configuration
debug:
var: ansible_chocolatey.config
- name: Displays the Feature
debug:
var: ansible_chocolatey.feature
- name: Displays the Sources
debug:
var: ansible_chocolatey.sources
- name: Displays the Packages
debug:
var: ansible_chocolatey.packages
```
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\_chocolatey** complex / elements=string | always | Detailed information about the Chocolatey installation |
| | **config** dictionary / elements=string | always | Detailed information about stored the configurations **Sample:** {'commandExecutionTimeoutSeconds': 2700, 'containsLegacyPackageInstalls': True} |
| | **feature** dictionary / elements=string | always | Detailed information about enabled and disabled features **Sample:** {'allowEmptyCheckums': False, 'autoUninstaller': True, 'failOnAutoUninstaller': False} |
| | **packages** complex / elements=string | always | List of installed Packages |
| | | **package** string / elements=string | always | Name of the package **Sample:** vscode |
| | | **version** string / elements=string | always | Version of the package **Sample:** 1.27.2 |
| | **sources** complex / elements=string | always | List of Chocolatey sources |
| | | **admin\_only** boolean / elements=string | always | Is the source visible to Administrators only |
| | | **allow\_self\_service** boolean / elements=string | always | Is the source allowed to be used with self-service |
| | | **bypass\_proxy** boolean / elements=string | always | Can the source explicitly bypass configured proxies **Sample:** True |
| | | **certificate** string / elements=string | always | Pth to a PFX certificate for X509 authenticated feeds **Sample:** C:\chocolatey\cert.pfx |
| | | **disabled** boolean / elements=string | always | Is the source disabled |
| | | **name** string / elements=string | always | Name of the source **Sample:** chocolatey |
| | | **priority** integer / elements=string | always | The priority order of this source, lower is better, 0 is no priority |
| | | **source** string / elements=string | always | The source, can be a folder/file or an url **Sample:** https://chocolatey.org/api/v2/ |
| | | **source\_username** string / elements=string | always | Username used to access authenticated feeds **Sample:** username |
### Authors
* Simon BΓ€rlocher (@sbaerlocher)
* ITIGO AG (@itigoag)
ansible chocolatey.chocolatey.win_chocolatey_config β Manages Chocolatey config settings chocolatey.chocolatey.win\_chocolatey\_config β Manages Chocolatey config settings
==================================================================================
Note
This plugin is part of the [chocolatey.chocolatey collection](https://galaxy.ansible.com/chocolatey/chocolatey) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install chocolatey.chocolatey`.
To use it in a playbook, specify: `chocolatey.chocolatey.win_chocolatey_config`.
New in version 0.2.7: of chocolatey.chocolatey
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
Synopsis
--------
* Used to manage Chocolatey config settings as well as unset the values.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **name** string / required | | The name of the config setting to manage. See <https://chocolatey.org/docs/chocolatey-configuration> for a list of valid configuration settings that can be changed. Any config values that contain encrypted values like a password are not idempotent as the plaintext value cannot be read. |
| **state** string | **Choices:*** absent
* **present** β
| When `absent`, it will ensure the setting is unset or blank. When `present`, it will ensure the setting is set to the value of *value*. |
| **value** string | | Used when `state=present` that contains the value to set for the config setting. Cannot be null or an empty string, use `state=absent` to unset a config value instead. |
See Also
--------
See also
M(win\_chocolatey)
The official documentation on the **win\_chocolatey** module.
M(win\_chocolatey\_facts)
The official documentation on the **win\_chocolatey\_facts** module.
M(win\_chocolatey\_feature)
The official documentation on the **win\_chocolatey\_feature** module.
M(win\_chocolatey\_source)
The official documentation on the **win\_chocolatey\_source** module.
Examples
--------
```
- name: Set the cache location
win_chocolatey_config:
name: cacheLocation
state: present
value: D:\chocolatey_temp
- name: Unset the cache location
win_chocolatey_config:
name: cacheLocation
state: absent
```
### Authors
* Jordan Borean (@jborean93)
| programming_docs |
ansible chocolatey.chocolatey.win_chocolatey β Manage packages using chocolatey chocolatey.chocolatey.win\_chocolatey β Manage packages using chocolatey
========================================================================
Note
This plugin is part of the [chocolatey.chocolatey collection](https://galaxy.ansible.com/chocolatey/chocolatey) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install chocolatey.chocolatey`.
To use it in a playbook, specify: `chocolatey.chocolatey.win_chocolatey`.
New in version 0.1.9: of chocolatey.chocolatey
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage packages using Chocolatey.
* If Chocolatey is missing from the system, the module will install it.
Requirements
------------
The below requirements are needed on the host that executes this module.
* chocolatey >= 0.10.5 (will be upgraded if older)
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_empty\_checksums** boolean added in 0.2.2 of chocolatey.chocolatey | **Choices:*** **no** β
* yes
| Allow empty checksums to be used for downloaded resource from non-secure locations. Use M(win\_chocolatey\_feature) with the name `allowEmptyChecksums` to control this option globally. |
| **allow\_multiple** boolean added in 0.2.8 of chocolatey.chocolatey | **Choices:*** **no** β
* yes
| Allow the installation of multiple packages when *version* is specified. Having multiple packages at different versions can cause issues if the package doesn't support this. Use at your own risk. The value of this parameter is ignored if *state* is `absent`. Instead, this parameter is automatically configured to remove all versions if *version* is not specified, and the specific version only if *version* is specified. |
| **allow\_prerelease** boolean added in 0.2.6 of chocolatey.chocolatey | **Choices:*** **no** β
* yes
| Allow the installation of pre-release packages. If *state* is `latest`, the latest pre-release package will be installed. |
| **architecture** string added in 0.2.7 of chocolatey.chocolatey | **Choices:*** **default** β
* x86
| Force Chocolatey to install the package of a specific process architecture. When setting `x86`, will ensure Chocolatey installs the x86 package even when on an x64 bit OS. |
| **force** boolean | **Choices:*** **no** β
* yes
| Forces the install of a package, even if it already is installed. Using *force* will cause Ansible to always report that a change was made. |
| **ignore\_checksums** boolean added in 0.2.2 of chocolatey.chocolatey | **Choices:*** **no** β
* yes
| Ignore the checksums provided by the package. Use M(win\_chocolatey\_feature) with the name `checksumFiles` to control this option globally. |
| **ignore\_dependencies** boolean added in 0.2.1 of chocolatey.chocolatey | **Choices:*** **no** β
* yes
| Ignore dependencies, only install/upgrade the package itself. |
| **install\_args** string added in 0.2.1 of chocolatey.chocolatey | | Arguments to pass to the native installer. These are arguments that are passed directly to the installer the Chocolatey package runs, this is generally an advanced option. |
| **name** list / elements=string / required | | Name of the package(s) to be installed. Set to `all` to run the action on all the installed packages. |
| **override\_args** boolean added in 0.2.10 of chocolatey.chocolatey | **Choices:*** **no** β
* yes
| Override arguments of native installer with arguments provided by user. Should install arguments be used exclusively without appending to current package passed arguments. |
| **package\_params** string added in 0.2.1 of chocolatey.chocolatey | | Parameters to pass to the package. These are parameters specific to the Chocolatey package and are generally documented by the package itself. Before Ansible 2.7, this option was just *params*.
aliases: params |
| **pinned** boolean added in 0.2.8 of chocolatey.chocolatey | **Choices:*** no
* yes
| Whether to pin the Chocolatey package or not. If omitted then no checks on package pins are done. Will pin/unpin the specific version if *version* is set. Will pin the latest version of a package if `yes`, *version* is not set and and no pin already exists. Will unpin all versions of a package if `no` and *version* is not set. This is ignored when `state=absent`. |
| **proxy\_password** string added in 0.2.4 of chocolatey.chocolatey | | Proxy password used to install Chocolatey and the package. This value is exposed as a command argument and any privileged account can see this value when the module is running Chocolatey, define the password on the global config level with M(win\_chocolatey\_config) with name `proxyPassword` to avoid this. |
| **proxy\_url** string added in 0.2.4 of chocolatey.chocolatey | | Proxy URL used to install chocolatey and the package. Use M(win\_chocolatey\_config) with the name `proxy` to control this option globally. |
| **proxy\_username** string added in 0.2.4 of chocolatey.chocolatey | | Proxy username used to install Chocolatey and the package. Before Ansible 2.7, users with double quote characters `"` would need to be escaped with `\` beforehand. This is no longer necessary. Use M(win\_chocolatey\_config) with the name `proxyUser` to control this option globally. |
| **remove\_dependencies** boolean added in 1.1.0 of chocolatey.chocolatey | **Choices:*** **no** β
* yes
| Remove a package's dependencies on uninstall. |
| **skip\_scripts** boolean added in 0.2.4 of chocolatey.chocolatey | **Choices:*** **no** β
* yes
| Do not run *chocolateyInstall.ps1* or *chocolateyUninstall.ps1* scripts when installing a package. |
| **source** string | | Specify the source to retrieve the package from. Use M(win\_chocolatey\_source) to manage global sources. This value can either be the URL to a Chocolatey feed, a path to a folder containing `.nupkg` packages or the name of a source defined by M(win\_chocolatey\_source). This value is also used when Chocolatey is not installed as the location of the install.ps1 script and only supports URLs for this case. |
| **source\_password** string added in 0.2.7 of chocolatey.chocolatey | | The password for *source\_username*. This value is exposed as a command argument and any privileged account can see this value when the module is running Chocolatey, define the credentials with a source with M(win\_chocolatey\_source) to avoid this. |
| **source\_username** string added in 0.2.7 of chocolatey.chocolatey | | A username to use with *source* when accessing a feed that requires authentication. It is recommended you define the credentials on a source with M(win\_chocolatey\_source) instead of passing it per task. |
| **state** string | **Choices:*** absent
* downgrade
* latest
* **present** β
* reinstalled
| State of the package on the system. When `absent`, will ensure the package is not installed. When `present`, will ensure the package is installed. When `downgrade`, will allow Chocolatey to downgrade a package if *version* is older than the installed version. When `latest`, will ensure the package is installed to the latest available version. When `reinstalled`, will uninstall and reinstall the package. |
| **timeout** integer added in 0.2.3 of chocolatey.chocolatey | **Default:**2700 | The time to allow chocolatey to finish before timing out.
aliases: execution\_timeout |
| **validate\_certs** boolean added in 0.2.7 of chocolatey.chocolatey | **Choices:*** no
* **yes** β
| Used when downloading the Chocolatey install script if Chocolatey is not already installed, this does not affect the Chocolatey package install process. When `no`, no SSL certificates will be validated. This should only be used on personally controlled sites using self-signed certificate. |
| **version** string | | Specific version of the package to be installed. When *state* is set to `absent`, will uninstall the specific version otherwise all versions of that package will be removed. If a different version of package is installed, *state* must be `latest` or *force* set to `yes` to install the desired version. Provide as a string (e.g. `'6.1'`), otherwise it is considered to be a floating-point number and depending on the locale could become `6,1`, which will cause a failure. If *name* is set to `chocolatey` and Chocolatey is not installed on the host, this will be the version of Chocolatey that is installed. You can also set the `chocolateyVersion` environment var. |
Notes
-----
Note
* This module will install or upgrade Chocolatey when needed.
* When using verbosity 2 or less (`-vv`) the `stdout` output will be restricted. When using verbosity 4 (`-vvvv`) the `stdout` output will be more verbose. When using verbosity 5 (`-vvvvv`) the `stdout` output will include debug output.
* Some packages, like hotfixes or updates need an interactive user logon in order to install. You can use `become` to achieve this, see [Become and Windows](../../../user_guide/become#become-windows). Even if you are connecting as local Administrator, using `become` to become Administrator will give you an interactive user logon, see examples below.
* If `become` is unavailable, use M(win\_hotfix) to install hotfixes instead of M(win\_chocolatey) as M(win\_hotfix) avoids using `wusa.exe` which cannot be run without `become`.
See Also
--------
See also
M(win\_chocolatey\_config)
The official documentation on the **win\_chocolatey\_config** module.
M(win\_chocolatey\_facts)
The official documentation on the **win\_chocolatey\_facts** module.
M(win\_chocolatey\_feature)
The official documentation on the **win\_chocolatey\_feature** module.
M(win\_chocolatey\_source)
The official documentation on the **win\_chocolatey\_source** module.
M(win\_feature)
The official documentation on the **win\_feature** module.
M(win\_hotfix)
Use when `become` is unavailable, to avoid using `wusa.exe`.
M(win\_package)
The official documentation on the **win\_package** module.
M(win\_updates)
The official documentation on the **win\_updates** module.
[Chocolatey website](http://chocolatey.org/)
More information about the Chocolatey tool.
[Chocolatey packages](http://chocolatey.org/packages)
An overview of the available Chocolatey packages.
[Become and Windows](../../../user_guide/become#become-windows)
Some packages, like hotfixes or updates need an interactive user logon in order to install. You can use `become` to achieve this.
Examples
--------
```
- name: Install git
win_chocolatey:
name: git
state: present
- name: Upgrade installed packages
win_chocolatey:
name: all
state: latest
- name: Install notepadplusplus version 6.6
win_chocolatey:
name: notepadplusplus
version: '6.6'
- name: Install notepadplusplus 32 bit version
win_chocolatey:
name: notepadplusplus
architecture: x86
- name: Install git from specified repository
win_chocolatey:
name: git
source: https://someserver/api/v2/
- name: Install git from a pre configured source (win_chocolatey_source)
win_chocolatey:
name: git
source: internal_repo
- name: Ensure Chocolatey itself is installed and use internal repo as source
win_chocolatey:
name: chocolatey
source: http://someserver/chocolatey
- name: Uninstall git
win_chocolatey:
name: git
state: absent
- name: Install multiple packages
win_chocolatey:
name:
- procexp
- putty
- windirstat
state: present
- name: Install multiple packages sequentially
win_chocolatey:
name: '{{ item }}'
state: present
loop:
- procexp
- putty
- windirstat
- name: Uninstall multiple packages
win_chocolatey:
name:
- procexp
- putty
- windirstat
state: absent
- name: Uninstall a package and dependencies
win_chocolatey:
name: audacity-lame
remove_dependencies: yes
state: absent
- name: Install curl using proxy
win_chocolatey:
name: curl
proxy_url: http://proxy-server:8080/
proxy_username: joe
proxy_password: p@ssw0rd
- name: Install a package that requires 'become'
win_chocolatey:
name: officepro2013
become: yes
become_user: Administrator
become_method: runas
- name: install and pin Notepad++ at 7.6.3
win_chocolatey:
name: notepadplusplus
version: 7.6.3
pinned: yes
state: present
- name: remove all pins for Notepad++ on all versions
win_chocolatey:
name: notepadplusplus
pinned: no
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 |
| --- | --- | --- |
| **command** string | changed | The full command used in the chocolatey task. **Sample:** choco.exe install -r --no-progress -y sysinternals --timeout 2700 --failonunfound |
| **rc** integer | always | The return code from the chocolatey task. |
| **stdout** string | changed | The stdout from the chocolatey task. The verbosity level of the messages are affected by Ansible verbosity setting, see notes for more details. **Sample:** Chocolatey upgraded 1/1 packages. |
### Authors
* Trond Hindenes (@trondhindenes)
* Peter Mounce (@petemounce)
* Pepe Barbe (@elventear)
* Adam Keech (@smadam813)
* Pierre Templier (@ptemplier)
* Jordan Borean (@jborean93)
ansible Collections in the Openvswitch Namespace Collections in the Openvswitch Namespace
========================================
These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **openvswitch** namespace.
* [openvswitch.openvswitch](openvswitch/index#plugins-in-openvswitch-openvswitch)
ansible Openvswitch.Openvswitch Openvswitch.Openvswitch
=======================
Collection version 2.0.2
Plugin Index
------------
These are the plugins in the openvswitch.openvswitch collection
### Modules
* [openvswitch\_bond](openvswitch_bond_module#ansible-collections-openvswitch-openvswitch-openvswitch-bond-module) β Manage Open vSwitch bonds
* [openvswitch\_bridge](openvswitch_bridge_module#ansible-collections-openvswitch-openvswitch-openvswitch-bridge-module) β Manage Open vSwitch bridges
* [openvswitch\_db](openvswitch_db_module#ansible-collections-openvswitch-openvswitch-openvswitch-db-module) β Configure open vswitch database.
* [openvswitch\_port](openvswitch_port_module#ansible-collections-openvswitch-openvswitch-openvswitch-port-module) β Manage Open vSwitch ports
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
ansible openvswitch.openvswitch.openvswitch_bridge β Manage Open vSwitch bridges openvswitch.openvswitch.openvswitch\_bridge β Manage Open vSwitch bridges
=========================================================================
Note
This plugin is part of the [openvswitch.openvswitch collection](https://galaxy.ansible.com/openvswitch/openvswitch) (version 2.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install openvswitch.openvswitch`.
To use it in a playbook, specify: `openvswitch.openvswitch.openvswitch_bridge`.
New in version 1.0.0: of openvswitch.openvswitch
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Manage Open vSwitch bridges
Requirements
------------
The below requirements are needed on the host that executes this module.
* ovs-vsctl
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bridge** string / required | | Name of bridge or fake bridge to manage |
| **external\_ids** dictionary | | A dictionary of external-ids. Omitting this parameter is a No-op. To clear all external-ids pass an empty value. |
| **fail\_mode** string | | Set bridge fail-mode. The default value (None) is a No-op. |
| **parent** string | | Bridge parent of the fake bridge to manage |
| **set** string | | Run set command after bridge configuration. This parameter is non-idempotent, play will always return *changed* state if present |
| **state** string | **Choices:*** **present** β
* absent
| Whether the bridge should exist |
| **timeout** integer | **Default:**5 | How long to wait for ovs-vswitchd to respond |
| **vlan** integer | | The VLAN id of the fake bridge to manage (must be between 0 and 4095). This parameter is required if *parent* parameter is set. |
Examples
--------
```
# Create a bridge named br-int
- openvswitch.openvswitch.openvswitch_bridge:
bridge: br-int
state: present
# Create a fake bridge named br-int within br-parent on the VLAN 405
- openvswitch.openvswitch.openvswitch_bridge:
bridge: br-int
parent: br-parent
vlan: 405
state: present
# Create an integration bridge
- openvswitch.openvswitch.openvswitch_bridge:
bridge: br-int
state: present
fail_mode: secure
args:
external_ids:
bridge-id: br-int
```
### Authors
* David Stygstra (@stygstra)
ansible openvswitch.openvswitch.openvswitch_port β Manage Open vSwitch ports openvswitch.openvswitch.openvswitch\_port β Manage Open vSwitch ports
=====================================================================
Note
This plugin is part of the [openvswitch.openvswitch collection](https://galaxy.ansible.com/openvswitch/openvswitch) (version 2.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install openvswitch.openvswitch`.
To use it in a playbook, specify: `openvswitch.openvswitch.openvswitch_port`.
New in version 1.0.0: of openvswitch.openvswitch
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Manage Open vSwitch ports
Requirements
------------
The below requirements are needed on the host that executes this module.
* ovs-vsctl
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bridge** string / required | | Name of bridge to manage |
| **external\_ids** dictionary | **Default:**{} | Dictionary of external\_ids applied to a port. |
| **port** string / required | | Name of port to manage on the bridge |
| **set** list / elements=string | | Set multiple properties on a port. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the port should exist |
| **tag** string | | VLAN tag for this port. Must be a value between 0 and 4095. |
| **timeout** integer | **Default:**5 | How long to wait for ovs-vswitchd to respond |
Examples
--------
```
# Creates port eth2 on bridge br-ex
- openvswitch.openvswitch.openvswitch_port:
bridge: br-ex
port: eth2
state: present
# Creates port eth6
- openvswitch.openvswitch.openvswitch_port:
bridge: bridge-loop
port: eth6
state: present
set: Interface eth6
# Creates port vlan10 with tag 10 on bridge br-ex
- openvswitch.openvswitch.openvswitch_port:
bridge: br-ex
port: vlan10
tag: 10
state: present
set: Interface vlan10
# Assign interface id server1-vifeth6 and mac address 00:00:5E:00:53:23
# to port vifeth6 and setup port to be managed by a controller.
- openvswitch.openvswitch.openvswitch_port:
bridge: br-int
port: vifeth6
state: present
args:
external_ids:
iface-id: '{{ inventory_hostname }}-vifeth6'
attached-mac: 00:00:5E:00:53:23
vm-id: '{{ inventory_hostname }}'
iface-status: active
```
### Authors
* David Stygstra (@stygstra)
| programming_docs |
ansible openvswitch.openvswitch.openvswitch_db β Configure open vswitch database. openvswitch.openvswitch.openvswitch\_db β Configure open vswitch database.
==========================================================================
Note
This plugin is part of the [openvswitch.openvswitch collection](https://galaxy.ansible.com/openvswitch/openvswitch) (version 2.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install openvswitch.openvswitch`.
To use it in a playbook, specify: `openvswitch.openvswitch.openvswitch_db`.
New in version 1.0.0: of openvswitch.openvswitch
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Set column values in record in database table.
Requirements
------------
The below requirements are needed on the host that executes this module.
* ovs-vsctl >= 2.3.3
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **col** string / required | | Identifies the column in the record. |
| **key** string | | Identifies the key in the record column, when the column is a map type. |
| **record** string / required | | Identifies the record in the table. |
| **state** string | **Choices:*** **present** β
* absent
| Configures the state of the key. When set to *present*, the *key* and *value* pair will be set on the *record* and when set to *absent* the *key* will not be set. |
| **table** string / required | | Identifies the table in the database. |
| **timeout** integer | **Default:**5 | How long to wait for ovs-vswitchd to respond |
| **value** string | | Expected value for the table, record, column and key. |
Examples
--------
```
# Increase the maximum idle time to 50 seconds before pruning unused kernel
# rules.
- openvswitch.openvswitch.openvswitch_db:
table: open_vswitch
record: .
col: other_config
key: max-idle
value: 50000
# Disable in band copy
- openvswitch.openvswitch.openvswitch_db:
table: Bridge
record: br-int
col: other_config
key: disable-in-band
value: true
# Remove in band key
- openvswitch.openvswitch.openvswitch_db:
state: present
table: Bridge
record: br-int
col: other_config
key: disable-in-band
# Mark port with tag 10
- openvswitch.openvswitch.openvswitch_db:
table: Port
record: port0
col: tag
value: 10
```
### Authors
* Mark Hamilton (@markleehamilton) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#600d08010d090c140f0e464353575b464355525b464354585b160d17011205464354565b030f0d)>
ansible openvswitch.openvswitch.openvswitch_bond β Manage Open vSwitch bonds openvswitch.openvswitch.openvswitch\_bond β Manage Open vSwitch bonds
=====================================================================
Note
This plugin is part of the [openvswitch.openvswitch collection](https://galaxy.ansible.com/openvswitch/openvswitch) (version 2.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install openvswitch.openvswitch`.
To use it in a playbook, specify: `openvswitch.openvswitch.openvswitch_bond`.
New in version 1.0.0: of openvswitch.openvswitch
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Manage Open vSwitch bonds and associated options.
Requirements
------------
The below requirements are needed on the host that executes this module.
* ovs-vsctl
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bond\_downdelay** integer | | Number of milliseconds a link must be down to be deactivated to prevent flapping. |
| **bond\_mode** string | **Choices:*** active-backup
* balance-tcp
* balance-slb
| Sets the bond mode |
| **bond\_updelay** integer | | Number of milliseconds a link must be up to be activated to prevent flapping. |
| **bridge** string / required | | Name of bridge to manage |
| **external\_ids** dictionary | **Default:**{} | Dictionary of external\_ids applied to a port. |
| **interfaces** list / elements=string | | List of interfaces to add to the bond |
| **lacp** string | **Choices:*** active
* passive
* off
| Sets LACP mode |
| **other\_config** dictionary | **Default:**{} | Dictionary of other\_config applied to a port. |
| **port** string / required | | Name of port to manage on the bridge |
| **set** list / elements=string | | Sets one or more properties on a port. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the port should exist |
| **timeout** integer | **Default:**5 | How long to wait for ovs-vswitchd to respond in seconds |
Examples
--------
```
- name: Create an active-backup bond using eth4 and eth5 on bridge br-ex
openvswitch.openvswitch.openvswitch_bond:
bridge: br-ex
port: bond1
interfaces:
- eth4
- eth5
state: present
- name: Delete the bond from bridge br-ex
openvswitch.openvswitch.openvswitch_bond:
bridge: br-ex
port: bond1
state: absent
- name: Create an active LACP bond using eth4 and eth5 on bridge br-ex
openvswitch.openvswitch.openvswitch_bond:
bridge: br-ex
port: bond1
interfaces:
- eth4
- eth5
lacp: active
state: present
# NOTE: other_config values of integer type must be represented
# as literal strings
- name: Configure bond with miimon link monitoring at 100 millisecond intervals
openvswitch.openvswitch.openvswitch_bond:
bridge: br-ex
port: bond1
interfaces:
- eth4
- eth5
bond_updelay: 100
bond_downdelay: 100
state: present
args:
other_config:
bond-detect-mode: miimon
bond-miimon-interval: '"100"'
- name: Create an active LACP bond using DPDK interfaces
openvswitch.openvswitch.openvswitch_bond:
bridge: br-provider
port: dpdkbond
interfaces:
- "0000:04:00.0"
- "0000:04:00.1"
lacp: active
set:
- "interface 0000:04:00.0 type=dpdk options:dpdk-devargs=0000:04:00.0"
- "interface 0000:04:00.1 type=dpdk options:dpdk-devargs=0000:04:00.1"
state: present
```
### Authors
* James Denton (@busterswt)
ansible Collections in the Sensu Namespace Collections in the Sensu Namespace
==================================
These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **sensu** namespace.
* [sensu.sensu\_go](sensu_go/index#plugins-in-sensu-sensu-go)
ansible sensu.sensu_go.cluster_role β Manage Sensu cluster roles sensu.sensu\_go.cluster\_role β Manage Sensu cluster roles
==========================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.cluster_role`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu role.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/rbac/#roles-and-cluster-roles>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **rules** list / elements=dictionary | | Rules that the cluster role applies. Must be non-empty if *state* is `present`. |
| | **resource\_names** list / elements=string | | Names of specific resources the rule has permission to access. Note that for the `create` verb, this argument will not be taken into account when enforcing RBAC, even if it is provided. |
| | **resources** list / elements=string / required | | Types of resources the rule has permission to access. |
| | **verbs** list / elements=string / required | **Choices:*** get
* list
* create
* update
* delete
| Permissions to be applied by the rule. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
See Also
--------
See also
[sensu.sensu\_go.cluster\_role\_info](cluster_role_info_module#ansible-collections-sensu-sensu-go-cluster-role-info-module)
The official documentation on the **sensu.sensu\_go.cluster\_role\_info** module.
[sensu.sensu\_go.cluster\_role\_binding](cluster_role_binding_module#ansible-collections-sensu-sensu-go-cluster-role-binding-module)
The official documentation on the **sensu.sensu\_go.cluster\_role\_binding** module.
[sensu.sensu\_go.role](role_module#ansible-collections-sensu-sensu-go-role-module)
The official documentation on the **sensu.sensu\_go.role** module.
[sensu.sensu\_go.role\_binding](role_binding_module#ansible-collections-sensu-sensu-go-role-binding-module)
The official documentation on the **sensu.sensu\_go.role\_binding** module.
Examples
--------
```
- name: Create a cluster role
sensu.sensu_go.cluster_role:
name: readonly
rules:
- verbs:
- get
- list
resources:
- checks
- entities
- name: Delete a cluster role
sensu.sensu_go.cluster_role:
name: readonly
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu cluster role. **Sample:** {'metadata': {'name': 'cluster-role'}, 'rules': [{'resource\_names': ['sample-name'], 'resources': ['assets', 'checks'], 'verbs': ['get', 'list']}]} |
### Authors
* Paul Arthur (@flowerysong)
* Manca Bizjak (@mancabizjak)
* Aljaz Kosir (@aljazkosir)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.cluster_role_binding_info β List Sensu cluster role bindings sensu.sensu\_go.cluster\_role\_binding\_info β List Sensu cluster role bindings
===============================================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.cluster_role_binding_info`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu cluster role bindings.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/rbac/#role-bindings-and-cluster-role-bindings>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
See Also
--------
See also
[sensu.sensu\_go.cluster\_role\_binding](cluster_role_binding_module#ansible-collections-sensu-sensu-go-cluster-role-binding-module)
The official documentation on the **sensu.sensu\_go.cluster\_role\_binding** module.
Examples
--------
```
- name: List all Sensu cluster role bindings
sensu.sensu_go.cluster_role_binding_info:
register: result
- name: Retrieve a specific Sensu cluster role binding
sensu.sensu_go.cluster_role_binding_info:
name: my-binding
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 |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu cluster role bindings. **Sample:** [{'metadata': {'name': 'cluster-admin'}, 'role\_ref': {'name': 'cluster-admin', 'type': 'ClusterRole'}, 'subjects': [{'name': 'cluster-admins', 'type': 'Group'}]}] |
### Authors
* Paul Arthur (@flowerysong)
* Manca Bizjak (@mancabizjak)
* Aljaz Kosir (@aljazkosir)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.etcd_replicator_info β List available Sensu Go etcd replicators sensu.sensu\_go.etcd\_replicator\_info β List available Sensu Go etcd replicators
=================================================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.etcd_replicator_info`.
New in version 1.9.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu Go etcd replicators.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/operations/deploy-sensu/etcdreplicators/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
See Also
--------
See also
[sensu.sensu\_go.etcd\_replicator](etcd_replicator_module#ansible-collections-sensu-sensu-go-etcd-replicator-module)
The official documentation on the **sensu.sensu\_go.etcd\_replicator** module.
Examples
--------
```
- name: List all Sensu Go etcd replicators
sensu.sensu_go.etcd_replicator_info:
register: result
- name: Retrieve the selected Sensu Go etcd replicator
sensu.sensu_go.etcd_replicator_info:
name: role_replicator
register: result
- name: Do something with result
ansible.builtin.debug:
msg: "{{ result.objects.0.resource }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu Go etcd replicators. **Sample:** [{'api\_version': 'core/v2', 'ca\_cert': '/etc/sensu/certs/ca.pem', 'cert': '/etc/sensu/certs/cert.pem', 'insecure': False, 'key': '/etc/sensu/certs/key.pem', 'metadata': {'created\_by': 'admin', 'name': 'cluster-role-replicator'}, 'namespace': '', 'replication\_interval\_seconds': 30, 'resource': 'ClusterRole', 'url': 'https://sensu.alpha.example.com:2379'}] |
### Authors
* Tadej Borovsak (@tadeboro)
| programming_docs |
ansible sensu.sensu_go.cluster_info β List available Sensu Go clusters sensu.sensu\_go.cluster\_info β List available Sensu Go clusters
================================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.cluster_info`.
New in version 1.9.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu Go clusters.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/operations/deploy-sensu/cluster-sensu/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
See Also
--------
See also
[sensu.sensu\_go.cluster](cluster_module#ansible-collections-sensu-sensu-go-cluster-module)
The official documentation on the **sensu.sensu\_go.cluster** module.
Examples
--------
```
- name: List all Sensu Go clusters
sensu.sensu_go.etcd_replicator_info:
register: result
- name: Retrieve the selected Sensu Go cluster
sensu.sensu_go.etcd_replicator_info:
name: my-cluster
register: result
- name: Do something with result
ansible.builtin.debug:
msg: "{{ result.objects.0.api_urls }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu Go etcd clusters. **Sample:** [{'api\_urls': ['http://10.10.0.1:8080'], 'metadata': {'name': 'alpha-cluster'}}, {'api\_urls': ['http:s//10.20.0.1:8080', 'http:s//10.20.0.2:8080'], 'metadata': {'name': 'beta-cluster'}}] |
### Authors
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.user_info β List Sensu users sensu.sensu\_go.user\_info β List Sensu users
=============================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.user_info`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu users.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/rbac/#users>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
See Also
--------
See also
[sensu.sensu\_go.user](user_module#ansible-collections-sensu-sensu-go-user-module)
The official documentation on the **sensu.sensu\_go.user** module.
Examples
--------
```
- name: List Sensu users
sensu.sensu_go.user_info:
register: result
- name: Retrieve a single Sensu user
sensu.sensu_go.user_info:
name: my-user
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 |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu users. **Sample:** [{'disabled': False, 'groups': ['ops', 'dev'], 'password': 'USER\_PASSWORD', 'password\_hash': '$5f$14$.brXRviMZpbaleSq9kjoUuwm67V/s4IziOLGHjEqxJbzPsreQAyNm', 'username': 'alice'}] |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.event β Manage Sensu events sensu.sensu\_go.event β Manage Sensu events
===========================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.event`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Send a synthetic event to Sensu.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/events/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **check** string / required | | Name of the check associated with this event. It must exist before event creation. |
| **check\_attributes** dictionary | | Additional check parameters. Find out more at <https://docs.sensu.io/sensu-go/latest/reference/events/#check-attributes>. |
| | **duration** float | | Command execution time in seconds. |
| | **executed** integer | | Time that the check request was executed. |
| | **history** list / elements=dictionary | | Check status history for the last 21 check executions. |
| | **issued** integer | | Time that the check request was issued in seconds since the Unix epoch. |
| | **last\_ok** integer | | The last time that the check returned an OK status (0) in seconds since the Unix epoch. |
| | **output** string | | The output from the execution of the check command. |
| | **state** string | **Choices:*** passing
* failing
* flapping
| The state of the check. |
| | **status** string | **Choices:*** ok
* warning
* critical
* unknown
| Exit status code produced by the check. |
| | **total\_state\_change** integer | | The total state change percentage for the check's history. |
| **entity** string / required | | Name of the entity associated with this event. It must exist before event creation. |
| **metric\_attributes** dictionary | | Metric attributes. Find out more at <https://docs.sensu.io/sensu-go/latest/reference/events/#metric-attributes>. |
| | **handlers** list / elements=string | | An array of Sensu handlers to use for events created by the check. Each array item must be a string. |
| | **points** list / elements=dictionary | | Metric data points including a name, timestamp, value, and tags. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **timestamp** integer | | UNIX time at which the event occurred. |
Notes
-----
Note
* Metric events bypass the store and are sent off to the event pipeline and corresponding event handlers. Read more about this at <https://docs.sensu.io/sensu-go/latest/reference/events/#metric-only-events>.
See Also
--------
See also
[sensu.sensu\_go.event\_info](event_info_module#ansible-collections-sensu-sensu-go-event-info-module)
The official documentation on the **sensu.sensu\_go.event\_info** module.
Examples
--------
```
- name: Create an event
sensu.sensu_go.event:
auth:
url: http://localhost:8080
entity: awesome_entity
check: awesome_check
check_attributes:
duration: 1.945
executed: 1522100915
history:
- executed: 1552505193
status: 1
issued: 1552506034
last_ok: 1552506033
output: '10'
state: 'passing'
status: 'ok'
total_state_change: 0
metric_attributes:
handlers:
- handler1
- handler2
points:
- name: "sensu-go-sandbox.curl_timings.time_total"
tags:
- name: "response_time_in_ms"
value: 101
timestamp: 1552506033
value: 0.005
- name: "sensu-go-sandbox.curl_timings.time_namelookup"
tags:
- name: "namelookup_time_in_ms"
value: 57
timestamp: 1552506033
value: 0.004
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu event (deprecated). **Sample:** {'check': {'check\_hooks': None, 'command': 'check-cpu.sh -w 75 -c 90', 'duration': 1.07055808, 'env\_vars': None, 'executed': 1552594757, 'handlers': [], 'high\_flap\_threshold': 0, 'history': [{'executed': 1552594757, 'status': 0}], 'interval': 60, 'metadata': {'name': 'check-cpu', 'namespace': 'default'}, 'occurrences': 1, 'occurrences\_watermark': 1, 'output': 'CPU OK - Usage:3.96', 'subscriptions': ['linux'], 'timeout': 0, 'total\_state\_change': 0, 'ttl': 0}, 'entity': {'deregister': False, 'deregistration': {}, 'entity\_class': 'agent', 'last\_seen': 1552594641, 'metadata': {'name': 'sensu-centos', 'namespace': 'default'}}, 'id': '3a5948f3-6ffd-4ea2-a41e-334f4a72ca2f', 'metadata': {'namespace': 'default'}, 'sequence': 1, 'timestamp': 1552594758} |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Manca Bizjak (@mancabizjak)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.cluster_role_binding β Manage Sensu cluster role bindings sensu.sensu\_go.cluster\_role\_binding β Manage Sensu cluster role bindings
===========================================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.cluster_role_binding`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu cluster role binding.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/rbac/#role-bindings-and-cluster-role-bindings>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **cluster\_role** string | | Name of the cluster role. Required if *state* is `present`. |
| **groups** list / elements=string | | List of groups to bind to the cluster role. Note that at least one of *users* and *groups* must be specified when creating a cluster role binding. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
| **users** list / elements=string | | List of users to bind to the cluster role. Note that at least one of *users* and *groups* must be specified when creating a cluster role binding. |
See Also
--------
See also
[sensu.sensu\_go.cluster\_role\_binding\_info](cluster_role_binding_info_module#ansible-collections-sensu-sensu-go-cluster-role-binding-info-module)
The official documentation on the **sensu.sensu\_go.cluster\_role\_binding\_info** module.
[sensu.sensu\_go.cluster\_role](cluster_role_module#ansible-collections-sensu-sensu-go-cluster-role-module)
The official documentation on the **sensu.sensu\_go.cluster\_role** module.
[sensu.sensu\_go.role\_binding](role_binding_module#ansible-collections-sensu-sensu-go-role-binding-module)
The official documentation on the **sensu.sensu\_go.role\_binding** module.
Examples
--------
```
- name: Create a cluster role binding
sensu.sensu_go.cluster_role_binding:
name: all-cluster-admins
cluster_role: cluster-admin
groups:
- cluster-admins
users:
- alice
- name: Delete a cluster role binding
sensu.sensu_go.cluster_role_binding:
name: all-cluster-admins
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu cluster role binding. **Sample:** {'metadata': {'name': 'cluster-admin'}, 'role\_ref': {'name': 'cluster-admin', 'type': 'ClusterRole'}, 'subjects': [{'name': 'cluster-admins', 'type': 'Group'}]} |
### Authors
* Paul Arthur (@flowerysong)
* Manca Bizjak (@mancabizjak)
* Aljaz Kosir (@aljazkosir)
* Tadej Borovsak (@tadeboro)
| programming_docs |
ansible sensu.sensu_go.backend β Install, configure, and start Sensu Go backend sensu.sensu\_go.backend β Install, configure, and start Sensu Go backend
========================================================================
Note
This role is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
To install it use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.backend`.
* [Entry point `configure` β Configure Sensu Go backend](#entry-point-configure-configure-sensu-go-backend)
+ [Synopsis](#synopsis)
+ [Parameters](#parameters)
* [Entry point `main` β Install, configure, and start Sensu Go backend](#entry-point-main-install-configure-and-start-sensu-go-backend)
+ [Synopsis](#id1)
+ [Parameters](#id2)
* [Entry point `start` β Start Sensu Go backend](#entry-point-start-start-sensu-go-backend)
+ [Synopsis](#id3)
+ [Parameters](#id4)
Entry point `configure` β Configure Sensu Go backend
----------------------------------------------------
### Synopsis
* Write the Sensu Go backend configuration file and optionally copy the keys and certificates over.
### Parameters
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_cert\_file** string | | Path to the certificate used to secure the Sensu Go API. |
| **api\_key\_file** string | | Path to the private key corresponding to the Sensu Go API certificate. Must be unencrypted. |
| **api\_trusted\_ca\_file** string | | Path to the trusted certificate authority for the Sensu Go API certificates. |
| **backend\_config** dictionary | | Any option that is valid for the Sensu Go backend version we are installing. All valid options are listed at <https://docs.sensu.io/sensu-go/latest/reference/backend/#configuration>. Role copies the key-value pairs from the *backend\_config* variable verbatim to the configuration file. This means that we must copy the key names **exactly** as they appear in the configuration reference. In a way, the *backend\_config* variable should contain a properly indented copy of the `/etc/sensu/backend.yml` file. |
| **dashboard\_cert\_file** string | | Path to the certificate used for SSL/TLS connections to the dashboard. |
| **dashboard\_key\_file** string | | Path to the private key corresponding to the dashboard certificate. Must be unencrypted. |
| **etcd\_cert\_file** string | | Path to the certificate used for SSL/TLS connections **to** etcd. This is a client certificate. |
| **etcd\_key\_file** string | | Path to the private key for the etcd client certificate file. Must be unencrypted. |
| **etcd\_peer\_cert\_file** string | | Path to the certificate used for SSL/TLS connections between peers. This will be used both for listening on the peer address as well as sending requests to other peers. |
| **etcd\_peer\_key\_file** string | | Path to the peer certificate's key. Must be unencrypted. |
| **etcd\_peer\_trusted\_ca\_file** string | | Path to the trusted certificate authority for the peer certificates. |
| **etcd\_trusted\_ca\_file** string | | Path to the trusted certificate authority for the etcd client certificates. |
Entry point `main` β Install, configure, and start Sensu Go backend
-------------------------------------------------------------------
### Synopsis
* Install, configure, and start the Sensu Go backend service and initialize it on the first run.
### Parameters
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_cert\_file** string | | Path to the certificate used to secure the Sensu Go API. |
| **api\_key\_file** string | | Path to the private key corresponding to the Sensu Go API certificate. Must be unencrypted. |
| **api\_trusted\_ca\_file** string | | Path to the trusted certificate authority for the Sensu Go API certificates. |
| **backend\_config** dictionary | | Any option that is valid for the Sensu Go backend version we are installing. All valid options are listed at <https://docs.sensu.io/sensu-go/latest/reference/backend/#configuration>. Role copies the key-value pairs from the *backend\_config* variable verbatim to the configuration file. This means that we must copy the key names **exactly** as they appear in the configuration reference. In a way, the *backend\_config* variable should contain a properly indented copy of the `/etc/sensu/backend.yml` file. |
| **build** string | **Default:**"latest" | Package build to install. Can be any valid build string such as `8290` or a special value latest. If the *version* variable is set to latest, this variable is ignored and the latest available build is installed. |
| **channel** string | **Default:**"stable" | Repository channel that serves as a source of packages. Visit the packagecloud site to find all available channels. |
| **cluster\_admin\_password** string | **Default:**"P@ssw0rd!" | Initial admin password to create when initializing backend for the first time. |
| **cluster\_admin\_username** string | **Default:**"admin" | Initial admin user to create when initializing backend for the first time. |
| **dashboard\_cert\_file** string | | Path to the certificate used for SSL/TLS connections to the dashboard. |
| **dashboard\_key\_file** string | | Path to the private key corresponding to the dashboard certificate. Must be unencrypted. |
| **etcd\_cert\_file** string | | Path to the certificate used for SSL/TLS connections **to** etcd. This is a client certificate. |
| **etcd\_key\_file** string | | Path to the private key for the etcd client certificate file. Must be unencrypted. |
| **etcd\_peer\_cert\_file** string | | Path to the certificate used for SSL/TLS connections between peers. This will be used both for listening on the peer address as well as sending requests to other peers. |
| **etcd\_peer\_key\_file** string | | Path to the peer certificate's key. Must be unencrypted. |
| **etcd\_peer\_trusted\_ca\_file** string | | Path to the trusted certificate authority for the peer certificates. |
| **etcd\_trusted\_ca\_file** string | | Path to the trusted certificate authority for the etcd client certificates. |
| **version** string | **Default:**"latest" | Package version to install. Can be any valid version string such as `6.2.5` or special value `latest`. |
Entry point `start` β Start Sensu Go backend
--------------------------------------------
### Synopsis
* Start the Sensu Go backend service and initialize it on the first run.
### Parameters
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **cluster\_admin\_password** string | **Default:**"P@ssw0rd!" | Initial admin password to create when initializing backend for the first time. |
| **cluster\_admin\_username** string | **Default:**"admin" | Initial admin user to create when initializing backend for the first time. |
ansible Sensu.Sensu_Go Sensu.Sensu\_Go
===============
Collection version 1.12.0
Plugin Index
------------
These are the plugins in the sensu.sensu\_go collection
### Modules
* [ad\_auth\_provider](ad_auth_provider_module#ansible-collections-sensu-sensu-go-ad-auth-provider-module) β Manage Sensu AD authentication provider
* [asset](asset_module#ansible-collections-sensu-sensu-go-asset-module) β Manage Sensu assets
* [asset\_info](asset_info_module#ansible-collections-sensu-sensu-go-asset-info-module) β List Sensu assets
* [auth\_provider\_info](auth_provider_info_module#ansible-collections-sensu-sensu-go-auth-provider-info-module) β List Sensu authentication providers
* [bonsai\_asset](bonsai_asset_module#ansible-collections-sensu-sensu-go-bonsai-asset-module) β Add Sensu assets from Bonsai
* [check](check_module#ansible-collections-sensu-sensu-go-check-module) β Manage Sensu checks
* [check\_info](check_info_module#ansible-collections-sensu-sensu-go-check-info-module) β List Sensu checks
* [cluster](cluster_module#ansible-collections-sensu-sensu-go-cluster-module) β Manage Sensu Go clusters
* [cluster\_info](cluster_info_module#ansible-collections-sensu-sensu-go-cluster-info-module) β List available Sensu Go clusters
* [cluster\_role](cluster_role_module#ansible-collections-sensu-sensu-go-cluster-role-module) β Manage Sensu cluster roles
* [cluster\_role\_binding](cluster_role_binding_module#ansible-collections-sensu-sensu-go-cluster-role-binding-module) β Manage Sensu cluster role bindings
* [cluster\_role\_binding\_info](cluster_role_binding_info_module#ansible-collections-sensu-sensu-go-cluster-role-binding-info-module) β List Sensu cluster role bindings
* [cluster\_role\_info](cluster_role_info_module#ansible-collections-sensu-sensu-go-cluster-role-info-module) β List Sensu cluster roles
* [datastore](datastore_module#ansible-collections-sensu-sensu-go-datastore-module) β Manage Sensu external datastore providers
* [datastore\_info](datastore_info_module#ansible-collections-sensu-sensu-go-datastore-info-module) β List external Sensu datastore providers
* [entity](entity_module#ansible-collections-sensu-sensu-go-entity-module) β Manage Sensu entities
* [entity\_info](entity_info_module#ansible-collections-sensu-sensu-go-entity-info-module) β List Sensu entities
* [etcd\_replicator](etcd_replicator_module#ansible-collections-sensu-sensu-go-etcd-replicator-module) β Manage Sensu Go etcd replicators
* [etcd\_replicator\_info](etcd_replicator_info_module#ansible-collections-sensu-sensu-go-etcd-replicator-info-module) β List available Sensu Go etcd replicators
* [event](event_module#ansible-collections-sensu-sensu-go-event-module) β Manage Sensu events
* [event\_info](event_info_module#ansible-collections-sensu-sensu-go-event-info-module) β List Sensu events
* [filter](filter_module#ansible-collections-sensu-sensu-go-filter-module) β Manage Sensu filters
* [filter\_info](filter_info_module#ansible-collections-sensu-sensu-go-filter-info-module) β List Sensu info
* [handler\_info](handler_info_module#ansible-collections-sensu-sensu-go-handler-info-module) β List Sensu handlers
* [handler\_set](handler_set_module#ansible-collections-sensu-sensu-go-handler-set-module) β Manage Sensu handler set
* [hook](hook_module#ansible-collections-sensu-sensu-go-hook-module) β Manage Sensu hooks
* [hook\_info](hook_info_module#ansible-collections-sensu-sensu-go-hook-info-module) β List Sensu hooks
* [ldap\_auth\_provider](ldap_auth_provider_module#ansible-collections-sensu-sensu-go-ldap-auth-provider-module) β Manage Sensu LDAP authentication provider
* [mutator](mutator_module#ansible-collections-sensu-sensu-go-mutator-module) β Manage Sensu mutators
* [mutator\_info](mutator_info_module#ansible-collections-sensu-sensu-go-mutator-info-module) β List Sensu mutators
* [namespace](namespace_module#ansible-collections-sensu-sensu-go-namespace-module) β Manage Sensu namespaces
* [namespace\_info](namespace_info_module#ansible-collections-sensu-sensu-go-namespace-info-module) β List Sensu namespaces
* [oidc\_auth\_provider](oidc_auth_provider_module#ansible-collections-sensu-sensu-go-oidc-auth-provider-module) β Manage Sensu OIDC authentication provider
* [pipe\_handler](pipe_handler_module#ansible-collections-sensu-sensu-go-pipe-handler-module) β Manage Sensu pipe handler
* [role](role_module#ansible-collections-sensu-sensu-go-role-module) β Manage Sensu roles
* [role\_binding](role_binding_module#ansible-collections-sensu-sensu-go-role-binding-module) β Manage Sensu role bindings
* [role\_binding\_info](role_binding_info_module#ansible-collections-sensu-sensu-go-role-binding-info-module) β List Sensu role bindings
* [role\_info](role_info_module#ansible-collections-sensu-sensu-go-role-info-module) β List Sensu roles
* [secret](secret_module#ansible-collections-sensu-sensu-go-secret-module) β Manage Sensu Go secrets
* [secret\_info](secret_info_module#ansible-collections-sensu-sensu-go-secret-info-module) β List available Sensu Go secrets
* [secrets\_provider\_env](secrets_provider_env_module#ansible-collections-sensu-sensu-go-secrets-provider-env-module) β Manage Sensu Env secrets provider
* [secrets\_provider\_info](secrets_provider_info_module#ansible-collections-sensu-sensu-go-secrets-provider-info-module) β List Sensu secrets providers
* [secrets\_provider\_vault](secrets_provider_vault_module#ansible-collections-sensu-sensu-go-secrets-provider-vault-module) β Manage Sensu VaultProvider secrets providers
* [silence](silence_module#ansible-collections-sensu-sensu-go-silence-module) β Manage Sensu silences
* [silence\_info](silence_info_module#ansible-collections-sensu-sensu-go-silence-info-module) β List Sensu silence entries
* [socket\_handler](socket_handler_module#ansible-collections-sensu-sensu-go-socket-handler-module) β Manage Sensu TCP/UDP handler
* [tessen](tessen_module#ansible-collections-sensu-sensu-go-tessen-module) β Manage Sensuβs Tessen configuration
* [user](user_module#ansible-collections-sensu-sensu-go-user-module) β Manage Sensu users
* [user\_info](user_info_module#ansible-collections-sensu-sensu-go-user-info-module) β List Sensu users
Role Index
----------
These are the roles in the sensu.sensu\_go collection
* [agent](agent_role#ansible-collections-sensu-sensu-go-agent-role) β Install, configure, and start Sensu Go agent
* [backend](backend_role#ansible-collections-sensu-sensu-go-backend-role) β Install, configure, and start Sensu Go backend
* [install](install_role#ansible-collections-sensu-sensu-go-install-role) β Enable Sensu Go repos and install selected packages
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
ansible sensu.sensu_go.hook_info β List Sensu hooks sensu.sensu\_go.hook\_info β List Sensu hooks
=============================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.hook_info`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu hooks.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/hooks/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
See Also
--------
See also
[sensu.sensu\_go.hook](hook_module#ansible-collections-sensu-sensu-go-hook-module)
The official documentation on the **sensu.sensu\_go.hook** module.
Examples
--------
```
- name: List all Sensu hooks
sensu.sensu_go.hook_info:
register: result
- name: Fetch a specific Sensu hook
sensu.sensu_go.hook_info:
name: awesome-hook
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 |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu hooks. **Sample:** [{'command': 'sudo systemctl start nginx', 'metadata': {'annotations': None, 'labels': None, 'name': 'restart\_nginx', 'namespace': 'default'}, 'stdin': False, 'timeout': 60}] |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.cluster β Manage Sensu Go clusters sensu.sensu\_go.cluster β Manage Sensu Go clusters
==================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.cluster`.
New in version 1.9.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu cluster.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/operations/deploy-sensu/cluster-sensu/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_urls** list / elements=string | | List of API urls that compose a single cluster. Required if *state* is `present`. |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
See Also
--------
See also
[sensu.sensu\_go.cluster\_info](cluster_info_module#ansible-collections-sensu-sensu-go-cluster-info-module)
The official documentation on the **sensu.sensu\_go.cluster\_info** module.
Examples
--------
```
- name: Create a small cluster
sensu.sensu_go.cluster:
name: small-cluster
api_urls: https://sensu.alpha.example.com:8080
- name: Create a larger cluster
sensu.sensu_go.cluster:
name: large-cluster
api_urls:
- https://sensu.alpha.example.com:8080
- https://sensu.beta.example.com:8080
- https://sensu.gamma.example.com:8080
- name: Delete a cluster
sensu.sensu_go.cluster:
name: small-cluster
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu cluster. **Sample:** {'api\_urls': ['http://10.10.0.1:8080'], 'metadata': {'name': 'alpha-cluster'}} |
### Authors
* Tadej Borovsak (@tadeboro)
| programming_docs |
ansible sensu.sensu_go.cluster_role_info β List Sensu cluster roles sensu.sensu\_go.cluster\_role\_info β List Sensu cluster roles
==============================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.cluster_role_info`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu roles.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/rbac/#roles-and-cluster-roles>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
See Also
--------
See also
[sensu.sensu\_go.cluster\_role](cluster_role_module#ansible-collections-sensu-sensu-go-cluster-role-module)
The official documentation on the **sensu.sensu\_go.cluster\_role** module.
Examples
--------
```
- name: List all Sensu cluster roles
sensu.sensu_go.cluster_role_info:
register: result
- name: Retrieve Sensu cluster role by name
sensu.sensu_go.cluster_role_info:
name: my-custer-role
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 |
| --- | --- | --- |
| **roles** list / elements=dictionary | success | List of Sensu cluster roles. **Sample:** [{'metadata': {'name': 'cluster-role'}, 'rules': [{'resource\_names': ['sample-name'], 'resources': ['assets', 'checks'], 'verbs': ['get', 'list']}]}] |
### Authors
* Paul Arthur (@flowerysong)
* Manca Bizjak (@mancabizjak)
* Aljaz Kosir (@aljazkosir)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.filter β Manage Sensu filters sensu.sensu\_go.filter β Manage Sensu filters
=============================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.filter`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu filter.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/filters/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string | **Choices:*** allow
* deny
| Action to take with the event if the filter expressions match. Required if *state* is `present`. |
| **annotations** dictionary | | Custom metadata fields with fewer restrictions, as key/value pairs. These are preserved by Sensu but not accessible as tokens or identifiers, and are mainly intended for use with external tools. |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **expressions** list / elements=string | | Filter expressions to be compared with event data. Required if *state* is `present`. |
| **labels** dictionary | | Custom metadata fields that can be accessed within Sensu, as key/value pairs. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **runtime\_assets** list / elements=string | | Assets to be applied to the filter's execution context. JavaScript files in the lib directory of the asset will be evaluated. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
See Also
--------
See also
[sensu.sensu\_go.filter\_info](filter_info_module#ansible-collections-sensu-sensu-go-filter-info-module)
The official documentation on the **sensu.sensu\_go.filter\_info** module.
Examples
--------
```
- name: Create a filter
sensu.sensu_go.filter:
name: filter
action: deny
expressions:
- event.check.interval == 10
- event.check.occurrences == 1
runtime_assets: awesomeness
- name: Create a production filter
sensu.sensu_go.filter:
name: filter
action: allow
expressions:
- event.entity.labels['environment'] == 'production'
- name: Create a filter with JS expression
sensu.sensu_go.filter:
name: filter
action: deny
expressions:
- "_.reduce(event.check.history, function(memo, h) { return (memo || h.status != 0); })"
runtime_assets:
- underscore
- name: Handling repeated events
sensu.sensu_go.filter:
name: filter_interval_60_hourly
action: allow
expressions:
- event.check.interval == 60
- event.check.occurrences == 1 || event.check.occurrences % 60 == 0
- name: Delete a filter
sensu.sensu_go.filter:
name: filter_interval_60_hourly
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu filter. **Sample:** {'action': 'allow', 'expressions': ['event.check.occurrences == 1'], 'metadata': {'name': 'filter\_minimum', 'namespace': 'default'}} |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.entity_info β List Sensu entities sensu.sensu\_go.entity\_info β List Sensu entities
==================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.entity_info`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu entities.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/entities/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
See Also
--------
See also
[sensu.sensu\_go.entity](entity_module#ansible-collections-sensu-sensu-go-entity-module)
The official documentation on the **sensu.sensu\_go.entity** module.
Examples
--------
```
- name: List all Sensu entities
sensu.sensu_go.entity_info:
register: result
- name: Retrieve a specific Sensu entity
sensu.sensu_go.entity_info:
name: my-entity
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 |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu entities. **Sample:** [{'deregister': False, 'deregistration': {}, 'entity\_class': 'agent', 'last\_seen': 1542667231, 'metadata': {'annotations': None, 'labels': None, 'name': 'webserver01', 'namespace': 'default'}, 'redact': ['password', 'private\_key', 'secret'], 'sensu\_agent\_version': '1.0.0', 'subscriptions': ['entity:webserver01'], 'system': {'arch': 'amd64', 'cloud\_provider': None, 'libc\_type': 'glibc', 'network': {'interfaces': [{'addresses': ['127.0.0.1/8', '::1/128'], 'name': 'lo'}, {'addresses': ['172.28.128.3/24', 'fe80::a00:27ff:febc:be60/64'], 'mac': '08:00:27:bc:be:60', 'name': 'enp0s8'}]}, 'os': 'linux', 'platform': 'centos', 'platform\_family': 'rhel', 'platform\_version': '7.4.1708', 'vm\_role': 'host', 'vm\_system': 'kvm'}, 'user': 'agent'}] |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.ad_auth_provider β Manage Sensu AD authentication provider sensu.sensu\_go.ad\_auth\_provider β Manage Sensu AD authentication provider
============================================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.ad_auth_provider`.
New in version 1.10.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete a Sensu Go AD authentication provider.
* For more information, refer to the Sensu Go documentation at <https://docs.sensu.io/sensu-go/latest/operations/control-access/ad-auth/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **groups\_prefix** string | | The prefix added to all AD groups. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **servers** list / elements=dictionary | | An array of AD servers for your directory. |
| | **binding** dictionary | | The AD account that performs user and group lookups. If your sever supports anonymous binding, you can omit the user\_dn or password attributes to query the directory without credentials. |
| | | **password** string / required | | Password for the user\_dn account. If your sever supports anonymous binding, you can omit this attribute. |
| | | **user\_dn** string / required | | The AD account that performs user and group lookups. If your sever supports anonymous binding, you can omit this attribute. |
| | **client\_cert\_file** string | | Path to the certificate that should be sent to the server if requested. |
| | **client\_key\_file** string | | Path to the key file associated with the client\_cert\_file. Required if *client\_cert\_file* is present. |
| | **default\_upn\_domain** string | | Enables UPN authentication when set. The default UPN suffix that will be appended to the username when a domain is not specified during login (for example, user becomes [email protected]). |
| | **group\_search** dictionary | | Search configuration for groups. |
| | | **attribute** string | **Default:**"member" | Used for comparing result entries. |
| | | **base\_dn** string / required | | Which part of the directory tree to search. |
| | | **name\_attribute** string | **Default:**"cn" | Represents the attribute to use as the entry name. |
| | | **object\_class** string | **Default:**"group" | Identifies the class of objects returned in the search result. |
| | **host** string / required | | AD server IP address. |
| | **include\_nested\_groups** boolean | **Choices:*** no
* yes
| If true, the group search includes any nested groups a user is a member of. If false, the group search includes only the top-level groups a user is a member of. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| Skips SSL certificate verification when set to true. |
| | **port** integer | | AD server port. |
| | **security** string | **Choices:*** insecure
* **tls** β
* starttls
| Encryption type to be used for the connection to the AD server. |
| | **trusted\_ca\_file** string | | Path to an alternative CA bundle file. |
| | **user\_search** dictionary | | Search configuration for users. |
| | | **attribute** string | **Default:**"sAMAccountName" | Used for comparing result entries. |
| | | **base\_dn** string / required | | Which part of the directory tree to search. |
| | | **name\_attribute** string | **Default:**"displayName" | Represents the attribute to use as the entry name. |
| | | **object\_class** string | **Default:**"person" | Identifies the class of objects returned in the search result. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
| **username\_prefix** string | | The prefix added to all AD usernames. |
See Also
--------
See also
[sensu.sensu\_go.auth\_provider\_info](auth_provider_info_module#ansible-collections-sensu-sensu-go-auth-provider-info-module)
The official documentation on the **sensu.sensu\_go.auth\_provider\_info** module.
[sensu.sensu\_go.ldap\_auth\_provider](ldap_auth_provider_module#ansible-collections-sensu-sensu-go-ldap-auth-provider-module)
The official documentation on the **sensu.sensu\_go.ldap\_auth\_provider** module.
[sensu.sensu\_go.oidc\_auth\_provider](oidc_auth_provider_module#ansible-collections-sensu-sensu-go-oidc-auth-provider-module)
The official documentation on the **sensu.sensu\_go.oidc\_auth\_provider** module.
Examples
--------
```
- name: Create a AD auth provider
sensu.sensu_go.ad_auth_provider:
name: activedirectory
servers:
- host: 127.0.0.1
group_search:
base_dn: dc=acme,dc=org
user_search:
base_dn: dc=acme,dc=org
- name: Delete a AD auth provider
sensu.sensu_go.ad_auth_provider:
name: activedirectory
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu AD authentication provider. **Sample:** {'groups\_prefix': 'AD', 'metadata': {'name': 'activedirectory'}, 'servers': {'binding': {'user\_dn': 'cn=binder,dc=acme,dc=org'}, 'client\_cert\_file': '/path/to/ssl/cert.pem', 'client\_key\_file': '/path/to/ssl/key.pem', 'default\_upn\_domain': 'example.org', 'group\_search': {'attribute': 'member', 'base\_dn': 'dc=acme,dc=org', "name\_attribute'": 'cn', 'object\_class': 'group'}, 'host': '127.0.0.1', 'insecure': 'False', 'port': '636', 'security': 'tls', 'trusted\_ca\_file': '/path/to/trusted-certificate-authorities.pem', 'user\_search': {'attribute': 'sAMAccountName', 'base\_dn': 'dc=acme,dc=org', 'name\_attribute': 'displayName', 'object\_class': 'person'}}, 'username\_prefix': 'AD'} |
### Authors
* Aljaz Kosir (@aljazkosir)
* Manca Bizjak (@mancabizjak)
* Miha Dolinar (@mdolin)
* Tadej Borovsak (@tadeboro)
| programming_docs |
ansible sensu.sensu_go.secret β Manage Sensu Go secrets sensu.sensu\_go.secret β Manage Sensu Go secrets
================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.secret`.
New in version 1.6.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu secret.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/operations/manage-secrets/secrets/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **id** string | | Secret's id in the provider store. Required if *state* is `present`. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **provider** string | | Name of the secrets provider that backs the secret value. Required if *state* is `present`. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
See Also
--------
See also
[sensu.sensu\_go.secret\_info](secret_info_module#ansible-collections-sensu-sensu-go-secret-info-module)
The official documentation on the **sensu.sensu\_go.secret\_info** module.
[sensu.sensu\_go.secrets\_provider\_env](secrets_provider_env_module#ansible-collections-sensu-sensu-go-secrets-provider-env-module)
The official documentation on the **sensu.sensu\_go.secrets\_provider\_env** module.
[sensu.sensu\_go.secrets\_provider\_vault](secrets_provider_vault_module#ansible-collections-sensu-sensu-go-secrets-provider-vault-module)
The official documentation on the **sensu.sensu\_go.secrets\_provider\_vault** module.
[sensu.sensu\_go.secrets\_provider\_info](secrets_provider_info_module#ansible-collections-sensu-sensu-go-secrets-provider-info-module)
The official documentation on the **sensu.sensu\_go.secrets\_provider\_info** module.
Examples
--------
```
- name: Create an environment varibale-backed secret
sensu.sensu_go.secret:
name: env_secret
provider: env
id: MY_ENV_VARIABLE
- name: Create a HashiCorp Vault-backed secret
sensu.sensu_go.secret:
name: hashi_valut_secret
provider: vault
id: secret/store#name
- name: Delete a secret
sensu.sensu_go.secret:
name: my_secret
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu secret. **Sample:** {'id': 'secret/database#password', 'metadata': {'name': 'sensu-ansible', 'namespace': 'default'}, 'provider': 'vault'} |
### Authors
* Aljaz Kosir (@aljazkosir)
* Manca Bizjak (@mancabizjak)
* Miha Dolinar (@mdolin)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.silence_info β List Sensu silence entries sensu.sensu\_go.silence\_info β List Sensu silence entries
==========================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.silence_info`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu silences.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/silencing/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **check** string | | The name of the check the entry should match. If left empty a silencing entry will contain an asterisk in the check position. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **subscription** string | | The name of the subscription the entry should match. If left empty a silencing entry will contain an asterisk in the subscription position. |
See Also
--------
See also
[sensu.sensu\_go.silence](silence_module#ansible-collections-sensu-sensu-go-silence-module)
The official documentation on the **sensu.sensu\_go.silence** module.
Examples
--------
```
- name: List all Sensu silence entries
sensu.sensu_go.silence_info:
register: result
- name: Fetch a specific silence with name proxy:awesome_check
sensu.sensu_go.silence_info:
subscription: proxy
check: awesome_check
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 |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu silence entries. **Sample:** [{'begin': 1542671205, 'check': None, 'creator': 'admin', 'expire': -1, 'expire\_on\_resolve': False, 'metadata': {'annotations': None, 'labels': None, 'name': 'entity:i-424242:\*', 'namespace': 'default'}, 'reason': None, 'subscription': 'entity:i-424242'}] |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Manca Bizjak (@mancabizjak)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.bonsai_asset β Add Sensu assets from Bonsai sensu.sensu\_go.bonsai\_asset β Add Sensu assets from Bonsai
============================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.bonsai_asset`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create or update a Sensu Go asset whose definition is available in the Bonsai, the Sensu asset index.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/assets/> and <https://bonsai.sensu.io/>.
Note
This module has a corresponding [action plugin](../../../plugins/action#action-plugins).
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **annotations** dictionary | | Custom metadata fields with fewer restrictions, as key/value pairs. These are preserved by Sensu but not accessible as tokens or identifiers, and are mainly intended for use with external tools. |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **labels** dictionary | | Custom metadata fields that can be accessed within Sensu, as key/value pairs. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **rename** string | | The name that will be used when adding the asset to Sensu. If not present, value of the *name* parameter will be used. |
| **version** string / required | | Version number of the asset to install. |
Notes
-----
Note
* *labels* and *annotations* values are merged with the values obtained from Bonsai. Values passed-in as parameters take precedence over the values obtained from Bonsai.
* To delete an asset, use regular [sensu.sensu\_go.asset](asset_module#ansible-collections-sensu-sensu-go-asset-module) module.
See Also
--------
See also
[sensu.sensu\_go.asset](asset_module#ansible-collections-sensu-sensu-go-asset-module)
The official documentation on the **sensu.sensu\_go.asset** module.
[sensu.sensu\_go.asset\_info](asset_info_module#ansible-collections-sensu-sensu-go-asset-info-module)
The official documentation on the **sensu.sensu\_go.asset\_info** module.
Examples
--------
```
- name: Make sure specific version of asset is installed
sensu.sensu_go.bonsai_asset:
name: sensu/monitoring-plugins
version: 2.2.0-1
- name: Remove previously added asset
sensu.sensu_go.asset:
name: sensu/monitoring-plugins
state: absent
- name: Store Bonsai asset under a different name
sensu.sensu_go.bonsai_asset:
name: sensu/monitoring-plugins
version: 2.2.0-1
rename: sensu-monitoring-2.2.0-1
- name: Display asset info
sensu.sensu_go.asset_info:
name: sensu-monitoring-2.2.0-1 # value from rename field
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu asset. **Sample:** {'builds': [{'sha512': '4f926bf4328f...2c58ad9ab40c9e2edc31b288d066b195b21b', 'url': 'http://example.com/asset.tar.gz'}], 'metadata': {'name': 'check\_script', 'namespace': 'default'}} |
### Authors
* Aljaz Kosir (@aljazkosir)
* Manca Bizjak (@mancabizjak)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.hook β Manage Sensu hooks sensu.sensu\_go.hook β Manage Sensu hooks
=========================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.hook`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu hook.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/hooks/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **annotations** dictionary | | Custom metadata fields with fewer restrictions, as key/value pairs. These are preserved by Sensu but not accessible as tokens or identifiers, and are mainly intended for use with external tools. |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **command** string | | Command to run when the hook is triggered. Required if *state* is `present`. |
| **labels** dictionary | | Custom metadata fields that can be accessed within Sensu, as key/value pairs. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **runtime\_assets** list / elements=string | | List of runtime assets required to run the check. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
| **stdin** boolean | **Choices:*** no
* yes
| Controls whether Sensu writes serialized JSON data to the process's stdin. |
| **timeout** integer | | The hook execution duration timeout in seconds (hard stop). Required if *state* is `present`. |
See Also
--------
See also
[sensu.sensu\_go.hook\_info](hook_info_module#ansible-collections-sensu-sensu-go-hook-info-module)
The official documentation on the **sensu.sensu\_go.hook\_info** module.
Examples
--------
```
- name: Rudimentary auto-remediation hook
sensu.sensu_go.hook:
auth:
url: http://localhost:8080
name: restart_nginx
command: sudo systemctl start nginx
timeout: 60
stdin: false
- name: Capture the process tree
sensu.sensu_go.hook:
auth:
url: http://localhost:8080
name: process_tree
command: ps aux
timeout: 60
stdin: false
- name: Delete a hook
sensu.sensu_go.hook:
name: process_tree
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu hook. **Sample:** {'command': 'sudo systemctl start nginx', 'metadata': {'annotations': None, 'labels': None, 'name': 'restart\_nginx', 'namespace': 'default'}, 'stdin': False, 'timeout': 60} |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
| programming_docs |
ansible sensu.sensu_go.namespace β Manage Sensu namespaces sensu.sensu\_go.namespace β Manage Sensu namespaces
===================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.namespace`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete a Sensu namespace.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/rbac/#namespaces>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
See Also
--------
See also
[sensu.sensu\_go.namespace\_info](namespace_info_module#ansible-collections-sensu-sensu-go-namespace-info-module)
The official documentation on the **sensu.sensu\_go.namespace\_info** module.
Examples
--------
```
- name: Create a new namespace
sensu.sensu_go.namespace:
name: production
state: present
- name: Delete a namespace
sensu.sensu_go.namespace:
name: staging
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu namespace. **Sample:** {'name': 'default'} |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.install β Enable Sensu Go repos and install selected packages sensu.sensu\_go.install β Enable Sensu Go repos and install selected packages
=============================================================================
Note
This role is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
To install it use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.install`.
* [Entry point `main` β Enable Sensu Go repos and install selected packages](#entry-point-main-enable-sensu-go-repos-and-install-selected-packages)
+ [Synopsis](#synopsis)
+ [Parameters](#parameters)
* [Entry point `packages` β Install selected Sensu Go packages](#entry-point-packages-install-selected-sensu-go-packages)
+ [Synopsis](#id1)
+ [Parameters](#id2)
* [Entry point `repositories` β Enable Sensu Go repos](#entry-point-repositories-enable-sensu-go-repos)
+ [Synopsis](#id3)
+ [Parameters](#id4)
Entry point `main` β Enable Sensu Go repos and install selected packages
------------------------------------------------------------------------
### Synopsis
* The main entry point just combines the repositories and packages entry points.
### Parameters
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **build** string | **Default:**"latest" | Package build to install. Can be any valid build string such as `8290` or a special value latest. If the *version* variable is set to latest, this variable is ignored and the latest available build is installed. |
| **channel** string | **Default:**"stable" | Repository channel that serves as a source of packages. Visit the packagecloud site to find all available channels. |
| **components** list / elements=string | **Choices:*** **sensu-go-backend** β
* **sensu-go-agent** β
* **sensu-go-cli** β
**Default:**["sensu-go-backend", "sensu-go-agent", "sensu-go-cli"] | List of components to install. |
| **version** string | **Default:**"latest" | Package version to install. Can be any valid version string such as `6.2.5` or special value `latest`. |
Entry point `packages` β Install selected Sensu Go packages
-----------------------------------------------------------
### Synopsis
* Make sure selected packages are installed.
* By default, the role will install latest available package version. This will change in the next major version of the collection where the *version* will become a required variable.
### Parameters
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **build** string | **Default:**"latest" | Package build to install. Can be any valid build string such as `8290` or a special value latest. If the *version* variable is set to latest, this variable is ignored and the latest available build is installed. |
| **components** list / elements=string | **Choices:*** **sensu-go-backend** β
* **sensu-go-agent** β
* **sensu-go-cli** β
**Default:**["sensu-go-backend", "sensu-go-agent", "sensu-go-cli"] | List of components to install. |
| **version** string | **Default:**"latest" | Package version to install. Can be any valid version string such as `6.2.5` or special value `latest`. |
Entry point `repositories` β Enable Sensu Go repos
--------------------------------------------------
### Synopsis
* Install required repository files on supported distributions.
* This entry point does not work on Windows because there is no concept of repository there.
### Parameters
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **channel** string | **Default:**"stable" | Repository channel that serves as a source of packages. Visit the packagecloud site to find all available channels. |
ansible sensu.sensu_go.handler_info β List Sensu handlers sensu.sensu\_go.handler\_info β List Sensu handlers
===================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.handler_info`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu handlers.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/handlers/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
See Also
--------
See also
[sensu.sensu\_go.socket\_handler](socket_handler_module#ansible-collections-sensu-sensu-go-socket-handler-module)
The official documentation on the **sensu.sensu\_go.socket\_handler** module.
[sensu.sensu\_go.pipe\_handler](pipe_handler_module#ansible-collections-sensu-sensu-go-pipe-handler-module)
The official documentation on the **sensu.sensu\_go.pipe\_handler** module.
[sensu.sensu\_go.handler\_set](handler_set_module#ansible-collections-sensu-sensu-go-handler-set-module)
The official documentation on the **sensu.sensu\_go.handler\_set** module.
Examples
--------
```
- name: List all Sensu handlers
sensu.sensu_go.handler_info:
register: result
- name: Retrieve info for a specific Sensu handler
sensu.sensu_go.handler_info:
name: my-handler
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 |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu handlers. **Sample:** [{'metadata': {'name': 'tcp\_udp\_handler\_minimum', 'namespace': 'default'}, 'socket': {'host': '10.0.1.99', 'port': 4444}, 'type': 'tcp'}] |
### Authors
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.role_binding_info β List Sensu role bindings sensu.sensu\_go.role\_binding\_info β List Sensu role bindings
==============================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.role_binding_info`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu role bindings.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/rbac/#role-bindings-and-cluster-role-bindings>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
See Also
--------
See also
[sensu.sensu\_go.role\_binding](role_binding_module#ansible-collections-sensu-sensu-go-role-binding-module)
The official documentation on the **sensu.sensu\_go.role\_binding** module.
Examples
--------
```
- name: List all Sensu role bindings
sensu.sensu_go.role_binding_info:
register: result
- name: Retrieve a single Sensu role binding
sensu.sensu_go.role_binding_info:
name: my-role-binding
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 |
| --- | --- | --- |
| **role\_bindings** list / elements=dictionary | success | List of Sensu role bindings. **Sample:** [{'metadata': {'name': 'event-reader-binding', 'namespace': 'default'}, 'role\_ref': {'name': 'event-reader', 'type': 'Role'}, 'subjects': [{'name': 'bob', 'type': 'User'}]}] |
### Authors
* Paul Arthur (@flowerysong)
* Manca Bizjak (@mancabizjak)
* Aljaz Kosir (@aljazkosir)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.secrets_provider_env β Manage Sensu Env secrets provider sensu.sensu\_go.secrets\_provider\_env β Manage Sensu Env secrets provider
==========================================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.secrets_provider_env`.
New in version 1.6.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create or delete a Sensu Go Env secrets provider.
* The module operates on a secrets provider named `env`.
* For more information, refer to the Sensu Go documentation at <https://docs.sensu.io/sensu-go/latest/operations/manage-secrets/secrets-providers/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
See Also
--------
See also
[sensu.sensu\_go.secrets\_provider\_vault](secrets_provider_vault_module#ansible-collections-sensu-sensu-go-secrets-provider-vault-module)
The official documentation on the **sensu.sensu\_go.secrets\_provider\_vault** module.
[sensu.sensu\_go.secrets\_provider\_info](secrets_provider_info_module#ansible-collections-sensu-sensu-go-secrets-provider-info-module)
The official documentation on the **sensu.sensu\_go.secrets\_provider\_info** module.
[sensu.sensu\_go.secret](secret_module#ansible-collections-sensu-sensu-go-secret-module)
The official documentation on the **sensu.sensu\_go.secret** module.
[sensu.sensu\_go.secret\_info](secret_info_module#ansible-collections-sensu-sensu-go-secret-info-module)
The official documentation on the **sensu.sensu\_go.secret\_info** module.
Examples
--------
```
- name: Create the env secrets provider
sensu.sensu_go.secrets_provider_env:
- name: Delete the env secrets provider
sensu.sensu_go.secrets_provider_env:
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu Env secrets provider. **Sample:** [{'metadata': {'name': 'env'}}] |
### Authors
* Aljaz Kosir (@aljazkosir)
* Manca Bizjak (@mancabizjak)
* Miha Dolinar (@mdolin)
* Tadej Borovsak (@tadeboro)
| programming_docs |
ansible sensu.sensu_go.namespace_info β List Sensu namespaces sensu.sensu\_go.namespace\_info β List Sensu namespaces
=======================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.namespace_info`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu namespaces.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/rbac/#namespaces>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
Notes
-----
Note
* Currently, it is not possible to retrieve information about a single namespace because namespace is not much more than a name itself.
See Also
--------
See also
[sensu.sensu\_go.namespace](namespace_module#ansible-collections-sensu-sensu-go-namespace-module)
The official documentation on the **sensu.sensu\_go.namespace** module.
Examples
--------
```
- name: List Sensu namespaces
sensu.sensu_go.namespace_info:
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 |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu namespaces. **Sample:** [{'name': 'default'}] |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.role_info β List Sensu roles sensu.sensu\_go.role\_info β List Sensu roles
=============================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.role_info`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu roles.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/rbac/#roles-and-cluster-roles>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
See Also
--------
See also
[sensu.sensu\_go.role](role_module#ansible-collections-sensu-sensu-go-role-module)
The official documentation on the **sensu.sensu\_go.role** module.
Examples
--------
```
- name: List all Sensu roles
sensu.sensu_go.role_info:
register: result
- name: Retrieve a specific Sensu role
sensu.sensu_go.role_info:
name: my-role
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 |
| --- | --- | --- |
| **roles** list / elements=dictionary | success | List of Sensu roles. **Sample:** [{'metadata': {'name': 'namespaced-resources-all-verbs', 'namespace': 'default'}, 'rules': [{'resource\_names': [], 'resources': ['assets', 'checks'], 'verbs': ['create', 'update', 'delete']}]}] |
### Authors
* Paul Arthur (@flowerysong)
* Manca Bizjak (@mancabizjak)
* Aljaz Kosir (@aljazkosir)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.secret_info β List available Sensu Go secrets sensu.sensu\_go.secret\_info β List available Sensu Go secrets
==============================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.secret_info`.
New in version 1.6.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu Go secrets.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/operations/manage-secrets/secrets/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
See Also
--------
See also
[sensu.sensu\_go.secret](secret_module#ansible-collections-sensu-sensu-go-secret-module)
The official documentation on the **sensu.sensu\_go.secret** module.
[sensu.sensu\_go.secrets\_provider\_env](secrets_provider_env_module#ansible-collections-sensu-sensu-go-secrets-provider-env-module)
The official documentation on the **sensu.sensu\_go.secrets\_provider\_env** module.
[sensu.sensu\_go.secrets\_provider\_vault](secrets_provider_vault_module#ansible-collections-sensu-sensu-go-secrets-provider-vault-module)
The official documentation on the **sensu.sensu\_go.secrets\_provider\_vault** module.
[sensu.sensu\_go.secrets\_provider\_info](secrets_provider_info_module#ansible-collections-sensu-sensu-go-secrets-provider-info-module)
The official documentation on the **sensu.sensu\_go.secrets\_provider\_info** module.
Examples
--------
```
- name: List all Sensu Go secrets
sensu.sensu_go.secret_info:
register: result
- name: Retrieve the selected Sensu Go secret
sensu.sensu_go.secret_info:
name: my-secret
register: result
- name: Do something with result
ansible.builtin.debug:
msg: "{{ result.objects.0.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 |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu Go secrets. **Sample:** [{'id': 'ANSIBLE\_TOKEN', 'metadata': {'name': 'sensu-ansible-token', 'namespace': 'default'}, 'provider': 'env'}, {'id': 'secret/database#password', 'metadata': {'name': 'sensu-ansible', 'namespace': 'default'}, 'provider': 'vault'}] |
### Authors
* Aljaz Kosir (@aljazkosir)
* Manca Bizjak (@mancabizjak)
* Miha Dolinar (@mdolin)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.filter_info β List Sensu info sensu.sensu\_go.filter\_info β List Sensu info
==============================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.filter_info`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu filters.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/filters/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
See Also
--------
See also
[sensu.sensu\_go.filter](filter_module#ansible-collections-sensu-sensu-go-filter-module)
The official documentation on the **sensu.sensu\_go.filter** module.
Examples
--------
```
- name: List all Sensu filters
sensu.sensu_go.filter_info:
register: result
- name: Retrieve a specific Sensu filter
sensu.sensu_go.filter_info:
name: my-filter
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 |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu filters. **Sample:** [{'action': 'allow', 'expressions': ['event.check.occurrences == 1'], 'metadata': {'name': 'filter\_minimum', 'namespace': 'default'}}] |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.agent β Install, configure, and start Sensu Go agent sensu.sensu\_go.agent β Install, configure, and start Sensu Go agent
====================================================================
Note
This role is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
To install it use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.agent`.
* [Entry point `configure` β Configure Sensu Go agent](#entry-point-configure-configure-sensu-go-agent)
+ [Synopsis](#synopsis)
+ [Parameters](#parameters)
* [Entry point `main` β Install, configure, and start Sensu Go agent](#entry-point-main-install-configure-and-start-sensu-go-agent)
+ [Synopsis](#id1)
+ [Parameters](#id2)
* [Entry point `start` β Start Sensu Go agent](#entry-point-start-start-sensu-go-agent)
+ [Synopsis](#id3)
Entry point `configure` β Configure Sensu Go agent
--------------------------------------------------
### Synopsis
* Write the Sensu Go agent configuration file.
### Parameters
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **agent\_config** dictionary | | Any option that is valid for the Sensu Go agent version we are installing. All valid options are listed at <https://docs.sensu.io/sensu-go/latest/reference/agent/#configuration>. Role copies the key-value pairs from the *agent\_config* variable verbatim to the configuration file. This means that we must copy the key names **exactly** as they appear in the configuration reference. In a way, the *agent\_config* variable should contain a properly indented copy of the `/etc/sensu/agent.yml` file. |
Entry point `main` β Install, configure, and start Sensu Go agent
-----------------------------------------------------------------
### Synopsis
* Install, configure, and start the Sensu Go agent service.
### Parameters
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **agent\_config** dictionary | | Any option that is valid for the Sensu Go agent version we are installing. All valid options are listed at <https://docs.sensu.io/sensu-go/latest/reference/agent/#configuration>. Role copies the key-value pairs from the *agent\_config* variable verbatim to the configuration file. This means that we must copy the key names **exactly** as they appear in the configuration reference. In a way, the *agent\_config* variable should contain a properly indented copy of the `/etc/sensu/agent.yml` file. |
| **build** string | **Default:**"latest" | Package build to install. Can be any valid build string such as `8290` or a special value latest. If the *version* variable is set to latest, this variable is ignored and the latest available build is installed. |
| **channel** string | **Default:**"stable" | Repository channel that serves as a source of packages. Visit the packagecloud site to find all available channels. |
| **version** string | **Default:**"latest" | Package version to install. Can be any valid version string such as `6.2.5` or special value `latest`. |
Entry point `start` β Start Sensu Go agent
------------------------------------------
### Synopsis
* Start the Sensu Go agent service.
| programming_docs |
ansible sensu.sensu_go.asset β Manage Sensu assets sensu.sensu\_go.asset β Manage Sensu assets
===========================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.asset`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu Go asset.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/assets/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **annotations** dictionary | | Custom metadata fields with fewer restrictions, as key/value pairs. These are preserved by Sensu but not accessible as tokens or identifiers, and are mainly intended for use with external tools. |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **builds** list / elements=dictionary | | A list of asset builds used to define multiple artefacts which provide the named asset. Required if *state* is `present`. |
| | **filters** list / elements=string | | A set of Sensu query expressions used to determine if the asset should be installed. |
| | **headers** dictionary | | Additional headers to send when retrieving the asset, e.g. for authorization. |
| | **sha512** string / required | | The checksum of the asset. |
| | **url** string / required | | The URL location of the asset. |
| **labels** dictionary | | Custom metadata fields that can be accessed within Sensu, as key/value pairs. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
See Also
--------
See also
[sensu.sensu\_go.asset\_info](asset_info_module#ansible-collections-sensu-sensu-go-asset-info-module)
The official documentation on the **sensu.sensu\_go.asset\_info** module.
[sensu.sensu\_go.bonsai\_asset](bonsai_asset_module#ansible-collections-sensu-sensu-go-bonsai-asset-module)
The official documentation on the **sensu.sensu\_go.bonsai\_asset** module.
Examples
--------
```
- name: Create a multiple-build asset
sensu.sensu_go.asset:
name: sensu-plugins-cpu-checks
builds:
- url: https://assets.bonsai.sensu.io/68546e739d96fd695655b77b35b5aabfbabeb056/sensu-plugins-cpu-checks_4.0.0_centos_linux_amd64.tar.gz
sha512: 518e7c17cf670393045bff4af318e1d35955bfde166e9ceec2b469109252f79043ed133241c4dc96501b6636a1ec5e008ea9ce055d1609865635d4f004d7187b
filters:
- entity.system.os == 'linux'
- entity.system.arch == 'amd64'
- entity.system.platform == 'rhel'
- url: https://assets.bonsai.sensu.io/68546e739d96fd695655b77b35b5aabfbabeb056/sensu-plugins-cpu-checks_4.0.0_alpine_linux_amd64.tar.gz
sha512: b2da25ecd7642e6de41fde37d674fe19dcb6ee3d680e145e32289f7cfc352e6b5f9413ee9b701d61faeaa47b399aa30b25885dbc1ca432c4061c8823774c28f3
filters:
- entity.system.os == 'linux'
- entity.system.arch == 'amd64'
- entity.system.platform == 'alpine'
- name: Delete an asset
sensu.sensu_go.asset:
name: sensu-plugins-cpu-check
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu asset. **Sample:** {'builds': [{'sha512': '4f926bf4328f...2c58ad9ab40c9e2edc31b288d066b195b21b', 'url': 'http://example.com/asset.tar.gz'}], 'metadata': {'name': 'check\_script', 'namespace': 'default'}} |
### Authors
* Cameron Hurst (@wakemaster39)
* Aljaz Kosir (@aljazkosir)
* Manca Bizjak (@mancabizjak)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.event_info β List Sensu events sensu.sensu\_go.event\_info β List Sensu events
===============================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.event_info`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve recent events that Sensu processed.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/events/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **check** string | | Limit results to a specific check.
*entity* must also be specified if this parameter is used. |
| **entity** string | | Limit results to a specific entity. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
See Also
--------
See also
[sensu.sensu\_go.event](event_module#ansible-collections-sensu-sensu-go-event-module)
The official documentation on the **sensu.sensu\_go.event** module.
Examples
--------
```
- name: List Sensu events
sensu.sensu_go.event_info:
register: result
- name: List Sensu events for api.example.com
sensu.sensu_go.event_info:
entity: api.example.com
register: result
- name: Filter events by check and entity
sensu.sensu_go.event_info:
entity: api.example.com
check: check-cpu
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 |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu events. **Sample:** [{'check': {'check\_hooks': None, 'command': 'check-cpu.sh -w 75 -c 90', 'duration': 1.07055808, 'env\_vars': None, 'executed': 1552594757, 'handlers': [], 'high\_flap\_threshold': 0, 'history': [{'executed': 1552594757, 'status': 0}], 'interval': 60, 'metadata': {'name': 'check-cpu', 'namespace': 'default'}, 'occurrences': 1, 'occurrences\_watermark': 1, 'output': 'CPU OK - Usage:3.96', 'subscriptions': ['linux'], 'timeout': 0, 'total\_state\_change': 0, 'ttl': 0}, 'entity': {'deregister': False, 'deregistration': {}, 'entity\_class': 'agent', 'last\_seen': 1552594641, 'metadata': {'name': 'sensu-centos', 'namespace': 'default'}}, 'id': '3a5948f3-6ffd-4ea2-a41e-334f4a72ca2f', 'metadata': {'namespace': 'default'}, 'sequence': 1, 'timestamp': 1552594758}] |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Manca Bizjak (@mancabizjak)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.auth_provider_info β List Sensu authentication providers sensu.sensu\_go.auth\_provider\_info β List Sensu authentication providers
==========================================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.auth_provider_info`.
New in version 1.10.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu Go authentication providers.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/operations/control-access/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
See Also
--------
See also
[sensu.sensu\_go.ad\_auth\_provider](ad_auth_provider_module#ansible-collections-sensu-sensu-go-ad-auth-provider-module)
The official documentation on the **sensu.sensu\_go.ad\_auth\_provider** module.
[sensu.sensu\_go.ldap\_auth\_provider](ldap_auth_provider_module#ansible-collections-sensu-sensu-go-ldap-auth-provider-module)
The official documentation on the **sensu.sensu\_go.ldap\_auth\_provider** module.
[sensu.sensu\_go.oidc\_auth\_provider](oidc_auth_provider_module#ansible-collections-sensu-sensu-go-oidc-auth-provider-module)
The official documentation on the **sensu.sensu\_go.oidc\_auth\_provider** module.
Examples
--------
```
- name: List all Sensu authentication providers
sensu.sensu_go.auth_provider_info:
register: result
- name: List the selected Sensu authentication provider
sensu.sensu_go.auth_provider_info:
name: my_auth_provider
register: result
- name: Do something with result
ansible.builtin.debug:
msg: "{{ result.objects.0.metadata.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 |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu authentication providers. **Sample:** [{'groups\_prefix': '', 'metadata': {'name': 'openldap'}, 'servers': {'binding': {'user\_dn': 'cn=binder,dc=acme,dc=org'}, 'client\_cert\_file': '', 'client\_key\_file': '', 'default\_upn\_domain': '', 'group\_search': {'attribute': 'member', 'base\_dn': 'dc=acme,dc=org', 'name\_attribute': 'cn', 'object\_class': 'groupOfNames'}, 'host': '127.0.0.1', 'insecure': False, 'port': 636, 'security': 'tls', 'trusted\_ca\_file': '', 'user\_search': {'attribute': 'uid', 'base\_dn': 'dc=acme,dc=org', 'name\_attribute': 'cn', 'object\_class': 'person'}}, 'username\_prefix': ''}] |
### Authors
* Aljaz Kosir (@aljazkosir)
* Manca Bizjak (@mancabizjak)
* Miha Dolinar (@mdolin)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.ldap_auth_provider β Manage Sensu LDAP authentication provider sensu.sensu\_go.ldap\_auth\_provider β Manage Sensu LDAP authentication provider
================================================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.ldap_auth_provider`.
New in version 1.10.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete a Sensu Go LDAP authentication provider.
* For more information, refer to the Sensu Go documentation at <https://docs.sensu.io/sensu-go/latest/operations/control-access/ldap-auth/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **groups\_prefix** string | | The prefix added to all LDAP groups. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **servers** list / elements=dictionary | | An array of LDAP servers for your directory. Required if *state* is `present`. |
| | **binding** dictionary | | The LDAP account that performs user and group lookups. If your sever supports anonymous binding, you can omit the user\_dn or password attributes to query the directory without credentials. |
| | | **password** string / required | | Password for the user\_dn account. If your sever supports anonymous binding, you can omit this attribute. |
| | | **user\_dn** string / required | | The LDAP account that performs user and group lookups. If your sever supports anonymous binding, you can omit this attribute. |
| | **client\_cert\_file** string | | Path to the certificate that should be sent to the server if requested. |
| | **client\_key\_file** string | | Path to the key file associated with the client\_cert\_file. Required if *client\_cert\_file* is present. |
| | **group\_search** dictionary | | Search configuration for groups. |
| | | **attribute** string | **Default:**"member" | Used for comparing result entries. |
| | | **base\_dn** string / required | | Which part of the directory tree to search. |
| | | **name\_attribute** string | **Default:**"cn" | Represents the attribute to use as the entry name. |
| | | **object\_class** string | **Default:**"groupOfNames" | Identifies the class of objects returned in the search result. |
| | **host** string / required | | LDAP server IP address. |
| | **insecure** boolean | **Choices:*** **no** β
* yes
| Skips SSL certificate verification when set to true. |
| | **port** integer | | LDAP server port. |
| | **security** string | **Choices:*** insecure
* **tls** β
* starttls
| Encryption type to be used for the connection to the LDAP server. |
| | **trusted\_ca\_file** string | | Path to an alternative CA bundle file. |
| | **user\_search** dictionary | | Search configuration for users. |
| | | **attribute** string | **Default:**"uid" | Used for comparing result entries. |
| | | **base\_dn** string / required | | Which part of the directory tree to search. |
| | | **name\_attribute** string | **Default:**"cn" | Represents the attribute to use as the entry name. |
| | | **object\_class** string | **Default:**"person" | Identifies the class of objects returned in the search result. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
| **username\_prefix** string | | The prefix added to all LDAP usernames. |
See Also
--------
See also
[sensu.sensu\_go.auth\_provider\_info](auth_provider_info_module#ansible-collections-sensu-sensu-go-auth-provider-info-module)
The official documentation on the **sensu.sensu\_go.auth\_provider\_info** module.
[sensu.sensu\_go.ad\_auth\_provider](ad_auth_provider_module#ansible-collections-sensu-sensu-go-ad-auth-provider-module)
The official documentation on the **sensu.sensu\_go.ad\_auth\_provider** module.
[sensu.sensu\_go.oidc\_auth\_provider](oidc_auth_provider_module#ansible-collections-sensu-sensu-go-oidc-auth-provider-module)
The official documentation on the **sensu.sensu\_go.oidc\_auth\_provider** module.
Examples
--------
```
- name: Create a LDAP auth provider
sensu.sensu_go.ldap_auth_provider:
name: openldap
servers:
- host: 127.0.0.1
group_search:
base_dn: dc=acme,dc=org
user_search:
base_dn: dc=acme,dc=org
- name: Delete a LDAP auth provider
sensu.sensu_go.ldap_auth_provider:
name: openldap
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu LDAP authentication provider. **Sample:** {'groups\_prefix': 'ldap', 'metadata': {'name': 'openldap'}, 'servers': {'binding': {'user\_dn': 'cn=binder,dc=acme,dc=org'}, 'client\_cert\_file': '/path/to/ssl/cert.pem', 'client\_key\_file': '/path/to/ssl/key.pem', 'group\_search': {'attribute': 'member', 'base\_dn': 'dc=acme,dc=org', "name\_attribute'": 'cn', 'object\_class': 'groupOfNames'}, 'host': '127.0.0.1', 'insecure': 'False', 'port': '636', 'security': 'tls', 'trusted\_ca\_file': '/path/to/trusted-certificate-authorities.pem', 'user\_search': {'attribute': 'uid', 'base\_dn': 'dc=acme,dc=org', 'name\_attribute': 'cn', 'object\_class': 'person'}}, 'username\_prefix': 'ldap'} |
### Authors
* Aljaz Kosir (@aljazkosir)
* Manca Bizjak (@mancabizjak)
* Miha Dolinar (@mdolin)
* Tadej Borovsak (@tadeboro)
| programming_docs |
ansible sensu.sensu_go.role β Manage Sensu roles sensu.sensu\_go.role β Manage Sensu roles
=========================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.role`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu role.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/rbac/#roles-and-cluster-roles>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **rules** list / elements=dictionary | | Rules that the role applies. Must be non-empty if *state* is `present`. |
| | **resource\_names** list / elements=string | | Names of specific resources the rule has permission to access. Note that for the `create` verb, this argument will not be taken into account when enforcing RBAC, even if it is provided. |
| | **resources** list / elements=string / required | | Types of resources the rule has permission to access. |
| | **verbs** list / elements=string / required | **Choices:*** get
* list
* create
* update
* delete
| Permissions to be applied by the rule. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
See Also
--------
See also
[sensu.sensu\_go.role\_info](role_info_module#ansible-collections-sensu-sensu-go-role-info-module)
The official documentation on the **sensu.sensu\_go.role\_info** module.
[sensu.sensu\_go.cluster\_role](cluster_role_module#ansible-collections-sensu-sensu-go-cluster-role-module)
The official documentation on the **sensu.sensu\_go.cluster\_role** module.
[sensu.sensu\_go.role\_binding](role_binding_module#ansible-collections-sensu-sensu-go-role-binding-module)
The official documentation on the **sensu.sensu\_go.role\_binding** module.
Examples
--------
```
- name: Create a role
sensu.sensu_go.role:
name: readonly
rules:
- verbs:
- get
- list
resources:
- checks
- entities
- name: Delete a role
sensu.sensu_go.role:
name: readonly
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu role. **Sample:** {'metadata': {'name': 'namespaced-resources-all-verbs', 'namespace': 'default'}, 'rules': [{'resource\_names': [], 'resources': ['assets', 'checks'], 'verbs': ['create', 'update', 'delete']}]} |
### Authors
* Paul Arthur (@flowerysong)
* Manca Bizjak (@mancabizjak)
* Aljaz Kosir (@aljazkosir)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.asset_info β List Sensu assets sensu.sensu\_go.asset\_info β List Sensu assets
===============================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.asset_info`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu Go assets.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/assets/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
See Also
--------
See also
[sensu.sensu\_go.asset](asset_module#ansible-collections-sensu-sensu-go-asset-module)
The official documentation on the **sensu.sensu\_go.asset** module.
[sensu.sensu\_go.bonsai\_asset](bonsai_asset_module#ansible-collections-sensu-sensu-go-bonsai-asset-module)
The official documentation on the **sensu.sensu\_go.bonsai\_asset** module.
Examples
--------
```
- name: List all Sensu assets
sensu.sensu_go.asset_info:
register: result
- name: List the selected Sensu asset
sensu.sensu_go.asset_info:
name: my_asset
register: result
- name: Do something with result
ansible.builtin.debug:
msg: "{{ result.objects.0.metadata.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 |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu assets. **Sample:** [{'builds': [{'sha512': '4f926bf4328f...2c58ad9ab40c9e2edc31b288d066b195b21b', 'url': 'http://example.com/asset.tar.gz'}], 'metadata': {'name': 'check\_script', 'namespace': 'default'}}] |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.socket_handler β Manage Sensu TCP/UDP handler sensu.sensu\_go.socket\_handler β Manage Sensu TCP/UDP handler
==============================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.socket_handler`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu socket handler.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/handlers/#tcp-udp-handlers>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **annotations** dictionary | | Custom metadata fields with fewer restrictions, as key/value pairs. These are preserved by Sensu but not accessible as tokens or identifiers, and are mainly intended for use with external tools. |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **filters** list / elements=string | | List of filters to use when determining whether to pass the check result to this handler. |
| **host** string | | The socket host address (IP or hostname) to connect to. Required if *state* is `present`. |
| **labels** dictionary | | Custom metadata fields that can be accessed within Sensu, as key/value pairs. |
| **mutator** string | | Mutator to call for transforming the check result before passing it to this handler. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **port** integer | | The socket port to connect to. Required if *state* is `present`. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
| **timeout** integer | | Timeout for handler execution. |
| **type** string | **Choices:*** tcp
* udp
| The handler type. Required if *state* is `present`. |
See Also
--------
See also
[sensu.sensu\_go.handler\_info](handler_info_module#ansible-collections-sensu-sensu-go-handler-info-module)
The official documentation on the **sensu.sensu\_go.handler\_info** module.
[sensu.sensu\_go.pipe\_handler](pipe_handler_module#ansible-collections-sensu-sensu-go-pipe-handler-module)
The official documentation on the **sensu.sensu\_go.pipe\_handler** module.
[sensu.sensu\_go.handler\_set](handler_set_module#ansible-collections-sensu-sensu-go-handler-set-module)
The official documentation on the **sensu.sensu\_go.handler\_set** module.
Examples
--------
```
- name: TCP handler
sensu.sensu_go.socket_handler:
name: tcp_handler
type: tcp
host: 10.0.1.99
port: 4444
- name: UDP handler
sensu.sensu_go.socket_handler:
name: udp_handler
type: udp
host: 10.0.1.99
port: 4444
- name: Delete a handler
sensu.sensu_go.socket_handler:
name: udp_handler
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu socket handler. **Sample:** [{'metadata': {'name': 'udp\_handler', 'namespace': 'default'}, 'socket': {'host': '10.0.1.99', 'port': 4444}, 'type': 'udp'}] |
### Authors
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.handler_set β Manage Sensu handler set sensu.sensu\_go.handler\_set β Manage Sensu handler set
=======================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.handler_set`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu handler set.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/handlers/#handler-sets>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **annotations** dictionary | | Custom metadata fields with fewer restrictions, as key/value pairs. These are preserved by Sensu but not accessible as tokens or identifiers, and are mainly intended for use with external tools. |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **handlers** list / elements=string | | List of Sensu event handlers (names) to use for events using the handler set. Required if *state* is `present`. |
| **labels** dictionary | | Custom metadata fields that can be accessed within Sensu, as key/value pairs. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
See Also
--------
See also
[sensu.sensu\_go.socket\_handler](socket_handler_module#ansible-collections-sensu-sensu-go-socket-handler-module)
The official documentation on the **sensu.sensu\_go.socket\_handler** module.
[sensu.sensu\_go.pipe\_handler](pipe_handler_module#ansible-collections-sensu-sensu-go-pipe-handler-module)
The official documentation on the **sensu.sensu\_go.pipe\_handler** module.
[sensu.sensu\_go.handler\_info](handler_info_module#ansible-collections-sensu-sensu-go-handler-info-module)
The official documentation on the **sensu.sensu\_go.handler\_info** module.
Examples
--------
```
- name: Create a handler set
sensu.sensu_go.handler_set:
name: notify_all_the_things
handlers:
- slack
- tcp_handler
- udp_handler
- name: Delete a handler set
sensu.sensu_go.handler_set:
name: notify_all_the_things
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu handler set. **Sample:** {'handlers': ['slack'], 'metadata': {'name': 'tcp\_udp\_handler\_minimum', 'namespace': 'default'}, 'type': 'set'} |
### Authors
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
| programming_docs |
ansible sensu.sensu_go.check β Manage Sensu checks sensu.sensu\_go.check β Manage Sensu checks
===========================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.check`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu Go check.
* For more information, refer to the Sensu Go documentation at <https://docs.sensu.io/sensu-go/latest/reference/checks/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **annotations** dictionary | | Custom metadata fields with fewer restrictions, as key/value pairs. These are preserved by Sensu but not accessible as tokens or identifiers, and are mainly intended for use with external tools. |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **check\_hooks** dictionary | | A mapping of response codes to hooks which will be run by the agent when that code is returned. Note that the structure of this parameter is a bit different from the one described at <https://docs.sensu.io/sensu-go/latest/reference/checks/#check-hooks-attribute>. See check hooks example below for more information on exact mapping structure. |
| **command** string | | Check command to run. Required if *state* is `present`. |
| **cron** string | | Schedule check requests using crontab syntax. Cannot be used when *interval* option is used. |
| **env\_vars** dictionary | | A mapping of environment variable names and values to use with command execution. |
| **handlers** list / elements=string | | List of handlers which receive check results. |
| **high\_flap\_threshold** integer | | High flap threshold. |
| **interval** integer | | Check request interval. Cannot be used when *cron* option is used. |
| **labels** dictionary | | Custom metadata fields that can be accessed within Sensu, as key/value pairs. |
| **low\_flap\_threshold** integer | | Low flap threshold. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **output\_metric\_format** string | **Choices:*** graphite\_plaintext
* influxdb\_line
* nagios\_perfdata
* opentsdb\_line
| Enable parsing of metrics in the specified format from this check's output. |
| **output\_metric\_handlers** list / elements=string | | List of handlers which receive check results. I'm not sure why this exists. |
| **proxy\_entity\_name** string | | Entity name to associate this check with instead of the agent it ran on. |
| **proxy\_requests** dictionary | | Allows you to assign the check to run for multiple entities according to their entity\_attributes. |
| | **entity\_attributes** list / elements=string | | List of attribute checks for determining which proxy entities this check should be scheduled against. |
| | **splay** boolean | **Choices:*** no
* yes
| Enables or disables splaying of check request scheduling. |
| | **splay\_coverage** integer | | Percentage of the `interval` over which to splay checks. |
| **publish** boolean | **Choices:*** no
* yes
| Enables or disables scheduled publication of check requests. |
| **round\_robin** boolean | **Choices:*** no
* yes
| An array of environment variables to use with command execution. |
| **runtime\_assets** list / elements=string | | List of runtime assets required to run the check. |
| **secrets** list / elements=dictionary added in 1.6.0 of sensu.sensu\_go | | List of secrets that are available to the command. |
| | **name** string / required added in 1.6.0 of sensu.sensu\_go | | Variable name that will contain the sensitive data. |
| | **secret** string / required added in 1.6.0 of sensu.sensu\_go | | Name of the secret that contains sensitive data. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
| **stdin** boolean | **Choices:*** no
* yes
| Enables writing of serialized JSON data to the check command's stdin. Only usable with checks written specifically for Sensu Go. |
| **subscriptions** list / elements=string | | List of subscriptions which receive check requests. Required if *state* is `present`. |
| **timeout** integer | | Check execution timeout. |
| **ttl** integer | | Amount of time after which a check result is considered stale. |
See Also
--------
See also
[sensu.sensu\_go.check\_info](check_info_module#ansible-collections-sensu-sensu-go-check-info-module)
The official documentation on the **sensu.sensu\_go.check\_info** module.
Examples
--------
```
- name: Check executing command every 30 seconds
sensu.sensu_go.check:
name: check
command: check-cpu.sh -w 75 -c 90
subscriptions:
- checks
interval: 30
publish: yes
- name: Check executing command with cron scheduler
sensu.sensu_go.check:
name: check
command: check-cpu.sh -w 75 -c 90
subscriptions:
- systems
handlers:
- slack
cron: "* * * * *"
publish: yes
- name: Ad-hoc scheduling
sensu.sensu_go.check:
name: check
command: check-cpu.sh -w 75 -c 90
subscriptions:
- systems
handlers:
- slack
interval: 60
publish: no
- name: Report events under proxy entity name instead of agent entity
sensu.sensu_go.check:
name: check
command: http_check.sh https://sensu.io
subscriptions:
- proxy
handlers:
- slack
interval: 60
proxy_entity_name: sensu-site
round_robin: yes
publish: yes
- name: Event that triggers hooks
sensu.sensu_go.check:
name: check
command: http_check.sh https://sensu.io
subscriptions: [ proxy ]
# The upstream JSON payload for the hooks below would look like this:
#
# "check_hooks": [
# {"0": ["passing-hook", "always-run-this-hook"]},
# {"critical": ["failing-hook", "always-run-this-hook"]}
# ]
#
# Ansible task simplifies this structure into a simple mapping:
check_hooks:
"0":
- passing-hook
- always-run-this-hook
critical:
- failing-hook
- always-run-this-hook
- name: Remove check
sensu.sensu_go.check:
name: my-check
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu check. **Sample:** {'command': 'collect.sh', 'handlers': ['slack'], 'interval': 10, 'metadata': {'name': 'check\_minimum', 'namespace': 'default'}, 'publish': True, 'subscriptions': ['system']} |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.entity β Manage Sensu entities sensu.sensu\_go.entity β Manage Sensu entities
==============================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.entity`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu entity.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/entities/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **annotations** dictionary | | Custom metadata fields with fewer restrictions, as key/value pairs. These are preserved by Sensu but not accessible as tokens or identifiers, and are mainly intended for use with external tools. |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **deregister** boolean | **Choices:*** no
* yes
| If the entity should be removed when it stops sending keepalive messages. |
| **deregistration\_handler** string | | The name of the handler to be called when an entity is deregistered. |
| **entity\_class** string | | Entity class. Standard classes are `proxy` and `agent`, but you can use whatever you want. Required if *state* is `present`. |
| **labels** dictionary | | Custom metadata fields that can be accessed within Sensu, as key/value pairs. |
| **last\_seen** integer | | Timestamp the entity was last seen, in seconds since the Unix epoch. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **redact** list / elements=string | | List of items to redact from log messages. If a value is provided, it overwrites the default list of items to be redacted. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
| **subscriptions** list / elements=string | | List of subscriptions for the entity. |
| **system** dictionary | | System information about the entity, such as operating system and platform. See <https://docs.sensu.io/sensu-go/5.13/reference/entities/#system-attributes> for more information. |
| **user** string | | Sensu RBAC username used by the entity. Agent entities require get, list, create, update, and delete permissions for events across all namespaces. |
See Also
--------
See also
[sensu.sensu\_go.entity\_info](entity_info_module#ansible-collections-sensu-sensu-go-entity-info-module)
The official documentation on the **sensu.sensu\_go.entity\_info** module.
Examples
--------
```
- name: Create an entity
sensu.sensu_go.entity:
auth:
url: http://localhost:8080
name: entity
entity_class: proxy
subscriptions:
- web
- prod
system:
hostname: playbook-entity
os: linux
platform: ubutntu
network:
interfaces:
- name: lo
addresses:
- 127.0.0.1/8
- ::1/128
- name: eth0
mac: 52:54:00:20:1b:3c
addresses:
- 93.184.216.34/24
last_seen: 1522798317
deregister: yes
deregistration_handler: email-handler
redact:
- password
- pass
- api_key
user: agent
- name: Delete an entity
sensu.sensu_go.entity:
name: entity
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu entity. **Sample:** {'deregister': False, 'deregistration': {}, 'entity\_class': 'agent', 'last\_seen': 1542667231, 'metadata': {'annotations': None, 'labels': None, 'name': 'webserver01', 'namespace': 'default'}, 'redact': ['password', 'private\_key', 'secret'], 'sensu\_agent\_version': '1.0.0', 'subscriptions': ['entity:webserver01'], 'system': {'arch': 'amd64', 'cloud\_provider': None, 'libc\_type': 'glibc', 'network': {'interfaces': [{'addresses': ['127.0.0.1/8', '::1/128'], 'name': 'lo'}, {'addresses': ['172.28.128.3/24', 'fe80::a00:27ff:febc:be60/64'], 'mac': '08:00:27:bc:be:60', 'name': 'enp0s8'}]}, 'os': 'linux', 'platform': 'centos', 'platform\_family': 'rhel', 'platform\_version': '7.4.1708', 'vm\_role': 'host', 'vm\_system': 'kvm'}, 'user': 'agent'} |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.etcd_replicator β Manage Sensu Go etcd replicators sensu.sensu\_go.etcd\_replicator β Manage Sensu Go etcd replicators
===================================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.etcd_replicator`.
New in version 1.9.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu etcd replicator.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/operations/deploy-sensu/etcdreplicators/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_version** string | | Sensu API version of the resource to replicate. |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **ca\_cert** string | | Path to an the PEM-format CA certificate to use for TLS client authentication. Required if *insecure* is `false`. |
| **cert** string | | Path to the PEM-format certificate to use for TLS client authentication. This certificate is required for secure client communication. Required if *insecure* is `false`. |
| **insecure** boolean | **Choices:*** **no** β
* yes
| Disable transport security. Only set to `true` in sandbox and experimental environments. |
| **key** string | | Path to the PEM-format key file associated with the cert to use for TLS client authentication. This key and its corresponding certificate are required for secure client communication. Required if *insecure* is `false`. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **namespace** string | | Namespace to constrain replication to. If you do not include namespace, all namespaces for a given resource are replicated. |
| **replication\_interval** integer | | Interval at which the resource will be replicated. In seconds. |
| **resource** string | | Name of the resource to replicate. List of all resources is available at <https://docs.sensu.io/sensu-go/latest/operations/control-access/rbac/#resources>. Required if *state* is `present`. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
| **url** list / elements=string | | Destination cluster URLs. Required if *state* is `present`. |
See Also
--------
See also
[sensu.sensu\_go.etcd\_replicator\_info](etcd_replicator_info_module#ansible-collections-sensu-sensu-go-etcd-replicator-info-module)
The official documentation on the **sensu.sensu\_go.etcd\_replicator\_info** module.
Examples
--------
```
- name: Create a minimal replicator
sensu.sensu_go.etcd_replicator:
name: cluster_role_replicator
ca_cert: /etc/sensu/certs/ca.pem
cert: /etc/sensu/certs/cert.pem
key: /etc/sensu/certs/key.pem
url: https://sensu.alpha.example.com:2379
resource: ClusterRole
- name: Create an insecure minimal replicator
sensu.sensu_go.etcd_replicator:
name: role_replicator
insecure: true
url:
- https://sensu.beta.example.com:2379
- https://sensu.gamma.example.com:2379
resource: Role
- name: Create a replicator with all parameters set
sensu.sensu_go.etcd_replicator:
name: role_binding_replicator
ca_cert: /etc/sensu/certs/ca.pem
cert: /etc/sensu/certs/cert.pem
key: /etc/sensu/certs/key.pem
insecure: false
url: https://127.0.0.1:2379
api_version: core/v2
resource: RoleBinding
namespace: default
replication_interval_seconds: 30
- name: Delete a replicator
sensu.sensu_go.etcd_replicator:
name: my_replicator
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu etcd replicator. **Sample:** {'api\_version': 'core/v2', 'ca\_cert': '/etc/sensu/certs/ca.pem', 'cert': '/etc/sensu/certs/cert.pem', 'insecure': False, 'key': '/etc/sensu/certs/key.pem', 'metadata': {'created\_by': 'admin', 'name': 'cluster-role-replicator'}, 'namespace': '', 'replication\_interval\_seconds': 30, 'resource': 'ClusterRole', 'url': 'https://sensu.alpha.example.com:2379'} |
### Authors
* Tadej Borovsak (@tadeboro)
| programming_docs |
ansible sensu.sensu_go.datastore β Manage Sensu external datastore providers sensu.sensu\_go.datastore β Manage Sensu external datastore providers
=====================================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.datastore`.
New in version 1.1.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add or remove external datastore provider.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/datastore/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **dsn** string | | Attribute that specifies the data source names as a URL or PostgreSQL connection string. See the PostgreSQL docs for more information about connection strings. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **pool\_size** integer | | The maximum number of connections to hold in the PostgreSQL connection pool. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
Notes
-----
Note
* Currently, only one external datastore can be active at a time. The module will fail to perform its operation if this would break that invariant.
See Also
--------
See also
[sensu.sensu\_go.datastore\_info](datastore_info_module#ansible-collections-sensu-sensu-go-datastore-info-module)
The official documentation on the **sensu.sensu\_go.datastore\_info** module.
Examples
--------
```
- name: Add external datastore
sensu.sensu_go.datastore:
name: my-postgres
dsn: postgresql://user:secret@host:port/dbname
- name: Remove external datastore
sensu.sensu_go.datastore:
name: my-postgres
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing external datastore provider. **Sample:** {'batch\_buffer': 0, 'batch\_size': 1, 'batch\_workers': 0, 'dsn': 'postgresql://user:secret@host:port/dbname', 'enable\_round\_robin': True, 'max\_conn\_lifetime': '5m', 'max\_idle\_conns': 2, 'metadata': {'name': 'my-postgres'}, 'pool\_size': 20, 'strict': True} |
### Authors
* Manca Bizjak (@mancabizjak)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.secrets_provider_info β List Sensu secrets providers sensu.sensu\_go.secrets\_provider\_info β List Sensu secrets providers
======================================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.secrets_provider_info`.
New in version 1.6.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu Go secrets providers.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/operations/manage-secrets/secrets-providers/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
See Also
--------
See also
[sensu.sensu\_go.secrets\_provider\_env](secrets_provider_env_module#ansible-collections-sensu-sensu-go-secrets-provider-env-module)
The official documentation on the **sensu.sensu\_go.secrets\_provider\_env** module.
[sensu.sensu\_go.secrets\_provider\_vault](secrets_provider_vault_module#ansible-collections-sensu-sensu-go-secrets-provider-vault-module)
The official documentation on the **sensu.sensu\_go.secrets\_provider\_vault** module.
[sensu.sensu\_go.secret](secret_module#ansible-collections-sensu-sensu-go-secret-module)
The official documentation on the **sensu.sensu\_go.secret** module.
[sensu.sensu\_go.secret\_info](secret_info_module#ansible-collections-sensu-sensu-go-secret-info-module)
The official documentation on the **sensu.sensu\_go.secret\_info** module.
Examples
--------
```
- name: List all Sensu secrets providers
sensu.sensu_go.secrets_provider_info:
register: result
- name: List the selected Sensu secrets provider
sensu.sensu_go.secrets_provider_info:
name: my_provider
register: result
- name: Do something with result
ansible.builtin.debug:
msg: "{{ result.objects.0.metadata.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 |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu secrets providers. **Sample:** [{'client': {'address': 'https://vaultserver.example.com:8200', 'max\_retries': 2, 'rate\_limiter': {'burst': 100, 'limit': 10}, 'timeout': '20s', 'tls': {'ca\_cert': '/etc/ssl/certs/vault\_ca\_cert.pem'}, 'token': 'VAULT\_TOKEN', 'version': 'v1'}, 'metadata': {'name': 'vault'}}] |
### Authors
* Aljaz Kosir (@aljazkosir)
* Manca Bizjak (@mancabizjak)
* Miha Dolinar (@mdolin)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.check_info β List Sensu checks sensu.sensu\_go.check\_info β List Sensu checks
===============================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.check_info`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu Go checks.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/checks/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
See Also
--------
See also
[sensu.sensu\_go.check](check_module#ansible-collections-sensu-sensu-go-check-module)
The official documentation on the **sensu.sensu\_go.check** module.
Examples
--------
```
- name: List all Sensu checks
sensu.sensu_go.check_info:
register: result
- name: Obtain a specific check
sensu.sensu_go.check_info:
name: my-check
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 |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu checks. **Sample:** [{'command': 'collect.sh', 'handlers': ['slack'], 'interval': 10, 'metadata': {'name': 'check\_minimum', 'namespace': 'default'}, 'publish': True, 'subscriptions': ['system']}] |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.datastore_info β List external Sensu datastore providers sensu.sensu\_go.datastore\_info β List external Sensu datastore providers
=========================================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.datastore_info`.
New in version 1.1.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about external Sensu datastores.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/datastore/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
See Also
--------
See also
[sensu.sensu\_go.datastore](datastore_module#ansible-collections-sensu-sensu-go-datastore-module)
The official documentation on the **sensu.sensu\_go.datastore** module.
Examples
--------
```
- name: List all external Sensu datastores
sensu.sensu_go.datastore_info:
register: result
- name: Retrieve the selected external Sensu datastore
sensu.sensu_go.datastore_info:
name: my-datastore
register: result
- name: Do something with result
ansible.builtin.debug:
msg: "{{ result.objects.0.dsn }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of external Sensu datastore providers. **Sample:** [{'batch\_buffer': 0, 'batch\_size': 1, 'batch\_workers': 0, 'dsn': 'postgresql://user:secret@host:port/dbname', 'enable\_round\_robin': True, 'max\_conn\_lifetime': '5m', 'max\_idle\_conns': 2, 'metadata': {'name': 'my-postgres'}, 'pool\_size': 20, 'strict': True}] |
### Authors
* Manca Bizjak (@mancabizjak)
* Tadej Borovsak (@tadeboro)
| programming_docs |
ansible sensu.sensu_go.tessen β Manage Sensuβs Tessen configuration sensu.sensu\_go.tessen β Manage Sensuβs Tessen configuration
============================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.tessen`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Enable or disable Tessen service.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/tessen/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **state** string / required | **Choices:*** enabled
* disabled
| Enable or disable sending anonymized data to Sensu Inc. |
Examples
--------
```
- name: Disable Tessen
sensu.sensu_go.tessen:
state: disabled
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu tessen. **Sample:** {'opt\_out': False} |
### Authors
* Paul Arthur (@flowerysong)
* Manca Bizjak (@mancabizjak)
* Aljaz Kosir (@aljazkosir)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.secrets_provider_vault β Manage Sensu VaultProvider secrets providers sensu.sensu\_go.secrets\_provider\_vault β Manage Sensu VaultProvider secrets providers
=======================================================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.secrets_provider_vault`.
New in version 1.6.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete a Sensu Go VaultProvider secrets provider.
* For more information, refer to the Sensu Go documentation at <https://docs.sensu.io/sensu-go/latest/operations/manage-secrets/secrets-providers/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string | | Address of the Vault server. Required if *state* is `present`. |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **burst\_limit** integer | | Maximum allowed number of secrets requests in a rate interval. |
| **max\_retries** integer | | Maximum number of times to retry failed connections to Vault server. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **rate\_limit** float | | Maximum number of secrets requests for per second. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
| **timeout** integer | | Timeout (in seconds) for connection to Vault server. |
| **tls** dictionary | | TLS configuration for establishing connection with Vault server. |
| | **ca\_cert** string | | Path to the certificate file of the trusted certificate authority. |
| | **client\_cert** string | | Path to the client certificate file. |
| | **client\_key** string | | Path to the client key file. |
| | **cname** string | | Canonical name for the client. |
| **token** string | | Authentication token to use with Vault. Required if *state* is `present`. |
| **version** string | **Choices:*** v1
* v2
| Version of the Vault key/value store. Please refer to <https://www.vaultproject.io/docs/secrets/kv> for additional information. Required if *state* is `present`. |
See Also
--------
See also
[sensu.sensu\_go.secrets\_provider\_env](secrets_provider_env_module#ansible-collections-sensu-sensu-go-secrets-provider-env-module)
The official documentation on the **sensu.sensu\_go.secrets\_provider\_env** module.
[sensu.sensu\_go.secrets\_provider\_info](secrets_provider_info_module#ansible-collections-sensu-sensu-go-secrets-provider-info-module)
The official documentation on the **sensu.sensu\_go.secrets\_provider\_info** module.
[sensu.sensu\_go.secret](secret_module#ansible-collections-sensu-sensu-go-secret-module)
The official documentation on the **sensu.sensu\_go.secret** module.
[sensu.sensu\_go.secret\_info](secret_info_module#ansible-collections-sensu-sensu-go-secret-info-module)
The official documentation on the **sensu.sensu\_go.secret\_info** module.
Examples
--------
```
- name: Create a vault secrets provider
sensu.sensu_go.secrets_provider_vault:
name: my-vault
address: https://my-vault.com
token: VAULT_TOKEN
version: v1
- name: Delete a vault secrets provider
sensu.sensu_go.secrets_provider_vault:
name: my-vault
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu vault secrets provider. **Sample:** {'client': {'address': 'https://vaultserver.example.com:8200', 'max\_retries': 2, 'rate\_limiter': {'burst': 100, 'limit': 10}, 'timeout': '20s', 'tls': {'ca\_cert': '/etc/ssl/certs/vault\_ca\_cert.pem'}, 'token': 'VAULT\_TOKEN', 'version': 'v1'}, 'metadata': {'name': 'vault'}} |
### Authors
* Aljaz Kosir (@aljazkosir)
* Manca Bizjak (@mancabizjak)
* Miha Dolinar (@mdolin)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.silence β Manage Sensu silences sensu.sensu\_go.silence β Manage Sensu silences
===============================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.silence`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu silence.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/silencing/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **annotations** dictionary | | Custom metadata fields with fewer restrictions, as key/value pairs. These are preserved by Sensu but not accessible as tokens or identifiers, and are mainly intended for use with external tools. |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **begin** integer | | UNIX time at which silence entry goes into effect. |
| **check** string | | The name of the check the entry should match. If left empty a silencing entry will contain an asterisk in the check position. This indicates that any event where the originating entities subscriptions match the subscription specified in the entry will be marked as silenced, regardless of the check name. This parameter is required if the *subscription* parameter is absent. |
| **expire** integer | | Number of seconds until the silence expires. |
| **expire\_on\_resolve** boolean | **Choices:*** no
* yes
| If the entry should be deleted when a check begins return OK status (resolves). |
| **labels** dictionary | | Custom metadata fields that can be accessed within Sensu, as key/value pairs. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **reason** string | | Reason for silencing. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
| **subscription** string | | The name of the subscription the entry should match. If left empty a silencing entry will contain an asterisk in the subscription position. This indicates that any event with a matching check name will be marked as silenced, regardless of the originating entities subscriptions. Specific entity can also be targeted by taking advantage of per-entity subscription (entity:<entity\_name>). This parameter is required if the *check* parameter is absent. |
See Also
--------
See also
[sensu.sensu\_go.silence\_info](silence_info_module#ansible-collections-sensu-sensu-go-silence-info-module)
The official documentation on the **sensu.sensu\_go.silence\_info** module.
Examples
--------
```
- name: Silence a specific check
sensu.sensu_go.silence:
subscription: proxy
check: check-disk
- name: Silence specific check regardless of the originating entities subscription
sensu.sensu_go.silence:
check: check-cpu
- name: Silence all checks on a specific entity
sensu.sensu_go.silence:
subscription: entity:important-entity
expire: 120
reason: rebooting the world
- name: Delete a silencing entry
sensu.sensu_go.silence:
subscription: entity:important-entity
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu silence. **Sample:** {'begin': 1542671205, 'check': None, 'creator': 'admin', 'expire': -1, 'expire\_on\_resolve': False, 'metadata': {'annotations': None, 'labels': None, 'name': 'entity:i-424242:\*', 'namespace': 'default'}, 'reason': None, 'subscription': 'entity:i-424242'} |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Manca Bizjak (@mancabizjak)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.oidc_auth_provider β Manage Sensu OIDC authentication provider sensu.sensu\_go.oidc\_auth\_provider β Manage Sensu OIDC authentication provider
================================================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.oidc_auth_provider`.
New in version 1.10.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete a Sensu Go OIDC authentication provider.
* For more information, refer to the Sensu Go documentation at <https://docs.sensu.io/sensu-go/latest/operations/control-access/oidc-auth/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **additional\_scopes** list / elements=string | **Default:**"openid" | Scopes to include in the claims. |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **client\_id** string | | The OIDC provider application Client ID. Required if *state* is `present`. |
| **client\_secret** string | | The OIDC provider application Client Secret. Required if *state* is `present`. |
| **disable\_offline\_access** boolean | **Choices:*** **no** β
* yes
| If `true`, the OIDC provider cannot include the offline\_access scope in the authentication request. Otherwise, `false`. |
| **groups\_claim** string | | The claim to use to form the associated RBAC groups. |
| **groups\_prefix** string | | The prefix added to all OIDC groups. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **redirect\_uri** string | | Redirect URL to provide to the OIDC provider. |
| **server** string | | The location of the OIDC server you wish to authenticate against. Required if *state* is `present`. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
| **username\_claim** string | | The claim to use to form the final RBAC user name. Required if *state* is `present`. |
| **username\_prefix** string | | The prefix added to all OIDC usernames. |
Notes
-----
Note
* Supported only on Sensu Go versions >= 6.
See Also
--------
See also
[sensu.sensu\_go.auth\_provider\_info](auth_provider_info_module#ansible-collections-sensu-sensu-go-auth-provider-info-module)
The official documentation on the **sensu.sensu\_go.auth\_provider\_info** module.
[sensu.sensu\_go.ldap\_auth\_provider](ldap_auth_provider_module#ansible-collections-sensu-sensu-go-ldap-auth-provider-module)
The official documentation on the **sensu.sensu\_go.ldap\_auth\_provider** module.
[sensu.sensu\_go.ad\_auth\_provider](ad_auth_provider_module#ansible-collections-sensu-sensu-go-ad-auth-provider-module)
The official documentation on the **sensu.sensu\_go.ad\_auth\_provider** module.
Examples
--------
```
- name: Create a OIDC auth provider
sensu.sensu_go.oidc_auth_provider:
state: present
name: oidc_name
additional_scopes:
- groups
- email
client_id: a8e43af034e7f2608780
client_secret: b63968394be6ed2edb61c93847ee792f31bf6216
disable_offline_access: false
redirect_uri: http://127.0.0.1:8080/api/enterprise/authentication/v2/oidc/callback
server: https://oidc.example.com:9031
groups_claim: groups
groups_prefix: 'oidc:'
username_claim: email
username_prefix: 'oidc:'
- name: Delete a OIDC auth provider
sensu.sensu_go.oidc_auth_provider:
name: oidc_name
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu OIDC authentication provider. **Sample:** {'additional\_scopes': ['groups', 'email'], 'client\_id': 'a8e43af034e7f2608780', 'disable\_offline\_access': False, 'groups\_claim': 'groups', 'groups\_prefix': 'oidc:', 'metadata': {'created\_by': 'admin', 'name': 'oidc\_name'}, 'redirect\_uri': 'http://sensu-backend.example.com:8080/api/enterprise/authentication/v2/oidc/callback', 'server': 'https://oidc.example.com:9031', 'username\_claim': 'email', 'username\_prefix': 'oidc:'} |
### Authors
* Aljaz Kosir (@aljazkosir)
* Manca Bizjak (@mancabizjak)
* Miha Dolinar (@mdolin)
* Tadej Borovsak (@tadeboro)
| programming_docs |
ansible sensu.sensu_go.role_binding β Manage Sensu role bindings sensu.sensu\_go.role\_binding β Manage Sensu role bindings
==========================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.role_binding`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu role binding.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/rbac/#role-bindings-and-cluster-role-bindings>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **cluster\_role** string | | Name of the cluster role. Note that the resulting role binding grants the cluster role to the provided users and groups in the context of *auth.namespace* only. This parameter is mutually exclusive with *role*. |
| **groups** list / elements=string | | List of groups to bind to the role or cluster role. Note that at least one of *users* and *groups* must be specified when creating a role binding. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **role** string | | Name of the role. This parameter is mutually exclusive with *cluster\_role*. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
| **users** list / elements=string | | List of users to bind to the role or cluster role. Note that at least one of *users* and *groups* must be specified when creating a role binding. |
See Also
--------
See also
[sensu.sensu\_go.role\_binding\_info](role_binding_info_module#ansible-collections-sensu-sensu-go-role-binding-info-module)
The official documentation on the **sensu.sensu\_go.role\_binding\_info** module.
[sensu.sensu\_go.role](role_module#ansible-collections-sensu-sensu-go-role-module)
The official documentation on the **sensu.sensu\_go.role** module.
[sensu.sensu\_go.cluster\_role](cluster_role_module#ansible-collections-sensu-sensu-go-cluster-role-module)
The official documentation on the **sensu.sensu\_go.cluster\_role** module.
[sensu.sensu\_go.cluster\_role\_binding](cluster_role_binding_module#ansible-collections-sensu-sensu-go-cluster-role-binding-module)
The official documentation on the **sensu.sensu\_go.cluster\_role\_binding** module.
Examples
--------
```
- name: Create a role binding
sensu.sensu_go.role_binding:
name: dev_and_testing
role: testers_permissive
groups:
- testers
- dev
- ops
users:
- alice
- name: Create a role binding for admins
sensu.sensu_go.role_binding:
name: org-admins
cluster_role: admin
groups:
- team1-admins
- team2-admins
- name: Delete a role binding
sensu.sensu_go.role_binding:
name: org-admins
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu role binding. **Sample:** {'metadata': {'name': 'event-reader-binding', 'namespace': 'default'}, 'role\_ref': {'name': 'event-reader', 'type': 'Role'}, 'subjects': [{'name': 'bob', 'type': 'User'}]} |
### Authors
* Paul Arthur (@flowerysong)
* Manca Bizjak (@mancabizjak)
* Aljaz Kosir (@aljazkosir)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.mutator β Manage Sensu mutators sensu.sensu\_go.mutator β Manage Sensu mutators
===============================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.mutator`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete Sensu mutator.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/mutators/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **annotations** dictionary | | Custom metadata fields with fewer restrictions, as key/value pairs. These are preserved by Sensu but not accessible as tokens or identifiers, and are mainly intended for use with external tools. |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **command** string | | The mutator command to be executed by the Sensu backend. Required if *state* is `present`. |
| **env\_vars** dictionary | | A mapping of environment variable names and values to use with command execution. |
| **labels** dictionary | | Custom metadata fields that can be accessed within Sensu, as key/value pairs. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **runtime\_assets** list / elements=string | | List of runtime assets, required to run the mutator *command*. |
| **secrets** list / elements=dictionary added in 1.6.0 of sensu.sensu\_go | | List of secrets that are available to the command. |
| | **name** string / required added in 1.6.0 of sensu.sensu\_go | | Variable name that will contain the sensitive data. |
| | **secret** string / required added in 1.6.0 of sensu.sensu\_go | | Name of the secret that contains sensitive data. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
| **timeout** integer | | The mutator execution duration timeout in seconds (hard stop). |
See Also
--------
See also
[sensu.sensu\_go.mutator\_info](mutator_info_module#ansible-collections-sensu-sensu-go-mutator-info-module)
The official documentation on the **sensu.sensu\_go.mutator\_info** module.
Examples
--------
```
- name: Create a mutator
sensu.sensu_go.mutator:
name: mutator
command: sensu-influxdb-mutator
timeout: 30
env_vars:
INFLUXDB_ADDR: http://influxdb.default.svc.cluster.local:8086
INFLUXDB_USER: sensu
runtime_assets:
- sensu-influxdb-mutator
- name: Delete a mutator
sensu.sensu_go.mutator:
name: mutator
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu mutator. **Sample:** {'command': 'example\_mutator.go', 'env\_vars': [], 'metadata': {'annotations': None, 'labels': None, 'name': 'example-mutator', 'namespace': 'default'}, 'runtime\_assets': [], 'timeout': 0} |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.user β Manage Sensu users sensu.sensu\_go.user β Manage Sensu users
=========================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.user`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update, activate or deactivate Sensu user.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/rbac/#users>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* bcrypt (when managing Sensu Go 5.21.0 or newer)
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **groups** list / elements=string | | List of groups user belongs to. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **password** string | | Password for the user. Required if user with a desired name does not exist yet on the backend and *password\_hash* is not set. If both *password* and *password\_hash* are set, *password\_hash* is ignored and calculated from the *password* if required. |
| **password\_hash** string added in 1.8.0 of sensu.sensu\_go | | Bcrypt password hash for the user. Use `sensuctl user hash-password PASSWORD` to generate a hash. Required if user with a desired name does not exist yet on the backend and *password* is not set. If both *password* and *password\_hash* are set, *password\_hash* is ignored and calculated from the *password* if required. Sensu Go < 5.21.0 does not support creating/updating users using hashed passwords. Use *password* parameter if you need to manage such Sensu Go installations. At the moment, change detection does not work properly when using password hashes because the Sensu Go backend does not expose enough information via its API. |
| **state** string | **Choices:*** **enabled** β
* disabled
| Desired state of the user. Users cannot actually be deleted, only deactivated. |
See Also
--------
See also
[sensu.sensu\_go.user\_info](user_info_module#ansible-collections-sensu-sensu-go-user-info-module)
The official documentation on the **sensu.sensu\_go.user\_info** module.
Examples
--------
```
- name: Create a user
sensu.sensu_go.user:
auth:
url: http://localhost:8080
name: awesome_username
password: hidden_password?
groups:
- dev
- prod
- name: Use pre-hashed password
sensu.sensu_go.user:
auth:
url: http://localhost:8080
name: awesome_username
password_hash: $5f$14$.brXRviMZpbaleSq9kjoUuwm67V/s4IziOLGHjEqxJbzPsreQAyNm
- name: Deactivate a user
sensu.sensu_go.user:
name: awesome_username
state: 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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu user. **Sample:** {'disabled': False, 'groups': ['ops', 'dev'], 'password': 'USER\_PASSWORD', 'password\_hash': '$5f$14$.brXRviMZpbaleSq9kjoUuwm67V/s4IziOLGHjEqxJbzPsreQAyNm', 'username': 'alice'} |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Tadej Borovsak (@tadeboro)
ansible sensu.sensu_go.mutator_info β List Sensu mutators sensu.sensu\_go.mutator\_info β List Sensu mutators
===================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.mutator_info`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Retrieve information about Sensu mutators.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/mutators/>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **name** string | | Retrieve information about this specific object instead of listing all objects. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
See Also
--------
See also
[sensu.sensu\_go.mutator](mutator_module#ansible-collections-sensu-sensu-go-mutator-module)
The official documentation on the **sensu.sensu\_go.mutator** module.
Examples
--------
```
- name: List all Sensu mutators
sensu.sensu_go.mutator_info:
register: result
- name: Retrieve a single Sensu mutator
sensu.sensu_go.mutator_info:
name: my-mutator
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 |
| --- | --- | --- |
| **objects** list / elements=dictionary | success | List of Sensu mutators. **Sample:** [{'command': 'example\_mutator.go', 'env\_vars': [], 'metadata': {'annotations': None, 'labels': None, 'name': 'example-mutator', 'namespace': 'default'}, 'runtime\_assets': [], 'timeout': 0}] |
### Authors
* Paul Arthur (@flowerysong)
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
| programming_docs |
ansible sensu.sensu_go.pipe_handler β Manage Sensu pipe handler sensu.sensu\_go.pipe\_handler β Manage Sensu pipe handler
=========================================================
Note
This plugin is part of the [sensu.sensu\_go collection](https://galaxy.ansible.com/sensu/sensu_go) (version 1.12.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install sensu.sensu_go`.
To use it in a playbook, specify: `sensu.sensu_go.pipe_handler`.
New in version 1.0.0: of sensu.sensu\_go
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [See Also](#see-also)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update or delete a Sensu pipe handler.
* For more information, refer to the Sensu documentation at <https://docs.sensu.io/sensu-go/latest/reference/handlers/#pipe-handlers>.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **annotations** dictionary | | Custom metadata fields with fewer restrictions, as key/value pairs. These are preserved by Sensu but not accessible as tokens or identifiers, and are mainly intended for use with external tools. |
| **auth** dictionary | | Authentication parameters. Can define each of them with ENV as well. |
| | **api\_key** string added in 1.3.0 of sensu.sensu\_go | | The API key that should be used when authenticating. If this is not set, the value of the SENSU\_API\_KEY environment variable will be checked. This replaces *auth.user* and *auth.password* parameters. For more information about the API key, refer to the official Sensu documentation at <https://docs.sensu.io/sensu-go/latest/guides/use-apikey-feature/>. |
| | **ca\_path** path added in 1.5.0 of sensu.sensu\_go | | Path to the CA bundle that should be used to validate the backend certificate. If this parameter is not set, module will use the CA bundle that python is using. It is also possible to set this parameter via the *SENSU\_CA\_PATH* environment variable. |
| | **password** string | **Default:**"P@ssw0rd!" | The Sensu user's password. If this is not set the value of the SENSU\_PASSWORD environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **url** string | **Default:**"http://localhost:8080" | Location of the Sensu backend API. If this is not set the value of the SENSU\_URL environment variable will be checked. |
| | **user** string | **Default:**"admin" | The username to use for connecting to the Sensu API. If this is not set the value of the SENSU\_USER environment variable will be checked. This parameter is ignored if the *auth.api\_key* parameter is set. |
| | **verify** boolean added in 1.5.0 of sensu.sensu\_go | **Choices:*** no
* **yes** β
| Flag that controls the certificate validation. If you are using self-signed certificates, you can set this parameter to `false`. ONLY USE THIS PARAMETER IN DEVELOPMENT SCENARIOS! In you use self-signed certificates in production, see the *auth.ca\_path* parameter. It is also possible to set this parameter via the *SENSU\_VERIFY* environment variable. |
| **command** string | | The handler command to be executed. The event data is passed to the process through STDIN. Required if *state* is `present`. |
| **env\_vars** dictionary | | A mapping of environment variable names and values to use with command execution. |
| **filters** list / elements=string | | List of filters to use when determining whether to pass the check result to this handler. |
| **labels** dictionary | | Custom metadata fields that can be accessed within Sensu, as key/value pairs. |
| **mutator** string | | Mutator to call for transforming the check result before passing it to this handler. |
| **name** string / required | | The Sensu resource's name. This name (in combination with the namespace where applicable) uniquely identifies the resource that Ansible operates on. If the resource with selected name already exists, Ansible module will update it to match the specification in the task. Consult the *name* metadata attribute specification in the upstream docs on <https://docs.sensu.io/sensu-go/latest/reference/> for more details about valid names and other restrictions. |
| **namespace** string | **Default:**"default" | RBAC namespace to operate in. If this is not set the value of the SENSU\_NAMESPACE environment variable will be used. |
| **runtime\_assets** list / elements=string | | List of runtime assets to required to run the handler `command`. |
| **secrets** list / elements=dictionary added in 1.6.0 of sensu.sensu\_go | | List of secrets that are available to the command. |
| | **name** string / required added in 1.6.0 of sensu.sensu\_go | | Variable name that will contain the sensitive data. |
| | **secret** string / required added in 1.6.0 of sensu.sensu\_go | | Name of the secret that contains sensitive data. |
| **state** string | **Choices:*** **present** β
* absent
| Target state of the Sensu object. |
| **timeout** integer | | Timeout for handler execution. |
See Also
--------
See also
[sensu.sensu\_go.socket\_handler](socket_handler_module#ansible-collections-sensu-sensu-go-socket-handler-module)
The official documentation on the **sensu.sensu\_go.socket\_handler** module.
[sensu.sensu\_go.handler\_info](handler_info_module#ansible-collections-sensu-sensu-go-handler-info-module)
The official documentation on the **sensu.sensu\_go.handler\_info** module.
[sensu.sensu\_go.handler\_set](handler_set_module#ansible-collections-sensu-sensu-go-handler-set-module)
The official documentation on the **sensu.sensu\_go.handler\_set** module.
Examples
--------
```
- name: Setup InfluxDB handler
sensu.sensu_go.pipe_handler:
name: influx-db
command: sensu-influxdb-handler -d sensu
env_vars:
INFLUXDB_ADDR: http://influxdb.default.svc.cluster.local:8086
INFLUXDB_USER: sensu
INFLUXDB_PASS: password
runtime_assets:
- sensu-influxdb-handler
- name: Delete handler
sensu.sensu_go.pipe_handler:
name: influx-db
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 |
| --- | --- | --- |
| **object** dictionary | success | Object representing Sensu pipe handler. **Sample:** {'command': 'command-example', 'metadata': {'name': 'pipe\_handler\_minimum', 'namespace': 'default'}, 'type': 'pipe'} |
### Authors
* Aljaz Kosir (@aljazkosir)
* Miha Plesko (@miha-plesko)
* Tadej Borovsak (@tadeboro)
ansible Collections in the Fortinet Namespace Collections in the Fortinet Namespace
=====================================
These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **fortinet** namespace.
* [fortinet.fortimanager](fortimanager/index#plugins-in-fortinet-fortimanager)
* [fortinet.fortios](fortios/index#plugins-in-fortinet-fortios)
ansible fortinet.fortimanager.fmgr_fsp_vlan_interface_ipv6_ip6prefixlist β Advertised prefix list. fortinet.fortimanager.fmgr\_fsp\_vlan\_interface\_ipv6\_ip6prefixlist β Advertised prefix list.
===============================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_fsp_vlan_interface_ipv6_ip6prefixlist`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **fsp\_vlan\_interface\_ipv6\_ip6prefixlist** dictionary | | the top level parameters set |
| | **autonomous-flag** string | **Choices:*** disable
* enable
| no description |
| | **dnssl** string | | no description |
| | **onlink-flag** string | **Choices:*** disable
* enable
| no description |
| | **preferred-life-time** integer | | no description |
| | **prefix** string | | no description |
| | **rdnss** string | | no description |
| | **valid-life-time** integer | | no description |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **vlan** string / required | | the parameter (vlan) in requested url |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Advertised prefix list.
fmgr_fsp_vlan_interface_ipv6_ip6prefixlist:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
vlan: <your own value>
state: <value in [present, absent]>
fsp_vlan_interface_ipv6_ip6prefixlist:
autonomous-flag: <value in [disable, enable]>
dnssl: <value of string>
onlink-flag: <value in [disable, enable]>
preferred-life-time: <value of integer>
prefix: <value of string>
rdnss: <value of string>
valid-life-time: <value of integer>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_firewall_shapingprofile_shapingentries β Define shaping entries of this shaping profile. fortinet.fortimanager.fmgr\_firewall\_shapingprofile\_shapingentries β Define shaping entries of this shaping profile.
======================================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_shapingprofile_shapingentries`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_shapingprofile\_shapingentries** dictionary | | the top level parameters set |
| | **burst-in-msec** integer | | Number of bytes that can be burst at maximum-bandwidth speed. Formula: burst = maximum-bandwidth\*burst-in-msec. |
| | **cburst-in-msec** integer | | Number of bytes that can be burst as fast as the interface can transmit. Formula: cburst = maximum-bandwidth\*cburst-in-msec. |
| | **class-id** integer | | Class ID. |
| | **guaranteed-bandwidth-percentage** integer | | Guaranteed bandwith in percentage. |
| | **id** integer | | ID number. |
| | **limit** integer | | Hard limit on the real queue size in packets. |
| | **max** integer | | Average queue size in packets at which RED drop probability is maximal. |
| | **maximum-bandwidth-percentage** integer | | Maximum bandwith in percentage. |
| | **min** integer | | Average queue size in packets at which RED drop becomes a possibility. |
| | **priority** string | **Choices:*** low
* medium
* high
* critical
* top
| Priority. |
| | **red-probability** integer | | Maximum probability (in percentage) for RED marking. |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **shaping-profile** string / required | | the parameter (shaping-profile) in requested url |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Define shaping entries of this shaping profile.
fmgr_firewall_shapingprofile_shapingentries:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
shaping-profile: <your own value>
state: <value in [present, absent]>
firewall_shapingprofile_shapingentries:
class-id: <value of integer>
guaranteed-bandwidth-percentage: <value of integer>
id: <value of integer>
maximum-bandwidth-percentage: <value of integer>
priority: <value in [low, medium, high, ...]>
burst-in-msec: <value of integer>
cburst-in-msec: <value of integer>
limit: <value of integer>
max: <value of integer>
min: <value of integer>
red-probability: <value of integer>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_admin_user_adom β Admin domain. fortinet.fortimanager.fmgr\_system\_admin\_user\_adom β Admin domain.
=====================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_admin_user_adom`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_admin\_user\_adom** dictionary | | the top level parameters set |
| | **adom-name** string | | Admin domain names. |
| **user** string / required | | the parameter (user) in requested url |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Admin domain.
fmgr_system_admin_user_adom:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
user: <your own value>
state: <value in [present, absent]>
system_admin_user_adom:
adom-name: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_fact β Gather fortimanager facts. fortinet.fortimanager.fmgr\_fact β Gather fortimanager facts.
=============================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_fact`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **facts** dictionary | | the top level parameters set |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- name: gathering fortimanager facts
hosts: fortimanager01
gather_facts: no
connection: httpapi
collections:
- fortinet.fortimanager
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: retrieve all the scripts
fmgr_fact:
facts:
selector: 'dvmdb_script'
params:
adom: 'root'
script: ''
- name: retrive all the interfaces
fmgr_fact:
facts:
selector: 'system_interface'
params:
interface: ''
- name: retrieve the interface port1
fmgr_fact:
facts:
selector: 'system_interface'
params:
interface: 'port1'
- name: fetch urlfilter with name urlfilter4
fmgr_fact:
facts:
selector: 'webfilter_urlfilter'
params:
adom: 'root'
urlfilter: ''
filter:
-
- 'name'
- '=='
- 'urlfilter4'
fields:
- 'id'
- 'name'
- 'comment'
sortings:
- 'id': 1
'name': -1
- name: Retrieve device
fmgr_fact:
facts:
selector: 'dvmdb_device'
params:
adom: 'root'
device: ''
option:
- 'get meta'
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_waf_profile_signature_customsignature β Custom signature. fortinet.fortimanager.fmgr\_waf\_profile\_signature\_customsignature β Custom signature.
========================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_waf_profile_signature_customsignature`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **profile** string / required | | the parameter (profile) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **waf\_profile\_signature\_customsignature** dictionary | | the top level parameters set |
| | **action** string | **Choices:*** allow
* block
* erase
| Action. |
| | **case-sensitivity** string | **Choices:*** disable
* enable
| Case sensitivity in pattern. |
| | **direction** string | **Choices:*** request
* response
| Traffic direction. |
| | **log** string | **Choices:*** disable
* enable
| Enable/disable logging. |
| | **name** string | | Signature name. |
| | **pattern** string | | Match pattern. |
| | **severity** string | **Choices:*** low
* medium
* high
| Severity. |
| | **status** string | **Choices:*** disable
* enable
| Status. |
| | **target** list / elements=string | **Choices:*** arg
* arg-name
* req-body
* req-cookie
* req-cookie-name
* req-filename
* req-header
* req-header-name
* req-raw-uri
* req-uri
* resp-body
* resp-hdr
* resp-status
| no description |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Custom signature.
fmgr_waf_profile_signature_customsignature:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
profile: <your own value>
state: <value in [present, absent]>
waf_profile_signature_customsignature:
action: <value in [allow, block, erase]>
case-sensitivity: <value in [disable, enable]>
direction: <value in [request, response]>
log: <value in [disable, enable]>
name: <value of string>
pattern: <value of string>
severity: <value in [low, medium, high]>
status: <value in [disable, enable]>
target:
- arg
- arg-name
- req-body
- req-cookie
- req-cookie-name
- req-filename
- req-header
- req-header-name
- req-raw-uri
- req-uri
- resp-body
- resp-hdr
- resp-status
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_firewall_vipgrp64 β Configure IPv6 to IPv4 virtual IP groups. fortinet.fortimanager.fmgr\_firewall\_vipgrp64 β Configure IPv6 to IPv4 virtual IP groups.
==========================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_vipgrp64`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_vipgrp64** dictionary | | the top level parameters set |
| | **color** integer | | Integer value to determine the color of the icon in the GUI (range 1 to 32, default = 0, which sets the value to 1). |
| | **comments** string | | Comment. |
| | **member** string | | Member VIP objects of the group (Separate multiple objects with a space). |
| | **name** string | | VIP64 group name. |
| | **uuid** string | | Universally Unique Identifier (UUID; automatically assigned but can be manually reset). |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure IPv6 to IPv4 virtual IP groups.
fmgr_firewall_vipgrp64:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
firewall_vipgrp64:
color: <value of integer>
comments: <value of string>
member: <value of string>
name: <value of string>
uuid: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_switchcontroller_managedswitch_stpsettings β Configuration method to edit Spanning Tree Protocol fortinet.fortimanager.fmgr\_switchcontroller\_managedswitch\_stpsettings β Configuration method to edit Spanning Tree Protocol
==============================================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_switchcontroller_managedswitch_stpsettings`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **device** string / required | | the parameter (device) in requested url |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **managed-switch** string / required | | the parameter (managed-switch) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **vdom** string / required | | the parameter (vdom) in requested url |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configuration method to edit Spanning Tree Protocol
fmgr_switchcontroller_managedswitch_stpsettings:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
device: <your own value>
vdom: <your own value>
managed-switch: <your own value>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_fmupdate_serveraccesspriorities_privateserver β Configure multiple FortiManager units and private servers. fortinet.fortimanager.fmgr\_fmupdate\_serveraccesspriorities\_privateserver β Configure multiple FortiManager units and private servers.
========================================================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_fmupdate_serveraccesspriorities_privateserver`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **fmupdate\_serveraccesspriorities\_privateserver** dictionary | | the top level parameters set |
| | **id** integer | **Default:**0 | Private server ID (1 - 10). |
| | **ip** string | **Default:**"0.0.0.0" | IPv4 address of the FortiManager unit or private server. |
| | **ip6** string | **Default:**"::" | IPv6 address of the FortiManager unit or private server. |
| | **time\_zone** integer | **Default:**-24 | Time zone of the private server (-24 = local time zone, default = -24). |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure multiple FortiManager units and private servers.
fmgr_fmupdate_serveraccesspriorities_privateserver:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
state: <value in [present, absent]>
fmupdate_serveraccesspriorities_privateserver:
id: <value of integer>
ip: <value of string>
ip6: <value of string>
time_zone: <value of integer>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_dvm_cmd_add_devlist β Add multiple devices to the Device Manager database. fortinet.fortimanager.fmgr\_dvm\_cmd\_add\_devlist β Add multiple devices to the Device Manager database.
=========================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_dvm_cmd_add_devlist`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **dvm\_cmd\_add\_devlist** dictionary | | the top level parameters set |
| | **add-dev-list** list / elements=string | | no description |
| | | **adm\_pass** string | | no description |
| | | **adm\_usr** string | | <i>add real and promote device</i>. |
| | | **desc** string | | <i>available for all operations</i>. |
| | | **device action** string | | Specify add device operations, or leave blank to add real device: "add\_model" - add a model device. "promote\_unreg" - promote an unregistered device to be managed by FortiManager using information from database. |
| | | **faz.quota** integer | | <i>available for all operations</i>. |
| | | **ip** string | | <i>add real device only</i>. Add device will probe with this IP using the log in credential specified. |
| | | **meta fields** string | | <i>add real and model device</i>. |
| | | **mgmt\_mode** string | **Choices:*** unreg
* fmg
* faz
* fmgfaz
| <i>add real and model device</i>. |
| | | **mr** integer | | <i>add model device only</i>. |
| | | **name** string | | <i>required for all operations</i>. Unique name for the device. |
| | | **os\_type** string | **Choices:*** unknown
* fos
* fsw
* foc
* fml
* faz
* fwb
* fch
* fct
* log
* fmg
* fsa
* fdd
* fac
* fpx
* fna
| <i>add model device only</i>. |
| | | **os\_ver** string | **Choices:*** unknown
* 0.0
* 1.0
* 2.0
* 3.0
* 4.0
* 5.0
* 6.0
* 7.0
* 8.0
| <i>add model device only</i>. |
| | | **patch** integer | | <i>add model device only</i>. |
| | | **platform\_str** string | | <i>add model device only</i>. Required for determine the platform for VM platforms. |
| | | **sn** string | | <i>add model device only</i>. This attribute will be used to determine the device platform, except for VM platforms, w... |
| | **adom** string | | Name or ID of the ADOM where the command is to be executed on. |
| | **flags** list / elements=string | **Choices:*** none
* create\_task
* nonblocking
* log\_dev
| no description |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Add multiple devices to the Device Manager database.
fmgr_dvm_cmd_add_devlist:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
dvm_cmd_add_devlist:
add-dev-list:
-
adm_pass: <value of string>
adm_usr: <value of string>
desc: <value of string>
device action: <value of string>
faz.quota: <value of integer>
ip: <value of string>
meta fields: <value of string>
mgmt_mode: <value in [unreg, fmg, faz, ...]>
mr: <value of integer>
name: <value of string>
os_type: <value in [unknown, fos, fsw, ...]>
os_ver: <value in [unknown, 0.0, 1.0, ...]>
patch: <value of integer>
platform_str: <value of string>
sn: <value of string>
adom: <value of string>
flags:
- none
- create_task
- nonblocking
- log_dev
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_logfetch_clientprofile_logfilter β Log content filters. fortinet.fortimanager.fmgr\_system\_logfetch\_clientprofile\_logfilter β Log content filters.
=============================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_logfetch_clientprofile_logfilter`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **client-profile** string / required | | the parameter (client-profile) in requested url |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_logfetch\_clientprofile\_logfilter** dictionary | | the top level parameters set |
| | **field** string | | Field name. |
| | **id** integer | **Default:**0 | Log filter ID. |
| | **oper** string | **Choices:*** **=** β
* !=
* <
* >
* <=
* >=
* contain
* not-contain
* match
| Field filter operator. < - =Less than or equal to > - =Greater than or equal to contain - Contain not-contain - Not contain match - Match (expression) |
| | **value** string | | Field filter operand or free-text matching expression. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Log content filters.
fmgr_system_logfetch_clientprofile_logfilter:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
client-profile: <your own value>
state: <value in [present, absent]>
system_logfetch_clientprofile_logfilter:
field: <value of string>
id: <value of integer>
oper: <value in [=, !=, <, ...]>
value: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_apcfgprofile β Configure AP local configuration profiles. fortinet.fortimanager.fmgr\_apcfgprofile β Configure AP local configuration profiles.
=====================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_apcfgprofile`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **apcfgprofile** dictionary | | the top level parameters set |
| | **ac-ip** string | | IP address of the validation controller that AP must be able to join after applying AP local configuration. |
| | **ac-port** integer | | Port of the validation controller that AP must be able to join after applying AP local configuration (1024 - 49150, default = ... |
| | **ac-timer** integer | | Maximum waiting time for the AP to join the validation controller after applying AP local configuration (3 - 30 min, default =... |
| | **ac-type** string | **Choices:*** default
* specify
* apcfg
| Validation controller type (default = default). |
| | **command-list** list / elements=string | | no description |
| | | **id** integer | | Command ID. |
| | | **name** string | | AP local configuration command name. |
| | | **passwd-value** string | | no description |
| | | **type** string | **Choices:*** non-password
* password
| The command type (default = non-password). |
| | | **value** string | | AP local configuration command value. |
| | **comment** string | | Comment. |
| | **name** string | | AP local configuration profile name. |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure AP local configuration profiles.
fmgr_apcfgprofile:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
apcfgprofile:
ac-ip: <value of string>
ac-port: <value of integer>
ac-timer: <value of integer>
ac-type: <value in [default, specify, apcfg]>
command-list:
-
id: <value of integer>
name: <value of string>
passwd-value: <value of string>
type: <value in [non-password, password]>
value: <value of string>
comment: <value of string>
name: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_antivirus_mmschecksum β Configure MMS content checksum list. fortinet.fortimanager.fmgr\_antivirus\_mmschecksum β Configure MMS content checksum list.
=========================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_antivirus_mmschecksum`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **antivirus\_mmschecksum** dictionary | | the top level parameters set |
| | **comment** string | | Optional comments. |
| | **entries** list / elements=string | | no description |
| | | **checksum** string | | MMS attachment checksum value (CRC32) |
| | | **name** string | | entry name, for administrator reference |
| | | **status** string | **Choices:*** disable
* enable
| apply this entry during attachment inspection |
| | **id** integer | | ID. |
| | **name** string | | Name of table. |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure MMS content checksum list.
fmgr_antivirus_mmschecksum:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
antivirus_mmschecksum:
comment: <value of string>
entries:
-
checksum: <value of string>
name: <value of string>
status: <value in [disable, enable]>
id: <value of integer>
name: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_pkg_firewall_interfacepolicy β Configure IPv4 interface policies. fortinet.fortimanager.fmgr\_pkg\_firewall\_interfacepolicy β Configure IPv4 interface policies.
===============================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_pkg_firewall_interfacepolicy`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **pkg** string / required | | the parameter (pkg) in requested url |
| **pkg\_firewall\_interfacepolicy** dictionary | | the top level parameters set |
| | **address-type** string | **Choices:*** ipv4
* ipv6
| no description |
| | **application-list** string | | Application list name. |
| | **application-list-status** string | **Choices:*** disable
* enable
| Enable/disable application control. |
| | **av-profile** string | | Antivirus profile. |
| | **av-profile-status** string | **Choices:*** disable
* enable
| Enable/disable antivirus. |
| | **comments** string | | Comments. |
| | **dlp-sensor** string | | DLP sensor name. |
| | **dlp-sensor-status** string | **Choices:*** disable
* enable
| Enable/disable DLP. |
| | **dsri** string | **Choices:*** disable
* enable
| Enable/disable DSRI. |
| | **dstaddr** string | | Address object to limit traffic monitoring to network traffic sent to the specified address or range. |
| | **emailfilter-profile** string | | Email filter profile. |
| | **emailfilter-profile-status** string | **Choices:*** disable
* enable
| Enable/disable email filter. |
| | **interface** string | | Monitored interface name from available interfaces. |
| | **ips-sensor** string | | IPS sensor name. |
| | **ips-sensor-status** string | **Choices:*** disable
* enable
| Enable/disable IPS. |
| | **label** string | | Label. |
| | **logtraffic** string | **Choices:*** disable
* all
* utm
| Logging type to be used in this policy (Options: all | utm | disable, Default: utm). |
| | **policyid** integer | | Policy ID. |
| | **scan-botnet-connections** string | **Choices:*** disable
* block
* monitor
| Enable/disable scanning for connections to Botnet servers. |
| | **service** string | | Service object from available options. |
| | **spamfilter-profile** string | | Antispam profile. |
| | **spamfilter-profile-status** string | **Choices:*** disable
* enable
| Enable/disable antispam. |
| | **srcaddr** string | | Address object to limit traffic monitoring to network traffic sent from the specified address or range. |
| | **status** string | **Choices:*** disable
* enable
| Enable/disable this policy. |
| | **webfilter-profile** string | | Web filter profile. |
| | **webfilter-profile-status** string | **Choices:*** disable
* enable
| Enable/disable web filtering. |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure IPv4 interface policies.
fmgr_pkg_firewall_interfacepolicy:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
pkg: <your own value>
state: <value in [present, absent]>
pkg_firewall_interfacepolicy:
address-type: <value in [ipv4, ipv6]>
application-list: <value of string>
application-list-status: <value in [disable, enable]>
av-profile: <value of string>
av-profile-status: <value in [disable, enable]>
comments: <value of string>
dlp-sensor: <value of string>
dlp-sensor-status: <value in [disable, enable]>
dsri: <value in [disable, enable]>
dstaddr: <value of string>
interface: <value of string>
ips-sensor: <value of string>
ips-sensor-status: <value in [disable, enable]>
label: <value of string>
logtraffic: <value in [disable, all, utm]>
policyid: <value of integer>
scan-botnet-connections: <value in [disable, block, monitor]>
service: <value of string>
spamfilter-profile: <value of string>
spamfilter-profile-status: <value in [disable, enable]>
srcaddr: <value of string>
status: <value in [disable, enable]>
webfilter-profile: <value of string>
webfilter-profile-status: <value in [disable, enable]>
emailfilter-profile: <value of string>
emailfilter-profile-status: <value in [disable, enable]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_autodelete_logautodeletion β Automatic deletion policy for device logs. fortinet.fortimanager.fmgr\_system\_autodelete\_logautodeletion β Automatic deletion policy for device logs.
============================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_autodelete_logautodeletion`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_autodelete\_logautodeletion** dictionary | | the top level parameters set |
| | **retention** string | **Choices:*** **days** β
* weeks
* months
| Automatic deletion in days, weeks, or months. days - Auto-delete data older than <value> days. weeks - Auto-delete data older than <value> weeks. months - Auto-delete data older than <value> months. |
| | **runat** integer | **Default:**0 | Automatic deletion run at (0 - 23) oclock. |
| | **status** string | **Choices:*** **disable** β
* enable
| Enable/disable automatic deletion. disable - Disable automatic deletion. enable - Enable automatic deletion. |
| | **value** integer | **Default:**0 | Automatic deletion in x days, weeks, or months. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Automatic deletion policy for device logs.
fmgr_system_autodelete_logautodeletion:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
system_autodelete_logautodeletion:
retention: <value in [days, weeks, months]>
runat: <value of integer>
status: <value in [disable, enable]>
value: <value of integer>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_pm_wanprof_adom β no description fortinet.fortimanager.fmgr\_pm\_wanprof\_adom β no description
==============================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_pm_wanprof_adom`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **pm\_wanprof\_adom** dictionary | | the top level parameters set |
| | **description** string | | no description |
| | **name** string | | no description |
| | **oid** integer | | no description |
| | **scope member** list / elements=string | | no description |
| | | **name** string | | no description |
| | | **vdom** string | | no description |
| | **type** string | **Choices:*** wanprof
| no description |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: no description
fmgr_pm_wanprof_adom:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
pm_wanprof_adom:
description: <value of string>
name: <value of string>
oid: <value of integer>
scope member:
-
name: <value of string>
vdom: <value of string>
type: <value in [wanprof]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_system_geoipoverride β Configure geographical location mapping for IP address fortinet.fortimanager.fmgr\_system\_geoipoverride β Configure geographical location mapping for IP address
==========================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_geoipoverride`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_geoipoverride** dictionary | | the top level parameters set |
| | **description** string | | Description. |
| | **ip-range** list / elements=string | | no description |
| | | **end-ip** string | | Final IP address, inclusive, of the address range (format: xxx.xxx.xxx.xxx). |
| | | **id** integer | | ID number for individual entry in the IP-Range table. |
| | | **start-ip** string | | Starting IP address, inclusive, of the address range (format: xxx.xxx.xxx.xxx). |
| | **ip6-range** list / elements=string | | no description |
| | | **end-ip** string | | Ending IP address, inclusive, of the address range (format: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx). |
| | | **id** integer | | ID of individual entry in the IPv6 range table. |
| | | **start-ip** string | | Starting IP address, inclusive, of the address range (format: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx). |
| | **name** string | | Location name. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure geographical location mapping for IP address
fmgr_system_geoipoverride:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
system_geoipoverride:
description: <value of string>
ip-range:
-
end-ip: <value of string>
id: <value of integer>
start-ip: <value of string>
name: <value of string>
ip6-range:
-
end-ip: <value of string>
id: <value of integer>
start-ip: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_fmupdate_webspam_fgdsetting_serveroverride_servlist β Override server. fortinet.fortimanager.fmgr\_fmupdate\_webspam\_fgdsetting\_serveroverride\_servlist β Override server.
======================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_fmupdate_webspam_fgdsetting_serveroverride_servlist`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **fmupdate\_webspam\_fgdsetting\_serveroverride\_servlist** dictionary | | the top level parameters set |
| | **id** integer | **Default:**0 | Override server ID (1 - 10). |
| | **ip** string | **Default:**"0.0.0.0" | IPv4 address of the override server. |
| | **ip6** string | **Default:**"::" | IPv6 address of the override server. |
| | **port** integer | **Default:**443 | Port number to use when contacting FortiGuard (1 - 65535, default = 443). |
| | **service-type** list / elements=string | **Choices:*** fgd
* fgc
* fsa
| no description |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Override server.
fmgr_fmupdate_webspam_fgdsetting_serveroverride_servlist:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
state: <value in [present, absent]>
fmupdate_webspam_fgdsetting_serveroverride_servlist:
id: <value of integer>
ip: <value of string>
ip6: <value of string>
port: <value of integer>
service-type:
- fgd
- fgc
- fsa
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_switchcontroller_customcommand β Configure the FortiGate switch controller to send custom commands to managed FortiSwitch devices. fortinet.fortimanager.fmgr\_switchcontroller\_customcommand β Configure the FortiGate switch controller to send custom commands to managed FortiSwitch devices.
===============================================================================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_switchcontroller_customcommand`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **switchcontroller\_customcommand** dictionary | | the top level parameters set |
| | **command** string | | String of commands to send to FortiSwitch devices (For example (0x0.00000092ddcbp-1022 = return key): config switch trunk 0x0.... |
| | **command-name** string | | Command name called by the FortiGate switch controller in the execute command. |
| | **description** string | | Description. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure the FortiGate switch controller to send custom commands to managed FortiSwitch devices.
fmgr_switchcontroller_customcommand:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
switchcontroller_customcommand:
command: <value of string>
command-name: <value of string>
description: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_admin_user_restrictdevvdom β Restricted to these devices/VDOMs. fortinet.fortimanager.fmgr\_system\_admin\_user\_restrictdevvdom β Restricted to these devices/VDOMs.
=====================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_admin_user_restrictdevvdom`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_admin\_user\_restrictdevvdom** dictionary | | the top level parameters set |
| | **dev-vdom** string | | Device or device VDOM. |
| **user** string / required | | the parameter (user) in requested url |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Restricted to these devices/VDOMs.
fmgr_system_admin_user_restrictdevvdom:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
user: <your own value>
state: <value in [present, absent]>
system_admin_user_restrictdevvdom:
dev-vdom: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_firewall_internetservicecustom_disableentry β Disable entries in the Internet Service database. fortinet.fortimanager.fmgr\_firewall\_internetservicecustom\_disableentry β Disable entries in the Internet Service database.
=============================================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_internetservicecustom_disableentry`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_internetservicecustom\_disableentry** dictionary | | the top level parameters set |
| | **id** integer | | Disable entry ID. |
| | **ip-range** list / elements=string | | no description |
| | | **end-ip** string | | End IP address. |
| | | **id** integer | | Disable entry range ID. |
| | | **start-ip** string | | Start IP address. |
| | **port** integer | | no description |
| | **protocol** integer | | Integer value for the protocol type as defined by IANA (0 - 255). |
| **internet-service-custom** string / required | | the parameter (internet-service-custom) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Disable entries in the Internet Service database.
fmgr_firewall_internetservicecustom_disableentry:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
internet-service-custom: <your own value>
state: <value in [present, absent]>
firewall_internetservicecustom_disableentry:
id: <value of integer>
ip-range:
-
end-ip: <value of string>
id: <value of integer>
start-ip: <value of string>
port: <value of integer>
protocol: <value of integer>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_dhcp_server_options β DHCP options. fortinet.fortimanager.fmgr\_system\_dhcp\_server\_options β DHCP options.
=========================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_dhcp_server_options`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **server** string / required | | the parameter (server) in requested url |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_dhcp\_server\_options** dictionary | | the top level parameters set |
| | **code** integer | | DHCP option code. |
| | **id** integer | | ID. |
| | **ip** string | | no description |
| | **type** string | **Choices:*** hex
* string
* ip
* fqdn
| DHCP option type. |
| | **value** string | | DHCP option value. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: DHCP options.
fmgr_system_dhcp_server_options:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
server: <your own value>
state: <value in [present, absent]>
system_dhcp_server_options:
code: <value of integer>
id: <value of integer>
ip: <value of string>
type: <value in [hex, string, ip, ...]>
value: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_locallog_memory_setting β Settings for memory buffer. fortinet.fortimanager.fmgr\_system\_locallog\_memory\_setting β Settings for memory buffer.
===========================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_locallog_memory_setting`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_locallog\_memory\_setting** dictionary | | the top level parameters set |
| | **diskfull** string | **Choices:*** **overwrite** β
* nolog
| Action upon disk full. overwrite - Overwrite oldest log when disk is full. nolog - Stop logging when disk is full. |
| | **severity** string | **Choices:*** emergency
* alert
* critical
* error
* warning
* **notification** β
* information
* debug
| Least severity level to log. emergency - Emergency level. alert - Alert level. critical - Critical level. error - Error level. warning - Warning level. notification - Notification level. information - Information level. debug - Debug level. |
| | **status** string | **Choices:*** **disable** β
* enable
| Enable/disable memory buffer log. disable - Do not log to memory buffer. enable - Log to memory buffer. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Settings for memory buffer.
fmgr_system_locallog_memory_setting:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
system_locallog_memory_setting:
diskfull: <value in [overwrite, nolog]>
severity: <value in [emergency, alert, critical, ...]>
status: <value in [disable, enable]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_firewall_profileprotocoloptions_cifs_filefilter β File filter. fortinet.fortimanager.fmgr\_firewall\_profileprotocoloptions\_cifs\_filefilter β File filter.
=============================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_profileprotocoloptions_cifs_filefilter`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_profileprotocoloptions\_cifs\_filefilter** dictionary | | the top level parameters set |
| | **entries** list / elements=string | | no description |
| | | **action** string | **Choices:*** log
* block
| Action taken for matched file. |
| | | **comment** string | | Comment. |
| | | **direction** string | **Choices:*** any
* incoming
* outgoing
| Match files transmitted in the sessions originating or reply direction. |
| | | **file-type** string | | no description |
| | | **filter** string | | Add a file filter. |
| | | **protocol** list / elements=string | **Choices:*** cifs
| no description |
| | **log** string | **Choices:*** disable
* enable
| Enable/disable file filter logging. |
| | **status** string | **Choices:*** disable
* enable
| Enable/disable file filter. |
| **profile-protocol-options** string / required | | the parameter (profile-protocol-options) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: File filter.
fmgr_firewall_profileprotocoloptions_cifs_filefilter:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
profile-protocol-options: <your own value>
firewall_profileprotocoloptions_cifs_filefilter:
entries:
-
action: <value in [log, block]>
comment: <value of string>
direction: <value in [any, incoming, outgoing]>
file-type: <value of string>
filter: <value of string>
protocol:
- cifs
log: <value in [disable, enable]>
status: <value in [disable, enable]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_firewall_address_tagging β Config object tagging. fortinet.fortimanager.fmgr\_firewall\_address\_tagging β Config object tagging.
===============================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_address_tagging`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string / required | | the parameter (address) in requested url |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_address\_tagging** dictionary | | the top level parameters set |
| | **category** string | | Tag category. |
| | **name** string | | Tagging entry name. |
| | **tags** string | | no description |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Config object tagging.
fmgr_firewall_address_tagging:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
address: <your own value>
state: <value in [present, absent]>
firewall_address_tagging:
category: <value of string>
name: <value of string>
tags: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_wanprof_system_sdwan_service_sla β Service level agreement fortinet.fortimanager.fmgr\_wanprof\_system\_sdwan\_service\_sla β Service level agreement
==========================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_wanprof_system_sdwan_service_sla`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **service** string / required | | the parameter (service) in requested url |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **wanprof** string / required | | the parameter (wanprof) in requested url |
| **wanprof\_system\_sdwan\_service\_sla** dictionary | | the top level parameters set |
| | **health-check** string | | SD-WAN health-check. |
| | **id** integer | | SLA ID. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Service level agreement
fmgr_wanprof_system_sdwan_service_sla:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
wanprof: <your own value>
service: <your own value>
state: <value in [present, absent]>
wanprof_system_sdwan_service_sla:
health-check: <value of string>
id: <value of integer>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_devprof_system_global β Configure global attributes. fortinet.fortimanager.fmgr\_devprof\_system\_global β Configure global attributes.
==================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_devprof_system_global`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **devprof** string / required | | the parameter (devprof) in requested url |
| **devprof\_system\_global** dictionary | | the top level parameters set |
| | **admin-https-redirect** string | **Choices:*** disable
* enable
| Enable/disable redirection of HTTP administration access to HTTPS. |
| | **admin-port** integer | | Administrative access port for HTTP. (1 - 65535, default = 80). |
| | **admin-scp** string | **Choices:*** disable
* enable
| Enable/disable using SCP to download the system configuration. You can use SCP as an alternative method for backing up the con... |
| | **admin-sport** integer | | Administrative access port for HTTPS. (1 - 65535, default = 443). |
| | **admin-ssh-port** integer | | Administrative access port for SSH. (1 - 65535, default = 22). |
| | **admin-ssh-v1** string | **Choices:*** disable
* enable
| Enable/disable SSH v1 compatibility. |
| | **admin-telnet-port** integer | | Administrative access port for TELNET. (1 - 65535, default = 23). |
| | **admintimeout** integer | | Number of minutes before an idle administrator session times out (5 - 480 minutes (8 hours), default = 5). A shorter idle time... |
| | **gui-ipv6** string | **Choices:*** disable
* enable
| Enable/disable IPv6 settings on the GUI. |
| | **gui-lines-per-page** integer | | Number of lines to display per page for web administration. |
| | **gui-theme** string | **Choices:*** blue
* green
* melongene
* red
* mariner
* neutrino
* jade
* graphite
* dark-matter
* onyx
* eclipse
* retro
| Color scheme for the administration GUI. |
| | **language** string | **Choices:*** english
* simch
* japanese
* korean
* spanish
* trach
* french
* portuguese
| GUI display language. |
| | **switch-controller** string | **Choices:*** disable
* enable
| Enable/disable switch controller feature. Switch controller allows you to manage FortiSwitch from the FortiGate itself. |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure global attributes.
fmgr_devprof_system_global:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
devprof: <your own value>
devprof_system_global:
admin-https-redirect: <value in [disable, enable]>
admin-port: <value of integer>
admin-scp: <value in [disable, enable]>
admin-sport: <value of integer>
admin-ssh-port: <value of integer>
admin-ssh-v1: <value in [disable, enable]>
admin-telnet-port: <value of integer>
admintimeout: <value of integer>
gui-ipv6: <value in [disable, enable]>
gui-lines-per-page: <value of integer>
gui-theme: <value in [blue, green, melongene, ...]>
language: <value in [english, simch, japanese, ...]>
switch-controller: <value in [disable, enable]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_cifs_domaincontroller β Define known domain controller servers. fortinet.fortimanager.fmgr\_cifs\_domaincontroller β Define known domain controller servers.
============================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_cifs_domaincontroller`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **cifs\_domaincontroller** dictionary | | the top level parameters set |
| | **domain-name** string | | Fully qualified domain name (FQDN). E.g. EXAMPLE.COM. |
| | **ip** string | | IPv4 server address. |
| | **ip6** string | | IPv6 server address. |
| | **password** string | | no description |
| | **port** integer | | Port number of service. Port number 0 indicates automatic discovery. |
| | **server-name** string | | Name of the server to connect to. |
| | **username** string | | User name to sign in with. Must have proper permissions for service. |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Define known domain controller servers.
fmgr_cifs_domaincontroller:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
cifs_domaincontroller:
domain-name: <value of string>
ip: <value of string>
ip6: <value of string>
password: <value of string>
port: <value of integer>
server-name: <value of string>
username: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_user_group_match β Group matches. fortinet.fortimanager.fmgr\_user\_group\_match β Group matches.
===============================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_user_group_match`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **group** string / required | | the parameter (group) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **user\_group\_match** dictionary | | the top level parameters set |
| | **\_gui\_meta** string | | no description |
| | **group-name** string | | Name of matching group on remote authentication server. |
| | **id** integer | | ID. |
| | **server-name** string | | Name of remote auth server. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Group matches.
fmgr_user_group_match:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
group: <your own value>
state: <value in [present, absent]>
user_group_match:
_gui_meta: <value of string>
group-name: <value of string>
id: <value of integer>
server-name: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_firewall_mmsprofile β Configure MMS profiles. fortinet.fortimanager.fmgr\_firewall\_mmsprofile β Configure MMS profiles.
==========================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_mmsprofile`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_mmsprofile** dictionary | | the top level parameters set |
| | **avnotificationtable** string | | AntiVirus notification table ID. |
| | **bwordtable** string | | MMS banned word table ID. |
| | **carrier-endpoint-prefix** string | **Choices:*** disable
* enable
| Enable/disable prefixing of end point values. |
| | **carrier-endpoint-prefix-range-max** integer | | Maximum length of end point value that can be prefixed (1 - 48). |
| | **carrier-endpoint-prefix-range-min** integer | | Minimum end point length to be prefixed (1 - 48). |
| | **carrier-endpoint-prefix-string** string | | String with which to prefix End point values. |
| | **carrierendpointbwltable** string | | Carrier end point filter table ID. |
| | **comment** string | | Comment. |
| | **mm1** list / elements=string | **Choices:*** avmonitor
* block
* oversize
* quarantine
* scan
* avquery
* bannedword
* no-content-summary
* archive-summary
* archive-full
* carrier-endpoint-bwl
* remove-blocked
* chunkedbypass
* clientcomfort
* servercomfort
* strict-file
* mms-checksum
| no description |
| | **mm1-addr-hdr** string | | HTTP header field (for MM1) containing user address. |
| | **mm1-addr-source** string | **Choices:*** http-header
* cookie
| Source for MM1 user address. |
| | **mm1-convert-hex** string | **Choices:*** disable
* enable
| Enable/disable converting user address from HEX string for MM1. |
| | **mm1-outbreak-prevention** string | **Choices:*** disabled
* files
* full-archive
| Enable FortiGuard Virus Outbreak Prevention service. |
| | **mm1-retr-dupe** string | **Choices:*** disable
* enable
| Enable/disable duplicate scanning of MM1 retr. |
| | **mm1-retrieve-scan** string | **Choices:*** disable
* enable
| Enable/disable scanning on MM1 retrieve configuration messages. |
| | **mm1comfortamount** integer | | MM1 comfort amount (0 - 4294967295). |
| | **mm1comfortinterval** integer | | MM1 comfort interval (0 - 4294967295). |
| | **mm1oversizelimit** integer | | Maximum file size to scan (1 - 819200 kB). |
| | **mm3** list / elements=string | **Choices:*** avmonitor
* block
* oversize
* quarantine
* scan
* avquery
* bannedword
* no-content-summary
* archive-summary
* archive-full
* carrier-endpoint-bwl
* remove-blocked
* fragmail
* splice
* mms-checksum
| no description |
| | **mm3-outbreak-prevention** string | **Choices:*** disabled
* files
* full-archive
| Enable FortiGuard Virus Outbreak Prevention service. |
| | **mm3oversizelimit** integer | | Maximum file size to scan (1 - 819200 kB). |
| | **mm4** list / elements=string | **Choices:*** avmonitor
* block
* oversize
* quarantine
* scan
* avquery
* bannedword
* no-content-summary
* archive-summary
* archive-full
* carrier-endpoint-bwl
* remove-blocked
* fragmail
* splice
* mms-checksum
| no description |
| | **mm4-outbreak-prevention** string | **Choices:*** disabled
* files
* full-archive
| Enable FortiGuard Virus Outbreak Prevention service. |
| | **mm4oversizelimit** integer | | Maximum file size to scan (1 - 819200 kB). |
| | **mm7** list / elements=string | **Choices:*** avmonitor
* block
* oversize
* quarantine
* scan
* avquery
* bannedword
* no-content-summary
* archive-summary
* archive-full
* carrier-endpoint-bwl
* remove-blocked
* chunkedbypass
* clientcomfort
* servercomfort
* strict-file
* mms-checksum
| no description |
| | **mm7-addr-hdr** string | | HTTP header field (for MM7) containing user address. |
| | **mm7-addr-source** string | **Choices:*** http-header
* cookie
| Source for MM7 user address. |
| | **mm7-convert-hex** string | **Choices:*** disable
* enable
| Enable/disable conversion of user address from HEX string for MM7. |
| | **mm7-outbreak-prevention** string | **Choices:*** disabled
* files
* full-archive
| Enable FortiGuard Virus Outbreak Prevention service. |
| | **mm7comfortamount** integer | | MM7 comfort amount (0 - 4294967295). |
| | **mm7comfortinterval** integer | | MM7 comfort interval (0 - 4294967295). |
| | **mm7oversizelimit** integer | | Maximum file size to scan (1 - 819200 kB). |
| | **mms-antispam-mass-log** string | **Choices:*** disable
* enable
| Enable/disable logging for MMS antispam mass. |
| | **mms-av-block-log** string | **Choices:*** disable
* enable
| Enable/disable logging for MMS antivirus file blocking. |
| | **mms-av-oversize-log** string | **Choices:*** disable
* enable
| Enable/disable logging for MMS antivirus oversize file blocking. |
| | **mms-av-virus-log** string | **Choices:*** disable
* enable
| Enable/disable logging for MMS antivirus scanning. |
| | **mms-carrier-endpoint-filter-log** string | **Choices:*** disable
* enable
| Enable/disable logging for MMS end point filter blocking. |
| | **mms-checksum-log** string | **Choices:*** disable
* enable
| Enable/disable MMS content checksum logging. |
| | **mms-checksum-table** string | | MMS content checksum table ID. |
| | **mms-notification-log** string | **Choices:*** disable
* enable
| Enable/disable logging for MMS notification messages. |
| | **mms-web-content-log** string | **Choices:*** disable
* enable
| Enable/disable logging for MMS web content blocking. |
| | **mmsbwordthreshold** integer | | MMS banned word threshold. |
| | **name** string | | Profile name. |
| | **notif-msisdn** list / elements=string | | no description |
| | | **msisdn** string | | Recipient MSISDN. |
| | | **threshold** list / elements=string | **Choices:*** flood-thresh-1
* flood-thresh-2
* flood-thresh-3
* dupe-thresh-1
* dupe-thresh-2
* dupe-thresh-3
| no description |
| | **remove-blocked-const-length** string | **Choices:*** disable
* enable
| Enable/disable MMS replacement of blocked file constant length. |
| | **replacemsg-group** string | | Replacement message group. |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure MMS profiles.
fmgr_firewall_mmsprofile:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
firewall_mmsprofile:
avnotificationtable: <value of string>
bwordtable: <value of string>
carrier-endpoint-prefix: <value in [disable, enable]>
carrier-endpoint-prefix-range-max: <value of integer>
carrier-endpoint-prefix-range-min: <value of integer>
carrier-endpoint-prefix-string: <value of string>
carrierendpointbwltable: <value of string>
comment: <value of string>
mm1:
- avmonitor
- block
- oversize
- quarantine
- scan
- avquery
- bannedword
- no-content-summary
- archive-summary
- archive-full
- carrier-endpoint-bwl
- remove-blocked
- chunkedbypass
- clientcomfort
- servercomfort
- strict-file
- mms-checksum
mm1-addr-hdr: <value of string>
mm1-addr-source: <value in [http-header, cookie]>
mm1-convert-hex: <value in [disable, enable]>
mm1-outbreak-prevention: <value in [disabled, files, full-archive]>
mm1-retr-dupe: <value in [disable, enable]>
mm1-retrieve-scan: <value in [disable, enable]>
mm1comfortamount: <value of integer>
mm1comfortinterval: <value of integer>
mm1oversizelimit: <value of integer>
mm3:
- avmonitor
- block
- oversize
- quarantine
- scan
- avquery
- bannedword
- no-content-summary
- archive-summary
- archive-full
- carrier-endpoint-bwl
- remove-blocked
- fragmail
- splice
- mms-checksum
mm3-outbreak-prevention: <value in [disabled, files, full-archive]>
mm3oversizelimit: <value of integer>
mm4:
- avmonitor
- block
- oversize
- quarantine
- scan
- avquery
- bannedword
- no-content-summary
- archive-summary
- archive-full
- carrier-endpoint-bwl
- remove-blocked
- fragmail
- splice
- mms-checksum
mm4-outbreak-prevention: <value in [disabled, files, full-archive]>
mm4oversizelimit: <value of integer>
mm7:
- avmonitor
- block
- oversize
- quarantine
- scan
- avquery
- bannedword
- no-content-summary
- archive-summary
- archive-full
- carrier-endpoint-bwl
- remove-blocked
- chunkedbypass
- clientcomfort
- servercomfort
- strict-file
- mms-checksum
mm7-addr-hdr: <value of string>
mm7-addr-source: <value in [http-header, cookie]>
mm7-convert-hex: <value in [disable, enable]>
mm7-outbreak-prevention: <value in [disabled, files, full-archive]>
mm7comfortamount: <value of integer>
mm7comfortinterval: <value of integer>
mm7oversizelimit: <value of integer>
mms-antispam-mass-log: <value in [disable, enable]>
mms-av-block-log: <value in [disable, enable]>
mms-av-oversize-log: <value in [disable, enable]>
mms-av-virus-log: <value in [disable, enable]>
mms-carrier-endpoint-filter-log: <value in [disable, enable]>
mms-checksum-log: <value in [disable, enable]>
mms-checksum-table: <value of string>
mms-notification-log: <value in [disable, enable]>
mms-web-content-log: <value in [disable, enable]>
mmsbwordthreshold: <value of integer>
name: <value of string>
notif-msisdn:
-
msisdn: <value of string>
threshold:
- flood-thresh-1
- flood-thresh-2
- flood-thresh-3
- dupe-thresh-1
- dupe-thresh-2
- dupe-thresh-3
remove-blocked-const-length: <value in [disable, enable]>
replacemsg-group: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_vpn_certificate_ca β CA certificate. fortinet.fortimanager.fmgr\_vpn\_certificate\_ca β CA certificate.
==================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_vpn_certificate_ca`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **vpn\_certificate\_ca** dictionary | | the top level parameters set |
| | **\_private\_key** string | | no description |
| | **auto-update-days** integer | | Number of days to wait before requesting an updated CA certificate (0 - 4294967295, 0 = disabled). |
| | **auto-update-days-warning** integer | | Number of days before an expiry-warning message is generated (0 - 4294967295, 0 = disabled). |
| | **ca** string | | CA certificate as a PEM file. |
| | **last-updated** integer | | Time at which CA was last updated. |
| | **name** string | | Name. |
| | **range** string | **Choices:*** global
* vdom
| Either global or VDOM IP address range for the CA certificate. |
| | **scep-url** string | | URL of the SCEP server. |
| | **source** string | **Choices:*** factory
* user
* bundle
* fortiguard
| CA certificate source type. |
| | **source-ip** string | | Source IP address for communications to the SCEP server. |
| | **ssl-inspection-trusted** string | **Choices:*** disable
* enable
| Enable/disable this CA as a trusted CA for SSL inspection. |
| | **trusted** string | **Choices:*** disable
* enable
| Enable/disable as a trusted CA. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: CA certificate.
fmgr_vpn_certificate_ca:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
vpn_certificate_ca:
_private_key: <value of string>
auto-update-days: <value of integer>
auto-update-days-warning: <value of integer>
ca: <value of string>
last-updated: <value of integer>
name: <value of string>
range: <value in [global, vdom]>
scep-url: <value of string>
source: <value in [factory, user, bundle, ...]>
source-ip: <value of string>
trusted: <value in [disable, enable]>
ssl-inspection-trusted: <value in [disable, enable]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_dvmdb_workspace_lock_pkg β Lock a specific package, where the url includes both the folder fortinet.fortimanager.fmgr\_dvmdb\_workspace\_lock\_pkg β Lock a specific package, where the url includes both the folder
=========================================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_dvmdb_workspace_lock_pkg`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **package\_path\_name** string / required | | the parameter (package\_path\_name) in requested url |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Lock a specific package, where the url includes both the folder
fmgr_dvmdb_workspace_lock_pkg:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
package_path_name: <your own value>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_replacemsggroup_auth β Replacement message table entries. fortinet.fortimanager.fmgr\_system\_replacemsggroup\_auth β Replacement message table entries.
==============================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_replacemsggroup_auth`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **replacemsg-group** string / required | | the parameter (replacemsg-group) in requested url |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_replacemsggroup\_auth** dictionary | | the top level parameters set |
| | **buffer** string | | Message string. |
| | **format** string | **Choices:*** none
* text
* html
* wml
| Format flag. |
| | **header** string | **Choices:*** none
* http
* 8bit
| Header flag. |
| | **msg-type** string | | Message type. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Replacement message table entries.
fmgr_system_replacemsggroup_auth:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
replacemsg-group: <your own value>
state: <value in [present, absent]>
system_replacemsggroup_auth:
buffer: <value of string>
format: <value in [none, text, html, ...]>
header: <value in [none, http, 8bit]>
msg-type: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_workflow_approvalmatrix β workflow approval matrix. fortinet.fortimanager.fmgr\_system\_workflow\_approvalmatrix β workflow approval matrix.
========================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_workflow_approvalmatrix`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_workflow\_approvalmatrix** dictionary | | the top level parameters set |
| | **adom-name** string | | Adom Name |
| | **approver** list / elements=string | | no description |
| | | **member** string | | Member of approver. |
| | | **seq\_num** integer | **Default:**0 | Entry number. |
| | **mail-server** string | | Notify mail server id. |
| | **notify** string | | Notify users |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: workflow approval matrix.
fmgr_system_workflow_approvalmatrix:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
state: <value in [present, absent]>
system_workflow_approvalmatrix:
adom-name: <value of string>
approver:
-
member: <value of string>
seq_num: <value of integer>
mail-server: <value of string>
notify: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_hotspot20_anqp3gppcellular_mccmnclist β Mobile Country Code and Mobile Network Code configuration. fortinet.fortimanager.fmgr\_hotspot20\_anqp3gppcellular\_mccmnclist β Mobile Country Code and Mobile Network Code configuration.
================================================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_hotspot20_anqp3gppcellular_mccmnclist`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **anqp-3gpp-cellular** string / required | | the parameter (anqp-3gpp-cellular) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **hotspot20\_anqp3gppcellular\_mccmnclist** dictionary | | the top level parameters set |
| | **id** integer | | ID. |
| | **mcc** string | | Mobile country code. |
| | **mnc** string | | Mobile network code. |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Mobile Country Code and Mobile Network Code configuration.
fmgr_hotspot20_anqp3gppcellular_mccmnclist:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
anqp-3gpp-cellular: <your own value>
state: <value in [present, absent]>
hotspot20_anqp3gppcellular_mccmnclist:
id: <value of integer>
mcc: <value of string>
mnc: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_wtpprofile_radio1 β Configuration options for radio 1. fortinet.fortimanager.fmgr\_wtpprofile\_radio1 β Configuration options for radio 1.
===================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_wtpprofile_radio1`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
| **wtp-profile** string / required | | the parameter (wtp-profile) in requested url |
| **wtpprofile\_radio1** dictionary | | the top level parameters set |
| | **airtime-fairness** string | **Choices:*** disable
* enable
| Enable/disable airtime fairness (default = disable). |
| | **amsdu** string | **Choices:*** disable
* enable
| Enable/disable 802.11n AMSDU support. AMSDU can improve performance if supported by your WiFi clients (default = enable). |
| | **ap-handoff** string | **Choices:*** disable
* enable
| Enable/disable AP handoff of clients to other APs (default = disable). |
| | **ap-sniffer-addr** string | | MAC address to monitor. |
| | **ap-sniffer-bufsize** integer | | Sniffer buffer size (1 - 32 MB, default = 16). |
| | **ap-sniffer-chan** integer | | Channel on which to operate the sniffer (default = 6). |
| | **ap-sniffer-ctl** string | **Choices:*** disable
* enable
| Enable/disable sniffer on WiFi control frame (default = enable). |
| | **ap-sniffer-data** string | **Choices:*** disable
* enable
| Enable/disable sniffer on WiFi data frame (default = enable). |
| | **ap-sniffer-mgmt-beacon** string | **Choices:*** disable
* enable
| Enable/disable sniffer on WiFi management Beacon frames (default = enable). |
| | **ap-sniffer-mgmt-other** string | **Choices:*** disable
* enable
| Enable/disable sniffer on WiFi management other frames (default = enable). |
| | **ap-sniffer-mgmt-probe** string | **Choices:*** disable
* enable
| Enable/disable sniffer on WiFi management probe frames (default = enable). |
| | **auto-power-high** integer | | Automatic transmit power high limit in dBm (the actual range of transmit power depends on the AP platform type). |
| | **auto-power-level** string | **Choices:*** disable
* enable
| Enable/disable automatic power-level adjustment to prevent co-channel interference (default = disable). |
| | **auto-power-low** integer | | Automatic transmission power low limit in dBm (the actual range of transmit power depends on the AP platform type). |
| | **auto-power-target** string | | The target of automatic transmit power adjustment in dBm. (-95 to -20, default = -70). |
| | **band** string | **Choices:*** 802.11b
* 802.11a
* 802.11g
* 802.11n
* 802.11ac
* 802.11n-5G
* 802.11g-only
* 802.11n-only
* 802.11n,g-only
* 802.11ac-only
* 802.11ac,n-only
* 802.11n-5G-only
* 802.11ax-5G
* 802.11ax
* 802.11ax-5G-only
* 802.11ax,ac-only
* 802.11ax,ac,n-only
* 802.11ax-only
* 802.11ax,n-only
* 802.11ax,n,g-only
* 802.11ac-2G
| WiFi band that Radio 1 operates on. |
| | **band-5g-type** string | **Choices:*** 5g-full
* 5g-high
* 5g-low
| WiFi 5G band type. |
| | **bandwidth-admission-control** string | **Choices:*** disable
* enable
| Enable/disable WiFi multimedia (WMM) bandwidth admission control to optimize WiFi bandwidth use. A request to join the wireles... |
| | **bandwidth-capacity** integer | | Maximum bandwidth capacity allowed (1 - 600000 Kbps, default = 2000). |
| | **beacon-interval** integer | | Beacon interval. The time between beacon frames in msec (the actual range of beacon interval depends on the AP platform type, ... |
| | **bss-color** integer | | BSS color value for this 11ax radio (0 - 63, 0 means disable. default = 0). |
| | **call-admission-control** string | **Choices:*** disable
* enable
| Enable/disable WiFi multimedia (WMM) call admission control to optimize WiFi bandwidth use for VoIP calls. New VoIP calls are ... |
| | **call-capacity** integer | | Maximum number of Voice over WLAN (VoWLAN) phones supported by the radio (0 - 60, default = 10). |
| | **channel** string | | no description |
| | **channel-bonding** string | **Choices:*** disable
* enable
* 80MHz
* 40MHz
* 20MHz
* 160MHz
| Channel bandwidth: 80, 40, or 20MHz. Channels may use both 20 and 40 by enabling coexistence. |
| | **channel-utilization** string | **Choices:*** disable
* enable
| Enable/disable measuring channel utilization. |
| | **coexistence** string | **Choices:*** disable
* enable
| Enable/disable allowing both HT20 and HT40 on the same radio (default = enable). |
| | **darrp** string | **Choices:*** disable
* enable
| Enable/disable Distributed Automatic Radio Resource Provisioning (DARRP) to make sure the radio is always using the most optim... |
| | **drma** string | **Choices:*** disable
* enable
| Enable/disable dynamic radio mode assignment (DRMA) (default = disable). |
| | **drma-sensitivity** string | **Choices:*** low
* medium
* high
| Network Coverage Factor (NCF) percentage required to consider a radio as redundant (default = low). |
| | **dtim** integer | | DTIM interval. The frequency to transmit Delivery Traffic Indication Message (or Map) (DTIM) messages (1 - 255, default = 1). ... |
| | **frag-threshold** integer | | Maximum packet size that can be sent without fragmentation (800 - 2346 bytes, default = 2346). |
| | **frequency-handoff** string | **Choices:*** disable
* enable
| Enable/disable frequency handoff of clients to other channels (default = disable). |
| | **iperf-protocol** string | **Choices:*** udp
* tcp
| Iperf test protocol (default = "UDP"). |
| | **iperf-server-port** integer | | Iperf service port number. |
| | **max-clients** integer | | Maximum number of stations (STAs) or WiFi clients supported by the radio. Range depends on the hardware. |
| | **max-distance** integer | | Maximum expected distance between the AP and clients (0 - 54000 m, default = 0). |
| | **mode** string | **Choices:*** disabled
* ap
* monitor
* sniffer
* sam
| Mode of radio 1. Radio 1 can be disabled, configured as an access point, a rogue AP monitor, or a sniffer. |
| | **power-level** integer | | Radio power level as a percentage of the maximum transmit power (0 - 100, default = 100). |
| | **power-mode** string | **Choices:*** dBm
* percentage
| Set radio effective isotropic radiated power (EIRP) in dBm or by a percentage of the maximum EIRP (default = percentage). This... |
| | **power-value** integer | | Radio EIRP power in dBm (1 - 33, default = 27). |
| | **powersave-optimize** list / elements=string | **Choices:*** tim
* ac-vo
* no-obss-scan
* no-11b-rate
* client-rate-follow
| no description |
| | **protection-mode** string | **Choices:*** rtscts
* ctsonly
* disable
| Enable/disable 802.11g protection modes to support backwards compatibility with older clients (rtscts, ctsonly, disable). |
| | **radio-id** integer | | no description |
| | **rts-threshold** integer | | Maximum packet size for RTS transmissions, specifying the maximum size of a data packet before RTS/CTS (256 - 2346 bytes, defa... |
| | **sam-bssid** string | | BSSID for WiFi network. |
| | **sam-captive-portal** string | **Choices:*** disable
* enable
| Enable/disable Captive Portal Authentication (default = disable). |
| | **sam-password** string | | no description |
| | **sam-report-intv** integer | | SAM report interval (sec), 0 for a one-time report. |
| | **sam-security-type** string | **Choices:*** open
* wpa-personal
* wpa-enterprise
| Select WiFi network security type (default = "wpa-personal"). |
| | **sam-server** string | | SAM test server IP address or domain name. |
| | **sam-ssid** string | | SSID for WiFi network. |
| | **sam-test** string | **Choices:*** ping
* iperf
| Select SAM test type (default = "PING"). |
| | **sam-username** string | | Username for WiFi network connection. |
| | **short-guard-interval** string | **Choices:*** disable
* enable
| Use either the short guard interval (Short GI) of 400 ns or the long guard interval (Long GI) of 800 ns. |
| | **spectrum-analysis** string | **Choices:*** disable
* enable
* scan-only
| Enable/disable spectrum analysis to find interference that would negatively impact wireless performance. |
| | **transmit-optimize** list / elements=string | **Choices:*** disable
* power-save
* aggr-limit
* retry-limit
* send-bar
| no description |
| | **vap-all** string | **Choices:*** disable
* enable
* tunnel
* bridge
* manual
| Enable/disable the automatic inheritance of all Virtual Access Points (VAPs) (default = enable). |
| | **vap1** string | | Virtual Access Point (VAP) for wlan ID 1 |
| | **vap2** string | | Virtual Access Point (VAP) for wlan ID 2 |
| | **vap3** string | | Virtual Access Point (VAP) for wlan ID 3 |
| | **vap4** string | | Virtual Access Point (VAP) for wlan ID 4 |
| | **vap5** string | | Virtual Access Point (VAP) for wlan ID 5 |
| | **vap6** string | | Virtual Access Point (VAP) for wlan ID 6 |
| | **vap7** string | | Virtual Access Point (VAP) for wlan ID 7 |
| | **vap8** string | | Virtual Access Point (VAP) for wlan ID 8 |
| | **vaps** string | | Manually selected list of Virtual Access Points (VAPs). |
| | **wids-profile** string | | Wireless Intrusion Detection System (WIDS) profile name to assign to the radio. |
| | **zero-wait-dfs** string | **Choices:*** disable
* enable
| Enable/disable zero wait DFS on radio (default = enable). |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configuration options for radio 1.
fmgr_wtpprofile_radio1:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
wtp-profile: <your own value>
wtpprofile_radio1:
amsdu: <value in [disable, enable]>
ap-handoff: <value in [disable, enable]>
ap-sniffer-addr: <value of string>
ap-sniffer-bufsize: <value of integer>
ap-sniffer-chan: <value of integer>
ap-sniffer-ctl: <value in [disable, enable]>
ap-sniffer-data: <value in [disable, enable]>
ap-sniffer-mgmt-beacon: <value in [disable, enable]>
ap-sniffer-mgmt-other: <value in [disable, enable]>
ap-sniffer-mgmt-probe: <value in [disable, enable]>
auto-power-high: <value of integer>
auto-power-level: <value in [disable, enable]>
auto-power-low: <value of integer>
band: <value in [802.11b, 802.11a, 802.11g, ...]>
bandwidth-admission-control: <value in [disable, enable]>
bandwidth-capacity: <value of integer>
beacon-interval: <value of integer>
call-admission-control: <value in [disable, enable]>
call-capacity: <value of integer>
channel: <value of string>
channel-bonding: <value in [disable, enable, 80MHz, ...]>
channel-utilization: <value in [disable, enable]>
coexistence: <value in [disable, enable]>
darrp: <value in [disable, enable]>
dtim: <value of integer>
frag-threshold: <value of integer>
frequency-handoff: <value in [disable, enable]>
max-clients: <value of integer>
max-distance: <value of integer>
mode: <value in [disabled, ap, monitor, ...]>
power-level: <value of integer>
powersave-optimize:
- tim
- ac-vo
- no-obss-scan
- no-11b-rate
- client-rate-follow
protection-mode: <value in [rtscts, ctsonly, disable]>
radio-id: <value of integer>
rts-threshold: <value of integer>
short-guard-interval: <value in [disable, enable]>
spectrum-analysis: <value in [disable, enable, scan-only]>
transmit-optimize:
- disable
- power-save
- aggr-limit
- retry-limit
- send-bar
vap-all: <value in [disable, enable, tunnel, ...]>
vaps: <value of string>
wids-profile: <value of string>
airtime-fairness: <value in [disable, enable]>
band-5g-type: <value in [5g-full, 5g-high, 5g-low]>
zero-wait-dfs: <value in [disable, enable]>
vap1: <value of string>
vap2: <value of string>
vap3: <value of string>
vap4: <value of string>
vap5: <value of string>
vap6: <value of string>
vap7: <value of string>
vap8: <value of string>
bss-color: <value of integer>
auto-power-target: <value of string>
drma: <value in [disable, enable]>
drma-sensitivity: <value in [low, medium, high]>
iperf-protocol: <value in [udp, tcp]>
iperf-server-port: <value of integer>
power-mode: <value in [dBm, percentage]>
power-value: <value of integer>
sam-bssid: <value of string>
sam-captive-portal: <value in [disable, enable]>
sam-password: <value of string>
sam-report-intv: <value of integer>
sam-security-type: <value in [open, wpa-personal, wpa-enterprise]>
sam-server: <value of string>
sam-ssid: <value of string>
sam-test: <value in [ping, iperf]>
sam-username: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_pm_config_metafields_firewall_addrgrp β no description fortinet.fortimanager.fmgr\_pm\_config\_metafields\_firewall\_addrgrp β no description
======================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_pm_config_metafields_firewall_addrgrp`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **pm\_config\_metafields\_firewall\_addrgrp** dictionary | | the top level parameters set |
| | **importance** string | **Choices:*** optional
* required
| no description |
| | **length** integer | | no description |
| | **name** string | | no description |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: no description
fmgr_pm_config_metafields_firewall_addrgrp:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
pm_config_metafields_firewall_addrgrp:
importance: <value in [optional, required]>
length: <value of integer>
name: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_widsprofile β Configure wireless intrusion detection system fortinet.fortimanager.fmgr\_widsprofile β Configure wireless intrusion detection system
=======================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_widsprofile`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **widsprofile** dictionary | | the top level parameters set |
| | **ap-auto-suppress** string | **Choices:*** disable
* enable
| Enable/disable on-wire rogue AP auto-suppression (default = disable). |
| | **ap-bgscan-disable-day** list / elements=string | **Choices:*** sunday
* monday
* tuesday
* wednesday
* thursday
* friday
* saturday
| no description |
| | **ap-bgscan-disable-end** string | | End time, using a 24-hour clock in the format of hh:mm, for disabling background scanning (default = 00:00). |
| | **ap-bgscan-disable-schedules** string | | Firewall schedules for turning off FortiAP radio background scan. Background scan will be disabled when at least one of the sc... |
| | **ap-bgscan-disable-start** string | | Start time, using a 24-hour clock in the format of hh:mm, for disabling background scanning (default = 00:00). |
| | **ap-bgscan-duration** integer | | Listening time on a scanning channel (10 - 1000 msec, default = 20). |
| | **ap-bgscan-idle** integer | | Waiting time for channel inactivity before scanning this channel (0 - 1000 msec, default = 0). |
| | **ap-bgscan-intv** integer | | Period of time between scanning two channels (1 - 600 sec, default = 1). |
| | **ap-bgscan-period** integer | | Period of time between background scans (60 - 3600 sec, default = 600). |
| | **ap-bgscan-report-intv** integer | | Period of time between background scan reports (15 - 600 sec, default = 30). |
| | **ap-fgscan-report-intv** integer | | Period of time between foreground scan reports (15 - 600 sec, default = 15). |
| | **ap-scan** string | **Choices:*** disable
* enable
| Enable/disable rogue AP detection. |
| | **ap-scan-passive** string | **Choices:*** disable
* enable
| Enable/disable passive scanning. Enable means do not send probe request on any channels (default = disable). |
| | **ap-scan-threshold** string | | Minimum signal level/threshold in dBm required for the AP to report detected rogue AP (-95 to -20, default = -90). |
| | **asleap-attack** string | **Choices:*** disable
* enable
| Enable/disable asleap attack detection (default = disable). |
| | **assoc-flood-thresh** integer | | The threshold value for association frame flooding. |
| | **assoc-flood-time** integer | | Number of seconds after which a station is considered not connected. |
| | **assoc-frame-flood** string | **Choices:*** disable
* enable
| Enable/disable association frame flooding detection (default = disable). |
| | **auth-flood-thresh** integer | | The threshold value for authentication frame flooding. |
| | **auth-flood-time** integer | | Number of seconds after which a station is considered not connected. |
| | **auth-frame-flood** string | **Choices:*** disable
* enable
| Enable/disable authentication frame flooding detection (default = disable). |
| | **comment** string | | Comment. |
| | **deauth-broadcast** string | **Choices:*** disable
* enable
| Enable/disable broadcasting de-authentication detection (default = disable). |
| | **deauth-unknown-src-thresh** integer | | Threshold value per second to deauth unknown src for DoS attack (0: no limit). |
| | **eapol-fail-flood** string | **Choices:*** disable
* enable
| Enable/disable EAPOL-Failure flooding (to AP) detection (default = disable). |
| | **eapol-fail-intv** integer | | The detection interval for EAPOL-Failure flooding (1 - 3600 sec). |
| | **eapol-fail-thresh** integer | | The threshold value for EAPOL-Failure flooding in specified interval. |
| | **eapol-logoff-flood** string | **Choices:*** disable
* enable
| Enable/disable EAPOL-Logoff flooding (to AP) detection (default = disable). |
| | **eapol-logoff-intv** integer | | The detection interval for EAPOL-Logoff flooding (1 - 3600 sec). |
| | **eapol-logoff-thresh** integer | | The threshold value for EAPOL-Logoff flooding in specified interval. |
| | **eapol-pre-fail-flood** string | **Choices:*** disable
* enable
| Enable/disable premature EAPOL-Failure flooding (to STA) detection (default = disable). |
| | **eapol-pre-fail-intv** integer | | The detection interval for premature EAPOL-Failure flooding (1 - 3600 sec). |
| | **eapol-pre-fail-thresh** integer | | The threshold value for premature EAPOL-Failure flooding in specified interval. |
| | **eapol-pre-succ-flood** string | **Choices:*** disable
* enable
| Enable/disable premature EAPOL-Success flooding (to STA) detection (default = disable). |
| | **eapol-pre-succ-intv** integer | | The detection interval for premature EAPOL-Success flooding (1 - 3600 sec). |
| | **eapol-pre-succ-thresh** integer | | The threshold value for premature EAPOL-Success flooding in specified interval. |
| | **eapol-start-flood** string | **Choices:*** disable
* enable
| Enable/disable EAPOL-Start flooding (to AP) detection (default = disable). |
| | **eapol-start-intv** integer | | The detection interval for EAPOL-Start flooding (1 - 3600 sec). |
| | **eapol-start-thresh** integer | | The threshold value for EAPOL-Start flooding in specified interval. |
| | **eapol-succ-flood** string | **Choices:*** disable
* enable
| Enable/disable EAPOL-Success flooding (to AP) detection (default = disable). |
| | **eapol-succ-intv** integer | | The detection interval for EAPOL-Success flooding (1 - 3600 sec). |
| | **eapol-succ-thresh** integer | | The threshold value for EAPOL-Success flooding in specified interval. |
| | **invalid-mac-oui** string | **Choices:*** disable
* enable
| Enable/disable invalid MAC OUI detection. |
| | **long-duration-attack** string | **Choices:*** disable
* enable
| Enable/disable long duration attack detection based on user configured threshold (default = disable). |
| | **long-duration-thresh** integer | | Threshold value for long duration attack detection (1000 - 32767 usec, default = 8200). |
| | **name** string | | WIDS profile name. |
| | **null-ssid-probe-resp** string | **Choices:*** disable
* enable
| Enable/disable null SSID probe response detection (default = disable). |
| | **sensor-mode** string | **Choices:*** disable
* foreign
* both
| Scan WiFi nearby stations (default = disable). |
| | **spoofed-deauth** string | **Choices:*** disable
* enable
| Enable/disable spoofed de-authentication attack detection (default = disable). |
| | **weak-wep-iv** string | **Choices:*** disable
* enable
| Enable/disable weak WEP IV (Initialization Vector) detection (default = disable). |
| | **wireless-bridge** string | **Choices:*** disable
* enable
| Enable/disable wireless bridge detection (default = disable). |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure wireless intrusion detection system
fmgr_widsprofile:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
widsprofile:
ap-auto-suppress: <value in [disable, enable]>
ap-bgscan-disable-day:
- sunday
- monday
- tuesday
- wednesday
- thursday
- friday
- saturday
ap-bgscan-disable-end: <value of string>
ap-bgscan-disable-start: <value of string>
ap-bgscan-duration: <value of integer>
ap-bgscan-idle: <value of integer>
ap-bgscan-intv: <value of integer>
ap-bgscan-period: <value of integer>
ap-bgscan-report-intv: <value of integer>
ap-fgscan-report-intv: <value of integer>
ap-scan: <value in [disable, enable]>
ap-scan-passive: <value in [disable, enable]>
asleap-attack: <value in [disable, enable]>
assoc-flood-thresh: <value of integer>
assoc-flood-time: <value of integer>
assoc-frame-flood: <value in [disable, enable]>
auth-flood-thresh: <value of integer>
auth-flood-time: <value of integer>
auth-frame-flood: <value in [disable, enable]>
comment: <value of string>
deauth-broadcast: <value in [disable, enable]>
deauth-unknown-src-thresh: <value of integer>
eapol-fail-flood: <value in [disable, enable]>
eapol-fail-intv: <value of integer>
eapol-fail-thresh: <value of integer>
eapol-logoff-flood: <value in [disable, enable]>
eapol-logoff-intv: <value of integer>
eapol-logoff-thresh: <value of integer>
eapol-pre-fail-flood: <value in [disable, enable]>
eapol-pre-fail-intv: <value of integer>
eapol-pre-fail-thresh: <value of integer>
eapol-pre-succ-flood: <value in [disable, enable]>
eapol-pre-succ-intv: <value of integer>
eapol-pre-succ-thresh: <value of integer>
eapol-start-flood: <value in [disable, enable]>
eapol-start-intv: <value of integer>
eapol-start-thresh: <value of integer>
eapol-succ-flood: <value in [disable, enable]>
eapol-succ-intv: <value of integer>
eapol-succ-thresh: <value of integer>
invalid-mac-oui: <value in [disable, enable]>
long-duration-attack: <value in [disable, enable]>
long-duration-thresh: <value of integer>
name: <value of string>
null-ssid-probe-resp: <value in [disable, enable]>
sensor-mode: <value in [disable, foreign, both]>
spoofed-deauth: <value in [disable, enable]>
weak-wep-iv: <value in [disable, enable]>
wireless-bridge: <value in [disable, enable]>
ap-bgscan-disable-schedules: <value of string>
ap-scan-threshold: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_dynamic_interface_platformmapping β no description fortinet.fortimanager.fmgr\_dynamic\_interface\_platformmapping β no description
================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_dynamic_interface_platformmapping`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **dynamic\_interface\_platformmapping** dictionary | | the top level parameters set |
| | **egress-shaping-profile** string | | no description |
| | **ingress-shaping-profile** string | | no description |
| | **intf-zone** string | | no description |
| | **intrazone-deny** string | **Choices:*** disable
* enable
| no description |
| | **name** string | | no description |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **interface** string / required | | the parameter (interface) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: no description
fmgr_dynamic_interface_platformmapping:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
interface: <your own value>
state: <value in [present, absent]>
dynamic_interface_platformmapping:
egress-shaping-profile: <value of string>
ingress-shaping-profile: <value of string>
intf-zone: <value of string>
intrazone-deny: <value in [disable, enable]>
name: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_sshfilter_profile_filefilter β File filter. fortinet.fortimanager.fmgr\_sshfilter\_profile\_filefilter β File filter.
=========================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_sshfilter_profile_filefilter`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **profile** string / required | | the parameter (profile) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **sshfilter\_profile\_filefilter** dictionary | | the top level parameters set |
| | **entries** list / elements=string | | no description |
| | | **action** string | **Choices:*** log
* block
| Action taken for matched file. |
| | | **comment** string | | Comment. |
| | | **direction** string | **Choices:*** any
* incoming
* outgoing
| Match files transmitted in the sessions originating or reply direction. |
| | | **file-type** string | | no description |
| | | **filter** string | | Add a file filter. |
| | | **password-protected** string | **Choices:*** any
* yes
| Match password-protected files. |
| | | **protocol** list / elements=string | **Choices:*** ssh
| no description |
| | **log** string | **Choices:*** disable
* enable
| Enable/disable file filter logging. |
| | **scan-archive-contents** string | **Choices:*** disable
* enable
| Enable/disable file filter archive contents scan. |
| | **status** string | **Choices:*** disable
* enable
| Enable/disable file filter. |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: File filter.
fmgr_sshfilter_profile_filefilter:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
profile: <your own value>
sshfilter_profile_filefilter:
entries:
-
action: <value in [log, block]>
comment: <value of string>
direction: <value in [any, incoming, outgoing]>
file-type: <value of string>
filter: <value of string>
password-protected: <value in [any, yes]>
protocol:
- ssh
log: <value in [disable, enable]>
scan-archive-contents: <value in [disable, enable]>
status: <value in [disable, enable]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_firewall_gtp_policyv2 β Apply allow or deny action to each GTPv2-c packet. fortinet.fortimanager.fmgr\_firewall\_gtp\_policyv2 β Apply allow or deny action to each GTPv2-c packet.
========================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_gtp_policyv2`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_gtp\_policyv2** dictionary | | the top level parameters set |
| | **action** string | **Choices:*** deny
* allow
| Action. |
| | **apn-sel-mode** list / elements=string | **Choices:*** ms
* net
* vrf
| no description |
| | **apnmember** string | | APN member. |
| | **id** integer | | ID. |
| | **imsi-prefix** string | | IMSI prefix. |
| | **max-apn-restriction** string | **Choices:*** all
* public-1
* public-2
* private-1
* private-2
| Maximum APN restriction value. |
| | **mei** string | | MEI pattern. |
| | **messages** list / elements=string | **Choices:*** create-ses-req
* create-ses-res
* modify-bearer-req
* modify-bearer-res
| no description |
| | **msisdn-prefix** string | | MSISDN prefix. |
| | **rat-type** list / elements=string | **Choices:*** any
* utran
* geran
* wlan
* gan
* hspa
* eutran
* virtual
* nbiot
* ltem
* nr
| no description |
| | **uli** string | | no description |
| **gtp** string / required | | the parameter (gtp) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Apply allow or deny action to each GTPv2-c packet.
fmgr_firewall_gtp_policyv2:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
gtp: <your own value>
state: <value in [present, absent]>
firewall_gtp_policyv2:
action: <value in [deny, allow]>
apn-sel-mode:
- ms
- net
- vrf
apnmember: <value of string>
id: <value of integer>
imsi-prefix: <value of string>
max-apn-restriction: <value in [all, public-1, public-2, ...]>
mei: <value of string>
messages:
- create-ses-req
- create-ses-res
- modify-bearer-req
- modify-bearer-res
msisdn-prefix: <value of string>
rat-type:
- any
- utran
- geran
- wlan
- gan
- hspa
- eutran
- virtual
- nbiot
- ltem
- nr
uli: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_locallog_memory_filter β Filter for memory logging. fortinet.fortimanager.fmgr\_system\_locallog\_memory\_filter β Filter for memory logging.
=========================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_locallog_memory_filter`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_locallog\_memory\_filter** dictionary | | the top level parameters set |
| | **aid** string | **Choices:*** disable
* **enable** β
| Log aid messages. disable - Disable setting. enable - Enable setting. |
| | **devcfg** string | **Choices:*** disable
* **enable** β
| Log device configuration message. disable - Disable setting. enable - Enable setting. |
| | **devops** string | **Choices:*** disable
* **enable** β
| Managered devices operations messages. disable - Disable setting. enable - Enable setting. |
| | **diskquota** string | **Choices:*** disable
* **enable** β
| Log Fortianalyzer disk quota messages. disable - Disable setting. enable - Enable setting. |
| | **dm** string | **Choices:*** disable
* **enable** β
| Log deployment manager message. disable - Disable setting. enable - Enable setting. |
| | **docker** string | **Choices:*** disable
* **enable** β
| Docker application generic messages. disable - Disable setting. enable - Enable setting. |
| | **dvm** string | **Choices:*** disable
* **enable** β
| Log device manager messages. disable - Disable setting. enable - Enable setting. |
| | **ediscovery** string | **Choices:*** disable
* **enable** β
| Log Fortianalyzer ediscovery messages. disable - Disable setting. enable - Enable setting. |
| | **epmgr** string | **Choices:*** disable
* **enable** β
| Log endpoint manager message. disable - Disable setting. enable - Enable setting. |
| | **event** string | **Choices:*** disable
* **enable** β
| Log event messages. disable - Disable setting. enable - Enable setting. |
| | **eventmgmt** string | **Choices:*** disable
* **enable** β
| Log Fortianalyzer event handler messages. disable - Disable setting. enable - Enable setting. |
| | **faz** string | **Choices:*** disable
* **enable** β
| Log Fortianalyzer messages. disable - Disable setting. enable - Enable setting. |
| | **fazha** string | **Choices:*** disable
* **enable** β
| Log Fortianalyzer HA messages. disable - Disable setting. enable - Enable setting. |
| | **fazsys** string | **Choices:*** disable
* **enable** β
| Log Fortianalyzer system messages. disable - Disable setting. enable - Enable setting. |
| | **fgd** string | **Choices:*** disable
* **enable** β
| Log FortiGuard service message. disable - Disable setting. enable - Enable setting. |
| | **fgfm** string | **Choices:*** disable
* **enable** β
| Log FGFM protocol message. disable - Disable setting. enable - Enable setting. |
| | **fips** string | **Choices:*** disable
* **enable** β
| Whether to log fips messages. disable - Disable setting. enable - Enable setting. |
| | **fmgws** string | **Choices:*** disable
* **enable** β
| Log web service messages. disable - Disable setting. enable - Enable setting. |
| | **fmlmgr** string | **Choices:*** disable
* **enable** β
| Log FortiMail manager message. disable - Disable setting. enable - Enable setting. |
| | **fmwmgr** string | **Choices:*** disable
* **enable** β
| Log firmware manager message. disable - Disable setting. enable - Enable setting. |
| | **fortiview** string | **Choices:*** disable
* **enable** β
| Log Fortianalyzer FortiView messages. disable - Disable setting. enable - Enable setting. |
| | **glbcfg** string | **Choices:*** disable
* **enable** β
| Log global database message. disable - Disable setting. enable - Enable setting. |
| | **ha** string | **Choices:*** disable
* **enable** β
| Log HA message. disable - Disable setting. enable - Enable setting. |
| | **hcache** string | **Choices:*** disable
* **enable** β
| Log Fortianalyzer hcache messages. disable - Disable setting. enable - Enable setting. |
| | **incident** string | **Choices:*** disable
* **enable** β
| Log Fortianalyzer incident messages. disable - Disable setting. enable - Enable setting. |
| | **iolog** string | **Choices:*** disable
* **enable** β
| Log debug IO log message. disable - Disable setting. enable - Enable setting. |
| | **logd** string | **Choices:*** disable
* **enable** β
| Log the status of log daemon. disable - Disable setting. enable - Enable setting. |
| | **logdb** string | **Choices:*** disable
* **enable** β
| Log Fortianalyzer log DB messages. disable - Disable setting. enable - Enable setting. |
| | **logdev** string | **Choices:*** disable
* **enable** β
| Log Fortianalyzer log device messages. disable - Disable setting. enable - Enable setting. |
| | **logfile** string | **Choices:*** enable
* disable
| Log Fortianalyzer log file messages. enable - Enable setting. disable - Disable setting. |
| | **logging** string | **Choices:*** disable
* **enable** β
| Log Fortianalyzer logging messages. disable - Disable setting. enable - Enable setting. |
| | **lrmgr** string | **Choices:*** disable
* **enable** β
| Log log and report manager message. disable - Disable setting. enable - Enable setting. |
| | **objcfg** string | **Choices:*** disable
* **enable** β
| Log object configuration change message. disable - Disable setting. enable - Enable setting. |
| | **report** string | **Choices:*** disable
* **enable** β
| Log Fortianalyzer report messages. disable - Disable setting. enable - Enable setting. |
| | **rev** string | **Choices:*** disable
* **enable** β
| Log revision history message. disable - Disable setting. enable - Enable setting. |
| | **rtmon** string | **Choices:*** disable
* **enable** β
| Log real-time monitor message. disable - Disable setting. enable - Enable setting. |
| | **scfw** string | **Choices:*** disable
* **enable** β
| Log firewall objects message. disable - Disable setting. enable - Enable setting. |
| | **scply** string | **Choices:*** disable
* **enable** β
| Log policy console message. disable - Disable setting. enable - Enable setting. |
| | **scrmgr** string | **Choices:*** disable
* **enable** β
| Log script manager message. disable - Disable setting. enable - Enable setting. |
| | **scvpn** string | **Choices:*** disable
* **enable** β
| Log VPN console message. disable - Disable setting. enable - Enable setting. |
| | **system** string | **Choices:*** disable
* **enable** β
| Log system manager message. disable - Disable setting. enable - Enable setting. |
| | **webport** string | **Choices:*** disable
* **enable** β
| Log web portal message. disable - Disable setting. enable - Enable setting. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Filter for memory logging.
fmgr_system_locallog_memory_filter:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
system_locallog_memory_filter:
devcfg: <value in [disable, enable]>
devops: <value in [disable, enable]>
diskquota: <value in [disable, enable]>
dm: <value in [disable, enable]>
dvm: <value in [disable, enable]>
ediscovery: <value in [disable, enable]>
epmgr: <value in [disable, enable]>
event: <value in [disable, enable]>
eventmgmt: <value in [disable, enable]>
faz: <value in [disable, enable]>
fazha: <value in [disable, enable]>
fazsys: <value in [disable, enable]>
fgd: <value in [disable, enable]>
fgfm: <value in [disable, enable]>
fips: <value in [disable, enable]>
fmgws: <value in [disable, enable]>
fmlmgr: <value in [disable, enable]>
fmwmgr: <value in [disable, enable]>
fortiview: <value in [disable, enable]>
glbcfg: <value in [disable, enable]>
ha: <value in [disable, enable]>
hcache: <value in [disable, enable]>
iolog: <value in [disable, enable]>
logd: <value in [disable, enable]>
logdb: <value in [disable, enable]>
logdev: <value in [disable, enable]>
logfile: <value in [enable, disable]>
logging: <value in [disable, enable]>
lrmgr: <value in [disable, enable]>
objcfg: <value in [disable, enable]>
report: <value in [disable, enable]>
rev: <value in [disable, enable]>
rtmon: <value in [disable, enable]>
scfw: <value in [disable, enable]>
scply: <value in [disable, enable]>
scrmgr: <value in [disable, enable]>
scvpn: <value in [disable, enable]>
system: <value in [disable, enable]>
webport: <value in [disable, enable]>
incident: <value in [disable, enable]>
aid: <value in [disable, enable]>
docker: <value in [disable, enable]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_devprof_system_dns β Configure DNS. fortinet.fortimanager.fmgr\_devprof\_system\_dns β Configure DNS.
=================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_devprof_system_dns`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **devprof** string / required | | the parameter (devprof) in requested url |
| **devprof\_system\_dns** dictionary | | the top level parameters set |
| | **cache-notfound-responses** string | **Choices:*** disable
* enable
| Enable/disable response from the DNS server when a record is not in cache. |
| | **dns-cache-limit** integer | | Maximum number of records in the DNS cache. |
| | **dns-cache-ttl** integer | | Duration in seconds that the DNS cache retains information. |
| | **dns-over-tls** string | **Choices:*** disable
* enable
* enforce
| Enable/disable/enforce DNS over TLS. |
| | **domain** string | | Domain name suffix for the IP addresses of the DNS server. |
| | **interface** string | | Specify outgoing interface to reach server. |
| | **interface-select-method** string | **Choices:*** auto
* sdwan
* specify
| Specify how to select outgoing interface to reach server. |
| | **ip6-primary** string | | Primary DNS server IPv6 address. |
| | **ip6-secondary** string | | Secondary DNS server IPv6 address. |
| | **primary** string | | Primary DNS server IP address. |
| | **retry** integer | | Number of times to retry (0 - 5). |
| | **secondary** string | | Secondary DNS server IP address. |
| | **server-hostname** string | | no description |
| | **ssl-certificate** string | | Name of local certificate for SSL connections. |
| | **timeout** integer | | DNS query timeout interval in seconds (1 - 10). |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure DNS.
fmgr_devprof_system_dns:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
devprof: <your own value>
devprof_system_dns:
cache-notfound-responses: <value in [disable, enable]>
dns-cache-limit: <value of integer>
dns-cache-ttl: <value of integer>
domain: <value of string>
ip6-primary: <value of string>
ip6-secondary: <value of string>
primary: <value of string>
secondary: <value of string>
dns-over-tls: <value in [disable, enable, enforce]>
retry: <value of integer>
server-hostname: <value of string>
ssl-certificate: <value of string>
timeout: <value of integer>
interface: <value of string>
interface-select-method: <value in [auto, sdwan, specify]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_pkg_firewall_centralsnatmap β Configure central SNAT policies. fortinet.fortimanager.fmgr\_pkg\_firewall\_centralsnatmap β Configure central SNAT policies.
============================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_pkg_firewall_centralsnatmap`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **pkg** string / required | | the parameter (pkg) in requested url |
| **pkg\_firewall\_centralsnatmap** dictionary | | the top level parameters set |
| | **comments** string | | Comment. |
| | **dst-addr** string | | Destination address name from available addresses. |
| | **dst-addr6** string | | IPv6 Destination address. |
| | **dstintf** string | | Destination interface name from available interfaces. |
| | **nat** string | **Choices:*** disable
* enable
| Enable/disable source NAT. |
| | **nat-ippool** string | | Name of the IP pools to be used to translate addresses from available IP Pools. |
| | **nat-ippool6** string | | IPv6 pools to be used for source NAT. |
| | **nat-port** string | | Translated port or port range (0 to 65535). |
| | **orig-addr** string | | Original address. |
| | **orig-addr6** string | | IPv6 Original address. |
| | **orig-port** integer | | Original TCP port (0 to 65535). |
| | **policyid** integer | | Policy ID. |
| | **protocol** integer | | Integer value for the protocol type (0 - 255). |
| | **srcintf** string | | Source interface name from available interfaces. |
| | **status** string | **Choices:*** disable
* enable
| Enable/disable the active status of this policy. |
| | **type** string | **Choices:*** ipv4
* ipv6
| IPv4/IPv6 source NAT. |
| | **uuid** string | | Universally Unique Identifier (UUID; automatically assigned but can be manually reset). |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure central SNAT policies.
fmgr_pkg_firewall_centralsnatmap:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
pkg: <your own value>
state: <value in [present, absent]>
pkg_firewall_centralsnatmap:
dst-addr: <value of string>
dstintf: <value of string>
nat: <value in [disable, enable]>
nat-ippool: <value of string>
nat-port: <value of string>
orig-addr: <value of string>
orig-port: <value of integer>
policyid: <value of integer>
protocol: <value of integer>
srcintf: <value of string>
status: <value in [disable, enable]>
comments: <value of string>
dst-addr6: <value of string>
nat-ippool6: <value of string>
orig-addr6: <value of string>
type: <value in [ipv4, ipv6]>
uuid: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_webfilter_ftgdlocalrating β Configure local FortiGuard Web Filter local ratings. fortinet.fortimanager.fmgr\_webfilter\_ftgdlocalrating β Configure local FortiGuard Web Filter local ratings.
=============================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_webfilter_ftgdlocalrating`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **webfilter\_ftgdlocalrating** dictionary | | the top level parameters set |
| | **comment** string | | Comment. |
| | **rating** string | | Local rating. |
| | **status** string | **Choices:*** disable
* enable
| Enable/disable local rating. |
| | **url** string | | URL to rate locally. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure local FortiGuard Web Filter local ratings.
fmgr_webfilter_ftgdlocalrating:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
webfilter_ftgdlocalrating:
rating: <value of string>
status: <value in [disable, enable]>
url: <value of string>
comment: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_admin_user_adomexclude β Excluding admin domain. fortinet.fortimanager.fmgr\_system\_admin\_user\_adomexclude β Excluding admin domain.
======================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_admin_user_adomexclude`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_admin\_user\_adomexclude** dictionary | | the top level parameters set |
| | **adom-name** string | | Admin domain names. |
| **user** string / required | | the parameter (user) in requested url |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Excluding admin domain.
fmgr_system_admin_user_adomexclude:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
user: <your own value>
state: <value in [present, absent]>
system_admin_user_adomexclude:
adom-name: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_application_list_entries β Application list entries. fortinet.fortimanager.fmgr\_application\_list\_entries β Application list entries.
==================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_application_list_entries`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **application\_list\_entries** dictionary | | the top level parameters set |
| | **action** string | **Choices:*** pass
* block
* reset
| Pass or block traffic, or reset connection for traffic from this application. |
| | **application** integer | | no description |
| | **behavior** string | | no description |
| | **category** string | | Category ID list. |
| | **exclusion** integer | | no description |
| | **id** integer | | Entry ID. |
| | **log** string | **Choices:*** disable
* enable
| Enable/disable logging for this application list. |
| | **log-packet** string | **Choices:*** disable
* enable
| Enable/disable packet logging. |
| | **parameters** list / elements=string | | no description |
| | | **id** integer | | Parameter ID. |
| | | **members** list / elements=string | | no description |
| | | | **id** integer | | Parameter. |
| | | | **name** string | | Parameter name. |
| | | | **value** string | | Parameter value. |
| | | **value** string | | Parameter value. |
| | **per-ip-shaper** string | | Per-IP traffic shaper. |
| | **popularity** list / elements=string | **Choices:*** 1
* 2
* 3
* 4
* 5
| no description |
| | **protocols** string | | no description |
| | **quarantine** string | **Choices:*** none
* attacker
| Quarantine method. |
| | **quarantine-expiry** string | | Duration of quarantine. (Format ###d##h##m, minimum 1m, maximum 364d23h59m, default = 5m). Requires quarantine set to attacker. |
| | **quarantine-log** string | **Choices:*** disable
* enable
| Enable/disable quarantine logging. |
| | **rate-count** integer | | Count of the rate. |
| | **rate-duration** integer | | Duration (sec) of the rate. |
| | **rate-mode** string | **Choices:*** periodical
* continuous
| Rate limit mode. |
| | **rate-track** string | **Choices:*** none
* src-ip
* dest-ip
* dhcp-client-mac
* dns-domain
| Track the packet protocol field. |
| | **risk** integer | | no description |
| | **session-ttl** integer | | Session TTL (0 = default). |
| | **shaper** string | | Traffic shaper. |
| | **shaper-reverse** string | | Reverse traffic shaper. |
| | **sub-category** integer | | no description |
| | **technology** string | | no description |
| | **vendor** string | | no description |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **list** string / required | | the parameter (list) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Application list entries.
fmgr_application_list_entries:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
list: <your own value>
state: <value in [present, absent]>
application_list_entries:
action: <value in [pass, block, reset]>
application: <value of integer>
behavior: <value of string>
category: <value of string>
id: <value of integer>
log: <value in [disable, enable]>
log-packet: <value in [disable, enable]>
parameters:
-
id: <value of integer>
value: <value of string>
members:
-
id: <value of integer>
name: <value of string>
value: <value of string>
per-ip-shaper: <value of string>
popularity:
- 1
- 2
- 3
- 4
- 5
protocols: <value of string>
quarantine: <value in [none, attacker]>
quarantine-expiry: <value of string>
quarantine-log: <value in [disable, enable]>
rate-count: <value of integer>
rate-duration: <value of integer>
rate-mode: <value in [periodical, continuous]>
rate-track: <value in [none, src-ip, dest-ip, ...]>
risk: <value of integer>
session-ttl: <value of integer>
shaper: <value of string>
shaper-reverse: <value of string>
sub-category: <value of integer>
technology: <value of string>
vendor: <value of string>
exclusion: <value of integer>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_emailfilter_profile_otherwebmails β Other supported webmails. fortinet.fortimanager.fmgr\_emailfilter\_profile\_otherwebmails β Other supported webmails.
===========================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_emailfilter_profile_otherwebmails`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **emailfilter\_profile\_otherwebmails** dictionary | | the top level parameters set |
| | **log-all** string | **Choices:*** disable
* enable
| Enable/disable logging of all email traffic. |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **profile** string / required | | the parameter (profile) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Other supported webmails.
fmgr_emailfilter_profile_otherwebmails:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
profile: <your own value>
emailfilter_profile_otherwebmails:
log-all: <value in [disable, enable]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_firewall_shaper_trafficshaper β Configure shared traffic shaper. fortinet.fortimanager.fmgr\_firewall\_shaper\_trafficshaper β Configure shared traffic shaper.
==============================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_shaper_trafficshaper`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_shaper\_trafficshaper** dictionary | | the top level parameters set |
| | **bandwidth-unit** string | **Choices:*** kbps
* mbps
* gbps
| Unit of measurement for guaranteed and maximum bandwidth for this shaper (Kbps, Mbps or Gbps). |
| | **diffserv** string | **Choices:*** disable
* enable
| Enable/disable changing the DiffServ setting applied to traffic accepted by this shaper. |
| | **diffservcode** string | | DiffServ setting to be applied to traffic accepted by this shaper. |
| | **dscp-marking-method** string | **Choices:*** multi-stage
* static
| Select DSCP marking method. |
| | **exceed-bandwidth** integer | | Exceed bandwidth used for DSCP multi-stage marking. Units depend on the bandwidth-unit setting. |
| | **exceed-class-id** integer | | Class ID for traffic in [guaranteed-bandwidth, maximum-bandwidth]. |
| | **exceed-dscp** string | | DSCP mark for traffic in [guaranteed-bandwidth, exceed-bandwidth]. |
| | **guaranteed-bandwidth** integer | | Amount of bandwidth guaranteed for this shaper (0 - 16776000). Units depend on the bandwidth-unit setting. |
| | **maximum-bandwidth** integer | | Upper bandwidth limit enforced by this shaper (0 - 16776000). 0 means no limit. Units depend on the bandwidth-unit setting. |
| | **maximum-dscp** string | | DSCP mark for traffic in [exceed-bandwidth, maximum-bandwidth]. |
| | **name** string | | Traffic shaper name. |
| | **overhead** integer | | Per-packet size overhead used in rate computations. |
| | **per-policy** string | **Choices:*** disable
* enable
| Enable/disable applying a separate shaper for each policy. For example, if enabled the guaranteed bandwidth is applied separat... |
| | **priority** string | **Choices:*** high
* medium
* low
| Higher priority traffic is more likely to be forwarded without delays and without compromising the guaranteed bandwidth. |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure shared traffic shaper.
fmgr_firewall_shaper_trafficshaper:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
firewall_shaper_trafficshaper:
bandwidth-unit: <value in [kbps, mbps, gbps]>
diffserv: <value in [disable, enable]>
diffservcode: <value of string>
guaranteed-bandwidth: <value of integer>
maximum-bandwidth: <value of integer>
name: <value of string>
per-policy: <value in [disable, enable]>
priority: <value in [high, medium, low]>
dscp-marking-method: <value in [multi-stage, static]>
exceed-bandwidth: <value of integer>
exceed-class-id: <value of integer>
exceed-dscp: <value of string>
maximum-dscp: <value of string>
overhead: <value of integer>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_firewall_sslsshprofile_ssh β Configure SSH options. fortinet.fortimanager.fmgr\_firewall\_sslsshprofile\_ssh β Configure SSH options.
=================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_sslsshprofile_ssh`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_sslsshprofile\_ssh** dictionary | | the top level parameters set |
| | **inspect-all** string | **Choices:*** disable
* deep-inspection
| Level of SSL inspection. |
| | **ports** integer | | no description |
| | **proxy-after-tcp-handshake** string | **Choices:*** disable
* enable
| Proxy traffic after the TCP 3-way handshake has been established (not before). |
| | **ssh-algorithm** string | **Choices:*** compatible
* high-encryption
| Relative strength of encryption algorithms accepted during negotiation. |
| | **ssh-policy-check** string | **Choices:*** disable
* enable
| Enable/disable SSH policy check. |
| | **ssh-tun-policy-check** string | **Choices:*** disable
* enable
| Enable/disable SSH tunnel policy check. |
| | **status** string | **Choices:*** disable
* deep-inspection
| Configure protocol inspection status. |
| | **unsupported-version** string | **Choices:*** block
* bypass
| Action based on SSH version being unsupported. |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **ssl-ssh-profile** string / required | | the parameter (ssl-ssh-profile) in requested url |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure SSH options.
fmgr_firewall_sslsshprofile_ssh:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
ssl-ssh-profile: <your own value>
firewall_sslsshprofile_ssh:
inspect-all: <value in [disable, deep-inspection]>
ports: <value of integer>
ssh-algorithm: <value in [compatible, high-encryption]>
ssh-policy-check: <value in [disable, enable]>
ssh-tun-policy-check: <value in [disable, enable]>
status: <value in [disable, deep-inspection]>
unsupported-version: <value in [block, bypass]>
proxy-after-tcp-handshake: <value in [disable, enable]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_fsp_vlan_dynamicmapping_interface_ipv6_vrrp6 β IPv6 VRRP configuration. fortinet.fortimanager.fmgr\_fsp\_vlan\_dynamicmapping\_interface\_ipv6\_vrrp6 β IPv6 VRRP configuration.
========================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_fsp_vlan_dynamicmapping_interface_ipv6_vrrp6`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **dynamic\_mapping** string / required | | the parameter (dynamic\_mapping) in requested url |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **fsp\_vlan\_dynamicmapping\_interface\_ipv6\_vrrp6** dictionary | | the top level parameters set |
| | **accept-mode** string | **Choices:*** disable
* enable
| no description |
| | **adv-interval** integer | | no description |
| | **preempt** string | **Choices:*** disable
* enable
| no description |
| | **priority** integer | | no description |
| | **start-time** integer | | no description |
| | **status** string | **Choices:*** disable
* enable
| no description |
| | **vrdst6** string | | no description |
| | **vrgrp** integer | | no description |
| | **vrid** integer | | no description |
| | **vrip6** string | | no description |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **vlan** string / required | | the parameter (vlan) in requested url |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: IPv6 VRRP configuration.
fmgr_fsp_vlan_dynamicmapping_interface_ipv6_vrrp6:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
vlan: <your own value>
dynamic_mapping: <your own value>
state: <value in [present, absent]>
fsp_vlan_dynamicmapping_interface_ipv6_vrrp6:
accept-mode: <value in [disable, enable]>
adv-interval: <value of integer>
preempt: <value in [disable, enable]>
priority: <value of integer>
start-time: <value of integer>
status: <value in [disable, enable]>
vrdst6: <value of string>
vrgrp: <value of integer>
vrid: <value of integer>
vrip6: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_dynamic_virtualwanlink_server_dynamicmapping β no description fortinet.fortimanager.fmgr\_dynamic\_virtualwanlink\_server\_dynamicmapping β no description
============================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_dynamic_virtualwanlink_server_dynamicmapping`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **dynamic\_virtualwanlink\_server\_dynamicmapping** dictionary | | the top level parameters set |
| | **\_scope** list / elements=string | | no description |
| | | **name** string | | no description |
| | | **vdom** string | | no description |
| | **server** string | | no description |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **server** string / required | | the parameter (server) in requested url |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: no description
fmgr_dynamic_virtualwanlink_server_dynamicmapping:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
server: <your own value>
state: <value in [present, absent]>
dynamic_virtualwanlink_server_dynamicmapping:
_scope:
-
name: <value of string>
vdom: <value of string>
server: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_firewall_profileprotocoloptions_pop3 β Configure POP3 protocol options. fortinet.fortimanager.fmgr\_firewall\_profileprotocoloptions\_pop3 β Configure POP3 protocol options.
=====================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_profileprotocoloptions_pop3`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_profileprotocoloptions\_pop3** dictionary | | the top level parameters set |
| | **inspect-all** string | **Choices:*** disable
* enable
| Enable/disable the inspection of all ports for the protocol. |
| | **options** list / elements=string | **Choices:*** oversize
* fragmail
* no-content-summary
| no description |
| | **oversize-limit** integer | | Maximum in-memory file size that can be scanned (1 - 383 MB, default = 10). |
| | **ports** integer | | no description |
| | **proxy-after-tcp-handshake** string | **Choices:*** disable
* enable
| Proxy traffic after the TCP 3-way handshake has been established (not before). |
| | **scan-bzip2** string | **Choices:*** disable
* enable
| Enable/disable scanning of BZip2 compressed files. |
| | **ssl-offloaded** string | **Choices:*** no
* yes
| SSL decryption and encryption performed by an external device. |
| | **status** string | **Choices:*** disable
* enable
| Enable/disable the active status of scanning for this protocol. |
| | **uncompressed-nest-limit** integer | | Maximum nested levels of compression that can be uncompressed and scanned (2 - 100, default = 12). |
| | **uncompressed-oversize-limit** integer | | Maximum in-memory uncompressed file size that can be scanned (0 - 383 MB, 0 = unlimited, default = 10). |
| **profile-protocol-options** string / required | | the parameter (profile-protocol-options) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure POP3 protocol options.
fmgr_firewall_profileprotocoloptions_pop3:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
profile-protocol-options: <your own value>
firewall_profileprotocoloptions_pop3:
inspect-all: <value in [disable, enable]>
options:
- oversize
- fragmail
- no-content-summary
oversize-limit: <value of integer>
ports: <value of integer>
scan-bzip2: <value in [disable, enable]>
status: <value in [disable, enable]>
uncompressed-nest-limit: <value of integer>
uncompressed-oversize-limit: <value of integer>
ssl-offloaded: <value in [no, yes]>
proxy-after-tcp-handshake: <value in [disable, enable]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_dynamic_virtualwanlink_members_dynamicmapping β no description fortinet.fortimanager.fmgr\_dynamic\_virtualwanlink\_members\_dynamicmapping β no description
=============================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_dynamic_virtualwanlink_members_dynamicmapping`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **dynamic\_virtualwanlink\_members\_dynamicmapping** dictionary | | the top level parameters set |
| | **\_scope** list / elements=string | | no description |
| | | **name** string | | no description |
| | | **vdom** string | | no description |
| | **comment** string | | no description |
| | **cost** integer | | no description |
| | **detect-failtime** integer | | no description |
| | **detect-http-get** string | | no description |
| | **detect-http-match** string | | no description |
| | **detect-http-port** integer | | no description |
| | **detect-interval** integer | | no description |
| | **detect-protocol** string | **Choices:*** ping
* tcp-echo
* udp-echo
* http
| no description |
| | **detect-recoverytime** integer | | no description |
| | **detect-server** string | | no description |
| | **detect-timeout** integer | | no description |
| | **gateway** string | | no description |
| | **gateway6** string | | no description |
| | **ingress-spillover-threshold** integer | | no description |
| | **interface** string | | no description |
| | **priority** integer | | no description |
| | **source** string | | no description |
| | **source6** string | | no description |
| | **spillover-threshold** integer | | no description |
| | **status** string | **Choices:*** disable
* enable
| no description |
| | **volume-ratio** integer | | no description |
| | **weight** integer | | no description |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **members** string / required | | the parameter (members) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: no description
fmgr_dynamic_virtualwanlink_members_dynamicmapping:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
members: <your own value>
state: <value in [present, absent]>
dynamic_virtualwanlink_members_dynamicmapping:
_scope:
-
name: <value of string>
vdom: <value of string>
comment: <value of string>
cost: <value of integer>
detect-failtime: <value of integer>
detect-http-get: <value of string>
detect-http-match: <value of string>
detect-http-port: <value of integer>
detect-interval: <value of integer>
detect-protocol: <value in [ping, tcp-echo, udp-echo, ...]>
detect-recoverytime: <value of integer>
detect-server: <value of string>
detect-timeout: <value of integer>
gateway: <value of string>
gateway6: <value of string>
ingress-spillover-threshold: <value of integer>
interface: <value of string>
priority: <value of integer>
source: <value of string>
source6: <value of string>
spillover-threshold: <value of integer>
status: <value in [disable, enable]>
volume-ratio: <value of integer>
weight: <value of integer>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_gtp_iewhitelist β IE white list. fortinet.fortimanager.fmgr\_gtp\_iewhitelist β IE white list.
=============================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_gtp_iewhitelist`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **gtp\_iewhitelist** dictionary | | the top level parameters set |
| | **entries** list / elements=string | | no description |
| | | **id** integer | | Entry ID. |
| | | **ie** integer | | IE ID (1 - 255). |
| | | **message** integer | | Message ID (1 - 255). |
| | **name** string | | IE white list name. |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: IE white list.
fmgr_gtp_iewhitelist:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
gtp_iewhitelist:
entries:
-
id: <value of integer>
ie: <value of integer>
message: <value of integer>
name: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_replacemsggroup_fortiguardwf β Replacement message table entries. fortinet.fortimanager.fmgr\_system\_replacemsggroup\_fortiguardwf β Replacement message table entries.
======================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_replacemsggroup_fortiguardwf`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **replacemsg-group** string / required | | the parameter (replacemsg-group) in requested url |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_replacemsggroup\_fortiguardwf** dictionary | | the top level parameters set |
| | **buffer** string | | Message string. |
| | **format** string | **Choices:*** none
* text
* html
* wml
| Format flag. |
| | **header** string | **Choices:*** none
* http
* 8bit
| Header flag. |
| | **msg-type** string | | Message type. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Replacement message table entries.
fmgr_system_replacemsggroup_fortiguardwf:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
replacemsg-group: <your own value>
state: <value in [present, absent]>
system_replacemsggroup_fortiguardwf:
buffer: <value of string>
format: <value in [none, text, html, ...]>
header: <value in [none, http, 8bit]>
msg-type: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_antivirus_profile_smb β Configure SMB AntiVirus options. fortinet.fortimanager.fmgr\_antivirus\_profile\_smb β Configure SMB AntiVirus options.
======================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_antivirus_profile_smb`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **antivirus\_profile\_smb** dictionary | | the top level parameters set |
| | **archive-block** list / elements=string | **Choices:*** encrypted
* corrupted
* multipart
* nested
* mailbomb
* unhandled
* partiallycorrupted
* fileslimit
* timeout
| no description |
| | **archive-log** list / elements=string | **Choices:*** encrypted
* corrupted
* multipart
* nested
* mailbomb
* unhandled
* partiallycorrupted
* fileslimit
* timeout
| no description |
| | **emulator** string | **Choices:*** disable
* enable
| Enable/disable the virus emulator. |
| | **options** list / elements=string | **Choices:*** scan
* quarantine
* avquery
* avmonitor
| no description |
| | **outbreak-prevention** string | **Choices:*** disabled
* files
* full-archive
| Enable FortiGuard Virus Outbreak Prevention service. |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **profile** string / required | | the parameter (profile) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure SMB AntiVirus options.
fmgr_antivirus_profile_smb:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
profile: <your own value>
antivirus_profile_smb:
archive-block:
- encrypted
- corrupted
- multipart
- nested
- mailbomb
- unhandled
- partiallycorrupted
- fileslimit
- timeout
archive-log:
- encrypted
- corrupted
- multipart
- nested
- mailbomb
- unhandled
- partiallycorrupted
- fileslimit
- timeout
emulator: <value in [disable, enable]>
options:
- scan
- quarantine
- avquery
- avmonitor
outbreak-prevention: <value in [disabled, files, full-archive]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_devprof_system_centralmanagement_serverlist β Additional severs that the FortiGate can use for updates fortinet.fortimanager.fmgr\_devprof\_system\_centralmanagement\_serverlist β Additional severs that the FortiGate can use for updates
=====================================================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_devprof_system_centralmanagement_serverlist`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **devprof** string / required | | the parameter (devprof) in requested url |
| **devprof\_system\_centralmanagement\_serverlist** dictionary | | the top level parameters set |
| | **addr-type** string | **Choices:*** fqdn
* ipv4
* ipv6
| Indicate whether the FortiGate communicates with the override server using an IPv4 address, an IPv6 address or a FQDN. |
| | **fqdn** string | | FQDN address of override server. |
| | **id** integer | | ID. |
| | **server-address** string | | IPv4 address of override server. |
| | **server-address6** string | | IPv6 address of override server. |
| | **server-type** list / elements=string | **Choices:*** update
* rating
| no description |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Additional severs that the FortiGate can use for updates
fmgr_devprof_system_centralmanagement_serverlist:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
devprof: <your own value>
state: <value in [present, absent]>
devprof_system_centralmanagement_serverlist:
addr-type: <value in [fqdn, ipv4, ipv6]>
fqdn: <value of string>
id: <value of integer>
server-address: <value of string>
server-address6: <value of string>
server-type:
- update
- rating
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_system_admin_user_ipsfilter β IPS filter. fortinet.fortimanager.fmgr\_system\_admin\_user\_ipsfilter β IPS filter.
========================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_admin_user_ipsfilter`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_admin\_user\_ipsfilter** dictionary | | the top level parameters set |
| | **ips-filter-name** string | | IPS filter name. |
| **user** string / required | | the parameter (user) in requested url |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: IPS filter.
fmgr_system_admin_user_ipsfilter:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
user: <your own value>
state: <value in [present, absent]>
system_admin_user_ipsfilter:
ips-filter-name: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_generic β Build and send generic FortiManager API request. fortinet.fortimanager.fmgr\_generic β Build and send generic FortiManager API request.
======================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_generic`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is for generic fortimanager requests. it receives raw json-rpc data, and sends it to fortimanager, finally returns the response to users.
* This module also rely on fortimanager httpapi plugin as the transport.
* the payload doesnβt include session, the httpapi plugin will automatically fill the session later.
* the username and password is not managed by the module, but by the plugin.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **json** string | | the raw json-formatted payload to send to fortimanager |
| **method** string | | the method of the json-rpc it must be in [get, add, set, update, delete, move, clone, exec] |
| **params** string | | the parameter collection. |
Notes
-----
Note
* two parameters schemes are supported, either in raw json format or in ansible recognnizable top-level parameters format.
* json is defined as string, user is response for make it json-formatted
* method and params should be specified by users if βjsonβ is not present
* if all three parameters are provided, the βjsonβ is preferred.
Examples
--------
```
- hosts: fortimanager01
connection: httpapi
vars:
adom: "root"
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: 'login a user'
fmgr_generic:
method: 'exec'
params:
- url: 'sys/login/user'
data:
- user: 'APIUser'
passwd: 'Fortinet1!e'
- name: 'login another user'
fmgr_generic:
json: |
{
"method":"exec",
"params":[
{
"url":"sys/login/user",
"data":[
{
"user":"APIUser",
"passwd":"Fortinet1!"
}
]
}
]
}
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **api\_result** string | always | full API response, includes status code and message |
### Authors
* Link Zheng (@zhengl)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_wanopt_profile_tcp β Enable/disable TCP WAN Optimization and configure TCP WAN Optimization features. fortinet.fortimanager.fmgr\_wanopt\_profile\_tcp β Enable/disable TCP WAN Optimization and configure TCP WAN Optimization features.
===================================================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_wanopt_profile_tcp`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **profile** string / required | | the parameter (profile) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **wanopt\_profile\_tcp** dictionary | | the top level parameters set |
| | **byte-caching** string | **Choices:*** disable
* enable
| Enable/disable byte-caching for HTTP. Byte caching reduces the amount of traffic by caching file data sent across the WAN and ... |
| | **byte-caching-opt** string | **Choices:*** mem-only
* mem-disk
| Select whether TCP byte-caching uses system memory only or both memory and disk space. |
| | **log-traffic** string | **Choices:*** disable
* enable
| Enable/disable logging. |
| | **port** string | | Single port number or port number range for TCP. Only packets with a destination port number that matches this port number or ... |
| | **secure-tunnel** string | **Choices:*** disable
* enable
| Enable/disable securing the WAN Opt tunnel using SSL. Secure and non-secure tunnels use the same TCP port (7810). |
| | **ssl** string | **Choices:*** disable
* enable
| Enable/disable SSL/TLS offloading. |
| | **ssl-port** integer | | no description |
| | **status** string | **Choices:*** disable
* enable
| Enable/disable HTTP WAN Optimization. |
| | **tunnel-sharing** string | **Choices:*** private
* shared
* express-shared
| Tunnel sharing mode for aggressive/non-aggressive and/or interactive/non-interactive protocols. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Enable/disable TCP WAN Optimization and configure TCP WAN Optimization features.
fmgr_wanopt_profile_tcp:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
profile: <your own value>
wanopt_profile_tcp:
byte-caching: <value in [disable, enable]>
byte-caching-opt: <value in [mem-only, mem-disk]>
log-traffic: <value in [disable, enable]>
port: <value of string>
secure-tunnel: <value in [disable, enable]>
ssl: <value in [disable, enable]>
ssl-port: <value of integer>
status: <value in [disable, enable]>
tunnel-sharing: <value in [private, shared, express-shared]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_replacemsggroup_utm β Replacement message table entries. fortinet.fortimanager.fmgr\_system\_replacemsggroup\_utm β Replacement message table entries.
=============================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_replacemsggroup_utm`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **replacemsg-group** string / required | | the parameter (replacemsg-group) in requested url |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_replacemsggroup\_utm** dictionary | | the top level parameters set |
| | **buffer** string | | Message string. |
| | **format** string | **Choices:*** none
* text
* html
* wml
| Format flag. |
| | **header** string | **Choices:*** none
* http
* 8bit
| Header flag. |
| | **msg-type** string | | Message type. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Replacement message table entries.
fmgr_system_replacemsggroup_utm:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
replacemsg-group: <your own value>
state: <value in [present, absent]>
system_replacemsggroup_utm:
buffer: <value of string>
format: <value in [none, text, html, ...]>
header: <value in [none, http, 8bit]>
msg-type: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_dnsfilter_domainfilter β Configure DNS domain filters. fortinet.fortimanager.fmgr\_dnsfilter\_domainfilter β Configure DNS domain filters.
===================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_dnsfilter_domainfilter`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **dnsfilter\_domainfilter** dictionary | | the top level parameters set |
| | **comment** string | | Optional comments. |
| | **entries** list / elements=string | | no description |
| | | **action** string | **Choices:*** block
* allow
* monitor
| Action to take for domain filter matches. |
| | | **domain** string | | Domain entries to be filtered. |
| | | **id** integer | | Id. |
| | | **status** string | **Choices:*** disable
* enable
| Enable/disable this domain filter. |
| | | **type** string | **Choices:*** simple
* regex
* wildcard
| DNS domain filter type. |
| | **id** integer | | ID. |
| | **name** string | | Name of table. |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure DNS domain filters.
fmgr_dnsfilter_domainfilter:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
dnsfilter_domainfilter:
comment: <value of string>
entries:
-
action: <value in [block, allow, monitor]>
domain: <value of string>
id: <value of integer>
status: <value in [disable, enable]>
type: <value in [simple, regex, wildcard]>
id: <value of integer>
name: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_waf_profile_method_methodpolicy β HTTP method policy. fortinet.fortimanager.fmgr\_waf\_profile\_method\_methodpolicy β HTTP method policy.
====================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_waf_profile_method_methodpolicy`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **profile** string / required | | the parameter (profile) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **waf\_profile\_method\_methodpolicy** dictionary | | the top level parameters set |
| | **address** string | | Host address. |
| | **allowed-methods** list / elements=string | **Choices:*** delete
* get
* head
* options
* post
* put
* trace
* others
* connect
| no description |
| | **id** integer | | HTTP method policy ID. |
| | **pattern** string | | URL pattern. |
| | **regex** string | **Choices:*** disable
* enable
| Enable/disable regular expression based pattern match. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: HTTP method policy.
fmgr_waf_profile_method_methodpolicy:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
profile: <your own value>
state: <value in [present, absent]>
waf_profile_method_methodpolicy:
address: <value of string>
allowed-methods:
- delete
- get
- head
- options
- post
- put
- trace
- others
- connect
id: <value of integer>
pattern: <value of string>
regex: <value in [disable, enable]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_replacemsggroup_ftp β Replacement message table entries. fortinet.fortimanager.fmgr\_system\_replacemsggroup\_ftp β Replacement message table entries.
=============================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_replacemsggroup_ftp`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **replacemsg-group** string / required | | the parameter (replacemsg-group) in requested url |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_replacemsggroup\_ftp** dictionary | | the top level parameters set |
| | **buffer** string | | Message string. |
| | **format** string | **Choices:*** none
* text
* html
* wml
| Format flag. |
| | **header** string | **Choices:*** none
* http
* 8bit
| Header flag. |
| | **msg-type** string | | Message type. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Replacement message table entries.
fmgr_system_replacemsggroup_ftp:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
replacemsg-group: <your own value>
state: <value in [present, absent]>
system_replacemsggroup_ftp:
buffer: <value of string>
format: <value in [none, text, html, ...]>
header: <value in [none, http, 8bit]>
msg-type: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_firewall_internetservicecustomgroup β Configure custom Internet Service group. fortinet.fortimanager.fmgr\_firewall\_internetservicecustomgroup β Configure custom Internet Service group.
===========================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_internetservicecustomgroup`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_internetservicecustomgroup** dictionary | | the top level parameters set |
| | **comment** string | | Comment. |
| | **member** string | | Custom Internet Service group members. |
| | **name** string | | Custom Internet Service group name. |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure custom Internet Service group.
fmgr_firewall_internetservicecustomgroup:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
firewall_internetservicecustomgroup:
comment: <value of string>
member: <value of string>
name: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_locallog_syslogd_setting β Settings for remote syslog server. fortinet.fortimanager.fmgr\_system\_locallog\_syslogd\_setting β Settings for remote syslog server.
===================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_locallog_syslogd_setting`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_locallog\_syslogd\_setting** dictionary | | the top level parameters set |
| | **csv** string | **Choices:*** **disable** β
* enable
| CSV format. disable - Disable CSV format. enable - Enable CSV format. |
| | **facility** string | **Choices:*** kernel
* user
* ntp
* audit
* alert
* clock
* mail
* daemon
* auth
* syslog
* lpr
* news
* uucp
* cron
* authpriv
* ftp
* local0
* local1
* local2
* local3
* local4
* local5
* local6
* **local7** β
| Remote syslog facility. kernel - Kernel messages. user - Random user-level messages. ntp - NTP daemon. audit - Log audit. alert - Log alert. clock - Clock daemon. mail - Mail system. daemon - System daemons. auth - Security/authorization messages. syslog - Messages generated internally by syslog daemon. lpr - Line printer subsystem. news - Network news subsystem. uucp - Network news subsystem. cron - Clock daemon. authpriv - Security/authorization messages (private). ftp - FTP daemon. local0 - Reserved for local use. local1 - Reserved for local use. local2 - Reserved for local use. local3 - Reserved for local use. local4 - Reserved for local use. local5 - Reserved for local use. local6 - Reserved for local use. local7 - Reserved for local use. |
| | **severity** string | **Choices:*** emergency
* alert
* critical
* error
* warning
* **notification** β
* information
* debug
| Least severity level to log. emergency - Emergency level. alert - Alert level. critical - Critical level. error - Error level. warning - Warning level. notification - Notification level. information - Information level. debug - Debug level. |
| | **status** string | **Choices:*** **disable** β
* enable
| Remote syslog log. disable - Do not log to remote syslog server. enable - Log to remote syslog server. |
| | **syslog-name** string | | Remote syslog server name. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Settings for remote syslog server.
fmgr_system_locallog_syslogd_setting:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
system_locallog_syslogd_setting:
csv: <value in [disable, enable]>
facility: <value in [kernel, user, ntp, ...]>
severity: <value in [emergency, alert, critical, ...]>
status: <value in [disable, enable]>
syslog-name: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_firewall_gtp β Configure GTP. fortinet.fortimanager.fmgr\_firewall\_gtp β Configure GTP.
==========================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_gtp`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_gtp** dictionary | | the top level parameters set |
| | **addr-notify** string | | overbilling notify address |
| | **apn** list / elements=string | | no description |
| | | **action** string | **Choices:*** allow
* deny
| Action. |
| | | **apnmember** string | | APN member. |
| | | **id** integer | | ID. |
| | | **selection-mode** list / elements=string | **Choices:*** ms
* net
* vrf
| no description |
| | **apn-filter** string | **Choices:*** disable
* enable
| apn filter |
| | **authorized-ggsns** string | | Authorized GGSN group |
| | **authorized-ggsns6** string | | Authorized GGSN/PGW IPv6 group. |
| | **authorized-sgsns** string | | Authorized SGSN group |
| | **authorized-sgsns6** string | | Authorized SGSN/SGW IPv6 group. |
| | **comment** string | | Comment. |
| | **context-id** integer | | Overbilling context. |
| | **control-plane-message-rate-limit** integer | | control plane message rate limit |
| | **default-apn-action** string | **Choices:*** allow
* deny
| default apn action |
| | **default-imsi-action** string | **Choices:*** allow
* deny
| default imsi action |
| | **default-ip-action** string | **Choices:*** allow
* deny
| default action for encapsulated IP traffic |
| | **default-noip-action** string | **Choices:*** allow
* deny
| default action for encapsulated non-IP traffic |
| | **default-policy-action** string | **Choices:*** allow
* deny
| default advanced policy action |
| | **denied-log** string | **Choices:*** disable
* enable
| log denied |
| | **echo-request-interval** integer | | echo request interval (in seconds) |
| | **extension-log** string | **Choices:*** disable
* enable
| log in extension format |
| | **forwarded-log** string | **Choices:*** disable
* enable
| log forwarded |
| | **global-tunnel-limit** string | | Global tunnel limit. |
| | **gtp-in-gtp** string | **Choices:*** allow
* deny
| gtp in gtp |
| | **gtpu-denied-log** string | **Choices:*** disable
* enable
| Enable/disable logging of denied GTP-U packets. |
| | **gtpu-forwarded-log** string | **Choices:*** disable
* enable
| Enable/disable logging of forwarded GTP-U packets. |
| | **gtpu-log-freq** integer | | Logging of frequency of GTP-U packets. |
| | **half-close-timeout** integer | | Half-close tunnel timeout (in seconds). |
| | **half-open-timeout** integer | | Half-open tunnel timeout (in seconds). |
| | **handover-group** string | | Handover SGSN group |
| | **handover-group6** string | | Handover SGSN/SGW IPv6 group. |
| | **ie-allow-list-v0v1** string | | IE allow list. |
| | **ie-allow-list-v2** string | | IE allow list. |
| | **ie-remove-policy** list / elements=string | | no description |
| | | **id** integer | | ID. |
| | | **remove-ies** list / elements=string | **Choices:*** apn-restriction
* rat-type
* rai
* uli
* imei
| no description |
| | | **sgsn-addr** string | | SGSN address name. |
| | | **sgsn-addr6** string | | SGSN IPv6 address name. |
| | **ie-remover** string | **Choices:*** disable
* enable
| IE removal policy. |
| | **ie-validation** dictionary | | no description |
| | | **apn-restriction** string | **Choices:*** disable
* enable
| Validate APN restriction. |
| | | **charging-gateway-addr** string | **Choices:*** disable
* enable
| Validate charging gateway address. |
| | | **charging-ID** string | **Choices:*** disable
* enable
| Validate charging ID. |
| | | **end-user-addr** string | **Choices:*** disable
* enable
| Validate end user address. |
| | | **gsn-addr** string | **Choices:*** disable
* enable
| Validate GSN address. |
| | | **imei** string | **Choices:*** disable
* enable
| Validate IMEI(SV). |
| | | **imsi** string | **Choices:*** disable
* enable
| Validate IMSI. |
| | | **mm-context** string | **Choices:*** disable
* enable
| Validate MM context. |
| | | **ms-tzone** string | **Choices:*** disable
* enable
| Validate MS time zone. |
| | | **ms-validated** string | **Choices:*** disable
* enable
| Validate MS validated. |
| | | **msisdn** string | **Choices:*** disable
* enable
| Validate MSISDN. |
| | | **nsapi** string | **Choices:*** disable
* enable
| Validate NSAPI. |
| | | **pdp-context** string | **Choices:*** disable
* enable
| Validate PDP context. |
| | | **qos-profile** string | **Choices:*** disable
* enable
| Validate Quality of Service(QoS) profile. |
| | | **rai** string | **Choices:*** disable
* enable
| Validate RAI. |
| | | **rat-type** string | **Choices:*** disable
* enable
| Validate RAT type. |
| | | **reordering-required** string | **Choices:*** disable
* enable
| Validate re-ordering required. |
| | | **selection-mode** string | **Choices:*** disable
* enable
| Validate selection mode. |
| | | **uli** string | **Choices:*** disable
* enable
| Validate user location information. |
| | **ie-white-list-v0v1** string | | IE white list. |
| | **ie-white-list-v2** string | | IE white list. |
| | **imsi** list / elements=string | | no description |
| | | **action** string | **Choices:*** allow
* deny
| Action. |
| | | **apnmember** string | | APN member. |
| | | **id** integer | | ID. |
| | | **mcc-mnc** string | | MCC MNC. |
| | | **msisdn-prefix** string | | MSISDN prefix. |
| | | **selection-mode** list / elements=string | **Choices:*** ms
* net
* vrf
| no description |
| | **imsi-filter** string | **Choices:*** disable
* enable
| imsi filter |
| | **interface-notify** string | | overbilling interface |
| | **invalid-reserved-field** string | **Choices:*** allow
* deny
| Invalid reserved field in GTP header |
| | **invalid-sgsns-to-log** string | | Invalid SGSN group to be logged |
| | **invalid-sgsns6-to-log** string | | Invalid SGSN IPv6 group to be logged. |
| | **ip-filter** string | **Choices:*** disable
* enable
| IP filter for encapsulted traffic |
| | **ip-policy** list / elements=string | | no description |
| | | **action** string | **Choices:*** allow
* deny
| Action. |
| | | **dstaddr** string | | Destination address name. |
| | | **dstaddr6** string | | Destination IPv6 address name. |
| | | **id** integer | | ID. |
| | | **srcaddr** string | | Source address name. |
| | | **srcaddr6** string | | Source IPv6 address name. |
| | **log-freq** integer | | Logging of frequency of GTP-C packets. |
| | **log-gtpu-limit** integer | | the user data log limit (0-512 bytes) |
| | **log-imsi-prefix** string | | IMSI prefix for selective logging. |
| | **log-msisdn-prefix** string | | the msisdn prefix for selective logging |
| | **max-message-length** integer | | max message length |
| | **message-filter-v0v1** string | | Message filter. |
| | **message-filter-v2** string | | Message filter. |
| | **message-rate-limit** dictionary | | no description |
| | | **create-aa-pdp-request** integer | | Rate limit for create AA PDP context request (packets per second). |
| | | **create-aa-pdp-response** integer | | Rate limit for create AA PDP context response (packets per second). |
| | | **create-mbms-request** integer | | Rate limit for create MBMS context request (packets per second). |
| | | **create-mbms-response** integer | | Rate limit for create MBMS context response (packets per second). |
| | | **create-pdp-request** integer | | Rate limit for create PDP context request (packets per second). |
| | | **create-pdp-response** integer | | Rate limit for create PDP context response (packets per second). |
| | | **delete-aa-pdp-request** integer | | Rate limit for delete AA PDP context request (packets per second). |
| | | **delete-aa-pdp-response** integer | | Rate limit for delete AA PDP context response (packets per second). |
| | | **delete-mbms-request** integer | | Rate limit for delete MBMS context request (packets per second). |
| | | **delete-mbms-response** integer | | Rate limit for delete MBMS context response (packets per second). |
| | | **delete-pdp-request** integer | | Rate limit for delete PDP context request (packets per second). |
| | | **delete-pdp-response** integer | | Rate limit for delete PDP context response (packets per second). |
| | | **echo-reponse** integer | | Rate limit for echo response (packets per second). |
| | | **echo-request** integer | | Rate limit for echo requests (packets per second). |
| | | **error-indication** integer | | Rate limit for error indication (packets per second). |
| | | **failure-report-request** integer | | Rate limit for failure report request (packets per second). |
| | | **failure-report-response** integer | | Rate limit for failure report response (packets per second). |
| | | **fwd-reloc-complete-ack** integer | | Rate limit for forward relocation complete acknowledge (packets per second). |
| | | **fwd-relocation-complete** integer | | Rate limit for forward relocation complete (packets per second). |
| | | **fwd-relocation-request** integer | | Rate limit for forward relocation request (packets per second). |
| | | **fwd-relocation-response** integer | | Rate limit for forward relocation response (packets per second). |
| | | **fwd-srns-context** integer | | Rate limit for forward SRNS context (packets per second). |
| | | **fwd-srns-context-ack** integer | | Rate limit for forward SRNS context acknowledge (packets per second). |
| | | **g-pdu** integer | | Rate limit for G-PDU (packets per second). |
| | | **identification-request** integer | | Rate limit for identification request (packets per second). |
| | | **identification-response** integer | | Rate limit for identification response (packets per second). |
| | | **mbms-de-reg-request** integer | | Rate limit for MBMS de-registration request (packets per second). |
| | | **mbms-de-reg-response** integer | | Rate limit for MBMS de-registration response (packets per second). |
| | | **mbms-notify-rej-request** integer | | Rate limit for MBMS notification reject request (packets per second). |
| | | **mbms-notify-rej-response** integer | | Rate limit for MBMS notification reject response (packets per second). |
| | | **mbms-notify-request** integer | | Rate limit for MBMS notification request (packets per second). |
| | | **mbms-notify-response** integer | | Rate limit for MBMS notification response (packets per second). |
| | | **mbms-reg-request** integer | | Rate limit for MBMS registration request (packets per second). |
| | | **mbms-reg-response** integer | | Rate limit for MBMS registration response (packets per second). |
| | | **mbms-ses-start-request** integer | | Rate limit for MBMS session start request (packets per second). |
| | | **mbms-ses-start-response** integer | | Rate limit for MBMS session start response (packets per second). |
| | | **mbms-ses-stop-request** integer | | Rate limit for MBMS session stop request (packets per second). |
| | | **mbms-ses-stop-response** integer | | Rate limit for MBMS session stop response (packets per second). |
| | | **note-ms-request** integer | | Rate limit for note MS GPRS present request (packets per second). |
| | | **note-ms-response** integer | | Rate limit for note MS GPRS present response (packets per second). |
| | | **pdu-notify-rej-request** integer | | Rate limit for PDU notify reject request (packets per second). |
| | | **pdu-notify-rej-response** integer | | Rate limit for PDU notify reject response (packets per second). |
| | | **pdu-notify-request** integer | | Rate limit for PDU notify request (packets per second). |
| | | **pdu-notify-response** integer | | Rate limit for PDU notify response (packets per second). |
| | | **ran-info** integer | | Rate limit for RAN information relay (packets per second). |
| | | **relocation-cancel-request** integer | | Rate limit for relocation cancel request (packets per second). |
| | | **relocation-cancel-response** integer | | Rate limit for relocation cancel response (packets per second). |
| | | **send-route-request** integer | | Rate limit for send routing information for GPRS request (packets per second). |
| | | **send-route-response** integer | | Rate limit for send routing information for GPRS response (packets per second). |
| | | **sgsn-context-ack** integer | | Rate limit for SGSN context acknowledgement (packets per second). |
| | | **sgsn-context-request** integer | | Rate limit for SGSN context request (packets per second). |
| | | **sgsn-context-response** integer | | Rate limit for SGSN context response (packets per second). |
| | | **support-ext-hdr-notify** integer | | Rate limit for support extension headers notification (packets per second). |
| | | **update-mbms-request** integer | | Rate limit for update MBMS context request (packets per second). |
| | | **update-mbms-response** integer | | Rate limit for update MBMS context response (packets per second). |
| | | **update-pdp-request** integer | | Rate limit for update PDP context request (packets per second). |
| | | **update-pdp-response** integer | | Rate limit for update PDP context response (packets per second). |
| | | **version-not-support** integer | | Rate limit for version not supported (packets per second). |
| | **message-rate-limit-v0** dictionary | | no description |
| | | **create-pdp-request** integer | | Rate limit (packets/s) for create PDP context request. |
| | | **delete-pdp-request** integer | | Rate limit (packets/s) for delete PDP context request. |
| | | **echo-request** integer | | Rate limit (packets/s) for echo request. |
| | **message-rate-limit-v1** dictionary | | no description |
| | | **create-pdp-request** integer | | Rate limit (packets/s) for create PDP context request. |
| | | **delete-pdp-request** integer | | Rate limit (packets/s) for delete PDP context request. |
| | | **echo-request** integer | | Rate limit (packets/s) for echo request. |
| | **message-rate-limit-v2** dictionary | | no description |
| | | **create-session-request** integer | | Rate limit (packets/s) for create session request. |
| | | **delete-session-request** integer | | Rate limit (packets/s) for delete session request. |
| | | **echo-request** integer | | Rate limit (packets/s) for echo request. |
| | **min-message-length** integer | | min message length |
| | **miss-must-ie** string | **Choices:*** allow
* deny
| Missing mandatory information element |
| | **monitor-mode** string | **Choices:*** disable
* enable
* vdom
| GTP monitor mode |
| | **name** string | | Profile name. |
| | **noip-filter** string | **Choices:*** disable
* enable
| non-IP filter for encapsulted traffic |
| | **noip-policy** list / elements=string | | no description |
| | | **action** string | **Choices:*** allow
* deny
| Action. |
| | | **end** integer | | End of protocol range (0 - 255). |
| | | **id** integer | | ID. |
| | | **start** integer | | Start of protocol range (0 - 255). |
| | | **type** string | **Choices:*** etsi
* ietf
| Protocol field type. |
| | **out-of-state-ie** string | **Choices:*** allow
* deny
| Out of state information element. |
| | **out-of-state-message** string | **Choices:*** allow
* deny
| Out of state GTP message |
| | **per-apn-shaper** list / elements=string | | no description |
| | | **apn** string | | APN name. |
| | | **id** integer | | ID. |
| | | **rate-limit** integer | | Rate limit (packets/s) for create PDP context request. |
| | | **version** integer | | GTP version number: 0 or 1. |
| | **policy** list / elements=string | | no description |
| | | **action** string | **Choices:*** allow
* deny
| Action. |
| | | **apn-sel-mode** list / elements=string | **Choices:*** ms
* net
* vrf
| no description |
| | | **apnmember** string | | APN member. |
| | | **id** integer | | ID. |
| | | **imei** string | | IMEI(SV) pattern. |
| | | **imsi** string | | IMSI prefix. |
| | | **imsi-prefix** string | | IMSI prefix. |
| | | **max-apn-restriction** string | **Choices:*** all
* public-1
* public-2
* private-1
* private-2
| Maximum APN restriction value. |
| | | **messages** list / elements=string | **Choices:*** create-req
* create-res
* update-req
* update-res
| no description |
| | | **msisdn** string | | MSISDN prefix. |
| | | **msisdn-prefix** string | | MSISDN prefix. |
| | | **rai** string | | RAI pattern. |
| | | **rat-type** list / elements=string | **Choices:*** any
* utran
* geran
* wlan
* gan
* hspa
* eutran
* virtual
* nbiot
| no description |
| | | **uli** string | | ULI pattern. |
| | **policy-filter** string | **Choices:*** disable
* enable
| Advanced policy filter |
| | **policy-v2** list / elements=string | | no description |
| | | **action** string | **Choices:*** deny
* allow
| Action. |
| | | **apn-sel-mode** list / elements=string | **Choices:*** ms
* net
* vrf
| no description |
| | | **apnmember** string | | APN member. |
| | | **id** integer | | ID. |
| | | **imsi-prefix** string | | IMSI prefix. |
| | | **max-apn-restriction** string | **Choices:*** all
* public-1
* public-2
* private-1
* private-2
| Maximum APN restriction value. |
| | | **mei** string | | MEI pattern. |
| | | **messages** list / elements=string | **Choices:*** create-ses-req
* create-ses-res
* modify-bearer-req
* modify-bearer-res
| no description |
| | | **msisdn-prefix** string | | MSISDN prefix. |
| | | **rat-type** list / elements=string | **Choices:*** any
* utran
* geran
* wlan
* gan
* hspa
* eutran
* virtual
* nbiot
* ltem
* nr
| no description |
| | | **uli** string | | no description |
| | **port-notify** integer | | overbilling notify port |
| | **rate-limit-mode** string | **Choices:*** per-profile
* per-stream
* per-apn
| GTP rate limit mode. |
| | **rate-limited-log** string | **Choices:*** disable
* enable
| log rate limited |
| | **rate-sampling-interval** integer | | rate sampling interval (1-3600 seconds) |
| | **remove-if-echo-expires** string | **Choices:*** disable
* enable
| remove if echo response expires |
| | **remove-if-recovery-differ** string | **Choices:*** disable
* enable
| remove upon different Recovery IE |
| | **reserved-ie** string | **Choices:*** allow
* deny
| reserved information element |
| | **send-delete-when-timeout** string | **Choices:*** disable
* enable
| send DELETE request to path endpoints when GTPv0/v1 tunnel timeout. |
| | **send-delete-when-timeout-v2** string | **Choices:*** disable
* enable
| send DELETE request to path endpoints when GTPv2 tunnel timeout. |
| | **spoof-src-addr** string | **Choices:*** allow
* deny
| Spoofed source address for Mobile Station. |
| | **state-invalid-log** string | **Choices:*** disable
* enable
| log state invalid |
| | **sub-second-interval** string | **Choices:*** 0.1
* 0.25
* 0.5
| Sub-second interval (0.1, 0.25, or 0.5 sec, default = 0.5). |
| | **sub-second-sampling** string | **Choices:*** disable
* enable
| Enable/disable sub-second sampling. |
| | **traffic-count-log** string | **Choices:*** disable
* enable
| log tunnel traffic counter |
| | **tunnel-limit** integer | | tunnel limit |
| | **tunnel-limit-log** string | **Choices:*** disable
* enable
| tunnel limit |
| | **tunnel-timeout** integer | | Established tunnel timeout (in seconds). |
| | **unknown-version-action** string | **Choices:*** allow
* deny
| action for unknown gtp version |
| | **user-plane-message-rate-limit** integer | | user plane message rate limit |
| | **warning-threshold** integer | | Warning threshold for rate limiting (0 - 99 percent). |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure GTP.
fmgr_firewall_gtp:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
firewall_gtp:
addr-notify: <value of string>
apn:
-
action: <value in [allow, deny]>
apnmember: <value of string>
id: <value of integer>
selection-mode:
- ms
- net
- vrf
apn-filter: <value in [disable, enable]>
authorized-ggsns: <value of string>
authorized-sgsns: <value of string>
comment: <value of string>
context-id: <value of integer>
control-plane-message-rate-limit: <value of integer>
default-apn-action: <value in [allow, deny]>
default-imsi-action: <value in [allow, deny]>
default-ip-action: <value in [allow, deny]>
default-noip-action: <value in [allow, deny]>
default-policy-action: <value in [allow, deny]>
denied-log: <value in [disable, enable]>
echo-request-interval: <value of integer>
extension-log: <value in [disable, enable]>
forwarded-log: <value in [disable, enable]>
global-tunnel-limit: <value of string>
gtp-in-gtp: <value in [allow, deny]>
gtpu-denied-log: <value in [disable, enable]>
gtpu-forwarded-log: <value in [disable, enable]>
gtpu-log-freq: <value of integer>
half-close-timeout: <value of integer>
half-open-timeout: <value of integer>
handover-group: <value of string>
ie-remove-policy:
-
id: <value of integer>
remove-ies:
- apn-restriction
- rat-type
- rai
- uli
- imei
sgsn-addr: <value of string>
sgsn-addr6: <value of string>
ie-remover: <value in [disable, enable]>
ie-white-list-v0v1: <value of string>
ie-white-list-v2: <value of string>
imsi:
-
action: <value in [allow, deny]>
apnmember: <value of string>
id: <value of integer>
mcc-mnc: <value of string>
msisdn-prefix: <value of string>
selection-mode:
- ms
- net
- vrf
imsi-filter: <value in [disable, enable]>
interface-notify: <value of string>
invalid-reserved-field: <value in [allow, deny]>
invalid-sgsns-to-log: <value of string>
ip-filter: <value in [disable, enable]>
ip-policy:
-
action: <value in [allow, deny]>
dstaddr: <value of string>
id: <value of integer>
srcaddr: <value of string>
dstaddr6: <value of string>
srcaddr6: <value of string>
log-freq: <value of integer>
log-gtpu-limit: <value of integer>
log-imsi-prefix: <value of string>
log-msisdn-prefix: <value of string>
max-message-length: <value of integer>
message-filter-v0v1: <value of string>
message-filter-v2: <value of string>
min-message-length: <value of integer>
miss-must-ie: <value in [allow, deny]>
monitor-mode: <value in [disable, enable, vdom]>
name: <value of string>
noip-filter: <value in [disable, enable]>
noip-policy:
-
action: <value in [allow, deny]>
end: <value of integer>
id: <value of integer>
start: <value of integer>
type: <value in [etsi, ietf]>
out-of-state-ie: <value in [allow, deny]>
out-of-state-message: <value in [allow, deny]>
per-apn-shaper:
-
apn: <value of string>
id: <value of integer>
rate-limit: <value of integer>
version: <value of integer>
policy:
-
action: <value in [allow, deny]>
apn-sel-mode:
- ms
- net
- vrf
apnmember: <value of string>
id: <value of integer>
imei: <value of string>
imsi: <value of string>
max-apn-restriction: <value in [all, public-1, public-2, ...]>
messages:
- create-req
- create-res
- update-req
- update-res
msisdn: <value of string>
rai: <value of string>
rat-type:
- any
- utran
- geran
- wlan
- gan
- hspa
- eutran
- virtual
- nbiot
uli: <value of string>
imsi-prefix: <value of string>
msisdn-prefix: <value of string>
policy-filter: <value in [disable, enable]>
port-notify: <value of integer>
rate-limit-mode: <value in [per-profile, per-stream, per-apn]>
rate-limited-log: <value in [disable, enable]>
rate-sampling-interval: <value of integer>
remove-if-echo-expires: <value in [disable, enable]>
remove-if-recovery-differ: <value in [disable, enable]>
reserved-ie: <value in [allow, deny]>
send-delete-when-timeout: <value in [disable, enable]>
send-delete-when-timeout-v2: <value in [disable, enable]>
spoof-src-addr: <value in [allow, deny]>
state-invalid-log: <value in [disable, enable]>
traffic-count-log: <value in [disable, enable]>
tunnel-limit: <value of integer>
tunnel-limit-log: <value in [disable, enable]>
tunnel-timeout: <value of integer>
unknown-version-action: <value in [allow, deny]>
user-plane-message-rate-limit: <value of integer>
warning-threshold: <value of integer>
policy-v2:
-
action: <value in [deny, allow]>
apn-sel-mode:
- ms
- net
- vrf
apnmember: <value of string>
id: <value of integer>
imsi-prefix: <value of string>
max-apn-restriction: <value in [all, public-1, public-2, ...]>
mei: <value of string>
messages:
- create-ses-req
- create-ses-res
- modify-bearer-req
- modify-bearer-res
msisdn-prefix: <value of string>
rat-type:
- any
- utran
- geran
- wlan
- gan
- hspa
- eutran
- virtual
- nbiot
- ltem
- nr
uli: <value of string>
sub-second-interval: <value in [0.1, 0.25, 0.5]>
sub-second-sampling: <value in [disable, enable]>
authorized-ggsns6: <value of string>
authorized-sgsns6: <value of string>
handover-group6: <value of string>
invalid-sgsns6-to-log: <value of string>
ie-validation:
apn-restriction: <value in [disable, enable]>
charging-ID: <value in [disable, enable]>
charging-gateway-addr: <value in [disable, enable]>
end-user-addr: <value in [disable, enable]>
gsn-addr: <value in [disable, enable]>
imei: <value in [disable, enable]>
imsi: <value in [disable, enable]>
mm-context: <value in [disable, enable]>
ms-tzone: <value in [disable, enable]>
ms-validated: <value in [disable, enable]>
msisdn: <value in [disable, enable]>
nsapi: <value in [disable, enable]>
pdp-context: <value in [disable, enable]>
qos-profile: <value in [disable, enable]>
rai: <value in [disable, enable]>
rat-type: <value in [disable, enable]>
reordering-required: <value in [disable, enable]>
selection-mode: <value in [disable, enable]>
uli: <value in [disable, enable]>
message-rate-limit:
create-aa-pdp-request: <value of integer>
create-aa-pdp-response: <value of integer>
create-mbms-request: <value of integer>
create-mbms-response: <value of integer>
create-pdp-request: <value of integer>
create-pdp-response: <value of integer>
delete-aa-pdp-request: <value of integer>
delete-aa-pdp-response: <value of integer>
delete-mbms-request: <value of integer>
delete-mbms-response: <value of integer>
delete-pdp-request: <value of integer>
delete-pdp-response: <value of integer>
echo-reponse: <value of integer>
echo-request: <value of integer>
error-indication: <value of integer>
failure-report-request: <value of integer>
failure-report-response: <value of integer>
fwd-reloc-complete-ack: <value of integer>
fwd-relocation-complete: <value of integer>
fwd-relocation-request: <value of integer>
fwd-relocation-response: <value of integer>
fwd-srns-context: <value of integer>
fwd-srns-context-ack: <value of integer>
g-pdu: <value of integer>
identification-request: <value of integer>
identification-response: <value of integer>
mbms-de-reg-request: <value of integer>
mbms-de-reg-response: <value of integer>
mbms-notify-rej-request: <value of integer>
mbms-notify-rej-response: <value of integer>
mbms-notify-request: <value of integer>
mbms-notify-response: <value of integer>
mbms-reg-request: <value of integer>
mbms-reg-response: <value of integer>
mbms-ses-start-request: <value of integer>
mbms-ses-start-response: <value of integer>
mbms-ses-stop-request: <value of integer>
mbms-ses-stop-response: <value of integer>
note-ms-request: <value of integer>
note-ms-response: <value of integer>
pdu-notify-rej-request: <value of integer>
pdu-notify-rej-response: <value of integer>
pdu-notify-request: <value of integer>
pdu-notify-response: <value of integer>
ran-info: <value of integer>
relocation-cancel-request: <value of integer>
relocation-cancel-response: <value of integer>
send-route-request: <value of integer>
send-route-response: <value of integer>
sgsn-context-ack: <value of integer>
sgsn-context-request: <value of integer>
sgsn-context-response: <value of integer>
support-ext-hdr-notify: <value of integer>
update-mbms-request: <value of integer>
update-mbms-response: <value of integer>
update-pdp-request: <value of integer>
update-pdp-response: <value of integer>
version-not-support: <value of integer>
message-rate-limit-v0:
create-pdp-request: <value of integer>
delete-pdp-request: <value of integer>
echo-request: <value of integer>
message-rate-limit-v1:
create-pdp-request: <value of integer>
delete-pdp-request: <value of integer>
echo-request: <value of integer>
message-rate-limit-v2:
create-session-request: <value of integer>
delete-session-request: <value of integer>
echo-request: <value of integer>
ie-allow-list-v0v1: <value of string>
ie-allow-list-v2: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_emailfilter_bwl_entries β Anti-spam black/white list entries. fortinet.fortimanager.fmgr\_emailfilter\_bwl\_entries β Anti-spam black/white list entries.
===========================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_emailfilter_bwl_entries`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bwl** string / required | | the parameter (bwl) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **emailfilter\_bwl\_entries** dictionary | | the top level parameters set |
| | **action** string | **Choices:*** spam
* clear
* reject
| Reject, mark as spam or good email. |
| | **addr-type** string | **Choices:*** ipv4
* ipv6
| IP address type. |
| | **email-pattern** string | | Email address pattern. |
| | **id** integer | | Entry ID. |
| | **ip4-subnet** string | | IPv4 network address/subnet mask bits. |
| | **ip6-subnet** string | | IPv6 network address/subnet mask bits. |
| | **pattern-type** string | **Choices:*** wildcard
* regexp
| Wildcard pattern or regular expression. |
| | **status** string | **Choices:*** disable
* enable
| Enable/disable status. |
| | **type** string | **Choices:*** ip
* email
| Entry type. |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Anti-spam black/white list entries.
fmgr_emailfilter_bwl_entries:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
bwl: <your own value>
state: <value in [present, absent]>
emailfilter_bwl_entries:
action: <value in [spam, clear, reject]>
addr-type: <value in [ipv4, ipv6]>
email-pattern: <value of string>
id: <value of integer>
ip4-subnet: <value of string>
ip6-subnet: <value of string>
pattern-type: <value in [wildcard, regexp]>
status: <value in [disable, enable]>
type: <value in [ip, email]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_dvmdb_script_objectmember β Script table. fortinet.fortimanager.fmgr\_dvmdb\_script\_objectmember β Script table.
=======================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_dvmdb_script_objectmember`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **dvmdb\_script\_objectmember** dictionary | | the top level parameters set |
| | **name** string | | no description |
| | **vdom** string | | no description |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **script** string / required | | the parameter (script) in requested url |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Script table.
fmgr_dvmdb_script_objectmember:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
script: <your own value>
state: <value in [present, absent]>
dvmdb_script_objectmember:
name: <value of string>
vdom: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_pm_config_workspace_unlock β Unlock an ADOM. fortinet.fortimanager.fmgr\_pm\_config\_workspace\_unlock β Unlock an ADOM.
===========================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_pm_config_workspace_unlock`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Unlock an ADOM.
fmgr_pm_config_workspace_unlock:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_pm_wanprof_pkg β no description fortinet.fortimanager.fmgr\_pm\_wanprof\_pkg β no description
=============================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_pm_wanprof_pkg`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **pkg\_path** string / required | | the parameter (pkg\_path) in requested url |
| **pm\_wanprof\_pkg** dictionary | | the top level parameters set |
| | **description** string | | no description |
| | **name** string | | no description |
| | **oid** integer | | no description |
| | **scope member** list / elements=string | | no description |
| | | **name** string | | no description |
| | | **vdom** string | | no description |
| | **type** string | **Choices:*** wanprof
| no description |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: no description
fmgr_pm_wanprof_pkg:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
pkg_path: <your own value>
state: <value in [present, absent]>
pm_wanprof_pkg:
description: <value of string>
name: <value of string>
oid: <value of integer>
scope member:
-
name: <value of string>
vdom: <value of string>
type: <value in [wanprof]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_fsp_vlan_dynamicmapping_dhcpserver_options β DHCP options. fortinet.fortimanager.fmgr\_fsp\_vlan\_dynamicmapping\_dhcpserver\_options β DHCP options.
==========================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_fsp_vlan_dynamicmapping_dhcpserver_options`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **dynamic\_mapping** string / required | | the parameter (dynamic\_mapping) in requested url |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **fsp\_vlan\_dynamicmapping\_dhcpserver\_options** dictionary | | the top level parameters set |
| | **code** integer | | no description |
| | **id** integer | | no description |
| | **ip** string | | no description |
| | **type** string | **Choices:*** hex
* string
* ip
* fqdn
| no description |
| | **value** string | | no description |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **vlan** string / required | | the parameter (vlan) in requested url |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: DHCP options.
fmgr_fsp_vlan_dynamicmapping_dhcpserver_options:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
vlan: <your own value>
dynamic_mapping: <your own value>
state: <value in [present, absent]>
fsp_vlan_dynamicmapping_dhcpserver_options:
code: <value of integer>
id: <value of integer>
ip: <value of string>
type: <value in [hex, string, ip, ...]>
value: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_firewall_mmsprofile_outbreakprevention β Configure Virus Outbreak Prevention settings. fortinet.fortimanager.fmgr\_firewall\_mmsprofile\_outbreakprevention β Configure Virus Outbreak Prevention settings.
====================================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_mmsprofile_outbreakprevention`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_mmsprofile\_outbreakprevention** dictionary | | the top level parameters set |
| | **external-blocklist** string | **Choices:*** disable
* enable
| Enable/disable external malware blocklist. |
| | **ftgd-service** string | **Choices:*** disable
* enable
| Enable/disable FortiGuard Virus outbreak prevention service. |
| **mms-profile** string / required | | the parameter (mms-profile) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure Virus Outbreak Prevention settings.
fmgr_firewall_mmsprofile_outbreakprevention:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
mms-profile: <your own value>
firewall_mmsprofile_outbreakprevention:
external-blocklist: <value in [disable, enable]>
ftgd-service: <value in [disable, enable]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_firewall_gtp_policy β Policy. fortinet.fortimanager.fmgr\_firewall\_gtp\_policy β Policy.
===========================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_gtp_policy`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_gtp\_policy** dictionary | | the top level parameters set |
| | **action** string | **Choices:*** allow
* deny
| Action. |
| | **apn-sel-mode** list / elements=string | **Choices:*** ms
* net
* vrf
| no description |
| | **apnmember** string | | APN member. |
| | **id** integer | | ID. |
| | **imei** string | | IMEI(SV) pattern. |
| | **imsi** string | | IMSI prefix. |
| | **imsi-prefix** string | | IMSI prefix. |
| | **max-apn-restriction** string | **Choices:*** all
* public-1
* public-2
* private-1
* private-2
| Maximum APN restriction value. |
| | **messages** list / elements=string | **Choices:*** create-req
* create-res
* update-req
* update-res
| no description |
| | **msisdn** string | | MSISDN prefix. |
| | **msisdn-prefix** string | | MSISDN prefix. |
| | **rai** string | | RAI pattern. |
| | **rat-type** list / elements=string | **Choices:*** any
* utran
* geran
* wlan
* gan
* hspa
* eutran
* virtual
* nbiot
| no description |
| | **uli** string | | ULI pattern. |
| **gtp** string / required | | the parameter (gtp) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Policy.
fmgr_firewall_gtp_policy:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
gtp: <your own value>
state: <value in [present, absent]>
firewall_gtp_policy:
action: <value in [allow, deny]>
apn-sel-mode:
- ms
- net
- vrf
apnmember: <value of string>
id: <value of integer>
imei: <value of string>
imsi: <value of string>
max-apn-restriction: <value in [all, public-1, public-2, ...]>
messages:
- create-req
- create-res
- update-req
- update-res
msisdn: <value of string>
rai: <value of string>
rat-type:
- any
- utran
- geran
- wlan
- gan
- hspa
- eutran
- virtual
- nbiot
uli: <value of string>
imsi-prefix: <value of string>
msisdn-prefix: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_fsp_vlan_dhcpserver_excluderange β Exclude one or more ranges of IP addresses from being assigned to clients. fortinet.fortimanager.fmgr\_fsp\_vlan\_dhcpserver\_excluderange β Exclude one or more ranges of IP addresses from being assigned to clients.
============================================================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_fsp_vlan_dhcpserver_excluderange`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **fsp\_vlan\_dhcpserver\_excluderange** dictionary | | the top level parameters set |
| | **end-ip** string | | no description |
| | **id** integer | | no description |
| | **start-ip** string | | no description |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **vlan** string / required | | the parameter (vlan) in requested url |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Exclude one or more ranges of IP addresses from being assigned to clients.
fmgr_fsp_vlan_dhcpserver_excluderange:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
vlan: <your own value>
state: <value in [present, absent]>
fsp_vlan_dhcpserver_excluderange:
end-ip: <value of string>
id: <value of integer>
start-ip: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_dvmdb_workspace_unlock_dev β Unlock a device. fortinet.fortimanager.fmgr\_dvmdb\_workspace\_unlock\_dev β Unlock a device.
============================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_dvmdb_workspace_unlock_dev`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **device\_name** string / required | | the parameter (device\_name) in requested url |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Unlock a device.
fmgr_dvmdb_workspace_unlock_dev:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
device_name: <your own value>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_firewall_internetserviceaddition_entry β Entries added to the Internet Service addition database. fortinet.fortimanager.fmgr\_firewall\_internetserviceaddition\_entry β Entries added to the Internet Service addition database.
===============================================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_internetserviceaddition_entry`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_internetserviceaddition\_entry** dictionary | | the top level parameters set |
| | **id** integer | | Entry ID(1-255). |
| | **port-range** list / elements=string | | no description |
| | | **end-port** integer | | Integer value for ending TCP/UDP/SCTP destination port in range (1 to 65535). |
| | | **id** integer | | Custom entry port range ID. |
| | | **start-port** integer | | Integer value for starting TCP/UDP/SCTP destination port in range (1 to 65535). |
| | **protocol** integer | | Integer value for the protocol type as defined by IANA (0 - 255). |
| **internet-service-addition** string / required | | the parameter (internet-service-addition) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Entries added to the Internet Service addition database.
fmgr_firewall_internetserviceaddition_entry:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
internet-service-addition: <your own value>
state: <value in [present, absent]>
firewall_internetserviceaddition_entry:
id: <value of integer>
port-range:
-
end-port: <value of integer>
id: <value of integer>
start-port: <value of integer>
protocol: <value of integer>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_credentialstore_domaincontroller β Define known domain controller servers. fortinet.fortimanager.fmgr\_credentialstore\_domaincontroller β Define known domain controller servers.
=======================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_credentialstore_domaincontroller`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **credentialstore\_domaincontroller** dictionary | | the top level parameters set |
| | **domain-name** string | | Fully qualified domain name (FQDN). |
| | **hostname** string | | Hostname of the server to connect to. |
| | **ip** string | | IPv4 server address. |
| | **ip6** string | | IPv6 server address. |
| | **password** string | | no description |
| | **port** integer | | Port number of service. Port number 0 indicates automatic discovery. |
| | **server-name** string | | Name of the server to connect to. |
| | **username** string | | User name to sign in with. Must have proper permissions for service. |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Define known domain controller servers.
fmgr_credentialstore_domaincontroller:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
credentialstore_domaincontroller:
domain-name: <value of string>
ip: <value of string>
ip6: <value of string>
password: <value of string>
port: <value of integer>
server-name: <value of string>
username: <value of string>
hostname: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_dvmdb_device β Device table, most attributes are read-only and can only be changed internally. fortinet.fortimanager.fmgr\_dvmdb\_device β Device table, most attributes are read-only and can only be changed internally.
===========================================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_dvmdb_device`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **device** string / required | | the parameter (device) in requested url |
| **dvmdb\_device** dictionary | | the top level parameters set |
| | **adm\_pass** string | | no description |
| | **adm\_usr** string | | no description |
| | **app\_ver** string | | no description |
| | **av\_ver** string | | no description |
| | **beta** integer | | no description |
| | **branch\_pt** integer | | no description |
| | **build** integer | | no description |
| | **checksum** string | | no description |
| | **conf\_status** string | **Choices:*** **unknown** β
* insync
* outofsync
| no description |
| | **conn\_mode** string | **Choices:*** active
* **passive** β
| no description |
| | **conn\_status** string | **Choices:*** **UNKNOWN** β
* up
* down
| no description |
| | **db\_status** string | **Choices:*** **unknown** β
* nomod
* mod
| no description |
| | **desc** string | | no description |
| | **dev\_status** string | **Choices:*** none
* **unknown** β
* checkedin
* inprogress
* installed
* aborted
* sched
* retry
* canceled
* pending
* retrieved
* changed\_conf
* sync\_fail
* timeout
* rev\_revert
* auto\_updated
| no description |
| | **fap\_cnt** integer | | no description |
| | **faz.full\_act** integer | | no description |
| | **faz.perm** integer | | no description |
| | **faz.quota** integer | | no description |
| | **faz.used** integer | | no description |
| | **fex\_cnt** integer | | no description |
| | **flags** list / elements=string | **Choices:*** has\_hdd
* vdom\_enabled
* discover
* reload
* interim\_build
* offline\_mode
* is\_model
* fips\_mode
* linked\_to\_model
* ip-conflict
* faz-autosync
| no description |
| | **foslic\_cpu** integer | | VM Meter vCPU count. |
| | **foslic\_dr\_site** string | **Choices:*** **disable** β
* enable
| VM Meter DR Site status. |
| | **foslic\_inst\_time** integer | | VM Meter first deployment time (in UNIX timestamp). |
| | **foslic\_last\_sync** integer | | VM Meter last synchronized time (in UNIX timestamp). |
| | **foslic\_ram** integer | | VM Meter device RAM size (in MB). |
| | **foslic\_type** string | **Choices:*** **temporary** β
* trial
* regular
* trial\_expired
| VM Meter license type. |
| | **foslic\_utm** list / elements=string | **Choices:*** fw
* av
* ips
* app
* url
* utm
* fwb
| no description |
| | **fsw\_cnt** integer | | no description |
| | **ha\_group\_id** integer | | no description |
| | **ha\_group\_name** string | | no description |
| | **ha\_mode** string | **Choices:*** **standalone** β
* AP
* AA
* ELBC
* DUAL
* enabled
* unknown
* fmg-enabled
* autoscale
| enabled - Value reserved for non-FOS HA devices. |
| | **hdisk\_size** integer | | no description |
| | **hostname** string | | no description |
| | **hw\_rev\_major** integer | | no description |
| | **hw\_rev\_minor** integer | | no description |
| | **hyperscale** integer | | no description |
| | **ip** string | | no description |
| | **ips\_ext** integer | | no description |
| | **ips\_ver** string | | no description |
| | **last\_checked** integer | | no description |
| | **last\_resync** integer | | no description |
| | **latitude** string | | no description |
| | **lic\_flags** integer | | no description |
| | **lic\_region** string | | no description |
| | **location\_from** string | | no description |
| | **logdisk\_size** integer | | no description |
| | **longitude** string | | no description |
| | **maxvdom** integer | **Default:**10 | no description |
| | **meta fields** dictionary | | no description |
| | **mgmt\_id** integer | | no description |
| | **mgmt\_if** string | | no description |
| | **mgmt\_mode** string | **Choices:*** **unreg** β
* fmg
* faz
* fmgfaz
| no description |
| | **mgt\_vdom** string | | no description |
| | **module\_sn** string | | no description |
| | **mr** integer | **Default:**-1 | no description |
| | **name** string | | Unique name for the device. |
| | **nsxt\_service\_name** string | | no description |
| | **os\_type** string | **Choices:*** **unknown** β
* fos
* fsw
* foc
* fml
* faz
* fwb
* fch
* fct
* log
* fmg
* fsa
* fdd
* fac
* fpx
* fna
* fdc
* ffw
* fsr
* fad
* fap
* fxt
| no description |
| | **os\_ver** string | **Choices:*** **unknown** β
* 0.0
* 1.0
* 2.0
* 3.0
* 4.0
* 5.0
* 6.0
* 7.0
* 8.0
| no description |
| | **patch** integer | | no description |
| | **platform\_str** string | | no description |
| | **prefer\_img\_ver** string | | no description |
| | **prio** integer | | no description |
| | **private\_key** string | | no description |
| | **private\_key\_status** integer | | no description |
| | **psk** string | | no description |
| | **role** string | **Choices:*** **master** β
* ha-slave
* autoscale-slave
| no description |
| | **sn** string | | Unique value for each device. |
| | **vdom** list / elements=string | | no description |
| | | **comments** string | | no description |
| | | **meta fields** dictionary | | no description |
| | | **name** string | | no description |
| | | **opmode** string | **Choices:*** **nat** β
* transparent
| no description |
| | | **rtm\_prof\_id** integer | | no description |
| | | **status** string | | no description |
| | | **vpn\_id** integer | | no description |
| | **version** integer | | no description |
| | **vm\_cpu** integer | | no description |
| | **vm\_cpu\_limit** integer | | no description |
| | **vm\_lic\_expire** integer | | no description |
| | **vm\_mem** integer | | no description |
| | **vm\_mem\_limit** integer | | no description |
| | **vm\_status** integer | | no description |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Device table, most attributes are read-only and can only be changed internally.
fmgr_dvmdb_device:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
device: <your own value>
dvmdb_device:
adm_pass: <value of string>
adm_usr: <value of string>
app_ver: <value of string>
av_ver: <value of string>
beta: <value of integer>
branch_pt: <value of integer>
build: <value of integer>
checksum: <value of string>
conf_status: <value in [unknown, insync, outofsync]>
conn_mode: <value in [active, passive]>
conn_status: <value in [UNKNOWN, up, down]>
db_status: <value in [unknown, nomod, mod]>
desc: <value of string>
dev_status: <value in [none, unknown, checkedin, ...]>
fap_cnt: <value of integer>
faz.full_act: <value of integer>
faz.perm: <value of integer>
faz.quota: <value of integer>
faz.used: <value of integer>
fex_cnt: <value of integer>
flags:
- has_hdd
- vdom_enabled
- discover
- reload
- interim_build
- offline_mode
- is_model
- fips_mode
- linked_to_model
- ip-conflict
- faz-autosync
foslic_cpu: <value of integer>
foslic_dr_site: <value in [disable, enable]>
foslic_inst_time: <value of integer>
foslic_last_sync: <value of integer>
foslic_ram: <value of integer>
foslic_type: <value in [temporary, trial, regular, ...]>
foslic_utm:
- fw
- av
- ips
- app
- url
- utm
- fwb
fsw_cnt: <value of integer>
ha_group_id: <value of integer>
ha_group_name: <value of string>
ha_mode: <value in [standalone, AP, AA, ...]>
hdisk_size: <value of integer>
hostname: <value of string>
hw_rev_major: <value of integer>
hw_rev_minor: <value of integer>
ip: <value of string>
ips_ext: <value of integer>
ips_ver: <value of string>
last_checked: <value of integer>
last_resync: <value of integer>
latitude: <value of string>
lic_flags: <value of integer>
lic_region: <value of string>
location_from: <value of string>
logdisk_size: <value of integer>
longitude: <value of string>
maxvdom: <value of integer>
meta fields: <value of dict>
mgmt_id: <value of integer>
mgmt_if: <value of string>
mgmt_mode: <value in [unreg, fmg, faz, ...]>
mgt_vdom: <value of string>
mr: <value of integer>
name: <value of string>
os_type: <value in [unknown, fos, fsw, ...]>
os_ver: <value in [unknown, 0.0, 1.0, ...]>
patch: <value of integer>
platform_str: <value of string>
psk: <value of string>
sn: <value of string>
vdom:
-
comments: <value of string>
name: <value of string>
opmode: <value in [nat, transparent]>
rtm_prof_id: <value of integer>
status: <value of string>
vpn_id: <value of integer>
meta fields: <value of dict>
version: <value of integer>
vm_cpu: <value of integer>
vm_cpu_limit: <value of integer>
vm_lic_expire: <value of integer>
vm_mem: <value of integer>
vm_mem_limit: <value of integer>
vm_status: <value of integer>
module_sn: <value of string>
prefer_img_ver: <value of string>
prio: <value of integer>
role: <value in [master, ha-slave, autoscale-slave]>
hyperscale: <value of integer>
nsxt_service_name: <value of string>
private_key: <value of string>
private_key_status: <value of integer>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_dynamic_address_dynamicaddrmapping β no description fortinet.fortimanager.fmgr\_dynamic\_address\_dynamicaddrmapping β no description
=================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_dynamic_address_dynamicaddrmapping`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string / required | | the parameter (address) in requested url |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **dynamic\_address\_dynamicaddrmapping** dictionary | | the top level parameters set |
| | **addr** string | | no description |
| | **id** integer | | no description |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: no description
fmgr_dynamic_address_dynamicaddrmapping:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
address: <your own value>
state: <value in [present, absent]>
dynamic_address_dynamicaddrmapping:
addr: <value of string>
id: <value of integer>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_dynamic_address β no description fortinet.fortimanager.fmgr\_dynamic\_address β no description
=============================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_dynamic_address`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **dynamic\_address** dictionary | | the top level parameters set |
| | **default** string | | no description |
| | **description** string | | no description |
| | **dynamic\_addr\_mapping** list / elements=string | | no description |
| | | **addr** string | | no description |
| | | **id** integer | | no description |
| | **name** string | | no description |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: no description
fmgr_dynamic_address:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
dynamic_address:
default: <value of string>
description: <value of string>
dynamic_addr_mapping:
-
addr: <value of string>
id: <value of integer>
name: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_user_devicegroup β Configure device groups. fortinet.fortimanager.fmgr\_user\_devicegroup β Configure device groups.
========================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_user_devicegroup`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **user\_devicegroup** dictionary | | the top level parameters set |
| | **\_if\_unmanaged** integer | | no description |
| | **comment** string | | Comment. |
| | **dynamic\_mapping** list / elements=string | | no description |
| | | **\_if\_unmanaged** integer | | no description |
| | | **\_scope** list / elements=string | | no description |
| | | | **name** string | | no description |
| | | | **vdom** string | | no description |
| | | **comment** string | | no description |
| | | **member** list / elements=string | | no description |
| | **member** list / elements=string | | no description |
| | **name** string | | Device group name. |
| | **tagging** list / elements=string | | no description |
| | | **category** string | | Tag category. |
| | | **name** string | | Tagging entry name. |
| | | **tags** string | | no description |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure device groups.
fmgr_user_devicegroup:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
user_devicegroup:
_if_unmanaged: <value of integer>
comment: <value of string>
dynamic_mapping:
-
_if_unmanaged: <value of integer>
_scope:
-
name: <value of string>
vdom: <value of string>
comment: <value of string>
member: <value of list>
member: <value of list>
name: <value of string>
tagging:
-
category: <value of string>
name: <value of string>
tags: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_webfilter_contentheader β Configure content types used by Web filter. fortinet.fortimanager.fmgr\_webfilter\_contentheader β Configure content types used by Web filter.
==================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_webfilter_contentheader`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **webfilter\_contentheader** dictionary | | the top level parameters set |
| | **comment** string | | Optional comments. |
| | **entries** list / elements=string | | no description |
| | | **action** string | **Choices:*** exempt
* block
* allow
| Action to take for this content type. |
| | | **category** string | | Categories that this content type applies to. |
| | | **pattern** string | | Content type (regular expression). |
| | **id** integer | | ID. |
| | **name** string | | Name of table. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure content types used by Web filter.
fmgr_webfilter_contentheader:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
webfilter_contentheader:
comment: <value of string>
entries:
-
action: <value in [exempt, block, allow]>
category: <value of string>
pattern: <value of string>
id: <value of integer>
name: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_geoipoverride_iprange β Table of IP ranges assigned to country. fortinet.fortimanager.fmgr\_system\_geoipoverride\_iprange β Table of IP ranges assigned to country.
====================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_geoipoverride_iprange`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **geoip-override** string / required | | the parameter (geoip-override) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_geoipoverride\_iprange** dictionary | | the top level parameters set |
| | **end-ip** string | | Final IP address, inclusive, of the address range (format: xxx.xxx.xxx.xxx). |
| | **id** integer | | ID number for individual entry in the IP-Range table. |
| | **start-ip** string | | Starting IP address, inclusive, of the address range (format: xxx.xxx.xxx.xxx). |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Table of IP ranges assigned to country.
fmgr_system_geoipoverride_iprange:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
geoip-override: <your own value>
state: <value in [present, absent]>
system_geoipoverride_iprange:
end-ip: <value of string>
id: <value of integer>
start-ip: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
ansible fortinet.fortimanager.fmgr_devprof_system_replacemsg_alertmail β Replacement messages. fortinet.fortimanager.fmgr\_devprof\_system\_replacemsg\_alertmail β Replacement messages.
==========================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_devprof_system_replacemsg_alertmail`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **devprof** string / required | | the parameter (devprof) in requested url |
| **devprof\_system\_replacemsg\_alertmail** dictionary | | the top level parameters set |
| | **buffer** string | | Message string. |
| | **format** string | **Choices:*** none
* text
* html
* wml
| Format flag. |
| | **header** string | **Choices:*** none
* http
* 8bit
| Header flag. |
| | **msg-type** string | | Message type. |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Replacement messages.
fmgr_devprof_system_replacemsg_alertmail:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
devprof: <your own value>
devprof_system_replacemsg_alertmail:
buffer: <value of string>
format: <value in [none, text, html, ...]>
header: <value in [none, http, 8bit]>
msg-type: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_vpnsslweb_portal_splitdns β Split DNS for SSL VPN. fortinet.fortimanager.fmgr\_vpnsslweb\_portal\_splitdns β Split DNS for SSL VPN.
================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_vpnsslweb_portal_splitdns`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **portal** string / required | | the parameter (portal) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **vpnsslweb\_portal\_splitdns** dictionary | | the top level parameters set |
| | **dns-server1** string | | DNS server 1. |
| | **dns-server2** string | | DNS server 2. |
| | **domains** string | | Split DNS domains used for SSL-VPN clients separated by comma(,). |
| | **id** integer | | ID. |
| | **ipv6-dns-server1** string | | IPv6 DNS server 1. |
| | **ipv6-dns-server2** string | | IPv6 DNS server 2. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Split DNS for SSL VPN.
fmgr_vpnsslweb_portal_splitdns:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
portal: <your own value>
state: <value in [present, absent]>
vpnsslweb_portal_splitdns:
dns-server1: <value of string>
dns-server2: <value of string>
domains: <value of string>
id: <value of integer>
ipv6-dns-server1: <value of string>
ipv6-dns-server2: <value of 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 |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_firewall_profileprotocoloptions_dns β Configure DNS protocol options. fortinet.fortimanager.fmgr\_firewall\_profileprotocoloptions\_dns β Configure DNS protocol options.
===================================================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_firewall_profileprotocoloptions_dns`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **adom** string / required | | the parameter (adom) in requested url |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **firewall\_profileprotocoloptions\_dns** dictionary | | the top level parameters set |
| | **ports** integer | | no description |
| | **status** string | **Choices:*** disable
* enable
| Enable/disable the active status of scanning for this protocol. |
| **profile-protocol-options** string / required | | the parameter (profile-protocol-options) in requested url |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure DNS protocol options.
fmgr_firewall_profileprotocoloptions_dns:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
profile-protocol-options: <your own value>
firewall_profileprotocoloptions_dns:
ports: <value of integer>
status: <value in [disable, enable]>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
ansible fortinet.fortimanager.fmgr_system_admin_setting β Admin setting. fortinet.fortimanager.fmgr\_system\_admin\_setting β Admin setting.
===================================================================
Note
This plugin is part of the [fortinet.fortimanager collection](https://galaxy.ansible.com/fortinet/fortimanager) (version 2.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install fortinet.fortimanager`.
To use it in a playbook, specify: `fortinet.fortimanager.fmgr_system_admin_setting`.
New in version 2.10: of fortinet.fortimanager
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module is able to configure a FortiManager device.
* Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **bypass\_validation** boolean | **Choices:*** **no** β
* yes
| only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters |
| **enable\_log** boolean | **Choices:*** **no** β
* yes
| Enable/Disable logging for task |
| **proposed\_method** string | **Choices:*** update
* set
* add
| The overridden method for the underlying Json RPC request |
| **rc\_failed** list / elements=string | | the rc codes list with which the conditions to fail will be overriden |
| **rc\_succeeded** list / elements=string | | the rc codes list with which the conditions to succeed will be overriden |
| **state** string / required | **Choices:*** present
* absent
| the directive to create, update or delete an object |
| **system\_admin\_setting** dictionary | | the top level parameters set |
| | **access-banner** string | **Choices:*** **disable** β
* enable
| Enable/disable access banner. disable - Disable setting. enable - Enable setting. |
| | **admin-https-redirect** string | **Choices:*** disable
* **enable** β
| Enable/disable redirection of HTTP admin traffic to HTTPS. disable - Disable setting. enable - Enable setting. |
| | **admin-login-max** integer | **Default:**256 | Maximum number admin users logged in at one time (1 - 256). |
| | **admin\_server\_cert** string | **Default:**"server.crt" | HTTPS & Web Service server certificate. |
| | **allow\_register** string | **Choices:*** **disable** β
* enable
| Enable/disable allowance of register an unregistered device. disable - Disable setting. enable - Enable setting. |
| | **auth-addr** string | | IP which is used by FGT to authorize FMG. |
| | **auth-port** integer | **Default:**443 | Port which is used by FGT to authorize FMG. |
| | **auto-update** string | **Choices:*** disable
* **enable** β
| Enable/disable FortiGate automatic update. disable - Disable device automatic update. enable - Enable device automatic update. |
| | **banner-message** string | | Banner message. |
| | **chassis-mgmt** string | **Choices:*** **disable** β
* enable
| Enable or disable chassis management. disable - Disable setting. enable - Enable setting. |
| | **chassis-update-interval** integer | **Default:**15 | Chassis background update interval (4 - 1440 mins). |
| | **device\_sync\_status** string | **Choices:*** disable
* **enable** β
| Enable/disable device synchronization status indication. disable - Disable setting. enable - Enable setting. |
| | **gui-theme** string | **Choices:*** **blue** β
* green
* red
* melongene
* spring
* summer
* autumn
* winter
* space
* calla-lily
* binary-tunnel
* diving
* dreamy
* technology
* landscape
* twilight
* canyon
* northern-light
* astronomy
* fish
* penguin
* panda
* polar-bear
* parrot
* cave
* mountain
* zebra
* contrast-dark
* circuit-board
* mars
* blue-sea
| Color scheme to use for the administration GUI. blue - Blueberry green - Kiwi red - Cherry melongene - Plum spring - Spring summer - Summer autumn - Autumn winter - Winter space - Space calla-lily - Calla Lily binary-tunnel - Binary Tunnel diving - Diving dreamy - Dreamy technology - Technology landscape - Landscape twilight - Twilight canyon - Canyon northern-light - Northern Light astronomy - Astronomy fish - Fish penguin - Penguin panda - Panda polar-bear - Polar Bear parrot - Parrot cave - Cave |
| | **http\_port** integer | **Default:**80 | HTTP port. |
| | **https\_port** integer | **Default:**443 | HTTPS port. |
| | **idle\_timeout** integer | **Default:**15 | Idle timeout (1 - 480 min). |
| | **idle\_timeout\_api** integer | **Default:**900 | Idle timeout for API sessions (1 - 28800 sec). |
| | **idle\_timeout\_gui** integer | **Default:**900 | Idle timeout for GUI sessions (60 - 28800 sec). |
| | **install-ifpolicy-only** string | **Choices:*** **disable** β
* enable
| Allow install interface policy only. disable - Disable setting. enable - Enable setting. |
| | **mgmt-addr** string | | IP of FortiManager used by FGFM. |
| | **mgmt-fqdn** string | | FQDN of FortiManager used by FGFM. |
| | **objects-force-deletion** string | **Choices:*** disable
* **enable** β
| Enable/disable used objects force deletion. disable - Disable setting. enable - Enable setting. |
| | **offline\_mode** string | **Choices:*** **disable** β
* enable
| Enable/disable offline mode. disable - Disable offline mode. enable - Enable offline mode. |
| | **register\_passwd** string | | no description |
| | **sdwan-monitor-history** string | **Choices:*** **disable** β
* enable
| Enable/disable hostname display in the GUI login page. disable - Disable setting. enable - Enable setting. |
| | **sdwan-skip-unmapped-input-device** string | **Choices:*** **disable** β
* enable
| Skip unmapped interface for sdwan/rule/input-device instead of report mapping error. disable - Disable setting. enable - Enable setting. |
| | **shell-access** string | **Choices:*** **disable** β
* enable
| Enable/disable shell access. disable - Disable setting. enable - Enable setting. |
| | **shell-password** string | | no description |
| | **show-add-multiple** string | **Choices:*** **disable** β
* enable
| Show add multiple button. disable - Disable setting. enable - Enable setting. |
| | **show-adom-devman** string | **Choices:*** disable
* **enable** β
| Show ADOM device manager tools on GUI. disable - Hide device manager tools on GUI. enable - Show device manager tools on GUI. |
| | **show-checkbox-in-table** string | **Choices:*** **disable** β
* enable
| Show checkboxs in tables on GUI. disable - Disable setting. enable - Enable setting. |
| | **show-device-import-export** string | **Choices:*** **disable** β
* enable
| Enable/disable import/export of ADOM, device, and group lists. disable - Disable setting. enable - Enable setting. |
| | **show-fct-manager** string | **Choices:*** **disable** β
* enable
| Enable/disable FCT manager. disable - Disable setting. enable - Enable setting. |
| | **show-hostname** string | **Choices:*** **disable** β
* enable
| Enable/disable hostname display in the GUI login page. disable - Disable setting. enable - Enable setting. |
| | **show\_automatic\_script** string | **Choices:*** **disable** β
* enable
| Enable/disable automatic script. disable - Disable script option. enable - Enable script option. |
| | **show\_grouping\_script** string | **Choices:*** disable
* **enable** β
| Enable/disable grouping script. disable - Disable script option. enable - Enable script option. |
| | **show\_schedule\_script** string | **Choices:*** **disable** β
* enable
| Enable or disable schedule script. disable - Disable script option. enable - Enable script option. |
| | **show\_tcl\_script** string | **Choices:*** **disable** β
* enable
| Enable/disable TCL script. disable - Disable script option. enable - Enable script option. |
| | **unreg\_dev\_opt** string | **Choices:*** add\_no\_service
* ignore
* **add\_allow\_service** β
| Action to take when unregistered device connects to FortiManager. add\_no\_service - Add unregistered devices but deny service requests. ignore - Ignore unregistered devices. add\_allow\_service - Add unregistered devices and allow service requests. |
| | **webadmin\_language** string | **Choices:*** **auto\_detect** β
* english
* simplified\_chinese
* traditional\_chinese
* japanese
* korean
* spanish
| Web admin language. auto\_detect - Automatically detect language. english - English. simplified\_chinese - Simplified Chinese. traditional\_chinese - Traditional Chinese. japanese - Japanese. korean - Korean. spanish - Spanish. |
| **workspace\_locking\_adom** string | | the adom to lock for FortiManager running in workspace mode, the value can be global and others including root |
| **workspace\_locking\_timeout** integer | **Default:**300 | the maximum time in seconds to wait for other user to release the workspace lock |
Notes
-----
Note
* Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace\_locking\_adom and workspace\_locking\_timeout help do the work.
* To create or update an object, use state present directive.
* To delete an object, use state absent directive.
* Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc\_failed and rc\_succeeded
Examples
--------
```
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Admin setting.
fmgr_system_admin_setting:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
system_admin_setting:
access-banner: <value in [disable, enable]>
admin-https-redirect: <value in [disable, enable]>
admin-login-max: <value of integer>
admin_server_cert: <value of string>
allow_register: <value in [disable, enable]>
auto-update: <value in [disable, enable]>
banner-message: <value of string>
chassis-mgmt: <value in [disable, enable]>
chassis-update-interval: <value of integer>
device_sync_status: <value in [disable, enable]>
gui-theme: <value in [blue, green, red, ...]>
http_port: <value of integer>
https_port: <value of integer>
idle_timeout: <value of integer>
install-ifpolicy-only: <value in [disable, enable]>
mgmt-addr: <value of string>
mgmt-fqdn: <value of string>
objects-force-deletion: <value in [disable, enable]>
offline_mode: <value in [disable, enable]>
register_passwd: <value of string>
sdwan-monitor-history: <value in [disable, enable]>
shell-access: <value in [disable, enable]>
shell-password: <value of string>
show-add-multiple: <value in [disable, enable]>
show-adom-devman: <value in [disable, enable]>
show-checkbox-in-table: <value in [disable, enable]>
show-device-import-export: <value in [disable, enable]>
show-hostname: <value in [disable, enable]>
show_automatic_script: <value in [disable, enable]>
show_grouping_script: <value in [disable, enable]>
show_schedule_script: <value in [disable, enable]>
show_tcl_script: <value in [disable, enable]>
unreg_dev_opt: <value in [add_no_service, ignore, add_allow_service]>
webadmin_language: <value in [auto_detect, english, simplified_chinese, ...]>
show-fct-manager: <value in [disable, enable]>
sdwan-skip-unmapped-input-device: <value in [disable, enable]>
auth-addr: <value of string>
auth-port: <value of integer>
idle_timeout_api: <value of integer>
idle_timeout_gui: <value of integer>
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **request\_url** string | always | The full url requested **Sample:** /sys/login/user |
| **response\_code** integer | always | The status of api request |
| **response\_message** string | always | The descriptive message of the api response **Sample:** OK. |
### Authors
* Link Zheng (@chillancezen)
* Jie Xue (@JieX19)
* Frank Shen (@fshen01)
* Hongbin Lu (@fgtdev-hblu)
| programming_docs |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.