:source: fortios_vpn_ocvpn.py
:orphan:
.. fortios_vpn_ocvpn:
fortios_vpn_ocvpn -- Configure Overlay Controller VPN settings in Fortinet's FortiOS and FortiGate.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.. versionadded:: 2.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify vpn feature and ocvpn category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0
Requirements
------------
The below requirements are needed on the host that executes this module.
- ansible>=2.15
Tips
----
Using member operation to add an element to an existing object.
FortiOS Version Compatibility
-----------------------------
Supported Version Ranges: v6.0.0 -> v7.2.4
Parameters
----------
.. raw:: html
- access_token - Token-based authentication. Generated from GUI of Fortigate. type: str required: false
- enable_log - Enable/Disable logging for task. type: bool required: false default: False
- vdom - Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit. type: str default: root
- member_path - Member attribute path to operate on. type: str
- member_state - Add or delete a member under specified attribute path. type: str choices: present, absent
- vpn_ocvpn - Configure Overlay Controller VPN settings. type: dict
more...
| Supported Version Ranges |
| vpn_ocvpn |
v6.0.0 -> v7.2.4 |
- auto_discovery - Enable/disable auto-discovery shortcuts. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| auto_discovery |
v6.2.0 -> v7.2.4 |
| [enable] |
v6.2.0 -> v7.2.4 |
| [disable] |
v6.2.0 -> v7.2.4 |
- auto_discovery_shortcut_mode - Control deletion of child short-cut tunnels when the parent tunnel goes down. type: str choices: independent, dependent
more...
|
Supported Version Ranges |
| auto_discovery_shortcut_mode |
v7.0.1 -> v7.2.4 |
| [independent] |
v7.0.1 -> v7.2.4 |
| [dependent] |
v7.0.1 -> v7.2.4 |
- eap - Enable/disable EAP client authentication. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| eap |
v6.2.0 -> v7.2.4 |
| [enable] |
v6.2.0 -> v7.2.4 |
| [disable] |
v6.2.0 -> v7.2.4 |
- eap_users - EAP authentication user group. Source user.group.name. type: str
more...
|
Supported Version Ranges |
| eap_users |
v6.2.0 -> v7.2.4 |
- forticlient_access - Configure FortiClient settings. type: dict
more...
| Supported Version Ranges |
| forticlient_access |
v6.4.0 -> v7.2.4 |
- auth_groups - FortiClient user authentication groups. type: list member_path: forticlient_access/auth_groups:name
more...
| Supported Version Ranges |
| auth_groups |
v6.4.0 -> v7.2.4 |
- auth_group - Authentication user group for FortiClient access. Source user.group.name. type: str
more...
|
Supported Version Ranges |
| auth_group |
v6.4.0 -> v7.2.4 |
- name - Group name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.4.0 -> v7.2.4 |
- overlays - OCVPN overlays to allow access to. type: list member_path: forticlient_access/auth_groups:name/overlays:overlay_name
more...
| Supported Version Ranges |
| overlays |
v6.4.0 -> v7.2.4 |
- overlay_name - Overlay name. Source vpn.ocvpn.overlays.overlay-name. type: str required: true
more...
|
Supported Version Ranges |
| overlay_name |
v6.4.0 -> v7.2.4 |
- psksecret - Pre-shared secret for FortiClient PSK authentication (ASCII string or hexadecimal encoded with a leading 0x). type: str
more...
|
Supported Version Ranges |
| psksecret |
v6.4.0 -> v7.2.4 |
- status - Enable/disable FortiClient to access OCVPN networks. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.4.0 -> v7.2.4 |
| [enable] |
v6.4.0 -> v7.2.4 |
| [disable] |
v6.4.0 -> v7.2.4 |
- ha_alias - Hidden HA alias. type: str
more...
|
Supported Version Ranges |
| ha_alias |
v6.0.0 -> v6.0.11 |
v6.2.3 -> v6.2.3 |
- ip_allocation_block - Class B subnet reserved for private IP address assignment. type: str
more...
|
Supported Version Ranges |
| ip_allocation_block |
v6.4.0 -> v7.2.4 |
- multipath - Enable/disable multipath redundancy. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| multipath |
v6.4.0 -> v7.2.4 |
| [enable] |
v6.4.0 -> v7.2.4 |
| [disable] |
v6.4.0 -> v7.2.4 |
- nat - Enable/disable NAT support. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| nat |
v6.2.0 -> v7.2.4 |
| [enable] |
v6.2.0 -> v7.2.4 |
| [disable] |
v6.2.0 -> v7.2.4 |
- overlays - Network overlays to register with Overlay Controller VPN service. type: list member_path: overlays:overlay_name
more...
| Supported Version Ranges |
| overlays |
v6.2.0 -> v7.2.4 |
- assign_ip - Enable/disable mode-cfg address assignment. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| assign_ip |
v6.2.0 -> v7.0.0 |
| [enable] |
v6.2.0 -> v7.0.0 |
| [disable] |
v6.2.0 -> v7.0.0 |
- id - ID. type: int
more...
|
Supported Version Ranges |
| id |
v6.2.0 -> v6.2.7 |
- inter_overlay - Allow or deny traffic from other overlays. type: str choices: allow, deny
more...
|
Supported Version Ranges |
| inter_overlay |
v6.4.0 -> v7.2.4 |
| [allow] |
v6.4.0 -> v7.2.4 |
| [deny] |
v6.4.0 -> v7.2.4 |
- ipv4_end_ip - End of IPv4 range. type: str
more...
|
Supported Version Ranges |
| ipv4_end_ip |
v6.2.0 -> v7.0.0 |
- ipv4_start_ip - Start of IPv4 range. type: str
more...
|
Supported Version Ranges |
| ipv4_start_ip |
v6.2.0 -> v7.0.0 |
- name - Overlay name. type: str
more...
|
Supported Version Ranges |
| name |
v6.2.0 -> v6.2.7 |
- overlay_name - Overlay name. type: str required: true
more...
|
Supported Version Ranges |
| overlay_name |
v6.4.0 -> v7.2.4 |
- subnets - Internal subnets to register with OCVPN service. type: list member_path: overlays:overlay_name/subnets:id
more...
| Supported Version Ranges |
| subnets |
v6.2.0 -> v7.2.4 |
- id - ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.2.0 -> v7.2.4 |
- interface - LAN interface. Source system.interface.name. type: str
more...
|
Supported Version Ranges |
| interface |
v6.2.0 -> v7.2.4 |
- subnet - IPv4 address and subnet mask. type: str
more...
|
Supported Version Ranges |
| subnet |
v6.2.0 -> v7.2.4 |
- type - Subnet type. type: str choices: subnet, interface
more...
|
Supported Version Ranges |
| type |
v6.2.0 -> v7.2.4 |
| [subnet] |
v6.2.0 -> v7.2.4 |
| [interface] |
v6.2.0 -> v7.2.4 |
- poll_interval - Overlay Controller VPN polling interval. type: int
more...
|
Supported Version Ranges |
| poll_interval |
v6.0.0 -> v7.2.4 |
- role - Set device role. type: str choices: spoke, primary-hub, secondary-hub
more...
|
Supported Version Ranges |
| role |
v6.2.0 -> v7.2.4 |
| [spoke] |
v6.2.0 -> v7.2.4 |
| [primary-hub] |
v6.2.0 -> v7.2.4 |
| [secondary-hub] |
v6.2.0 -> v7.2.4 |
- sdwan - Enable/disable adding OCVPN tunnels to SD-WAN. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| sdwan |
v6.4.0 -> v7.2.4 |
| [enable] |
v6.4.0 -> v7.2.4 |
| [disable] |
v6.4.0 -> v7.2.4 |
- sdwan_zone - Set SD-WAN zone. Source system.sdwan.zone.name. type: str
more...
|
Supported Version Ranges |
| sdwan_zone |
v7.0.0 -> v7.2.4 |
- status - Enable/disable Overlay Controller cloud assisted VPN. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| status |
v6.0.0 -> v7.2.4 |
| [enable] |
v6.0.0 -> v7.2.4 |
| [disable] |
v6.0.0 -> v7.2.4 |
- subnets - Internal subnets to register with Overlay Controller VPN service. type: list member_path: subnets:id
more...
| Supported Version Ranges |
| subnets |
v6.0.0 -> v6.0.11 |
- id - ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.0.0 -> v6.0.11 |
- interface - LAN interface. Source system.interface.name. type: str
more...
|
Supported Version Ranges |
| interface |
v6.0.0 -> v6.0.11 |
- subnet - IPv4 address and subnet mask. type: str
more...
|
Supported Version Ranges |
| subnet |
v6.0.0 -> v6.0.11 |
- type - Subnet type. type: str choices: subnet, interface
more...
|
Supported Version Ranges |
| type |
v6.0.0 -> v6.0.11 |
| [subnet] |
v6.0.0 -> v6.0.11 |
| [interface] |
v6.0.0 -> v6.0.11 |
- wan_interface - FortiGate WAN interfaces to use with OCVPN. type: list member_path: wan_interface:name
more...
| Supported Version Ranges |
| wan_interface |
v6.4.0 -> v7.2.4 |
- name - Interface name. Source system.interface.name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.4.0 -> v7.2.4 |
Notes
-----
.. note::
- Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
- The module supports check_mode.
Examples
--------
.. code-block:: yaml+jinja
- name: Configure Overlay Controller VPN settings.
fortinet.fortios.fortios_vpn_ocvpn:
vdom: "{{ vdom }}"
vpn_ocvpn:
auto_discovery: "enable"
auto_discovery_shortcut_mode: "independent"
eap: "enable"
eap_users: " (source user.group.name)"
forticlient_access:
auth_groups:
-
auth_group: " (source user.group.name)"
name: "default_name_10"
overlays:
-
overlay_name: " (source vpn.ocvpn.overlays.overlay-name)"
psksecret: ""
status: "enable"
ha_alias: ""
ip_allocation_block: ""
multipath: "enable"
nat: "enable"
overlays:
-
assign_ip: "enable"
id: "21"
inter_overlay: "allow"
ipv4_end_ip: ""
ipv4_start_ip: ""
name: "default_name_25"
overlay_name: ""
subnets:
-
id: "28"
interface: " (source system.interface.name)"
subnet: ""
type: "subnet"
poll_interval: "30"
role: "spoke"
sdwan: "enable"
sdwan_zone: " (source system.sdwan.zone.name)"
status: "enable"
subnets:
-
id: "38"
interface: " (source system.interface.name)"
subnet: ""
type: "subnet"
wan_interface:
-
name: "default_name_43 (source system.interface.name)"
Return Values
-------------
Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:
.. raw:: html
- build - Build number of the fortigate image returned: always type: str sample: 1547
- http_method - Last method used to provision the content into FortiGate returned: always type: str sample: PUT
- http_status - Last result given by FortiGate on last operation applied returned: always type: str sample: 200
- mkey - Master key (id) used in the last call to FortiGate returned: success type: str sample: id
- name - Name of the table used to fulfill the request returned: always type: str sample: urlfilter
- path - Path of the table used to fulfill the request returned: always type: str sample: webfilter
- revision - Internal revision number returned: always type: str sample: 17.0.2.10658
- serial - Serial number of the unit returned: always type: str sample: FGVMEVYYQT3AB5352
- status - Indication of the operation's result returned: always type: str sample: success
- vdom - Virtual domain used returned: always type: str sample: root
- version - Version of the FortiGate returned: always type: str sample: v5.6.3
Status
------
- This module is not guaranteed to have a backwards compatible interface.
Authors
-------
- Link Zheng (@chillancezen)
- Jie Xue (@JieX19)
- Hongbin Lu (@fgtdev-hblu)
- Frank Shen (@frankshen01)
- Miguel Angel Munoz (@mamunozgonzalez)
- Nicolas Thomas (@thomnico)
.. hint::
If you notice any issues in this documentation, you can create a pull request to improve it.