fortios_system_sdn_connector – Configure connection to SDN Connector

New in version 2.8.

Synopsis

  • This module is able to configure a FortiGate or FortiOS by allowing the user to configure system feature and sdn_connector category. Examples includes all options and need to be adjusted to datasources before usage. Tested with FOS v6.0.2

Requirements

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

  • fortiosapi>=0.9.8

Parameters

Parameter Choices/Defaults Comments
host
- / required
FortiOS or FortiGate ip address.
https
boolean
    Choices:
  • no ←
  • yes
Indicates if the requests towards FortiGate must use HTTPS protocol
password
-
Default:
""
FortiOS or FortiGate password.
system_sdn_connector
-
Default:
null
Configure connection to SDN Connector.
access-key
-
AWS access key ID.
azure-region
-
    Choices:
  • global
  • china
  • germany
  • usgov
Azure server region.
client-id
-
Azure client ID (application ID).
client-secret
-
Azure client secret (application key).
compartment-id
-
Compartment ID.
external-ip
-
Configure GCP external IP.
name
- / required
External IP name.
gcp-project
-
GCP project name.
key-passwd
-
Private key password.
name
- / required
SDN connector name.
nic
-
Configure Azure network interface.
ip
-
Configure IP configuration.
name
- / required
IP configuration name.
public-ip
-
Public IP name.
name
- / required
Network interface name.
oci-cert
-
OCI certificate. Source certificate.local.name.
oci-fingerprint
-
OCI pubkey fingerprint.
oci-region
-
    Choices:
  • phoenix
  • ashburn
  • frankfurt
  • london
OCI server region.
password
-
Password of the remote SDN connector as login credentials.
private-key
-
Private key of GCP service account.
region
-
AWS region name.
resource-group
-
Azure resource group.
route
-
Configure GCP route.
name
- / required
Route name.
route-table
-
Configure Azure route table.
name
- / required
Route table name.
route
-
Configure Azure route.
name
- / required
Route name.
next-hop
-
Next hop address.
secret-key
-
AWS secret access key.
server
-
Server address of the remote SDN connector.
server-port
-
Port number of the remote SDN connector.
service-account
-
GCP service account email.
state
-
    Choices:
  • present
  • absent
Indicates whether to create or remove the object
status
-
    Choices:
  • disable
  • enable
Enable/disable connection to the remote SDN connector.
subscription-id
-
Azure subscription ID.
tenant-id
-
Tenant ID (directory ID).
type
-
    Choices:
  • aci
  • aws
  • azure
  • nsx
  • nuage
  • oci
  • gcp
Type of SDN connector.
update-interval
-
Dynamic object update interval (0 - 3600 sec, 0 means disabled, default = 60).
use-metadata-iam
-
    Choices:
  • disable
  • enable
Enable/disable using IAM role from metadata to call API.
user-id
-
User ID.
username
-
Username of the remote SDN connector as login credentials.
vpc-id
-
AWS VPC ID.
username
- / required
FortiOS or FortiGate username.
vdom
-
Default:
"root"
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.

Notes

Note

  • Requires fortiosapi library developed by Fortinet
  • Run as a local_action in your playbook

Examples

- hosts: localhost
  vars:
   host: "192.168.122.40"
   username: "admin"
   password: ""
   vdom: "root"
  tasks:
  - name: Configure connection to SDN Connector.
    fortios_system_sdn_connector:
      host:  "{{  host }}"
      username: "{{ username }}"
      password: "{{ password }}"
      vdom:  "{{  vdom }}"
      system_sdn_connector:
        state: "present"
        access-key: "<your_own_value>"
        azure-region: "global"
        client-id: "<your_own_value>"
        client-secret: "<your_own_value>"
        compartment-id: "<your_own_value>"
        external-ip:
         -
            name: "default_name_9"
        gcp-project: "<your_own_value>"
        key-passwd: "<your_own_value>"
        name: "default_name_12"
        nic:
         -
            ip:
             -
                name: "default_name_15"
                public-ip: "<your_own_value>"
            name: "default_name_17"
        oci-cert: "<your_own_value> (source certificate.local.name)"
        oci-fingerprint: "<your_own_value>"
        oci-region: "phoenix"
        password: "<your_own_value>"
        private-key: "<your_own_value>"
        region: "<your_own_value>"
        resource-group: "<your_own_value>"
        route:
         -
            name: "default_name_26"
        route-table:
         -
            name: "default_name_28"
            route:
             -
                name: "default_name_30"
                next-hop: "<your_own_value>"
        secret-key: "<your_own_value>"
        server: "192.168.100.40"
        server-port: "34"
        service-account: "<your_own_value>"
        status: "disable"
        subscription-id: "<your_own_value>"
        tenant-id: "<your_own_value>"
        type: "aci"
        update-interval: "40"
        use-metadata-iam: "disable"
        user-id: "<your_own_value>"
        username: "<your_own_value>"
        vpc-id: "<your_own_value>"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
build
string
always
Build number of the fortigate image

Sample:
1547
http_method
string
always
Last method used to provision the content into FortiGate

Sample:
PUT
http_status
string
always
Last result given by FortiGate on last operation applied

Sample:
200
mkey
string
success
Master key (id) used in the last call to FortiGate

Sample:
key1
name
string
always
Name of the table used to fulfill the request

Sample:
urlfilter
path
string
always
Path of the table used to fulfill the request

Sample:
webfilter
revision
string
always
Internal revision number

Sample:
17.0.2.10658
serial
string
always
Serial number of the unit

Sample:
FGVMEVYYQT3AB5352
status
string
always
Indication of the operation's result

Sample:
success
vdom
string
always
Virtual domain used

Sample:
root
version
string
always
Version of the FortiGate

Sample:
v5.6.3


Status

Authors

  • Miguel Angel Munoz (@mamunozgonzalez)
  • Nicolas Thomas (@thomnico)

Hint

If you notice any issues in this documentation you can edit this document to improve it.