fortinet.fortimanager.fmgr_system_sdnconnector (2.4.0) — module

Configure connection to SDN Connector.

| "added in version" 2.0.0 of fortinet.fortimanager"

Authors: Xinwei Du (@dux-fortinet), Xing Li (@lix-fortinet), Jie Xue (@JieX19), Link Zheng (@chillancezen), Frank Shen (@fshen01), Hongbin Lu (@fgtdev-hblu)

preview | supported by community

Install collection

Install with ansible-galaxy collection install fortinet.fortimanager:==2.4.0


Add to requirements.yml

  collections:
    - name: fortinet.fortimanager
      version: 2.4.0

Description

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.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Example playbook
  hosts: fortimanagers
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Configure connection to SDN Connector.
      fortinet.fortimanager.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, ...]>
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gathering fortimanager facts
  hosts: fortimanagers
  gather_facts: false
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Retrieve all the connections to SDN Connector
      fortinet.fortimanager.fmgr_fact:
        facts:
          selector: "system_sdnconnector"
          params:
            adom: "ansible"
            sdn-connector: "your_value"

Inputs

    
adom:
    description: The parameter (adom) in requested url.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    description: The directive to create, update or delete an object.
    required: true
    type: str

rc_failed:
    description: The rc codes list with which the conditions to fail will be overriden.
    elements: int
    type: list

enable_log:
    default: false
    description: Enable/Disable logging for task.
    type: bool

access_token:
    description: The token to access FortiManager without using username and password.
    type: str

rc_succeeded:
    description: The rc codes list with which the conditions to succeed will be overriden.
    elements: int
    type: list

proposed_method:
    choices:
    - update
    - set
    - add
    description: The overridden method for the underlying Json RPC request.
    type: str

bypass_validation:
    default: false
    description: Only set to True when module schema diffs with FortiManager API structure,
      module continues to execute without validating parameters.
    type: bool

