fmgr_system_sdnconnector – Configure connection to SDN Connector.

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
system_sdnconnector 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
  • system_sdnconnector - no description type: dict
    • _local_cert - _Local_Cert. type: str more...
    • access-key - AWS access key ID. type: str more...
    • azure-region - Azure server region. type: str choices: [global, china, germany, usgov, local] more...
    • client-id - Azure client ID (application ID). type: str more...
    • client-secret - Azure client secret (application key). type: str more...
    • compartment-id - Compartment ID. type: str more...
    • external-ip - External-Ip. type: array more...
      • name - External IP name. type: str more...
    • gcp-project - GCP project name. type: str more...
    • key-passwd - Private key password. type: str more...
    • login-endpoint - Azure Stack login enpoint. type: str more...
    • name - SDN connector name. type: str more...
    • nic - Nic. type: array more...
      • ip - Ip. type: array more...
        • name - IP configuration name. type: str more...
        • public-ip - Public IP name. type: str more...
        • resource-group - Resource group of Azure public IP. type: str more...
      • name - Network interface name. type: str more...
    • nsx-cert-fingerprint - NSX certificate fingerprint. type: str more...
    • oci-cert - OCI certificate. type: str more...
    • oci-fingerprint - Oci-Fingerprint. type: str more...
    • oci-region - OCI server region. type: str choices: [phoenix, ashburn, frankfurt, london, toronto] more...
    • password - Password of the remote SDN connector as login credentials. type: str more...
    • private-key - Private key of GCP service account. type: str more...
    • region - AWS region name. type: str more...
    • resource-group - Azure resource group. type: str more...
    • resource-url - Azure Stack resource URL. type: str more...
    • rest-interface - Interface name for REST service to listen on. type: str choices: [mgmt, sync] more...
    • rest-password - Password for REST service. type: str more...
    • rest-sport - REST service access port (1 - 65535). type: int more...
    • rest-ssl - Rest-Ssl. type: str choices: [disable, enable] more...
    • route - Route. type: array more...
      • name - Route name. type: str more...
    • route-table - Route-Table. type: array more...
      • name - Route table name. type: str more...
      • route - Route. type: array more...
        • name - Route name. type: str more...
        • next-hop - Next hop address. type: str more...
      • resource-group - Resource group of Azure route table. type: str more...
      • subscription-id - Subscription ID of Azure route table. type: str more...
    • secret-key - AWS / ACS secret access key. type: str more...
    • server - Server address of the remote SDN connector. type: str more...
    • server-port - Port number of the remote SDN connector. type: int more...
    • service-account - GCP service account email. type: str more...
    • status - Enable/disable connection to the remote SDN connector. type: str choices: [disable, enable] more...
    • subscription-id - Azure subscription ID. type: str more...
    • tenant-id - Tenant ID (directory ID). type: str more...
    • type - Type of SDN connector. type: str choices: [aci, aws, nsx, nuage, azure, gcp, oci, openstack, kubernetes, vmware, acs, alicloud, sepm, aci-direct, ibm, nutanix] more...
    • update-interval - Dynamic object update interval (0 - 3600 sec, 0 means disabled, default = 60). type: int more...
    • use-metadata-iam - Enable/disable using IAM role from metadata to call API. type: str choices: [disable, enable] more...
    • user-id - User ID. type: str more...
    • username - Username of the remote SDN connector as login credentials. type: str more...
    • vmx-image-url - URL of web-hosted VMX image. type: str more...
    • vmx-service-name - VMX Service name. type: str more...
    • vpc-id - AWS VPC ID. type: str more...
    • domain - Openstack domain. type: str more...
    • ha-status - Enable/disable use for FortiGate HA service. type: str choices: [disable, enable] more...
    • last-update - Last-Update. type: int more...
    • oci-region-type - OCI region type. type: str choices: [commercial, government] more...
    • secret-token - Secret token of Kubernetes service account. type: str more...
    • updating - Updating. type: int more...
    • group-name - Group name of computers. type: str more...
    • api-key - IBM cloud API key or service ID API key. type: str more...
    • compute-generation - Compute generation for IBM cloud infrastructure. type: int more...
    • ibm-region - IBM cloud region name. type: str choices: [us-south, us-east, germany, great-britain, japan, australia, dallas, washington-dc, london, frankfurt, sydney, tokyo, osaka, toronto, sao-paulo, dallas-private, washington-dc-private, london-private, frankfurt-private, sydney-private, tokyo-private, osaka-private, toronto-private, sao-paulo-private] more...
    • ibm-region-gen1 - Ibm-Region-Gen1. type: str choices: [us-south, us-east, germany, great-britain, japan, australia] more...
    • ibm-region-gen2 - Ibm-Region-Gen2. type: str choices: [us-south, us-east, great-britain] more...
    • vcenter-password - vCenter server password for NSX quarantine. type: str more...
    • vcenter-server - vCenter server address for NSX quarantine. type: str more...
    • vcenter-username - vCenter server username for NSX quarantine. type: str more...
    • server-list - Server address list of the remote SDN connector. type: str more...
    • external-account-list - No description for the parameter type: array more...
      • region-list - No description for the parameter type: str more...
      • role-arn - AWS role ARN to assume. type: str more...
    • forwarding-rule - No description for the parameter type: array more...
      • rule-name - Forwarding rule name. type: str more...
      • target - Target instance name. type: str more...
    • gcp-project-list - No description for the parameter type: array more...
      • gcp-zone-list - No description for the parameter type: str more...
      • id - GCP project ID. type: str more...
    • verify-certificate - Enable/disable server certificate verification. 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

- name: gathering fortimanager facts
  hosts: fortimanager00
  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 connections to SDN Connector
     fmgr_fact:
       facts:
           selector: 'system_sdnconnector'
           params:
               adom: 'ansible'
               sdn-connector: 'your_value'

- hosts: fortimanager00
  collections:
    - fortinet.fortimanager
  connection: httpapi
  vars:
     ansible_httpapi_use_ssl: True
     ansible_httpapi_validate_certs: False
     ansible_httpapi_port: 443
  tasks:
   - name: Configure connection to SDN Connector.
     fmgr_system_sdnconnector:
        bypass_validation: False
        adom: ansible
        state: present
        system_sdnconnector:
           azure-region: global #<value in [global, china, germany, ...]>
           #compartment-id: 1
           name: ansible-test-sdn
           password: fortinet
           server: ALL
           status: disable
           type: aws #<value in [aci, aws, nsx, ...]>

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.