fmgr_vpnmgr_node – VPN node for VPN Manager.

New in version 2.10.

Synopsis

  • This module is able to configure a FortiManager device.
  • Examples include all parameters and values need to be adjusted to data sources before usage.

Requirements

The below requirements are needed on the host that executes this module.

  • ansible>=2.9.0

FortiManager Version Compatibility


6.0.0 6.2.1 6.2.3 6.2.5 6.4.0 6.4.2 6.4.5 7.0.0 7.2.0
vpnmgr_node yes yes yes yes yes yes yes yes yes

Parameters

  • enable_log - Enable/Disable logging for task type: bool required: false default: False
  • forticloud_access_token - Access token of forticloud managed API users, this option is available with FortiManager later than 6.4.0 type: str required: false
  • proposed_method - The overridden method for the underlying Json RPC request type: str required: false choices: set, update, add
  • bypass_validation - Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters type: bool required: false default: False
  • workspace_locking_adom - Acquire the workspace lock if FortiManager is running in workspace mode type: str required: false choices: global, custom adom including root
  • workspace_locking_timeout - The maximum time in seconds to wait for other users to release workspace lock type: integer required: false default: 300
  • rc_succeeded - The rc codes list with which the conditions to succeed will be overriden type: list required: false
  • rc_failed - The rc codes list with which the conditions to fail will be overriden type: list required: false
  • state - The directive to create, update or delete an object type: str required: true choices: present, absent
  • adom - The parameter in requested url type: str required: true
  • vpnmgr_node - no description type: dict
    • add-route - Add-Route. type: str choices: [disable, enable] more...
    • assign-ip - Assign-Ip. type: str choices: [disable, enable] more...
    • assign-ip-from - Assign-Ip-From. type: str choices: [range, usrgrp, dhcp, name] more...
    • authpasswd - Authpasswd. type: str more...
    • authusr - Authusr. type: str more...
    • authusrgrp - Authusrgrp. type: str more...
    • auto-configuration - Auto-Configuration. type: str choices: [disable, enable] more...
    • automatic_routing - Automatic_Routing. type: str choices: [disable, enable] more...
    • banner - Banner. type: str more...
    • default-gateway - Default-Gateway. type: str more...
    • dhcp-server - Dhcp-Server. type: str choices: [disable, enable] more...
    • dns-mode - Dns-Mode. type: str choices: [auto, manual] more...
    • dns-service - Dns-Service. type: str choices: [default, specify, local] more...
    • domain - Domain. type: str more...
    • extgw - Extgw. type: str more...
    • extgw_hubip - Extgw_Hubip. type: str more...
    • extgw_p2_per_net - Extgw_P2_Per_Net. type: str choices: [disable, enable] more...
    • extgwip - Extgwip. type: str more...
    • hub_iface - Hub_Iface. type: str more...
    • id - Id. type: int more...
    • iface - Iface. type: str more...
    • ip-range - Ip-Range. type: array more...
      • end-ip - End-Ip. type: str more...
      • id - Id. type: int more...
      • start-ip - Start-Ip. type: str more...
    • ipsec-lease-hold - Ipsec-Lease-Hold. type: int more...
    • ipv4-dns-server1 - Ipv4-Dns-Server1. type: str more...
    • ipv4-dns-server2 - Ipv4-Dns-Server2. type: str more...
    • ipv4-dns-server3 - Ipv4-Dns-Server3. type: str more...
    • ipv4-end-ip - Ipv4-End-Ip. type: str more...
    • ipv4-exclude-range - Ipv4-Exclude-Range. type: array more...
      • end-ip - End-Ip. type: str more...
      • id - Id. type: int more...
      • start-ip - Start-Ip. type: str more...
    • ipv4-netmask - Ipv4-Netmask. type: str more...
    • ipv4-split-include - Ipv4-Split-Include. type: str more...
    • ipv4-start-ip - Ipv4-Start-Ip. type: str more...
    • ipv4-wins-server1 - Ipv4-Wins-Server1. type: str more...
    • ipv4-wins-server2 - Ipv4-Wins-Server2. type: str more...
    • local-gw - Local-Gw. type: str more...
    • localid - Localid. type: str more...
    • mode-cfg - Mode-Cfg. type: str choices: [disable, enable] more...
    • mode-cfg-ip-version - Mode-Cfg-Ip-Version. type: str choices: [4, 6] more...
    • net-device - Net-Device. type: str choices: [disable, enable] more...
    • peer - Peer. type: str more...
    • peergrp - Peergrp. type: str more...
    • peerid - Peerid. type: str more...
    • peertype - Peertype. type: str choices: [any, one, dialup, peer, peergrp] more...
    • protected_subnet - Protected_Subnet. type: array more...
      • addr - Addr. type: str more...
      • seq - Seq. type: int more...
    • public-ip - Public-Ip. type: str more...
    • role - Role. type: str choices: [hub, spoke] more...
    • route-overlap - Route-Overlap. type: str choices: [use-old, use-new, allow] more...
    • spoke-zone - Spoke-Zone. type: str more...
    • summary_addr - Summary_Addr. type: array more...
      • addr - Addr. type: str more...
      • priority - Priority. type: int more...
      • seq - Seq. type: int more...
    • tunnel-search - Tunnel-Search. type: str choices: [selectors, nexthop] more...
    • unity-support - Unity-Support. type: str choices: [disable, enable] more...
    • usrgrp - Usrgrp. type: str more...
    • vpn-interface-priority - Vpn-Interface-Priority. type: int more...
    • vpn-zone - Vpn-Zone. type: str more...
    • vpntable - Vpntable. type: str more...
    • xauthtype - Xauthtype. type: str choices: [disable, client, pap, chap, auto] more...
    • exchange-interface-ip - Exchange-Interface-Ip. type: str choices: [disable, enable] more...
    • hub-public-ip - Hub-Public-Ip. type: str more...
    • ipv4-split-exclude - Ipv4-Split-Exclude. type: str more...
    • scope member - No description for the parameter type: array more...
      • name - No description for the parameter type: str more...
      • vdom - No description for the parameter type: str more...
    • dhcp-ra-giaddr - No description for the parameter type: str more...
    • encapsulation - No description for the parameter type: str choices: [tunnel-mode, transport-mode] more...
    • ipv4-name - No description for the parameter type: str more...
    • l2tp - No description for the parameter type: str choices: [disable, enable] more...

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_vpnmgr_node:
        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]>
        vpnmgr_node:
           add-route: <value in [disable, enable]>
           assign-ip: <value in [disable, enable]>
           assign-ip-from: <value in [range, usrgrp, dhcp, ...]>
           authpasswd: <value of string>
           authusr: <value of string>
           authusrgrp: <value of string>
           auto-configuration: <value in [disable, enable]>
           automatic_routing: <value in [disable, enable]>
           banner: <value of string>
           default-gateway: <value of string>
           dhcp-server: <value in [disable, enable]>
           dns-mode: <value in [auto, manual]>
           dns-service: <value in [default, specify, local]>
           domain: <value of string>
           extgw: <value of string>
           extgw_hubip: <value of string>
           extgw_p2_per_net: <value in [disable, enable]>
           extgwip: <value of string>
           hub_iface: <value of string>
           id: <value of integer>
           iface: <value of string>
           ip-range:
             -
                 end-ip: <value of string>
                 id: <value of integer>
                 start-ip: <value of string>
           ipsec-lease-hold: <value of integer>
           ipv4-dns-server1: <value of string>
           ipv4-dns-server2: <value of string>
           ipv4-dns-server3: <value of string>
           ipv4-end-ip: <value of string>
           ipv4-exclude-range:
             -
                 end-ip: <value of string>
                 id: <value of integer>
                 start-ip: <value of string>
           ipv4-netmask: <value of string>
           ipv4-split-include: <value of string>
           ipv4-start-ip: <value of string>
           ipv4-wins-server1: <value of string>
           ipv4-wins-server2: <value of string>
           local-gw: <value of string>
           localid: <value of string>
           mode-cfg: <value in [disable, enable]>
           mode-cfg-ip-version: <value in [4, 6]>
           net-device: <value in [disable, enable]>
           peer: <value of string>
           peergrp: <value of string>
           peerid: <value of string>
           peertype: <value in [any, one, dialup, ...]>
           protected_subnet:
             -
                 addr: <value of string>
                 seq: <value of integer>
           public-ip: <value of string>
           role: <value in [hub, spoke]>
           route-overlap: <value in [use-old, use-new, allow]>
           spoke-zone: <value of string>
           summary_addr:
             -
                 addr: <value of string>
                 priority: <value of integer>
                 seq: <value of integer>
           tunnel-search: <value in [selectors, nexthop]>
           unity-support: <value in [disable, enable]>
           usrgrp: <value of string>
           vpn-interface-priority: <value of integer>
           vpn-zone: <value of string>
           vpntable: <value of string>
           xauthtype: <value in [disable, client, pap, ...]>
           exchange-interface-ip: <value in [disable, enable]>
           hub-public-ip: <value of string>
           ipv4-split-exclude: <value of string>
           scope member:
             -
                 name: <value of string>
                 vdom: <value of string>
           dhcp-ra-giaddr: <value of string>
           encapsulation: <value in [tunnel-mode, transport-mode]>
           ipv4-name: <value of string>
           l2tp: <value in [disable, enable]>

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:

  • request_url - The full url requested returned: always type: str sample: /sys/login/user
  • response_code - The status of api request returned: always type: int sample: 0
  • response_message - The descriptive message of the api response returned: always type: str sample: OK
  • response_data - The data body of the api response returned: optional type: list or dict

Status

  • This module is not guaranteed to have a backwards compatible interface.

Authors

  • Link Zheng (@chillancezen)
  • Jie Xue (@JieX19)
  • Frank Shen (@fshen01)
  • Hongbin Lu (@fgtdev-hblu)

Hint

If you notice any issues in this documentation, you can create a pull request to improve it.