fmgr_system_sdnconnector – Configure connection to SDN Connector.
Added in version 2.0.0.
Warning
Starting in version 3.0.0, all input arguments will be named using the underscore naming convention (snake_case).
Argument name before 3.0.0:
var-name
,var name
,var.name
New argument name starting in 3.0.0:
var_name
FortiManager Ansible v2.4+ supports both previous argument name and new underscore name. You will receive deprecation warnings if you keep using the previous argument name. You can ignore the warning by setting deprecation_warnings=False in ansible.cfg.
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.
Tested with FortiManager v7.x.
Requirements
The below requirements are needed on the host that executes this module.
ansible>=2.15.0
FortiManager Version Compatibility
Supported Version Ranges: v6.0.0 -> latest
Parameters
- access_token -The token to access FortiManager without using username and password. type: str required: false
- 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
- 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
- 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
- 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
- adom - The parameter in requested url type: str required: true
- system_sdnconnector - Configure connection to SDN Connector. type: dict
- _local_cert Local cert. type: str more...
- access_key (Alias name: access-key) Aws access key id. type: str more...
- azure_region (Alias name: azure-region) Azure server region. type: str choices: [global, china, germany, usgov, local] more...
- client_id (Alias name: client-id) Azure client id (application id). type: str more...
- client_secret (Alias name: client-secret) Azure client secret (application key). type: list more...
- compartment_id (Alias name: compartment-id) Compartment id. type: str more...
- external_ip (Alias name: external-ip) External ip. type: list
more...
- name External ip name. type: str more...
- gcp_project (Alias name: gcp-project) Gcp project name. type: str more...
- key_passwd (Alias name: key-passwd) Private key password. type: list more...
- login_endpoint (Alias name: login-endpoint) Azure stack login enpoint. type: str more...
- name Sdn connector name. type: str more...
- nic Nic. type: list more...
- nsx_cert_fingerprint (Alias name: nsx-cert-fingerprint) Nsx certificate fingerprint. type: str more...
- oci_cert (Alias name: oci-cert) Oci certificate. type: str more...
- oci_fingerprint (Alias name: oci-fingerprint) Oci fingerprint. type: str more...
- oci_region (Alias name: 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: list more...
- private_key (Alias name: private-key) Private key of gcp service account. type: str more...
- region Aws region name. type: str more...
- resource_group (Alias name: resource-group) Azure resource group. type: str more...
- resource_url (Alias name: resource-url) Azure stack resource url. type: str more...
- rest_interface (Alias name: rest-interface) Interface name for rest service to listen on. type: str choices: [mgmt, sync] more...
- rest_password (Alias name: rest-password) Password for rest service. type: list more...
- rest_sport (Alias name: rest-sport) Rest service access port (1 - 65535). type: int more...
- rest_ssl (Alias name: rest-ssl) Rest ssl. type: str choices: [disable, enable] more...
- route Route. type: list
more...
- name Route name. type: str more...
- route_table (Alias name: route-table) Route table. type: list more...
- secret_key (Alias name: secret-key) Aws secret access key. type: list more...
- server Server address of the remote sdn connector. type: str more...
- server_port (Alias name: server-port) Port number of the remote sdn connector. type: int more...
- service_account (Alias name: 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 (Alias name: subscription-id) Azure subscription id. type: str more...
- tenant_id (Alias name: 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, sap] more...
- update_interval (Alias name: update-interval) Dynamic object update interval (0 - 3600 sec, 0 means disabled, default = 60). type: int more...
- use_metadata_iam (Alias name: use-metadata-iam) Enable/disable using iam role from metadata to call api. type: str choices: [disable, enable] more...
- user_id (Alias name: user-id) User id. type: str more...
- username Username of the remote sdn connector as login credentials. type: str more...
- vmx_image_url (Alias name: vmx-image-url) Url of web-hosted vmx image. type: str more...
- vmx_service_name (Alias name: vmx-service-name) Vmx service name. type: str more...
- vpc_id (Alias name: vpc-id) Aws vpc id. type: str more...
- domain Openstack domain. type: str more...
- ha_status (Alias name: ha-status) Enable/disable use for fortigate ha service. type: str choices: [disable, enable] more...
- last_update (Alias name: last-update) Last update. type: int more...
- oci_region_type (Alias name: oci-region-type) Oci region type. type: str choices: [commercial, government] more...
- secret_token (Alias name: secret-token) Secret token of kubernetes service account. type: str more...
- updating Updating. type: int more...
- server_ip (Alias name: server-ip) Ip address of the remote sdn connector. type: str more...
- group_name (Alias name: group-name) Group name of computers. type: str more...
- api_key (Alias name: api-key) Ibm cloud api key or service id api key. type: list more...
- compute_generation (Alias name: compute-generation) Compute generation for ibm cloud infrastructure. type: int more...
- ibm_region (Alias name: 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 (Alias name: ibm-region-gen1) Ibm region gen1. type: str choices: [us-south, us-east, germany, great-britain, japan, australia] more...
- ibm_region_gen2 (Alias name: ibm-region-gen2) Ibm region gen2. type: str choices: [us-south, us-east, great-britain] more...
- vcenter_password (Alias name: vcenter-password) Vcenter server password for nsx quarantine. type: list more...
- vcenter_server (Alias name: vcenter-server) Vcenter server address for nsx quarantine. type: str more...
- vcenter_username (Alias name: vcenter-username) Vcenter server username for nsx quarantine. type: str more...
- server_list (Alias name: server-list) Server address list of the remote sdn connector. type: list more...
- external_account_list (Alias name: external-account-list) External account list. type: list more...
- forwarding_rule (Alias name: forwarding-rule) Forwarding rule. type: list more...
- gcp_project_list (Alias name: gcp-project-list) Gcp project list. type: list more...
- verify_certificate (Alias name: verify-certificate) Enable/disable server certificate verification. type: str choices: [disable, enable] more...
- alt_resource_ip (Alias name: alt-resource-ip) Enable/disable aws alternative resource ip. type: str choices: [disable, enable] more...
- server_ca_cert (Alias name: server-ca-cert) Trust only those servers whose certificate is directly/indirectly signed by this certificate. type: str more...
- server_cert (Alias name: server-cert) Trust servers that contain this certificate only. type: str more...
- compartment_list (Alias name: compartment-list) Compartment list. type: list
more...
- compartment_id (Alias name: compartment-id) Oci compartment id. type: str more...
- oci_region_list (Alias name: oci-region-list) Oci region list. type: list
more...
- region Oci region. type: str more...
- proxy Sdn proxy. type: str 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: 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, ...]>
- 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"
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:
- meta - The result of the request.returned: always type: dict
- 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_data - The data body of the api response. returned: optional type: list or dict
- response_message - The descriptive message of the api response. returned: always type: str sample: OK
- system_information - The information of the target system. returned: always type: dict
- rc - The status the request. returned: always type: int sample: 0
- version_check_warning - Warning if the parameters used in the playbook are not supported by the current FortiManager version. returned: if at least one parameter not supported by the current FortiManager version type: list
Status
This module is not guaranteed to have a backwards compatible interface.