system_sdnconnector:
    description: The top level parameters set.
    required: false
    suboptions:
      _local_cert:
        description: _Local_Cert.
        type: str
      access-key:
        description: Deprecated, please rename it to access_key. AWS access key ID.
        type: str
      alt-resource-ip:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to alt_resource_ip. Enable/disable AWS
          alternative resource IP.
        type: str
      api-key:
        description: (list) Deprecated, please rename it to api_key. IBM cloud API key
          or service ID API key.
        type: raw
      azure-region:
        choices:
        - global
        - china
        - germany
        - usgov
        - local
        description: Deprecated, please rename it to azure_region. Azure server region.
        type: str
      client-id:
        description: Deprecated, please rename it to client_id. Azure client ID
        type: str
      client-secret:
        description: (list) Deprecated, please rename it to client_secret. Azure client
          secret
        type: raw
      compartment-id:
        description: Deprecated, please rename it to compartment_id. Compartment ID.
        type: str
      compartment-list:
        description: Deprecated, please rename it to compartment_list.
        elements: dict
        suboptions:
          compartment-id:
            description: Deprecated, please rename it to compartment_id. OCI compartment
              ID.
            type: str
        type: list
      compute-generation:
        description: Deprecated, please rename it to compute_generation. Compute generation
          for IBM cloud infrastructure.
        type: int
      domain:
        description: Openstack domain.
        type: str
      external-account-list:
        description: Deprecated, please rename it to external_account_list.
        elements: dict
        suboptions:
          external-id:
            description: Deprecated, please rename it to external_id. AWS external ID.
            type: str
          region-list:
            description: (list) Deprecated, please rename it to region_list.
            type: raw
          role-arn:
            description: Deprecated, please rename it to role_arn. AWS role ARN to assume.
            type: str
        type: list
      external-ip:
        description: Deprecated, please rename it to external_ip. External-Ip.
        elements: dict
        suboptions:
          name:
            description: External IP name.
            type: str
        type: list
      forwarding-rule:
        description: Deprecated, please rename it to forwarding_rule.
        elements: dict
        suboptions:
          rule-name:
            description: Deprecated, please rename it to rule_name. Forwarding rule name.
            type: str
          target:
            description: Target instance name.
            type: str
        type: list
      gcp-project:
        description: Deprecated, please rename it to gcp_project. GCP project name.
        type: str
      gcp-project-list:
        description: Deprecated, please rename it to gcp_project_list.
        elements: dict
        suboptions:
          gcp-zone-list:
            description: (list) Deprecated, please rename it to gcp_zone_list.
            type: raw
          id:
            description: GCP project ID.
            type: str
        type: list
      group-name:
        description: Deprecated, please rename it to group_name. Group name of computers.
        type: str
      ha-status:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to ha_status. Enable/disable use for
          FortiGate HA service.
        type: str
      ibm-region:
        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
        description: Deprecated, please rename it to ibm_region. IBM cloud region name.
        type: str
      ibm-region-gen1:
        choices:
        - us-south
        - us-east
        - germany
        - great-britain
        - japan
        - australia
        description: Deprecated, please rename it to ibm_region_gen1. Ibm-Region-Gen1.
        type: str
      ibm-region-gen2:
        choices:
        - us-south
        - us-east
        - great-britain
        description: Deprecated, please rename it to ibm_region_gen2. Ibm-Region-Gen2.
        type: str
      key-passwd:
        description: (list) Deprecated, please rename it to key_passwd. Private key password.
        type: raw
      last-update:
        description: Deprecated, please rename it to last_update. Last-Update.
        type: int
      login-endpoint:
        description: Deprecated, please rename it to login_endpoint. Azure Stack login
          enpoint.
        type: str
      name:
        description: SDN connector name.
        required: true
        type: str
      nic:
        description: Nic.
        elements: dict
        suboptions:
          ip:
            description: Ip.
            elements: dict
            suboptions:
              name:
                description: IP configuration name.
                type: str
              public-ip:
                description: Deprecated, please rename it to public_ip. Public IP name.
                type: str
              resource-group:
                description: Deprecated, please rename it to resource_group. Resource
                  group of Azure public IP.
                type: str
            type: list
          name:
            description: Network interface name.
            type: str
        type: list
      nsx-cert-fingerprint:
        description: Deprecated, please rename it to nsx_cert_fingerprint. NSX certificate
          fingerprint.
        type: str
      oci-cert:
        description: Deprecated, please rename it to oci_cert. OCI certificate.
        type: str
      oci-fingerprint:
        description: Deprecated, please rename it to oci_fingerprint. Oci-Fingerprint.
        type: str
      oci-region:
        choices:
        - phoenix
        - ashburn
        - frankfurt
        - london
        - toronto
        description: Deprecated, please rename it to oci_region. OCI server region.
        type: str
      oci-region-list:
        description: Deprecated, please rename it to oci_region_list.
        elements: dict
        suboptions:
          region:
            description: OCI region.
            type: str
        type: list
      oci-region-type:
        choices:
        - commercial
        - government
        description: Deprecated, please rename it to oci_region_type. OCI region type.
        type: str
      password:
        description: (list) Password of the remote SDN connector as login credentials.
        type: raw
      private-key:
        description: Deprecated, please rename it to private_key. Private key of GCP service
          account.
        type: str
      proxy:
        description: SDN proxy.
        type: str
      region:
        description: AWS region name.
        type: str
      resource-group:
        description: Deprecated, please rename it to resource_group. Azure resource group.
        type: str
      resource-url:
        description: Deprecated, please rename it to resource_url. Azure Stack resource
          URL.
        type: str
      rest-interface:
        choices:
        - mgmt
        - sync
        description: Deprecated, please rename it to rest_interface. Interface name for
          REST service to listen on.
        type: str
      rest-password:
        description: (list) Deprecated, please rename it to rest_password. Password for
          REST service.
        type: raw
      rest-sport:
        description: Deprecated, please rename it to rest_sport. REST service access port
        type: int
      rest-ssl:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to rest_ssl. Rest-Ssl.
        type: str
      route:
        description: Route.
        elements: dict
        suboptions:
          name:
            description: Route name.
            type: str
        type: list
      route-table:
        description: Deprecated, please rename it to route_table. Route-Table.
        elements: dict
        suboptions:
          name:
            description: Route table name.
            type: str
          resource-group:
            description: Deprecated, please rename it to resource_group. Resource group
              of Azure route table.
            type: str
          route:
            description: Route.
            elements: dict
            suboptions:
              name:
                description: Route name.
                type: str
              next-hop:
                description: Deprecated, please rename it to next_hop. Next hop address.
                type: str
            type: list
          subscription-id:
            description: Deprecated, please rename it to subscription_id. Subscription
              ID of Azure route table.
            type: str
        type: list
      secret-key:
        description: (list) Deprecated, please rename it to secret_key. AWS / ACS secret
          access key.
        type: raw
      secret-token:
        description: Deprecated, please rename it to secret_token. Secret token of Kubernetes
          service account.
        type: str
      server:
        description: Server address of the remote SDN connector.
        type: str
      server-ca-cert:
        description: Deprecated, please rename it to server_ca_cert. Trust only those
          servers whose certificate is directly/indirectly signed b...
        type: str
      server-cert:
        description: Deprecated, please rename it to server_cert. Trust servers that contain
          this certificate only.
        type: str
      server-ip:
        description: Deprecated, please rename it to server_ip. IP address of the remote
          SDN connector.
        type: str
      server-list:
        description: (list) Deprecated, please rename it to server_list. Server address
          list of the remote SDN connector.
        type: raw
      server-port:
        description: Deprecated, please rename it to server_port. Port number of the remote
          SDN connector.
        type: int
      service-account:
        description: Deprecated, please rename it to service_account. GCP service account
          email.
        type: str
      status:
        choices:
        - disable
        - enable
        description: Enable/disable connection to the remote SDN connector.
        type: str
      subscription-id:
        description: Deprecated, please rename it to subscription_id. Azure subscription
          ID.
        type: str
      tenant-id:
        description: Deprecated, please rename it to tenant_id. Tenant ID
        type: str
      type:
        choices:
        - aci
        - aws
        - nsx
        - nuage
        - azure
        - gcp
        - oci
        - openstack
        - kubernetes
        - vmware
        - acs
        - alicloud
        - sepm
        - aci-direct
        - ibm
        - nutanix
        - sap
        description: Type of SDN connector.
        type: str
      update-interval:
        description: Deprecated, please rename it to update_interval. Dynamic object update
          interval
        type: int
      updating:
        description: Updating.
        type: int
      use-metadata-iam:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to use_metadata_iam. Enable/disable
          using IAM role from metadata to call API.
        type: str
      user-id:
        description: Deprecated, please rename it to user_id. User ID.
        type: str
      username:
        description: Username of the remote SDN connector as login credentials.
        type: str
      vcenter-password:
        description: (list) Deprecated, please rename it to vcenter_password. VCenter
          server password for NSX quarantine.
        type: raw
      vcenter-server:
        description: Deprecated, please rename it to vcenter_server. VCenter server address
          for NSX quarantine.
        type: str
      vcenter-username:
        description: Deprecated, please rename it to vcenter_username. VCenter server
          username for NSX quarantine.
        type: str
      verify-certificate:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to verify_certificate. Enable/disable
          server certificate verification.
        type: str
      vmx-image-url:
        description: Deprecated, please rename it to vmx_image_url. URL of web-hosted
          VMX image.
        type: str
      vmx-service-name:
        description: Deprecated, please rename it to vmx_service_name. VMX Service name.
        type: str
      vpc-id:
        description: Deprecated, please rename it to vpc_id. AWS VPC ID.
        type: str
    type: dict

workspace_locking_adom:
    description: The adom to lock for FortiManager running in workspace mode, the value
      can be global and others including root.
    type: str

forticloud_access_token:
    description: Authenticate Ansible client with forticloud API access token.
    type: str

workspace_locking_timeout:
    default: 300
    description: The maximum time in seconds to wait for other user to release the workspace
      lock.
    type: int

Outputs

meta:
  contains:
    request_url:
      description: The full url requested.
      returned: always
      sample: /sys/login/user
      type: str
    response_code:
      description: The status of api request.
      returned: always
      sample: 0
      type: int
    response_data:
      description: The api response.
      returned: always
      type: list
    response_message:
      description: The descriptive message of the api response.
      returned: always
      sample: OK.
      type: str
    system_information:
      description: The information of the target system.
      returned: always
      type: dict
  description: The result of the request.
  returned: always
  type: dict
rc:
  description: The status the request.
  returned: always
  sample: 0
  type: int
version_check_warning:
  description: Warning if the parameters used in the playbook are not supported by
    the current FortiManager version.
  returned: complex
  type: list