:source: fortios_monitor.py
:orphan:
.. :
fortios_monitor -- Ansible Module for FortiOS Monitor API.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.. versionadded:: 2.10
.. contents::
:local:
:depth: 1
Synopsis
--------
- Request FortiOS appliances to perform specific actions or procedures. This module contain all the FortiOS monitor API.
Requirements
------------
The below requirements are needed on the host that executes this module.
- install galaxy collection fortinet.fortios >= ``2.0.0``.
Parameters
----------
.. raw:: html
vdom - 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. type: strrequired: Falsedefault: root
enable_log - Enable/Disable logging for task. type: boolrequired: Falsedefault: False
access_token - Token-based authentication. Generated from GUI of Fortigate. type: strrequired: False
selector - Action taken in FortiOS appliance. type: strchoices:
abort.user.query - Abort a running user device unified query.
query_id - Provide a query ID to abort an unified type query. type: int required: True
activate.user.fortitoken - Activate a set of FortiTokens by serial number.
tokens - List of FortiToken serial numbers to activate. If omitted, all tokens will be used. type: array required: False
add-license.registration.forticare - Add a FortiCare license.
add_users.user.banned - Immediately add one or more users to the banned list.
ip_addresses - List of IP Addresses to ban. IPv4 and IPv6 addresses are allowed. type: array required: True
expiry - Time until expiry in seconds. 0 for indefinite ban. type: int required: False
auth.user.firewall - Trigger authentication for a single firewall user.
username - User name. type: string required: True
ip - User IP address. type: string required: True
server - Name of an existing LDAP server entry. If supplied, authenticate that user against any matched groups on that LDAP server. type: string required: False
backup-action.system.fortimanager - Import or update from FortiManager objects.
operation - Operation to perform on the given CMDB objects [import|update]. type: string required: True
objects - Array of CMDB tables and mkeys. type: array required: True
block.endpoint-control.registration - Block endpoint by FortiClient UID or MAC.
uid - Single FortiClient UID to block. type: string required: False
mac - Single MAC to block. type: string required: False
bounce-port.switch-controller.managed-switch - Reset the port to force all connected clients to re-request DHCP lease. All active client sessions will be terminated.
dport - Destination port. type: int required: True
config.system.fortimanager - Configure FortiManager IP. Register FortiManager if 'fortimanager_ip' is provided. Unregister FortiManager if only 'unregister' parameter is specified and set to true.
fortimanager_ip - FortiManager IP address. type: string required: False
unregister - Unregister the FortiManager (default=false). type: boolean required: False
connect.system.modem - Trigger a connect for the configured modem.
connect.wifi.network - When FortiWiFi is in client mode, connect to the specified network, if configured in the 'wifi' interface.
ssid - SSID of network to connect to. type: string required: True
create-default.wifi.ap-profile - Create a default FortiAP profile for the specified platform.
platform - FortiAP platform to create a default profile for. type: string required: True
create.forticonverter.ticket - Create a new FortiConverter service ticket to initiate a migration.
create.registration.forticare - Create a new FortiCare account.
common_name - Certificate common name. type: string required: True
scope - Scope of local certificate [vdom*|global]. Global scope is only accessible for global administrators. type: string required: True
create.web-ui.custom-language - Upload custom language file to this Fortigate.
lang_name - Name of custom language entry. type: string required: True
lang_comments - Comments of custom language entry. type: string required: False
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
deauth.user.firewall - Deauthenticate single, multiple, or all firewall users.
user_type - User type [proxy|firewall]. Required for both proxy and firewall users. type: string required: False
id - User ID. Required for both proxy and firewall users. type: int required: False
ip - User IP address. Required for both proxy and firewall users. type: string required: False
ip_version - IP version [ip4|ip6]. Only required if user_type is firewall. type: string required: False
method - Authentication method [fsso|rsso|ntlm|firewall|wsso|fsso_citrix|sso_guest]. Only required if user_type is firewall. type: string required: False
all - Set to true to deauthenticate all users. Other parameters will be ignored. type: boolean required: False
users - Array of user objects to deauthenticate. Use this to deauthenticate multiple users at once. Each object should include the above properties. type: array required: False
id - FortiExtender ID. type: string required: True
cmd - Command to execute. type: string required: True
disassociate.wifi.client - Disassociate a WiFi client from the FortiAP it's currently connected to. The client will need to reassociate with the same FortiAP or another to resume connectivity.
mac - MAC address. type: string required: True
disconnect.system.ha-peer - Update configuration of peer in HA cluster.
serial_no - Serial number of the HA member. type: string required: True
interface - Name of the interface which should be assigned for management. type: string required: True
ip - IP to assign to the selected interface. type: string required: True
mask - Full network mask to assign to the selected interface. type: string required: True
disconnect.system.modem - Trigger a disconnect for the configured modem.
download-eval.system.vmlicense - Download Evaluation VM License and reboot immediately if successful.
ticket_id - Service ticket ID. type: string required: True
generate-key.system.api-user - Generate a new api-key for the specified api-key-auth admin. The old api-key will be replaced. The response contains the only chance to read the new api-key plaintext in the api_key field.
api-user - Generate a new token for this api-user. type: string required: True
expiry - Expiry of API key in minutes from now (valid range: 1 - 10080). This can only be set for Fortinet Support Tool user. type: int required: False
generate-keys.wifi.ssid - Generate pre-shared keys for specific multi pre-shared key profile.
mpsk_profile - Multi pre-shared key profile to add keys to. type: string required: True
group - Multi pre-shared key group to add keys to. type: string required: True
prefix - Prefix to be added at the start of the generated key's name. type: string required: True
count - Number of keys to be generated [1-512]. type: int required: True
key_length - Length of the keys to be generated [8-63]. type: int required: True
generate.vpn-certificate.csr - Generate a certificate signing request (CSR) and a private key. The CSR can be retrieved / downloaded from CLI, GUI and REST API.
certname - Certicate name. Used to retrieve / download the CSR. Not included in CSR and key content. type: string required: True
subject - Subject (Host IP/Domain Name/E-Mail). Common Name (CN) of the certificate subject. type: string required: True
keytype - Generate a RSA or an elliptic curve certificate request [rsa|ec]. The Elliptic Curve option is unavailable if the FortiGate is a Low Encryption Device (LENC) type: string required: True
keysize - Key size.[1024|1536|2048|4096]. 512 only if the FortiGate is a Low Encryption Device (LENC). Required when keytype is RSA. type: int required: False
curvename - Elliptic curve name. [secp256r1|secp384r1|secp521r1]. Unavailable if the FortiGate is a Low Encryption Device (LENC). Required when keytype is ec. type: string required: False
orgunits - List of organization units. Organization Units (OU) of the certificate subject. type: array required: False
org - Organization (O) of the certificate subject. type: string required: False
city - Locality (L) of the certificate subject. type: string required: False
state - State (ST) of the certificate subject. type: string required: False
countrycode - Country (C) of the certificate subject. type: string required: False
email - Email of the certificate subject. type: string required: False
subject_alt_name - Subject alternative name (SAN) of the certificate. type: string required: False
password - Password / pass phrase for the private key. If not provided, FortiGate generates a random one. type: string required: False
scep_url - SCEP server URL. If provided, use the url to enroll the csr through SCEP. type: string required: False
scep_password - SCEP challenge password. Some SCEP servers may require challege password. Provide it when SCEP server requires. type: string required: False
scope - Scope of CSR [vdom*|global]. Global scope is only accessible for global administrators type: string required: False
generic-address.system.external-resource - Push JSON data to the specified external resource.
mkey - The name of the external resource to update. type: string required: True
data - JSON data. type: object required: True
geoip.geoip-query - Retrieve location details for IPs queried against FortiGuard's geoip service.
ip_addresses - One or more IP address strings to query for location details. type: array required: True
import-mobile.user.fortitoken - Import a list of tokens from FortiGuard to the FortiGate unit.
import-seed.user.fortitoken - Import a FortiToken seed file.
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
import-trial.user.fortitoken - Import trial mobile FortiTokens.
import.vpn-certificate.ca - Import CA certificate.
import_method - Method of importing CA certificate.[file|scep] type: string required: True
scep_url - SCEP server URL. Required for import via SCEP type: string required: False
scep_ca_id - SCEP server CA identifier for import via SCEP. type: string required: False
scope - Scope of CA certificate [vdom*|global]. Global scope is only accessible for global administrators type: string required: False
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
import.vpn-certificate.crl - Import certificate revocation lists (CRL) from file content.
scope - Scope of CRL [vdom*|global]. Global scope is only accessible for global administrators type: string required: False
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
import.vpn-certificate.local - Import local certificate.
type - Type of certificate.[local|pkcs12|regular] type: string required: True
certname - Certificate name for pkcs12 and regular certificate types. type: string required: False
password - Optional password for pkcs12 and regular certificate types. type: string required: False
key_file_content - Key content encoded in BASE64 for regular certificate type. type: string required: False
scope - Scope of local certificate [vdom*|global]. Global scope is only accessible for global administrators type: string required: False
acme_domain - A valid domain that resolves to an IP whose TCP port 443 reaches this FortiGate. type: string required: False
acme_email - Contact email address that is required by some CAs such as LetsEncrypt. type: string required: False
acme_ca_url - URL for the ACME CA server. type: string required: False
acme_rsa_key_size - Length of the RSA private key for the generated cert. type: int required: False
acme_renew_window - Certificate renewal window in days. type: int required: False
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
scope - Scope of CRL [vdom*|global]. Global scope is only accessible for global administrators type: string required: False
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
import.web-ui.language - Import localization language file to this FortiGate.
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
keep-alive.wifi.spectrum - Extend duration of an existing spectrum analysis for a specific FortiAP.
wtp_id - FortiAP ID. type: string required: True
radio_id - Radio ID. type: int required: True
duration - Duration in seconds. type: int required: True
kill.system.process - Kill a running process.
pid - The process ID. type: int required: True
signal - Signal to use when killing the process [9 (SIGKILL) | 11 (SIGSEGV) | 15 (SIGTERM)]. Defaults to 15. type: int required: False
led-blink.wifi.managed_ap - Turn a managed FortiAP's LED blinking on or off.
serials - FortiAP IDs to turn LED blink on/off. type: array required: True
blink - True to turn on blinking, false to turn off. type: boolean required: True
duration - Time to blink, in seconds. 0 or omit for indefinite. type: int required: False
login.registration.forticare - Login to FortiCare.
serial - Serial number of an HA cluster member to register to login to FortiCare. Current device will be selected if not set. type: string required: False
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
migrate.registration.forticloud - Migrate standalone FortiGate Cloud account to FortiCloud.
ports - Name of ports to reset statistics on. type: array required: False
provision-user.vpn.ssl - Provision SSL-VPN users with target applications. The provisioning message (email or SMS) is sent with no confirmation of success.
host - The hostname/IP address of the VPN server. type: string required: True
port - The port of the VPN server. type: int required: True
vpn_name - The name of the VPN configuration. type: string required: True
method - Method to send [email|sms]. If not set, email will be the default. type: string required: False
email_list - The email address that the VPN configuration message should be sent to. Required if "method" is "email". type: string required: False
phone_user_list - The user that the VPN configuration SMS should be sent to. At least one of "phone_user_list" or "phone_number_list" is required if "method" is "sms". type: string required: False
phone_number_list - The phone number that the VPN configuration SMS should be sent to. At least one of "phone_user_list" or "phone_number_list" is required if "method" is "sms". type: string required: False
sms_method - The method to be used for sending the SMS [fortiguard|custom]. Default is "fortiguard". type: string required: False
sms_server - The SMS server to be used for sending SMS messages, required if "custom" SMS method is chosen. type: string required: False
provision.user.fortitoken - Provision a set of FortiTokens by serial number.
tokens - List of FortiToken serial numbers to provision. If omitted, all tokens will be used. type: array required: False
pse-config.switch-controller.recommendation - Execute switch recommendation for pse-config to prevent PSE-PSE scenarios.
quarantine.endpoint-control.registration - Quarantine endpoint by FortiClient UID or MAC.
uid - Single FortiClient UID to quarantine. type: string required: False
mac - Single MAC to quarantine. type: string required: False
read-info.system.certificate - Get certificate information from a certificate string.
value - PEM formatted certificate. type: string required: True
reboot.system.os - Immediately reboot this device.
event_log_message - Message to be logged in event log. type: string required: False
refresh-server.user.fsso - Refresh remote agent group list for all fsso agents.
refresh.azure.application-list - Update the Azure application list data or get the status of an update.
last_update_time - Timestamp of a previous update request. If this is not provided then it will refresh the Azure application list data. type: int required: False
refresh.system.external-resource - Fetch the external resource file and refresh status for the specified external resource.
mkey - The name of the external resource to query. type: string required: True
check_status_only - Set to true to return only the refresh status. type: boolean required: False
last_connection_time - The timestamp of last connection to the resource; used for checking refresh status. type: int required: False
refresh.user.fortitoken - Refresh a set of FortiTokens by serial number.
tokens - List of FortiToken serial numbers to refresh. If omitted, all tokens will be used. type: array required: False
register-appliance.system.csf - Register appliance to Security Fabric.
type - Appliance type (Example: 'faz'). type: string required: True
mgmt_ip - Management IP or FQDN. type: string required: True
mgmt_port - Management port. type: int required: False
mgmt_url_parameters - Array of URL parameters. Each item is a key/value pair. If provided, the URL parameters will be included in the management IP URL. type: array required: False
serial - Serial number. type: string required: True
register-device.registration.forticloud - Register a device to FortiCloud through FortiGate. Currently FortiSwitches, FortiAPs and FortiExtenders are supported.
serial - Device serial number type: string required: False
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
revoke.system.dhcp - Revoke IPv4 DHCP leases.
ip - Optional list of addresses to revoke. Defaults to all addresses if not provided. type: array required: False
revoke.system.dhcp6 - Revoke IPv6 DHCP leases.
ip - Optional list of addresses to revoke. Defaults to all addresses if not provided. type: array required: False
run.system.compliance - Immediately run compliance checks for the selected VDOM.
run.system.config-script - Run remote config scripts.
remote_script - Name of remote config script to run. type: string required: True
save.system.config - Explicitly save all configuration.
save.system.config-revision - Create a new config revision checkpoint.
service - Service to check. [emailfilter | webfilter] type: string required: True
test-connect.user.radius - Test the connectivity of the given RADIUS server and, optionally, the validity of a username & password.
mkey - Name of FortiGate's RADIUS object whose settings to test. type: string required: False
ordinal - If 'mkey' is provided, the server-secret pair to use from the object: 'primary', 'secondary' or 'tertiary'. Defaults to 'primary'. type: string required: False
server - Host name or IP of a RADIUS server. If 'mkey' is provided, this overrides the 'server' value in the object. type: string required: False
secret - Secret password for the RADIUS server. If 'mkey' is provided, this overrides the 'secret' value in the object. type: string required: False
auth_type - Authentication protocol to use [auto|ms_chap_v2|ms_chap|chap|pap]. If 'mkey' is provided, this overrides the 'auth-type' value in the object. type: string required: False
user - User name whose access to check. type: string required: False
test.system.automation-stitch - Triggers an automation stitch for testing purposes.
mkey - ID of automation stitch to trigger. type: string required: True
log - Message to store in the log buffer when triggering an event. For example, "logid=\"32102\" eventtime=1528840790000000000 logdesc=\"Sample description\" msg=\"Sample message\"". This parameter is required for the 'event-log' event type. For the test to run, the 'logid' argument value must match the trigger-defined value. If 'logid' is not provided, the test will use the trigger-defined value. type: string required: False
test.user.tacacs-plus - Test the connectivity of the given TACACS+ server.
mkey - Name of FortiGate's TACACS+ object whose settings to test. type: string required: False
ordinal - If 'mkey' is provided, the server-key pair to use from the object: 'primary', 'secondary' or 'tertiary'. Defaults to 'primary'. type: string required: False
server - Host name of IP of a TACACS+ server. If 'mkey' is provided, this overrides the 'server' value in the object. type: string required: False
secret - Secret key for the TACACS+ server. If 'mkey' is provided, this overrides the 'key' value in the object. type: string required: False
port - Port number of the TACACS+ server. If 'mkey' is provided, this overrides the 'port' value in the object. Defaults to 49. type: int required: False
source_ip - Source IP for communications to TACACS+ server. If 'mkey' is provided, this overrides the 'source-ip' value in the object. type: string required: False
toggle-vdom-mode.system.admin - Toggles VDOM mode on/off. Enables or disables VDOM mode if it is disabled or enabled respectively.
transfer.registration.forticare - Transfer to a new FortiCare account.
update-global-label.firewall.policy - Update the global-label of group starting with the provided leading policy ID.
policyid - Leading policy ID of the group to update. type: string required: True
current-label - The current global-label of the group. If not provided, will assume the current group's label is empty string. type: string required: False
new-label - The new global-label of the group. If not provided, the current group's label will be deleted type: string required: False
update-global-label.firewall.security-policy - Update the global-label of group starting with the provided leading policy ID.
policyid - Leading policy ID of the group to update. type: string required: True
current-label - The current global-label of the group. If not provided, will assume the current group's label is empty string. type: string required: False
new-label - The new global-label of the group. If not provided, the current group's label will be deleted type: string required: False
update.forticonverter.eligibility - Force an immediate request to update eligibility and ticket info.
update.forticonverter.intf-list - Force an immediate request to update source interface list.
update.forticonverter.sn-list - Force an immediate request to update source device serials.
update.forticonverter.submitted-info - Force an immediate request to update all submitted info.
admin - New FortiSwitch administrative state [enable|disable|discovered]. type: string required: False
update.system.fortiguard - Immediately update status for FortiGuard services.
update.system.ha-peer - Update configuration of peer in HA cluster.
serial_no - Serial number of the HA member. type: string required: True
vcluster_id - Virtual cluster number. type: int required: False
priority - Priority to assign to HA member. type: int required: False
hostname - Name to assign the HA member. type: string required: False
update.system.modem - Update supported modem list from FortiGuard.
update.system.sdn-connector - Update an SDN connector's connection status.
mkey - SDN connector name. type: string required: True
update.web-ui.custom-language - Update custom language file to this Fortigate.
mkey - Name of custom language entry. type: string required: True
lang_name - New name of custom language entry. type: string required: False
lang_comments - Comments of custom language entry. type: string required: False
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
id - FortiExtender ID to upgrade. type: string required: True
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
upgrade.license.database - Upgrade or downgrade UTM engine or signature package (IPS/AntiVirus/Application Control/Industrial database/Security Rating/Internet Service Database) using uploaded file.
db_name - Security service database name [ips|appctrl|industrial_db|antivirus|security_rating|isdb|iotddb] type: string required: True
confirm_not_signed - Confirm whether unsigned pkg files may be uploaded. type: boolean required: False
confirm_not_ga_certified - Confirm whether non GA-certified pkg files may be uploaded. type: boolean required: False
file_id - File id of existing pkg file from a previous upload. type: string required: False
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
upgrade.system.firmware - Upgrade firmware image on this device.
force - Bypass signature and validity checking. type: boolean required: False
filename - Name of file on USB disk to upgrade to, or ID from FortiGuard available firmware. type: string required: False
format_partition - Set to true to format boot partition before upgrade. type: boolean required: False
ignore_invalid_signature - Set to true to allow upgrade of firmware images with invalid signatures. type: boolean required: False
file_id - File ID of the uploaded firmware image to allow upgrade of firmware images with invalid signatures. type: string required: False
ignore_admin_lockout_upon_downgrade - Set to true to allow dowgrading if the firmware doesn't support safer password and there is at least 1 admin that will be locked out after upgrade. type: boolean required: False
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
upgrade.system.lte-modem - Upgrade LTE modem firmware image on this device using uploaded files.
upload.forticonverter.config - Upload config from target FortiGate to FortiConverter.
ticket_id - Service ticket ID. type: string required: True
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
upload.switch-controller.fsw-firmware - Upload FortiSwitch firmware to the management FortiGate and then push to target FortiSwitches.
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
upload.system.config-script - Upload and run a new configuration script file.
filename - Name of configuration script file. type: string required: False
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
upload.system.hscalefw-license - Update Hyperscale firewall license for hardware acceleration using license key.
upload.system.lte-modem - Upload the modem firmware upgrade files.
filename - Firmware file being uploaded. type: string required: False
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
upload.system.vmlicense - Update VM license using uploaded file. Reboots immediately if successful.
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
filename - Name of PAC file. type: string required: False
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
upload.wifi.firmware - Upload FortiAP firmware to the management FortiGate and then push to target FortiAPs.
serials - The target device's serial. type: string required: False
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
upload.wifi.region-image - Saves a floorplan/region image to an existing region.
region_name - Region name to save image to. type: string required: True
image_type - MIME type of the image (png|jpeg|gif). type: string required: True
file_content - Provided when uploading a file: base64 encoded file data. Must not contain whitespace or other invalid base64 characters. Must be included in HTTP body. type: string required: False
user.password-policy-conform - Check if password adheres to local user password policy.
username - User name. type: string required: False
password - Password. type: string required: True
utm.rating-lookup - Lookup FortiGuard rating for a specific URL.
url - List of URLs to query. type: array required: False
lang - Language for the rating response. type: string required: False
validate-gcp-key.system.sdn-connector - Validate a string representing a private key from GCP in PEM format.
port - Port used by UDP WoL packets (0, 7, or 9). Port 9 will be used by default. type: int required: False
address - Broadcast IP address used by UDP WoL packets. type: string required: False
secureon_password - Password of the destination host if SecureOn is enabled. type: string required: False
webhook.system.automation-stitch - Triggers an incoming webhook for an automation stitch.
mkey - The incoming webhook name to trigger. type: string required: True
params - the parameter for each action, see definition in above list.type: dict
Notes
-----
.. note::
- Backup API varies across versions. For FOS 7.0.1 and earlier, utilize system_config_backup in fortios_monitor_fact. For FOS 7.0.2 and later, utilize backup.system.config in fortios_monitor.
- Different ``selector`` may have different parameters, users are expected to look them up in the dropdown list above..
- For some selectors, no ``params`` are allowed to appear.
- Not all parameters are required for a selector.
- This module is exclusivly for FortiOS monitor API.
- The result of API request is stored in ``results``.
Examples
--------
.. code-block:: yaml+jinja
- hosts: fortigates
connection: httpapi
collections:
- fortinet.fortios
vars:
vdom: "root"
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
ansible_httpapi_port: 443
tasks:
- name: Activate FortiToken
fortios_monitor:
vdom: "root"
access_token: ""
selector: 'activate.user.fortitoken'
params:
tokens: ''
- name: Reboot This Device
fortios_monitor:
vdom: "root"
access_token: ""
selector: 'reboot.system.os'
params:
event_log_message: 'Reboot Request From Ansible'
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:
.. raw:: html
build - Build number of the fortigate image returned: alwaystype: strsample: 1547
http_method - Last method used to provision the content into FortiGate returned: alwaystype: strsample: GET
name - Name of the table used to fulfill the request returned: alwaystype: strsample: firmware
path - Path of the table used to fulfill the request returned: alwaystype: strsample: system
results - Object list retrieved from device. returned: alwaystype: list
revision - Internal revision number returned: alwaystype: strsample: 17.0.2.10658
serial - Serial number of the unit returned: alwaystype: strsample: FGVMEVYYQT3AB5352
status - Indication of the operation's result returned: alwaystype: strsample: success
vdom - Virtual domain used returned: alwaystype: strsample: root
version - Version of the FortiGate returned: alwaystype: strsample: v5.6.3
ansible_facts - The list of fact subsets collected from the device returned: alwaystype: dict
Status
------
- This module is not guaranteed to have a backwards compatible interface.
Authors
-------
- Link Zheng (@chillancezen)
- Jie Xue (@JieX19)
- Hongbin Lu (@fgtdev-hblu)
- Frank Shen (@fshen01)
.. hint::
If you notice any issues in this documentation, you can create a pull request to improve it.