fortinet.fortimanager.fmgr_system_fortiguard module – Configure FortiGuard services.
Note
This module is part of the fortinet.fortimanager collection (version 2.8.2).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install fortinet.fortimanager
.
To use it in a playbook, specify: fortinet.fortimanager.fmgr_system_fortiguard
.
New in fortinet.fortimanager 2.0.0
Synopsis
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.
Parameters
Parameter |
Comments |
---|---|
The token to access FortiManager without using username and password. |
|
The parameter (adom) in requested url. |
|
Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters. Choices:
|
|
Enable/Disable logging for task. Choices:
|
|
Authenticate Ansible client with forticloud API access token. |
|
The overridden method for the underlying Json RPC request. Choices:
|
|
The rc codes list with which the conditions to fail will be overriden. |
|
The rc codes list with which the conditions to succeed will be overriden. |
|
The top level parameters set. |
|
Enable/disable FortiGuard antispam request caching. Choices:
|
|
Maximum percent of FortiGate memory the antispam cache is allowed to use |
|
Maximum permille of FortiGate memory the antispam cache is allowed to use |
|
Time-to-live for antispam cache entries in seconds |
|
Antispam expiration. |
|
Enable/disable turning off the FortiGuard antispam service. Choices:
|
|
Antispam license. |
|
Antispam query time out |
|
IP address of the FortiGuard anycast DNS rating server. |
|
Port to connect to on the FortiGuard anycast DNS rating server. |
|
Enable/disable automatic patch-level firmware upgrade from FortiGuard. Choices:
|
|
Allowed day Choices:
|
|
Delay of day |
|
End time in the designated time window for automatic patch-level firmware upgrade from FortiGuard in 24 hour time |
|
Start time in the designated time window for automatic patch-level firmware upgrade from FortiGuard in 24 hour time |
|
Automatically connect to and login to FortiCloud. Choices:
|
|
Enable/disable the FortiGuard antivirus cache. Choices:
|
|
Maximum percent of memory the antivirus cache can use |
|
Time-to-live for antivirus cache entries |
|
Turn off the FortiGuard antivirus service. Choices:
|
|
Interval of time between license checks for the FortiGuard antivirus contract. |
|
Antivirus query time out |
|
IP address of the FortiDDNS server. |
|
IPv6 address of the FortiDDNS server. |
|
Port used to communicate with FortiDDNS servers. |
|
Threshold for number of days before FortiGuard license expiration to generate license expiring event log |
|
Enable/disable use of FortiGuards anycast network. Choices:
|
|
Configure which of Fortinets servers to provide FortiGuard services in FortiGuards anycast network. Choices:
|
|
Enable/disable prompting of automatic patch-level firmware upgrade recommendation. Choices:
|
|
Specify outgoing interface to reach server. |
|
Specify how to select outgoing interface to reach server. Choices:
|
|
Number of servers to alternate between as first FortiGuard option. |
|
Enable/disable FortiGuard Virus Outbreak Prevention cache. Choices:
|
|
Maximum percent of memory FortiGuard Virus Outbreak Prevention cache can use |
|
Maximum permille of memory FortiGuard Virus Outbreak Prevention cache can use |
|
Time-to-live for FortiGuard Virus Outbreak Prevention cache entries |
|
Outbreak prevention expiration. |
|
Turn off FortiGuard Virus Outbreak Prevention service. Choices:
|
|
Outbreak prevention license. |
|
FortiGuard Virus Outbreak Prevention time out |
|
Enable/disable use of persistent connection to receive update notification from FortiGuard. Choices:
|
|
Port used to communicate with the FortiGuard servers. Choices:
|
|
Protocol used to communicate with the FortiGuard servers. Choices:
|
|
(list) Proxy user password. |
|
IP address of the proxy server. |
|
Port used to communicate with the proxy server. |
|
Proxy user name. |
|
Enable/disable FortiCloud Sandbox inline-scan. Choices:
|
|
Cloud sandbox region. |
|
Customization options for the FortiGuard DNS service. Choices:
|
|
(list) IP address of the FortiDNS server. |
|
Port used to communicate with FortiDNS servers. |
|
Service account ID. |
|
Source IPv4 address used to communicate with FortiGuard. |
|
Source IPv6 address used to communicate with FortiGuard. |
|
Enable/disable proxy dictionary rebuild. Choices:
|
|
Enable/disable DLP signature update. Choices:
|
|
Enable/disable external resource update. Choices:
|
|
Enable/disable Internet Service Database update. Choices:
|
|
Signature update server location. Choices:
|
|
Enable/disable allowlist update. Choices:
|
|
FortiGuard Service virtual domain name. |
|
Videofilter expiration. |
|
Videofilter license. |
|
Enable/disable FortiGuard web filter caching. Choices:
|
|
Time-to-live for web filter cache entries in seconds |
|
Webfilter expiration. |
|
Enable/disable turning off the FortiGuard web filtering service. Choices:
|
|
Webfilter license. |
|
Web filter query time out |
|
The adom to lock for FortiManager running in workspace mode, the value can be global and others including root. |
|
The maximum time in seconds to wait for other user to release the workspace lock. Default: |
Notes
Note
Starting in version 2.4.0, all input arguments are named using the underscore naming convention (snake_case). Please change the arguments such as “var-name” to “var_name”. Old argument names are still available yet you will receive deprecation warnings. You can ignore this warning by setting deprecation_warnings=False in ansible.cfg.
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.
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 (generated based on argument schema)
hosts: fortimanagers
connection: httpapi
vars:
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
ansible_httpapi_port: 443
tasks:
- name: Configure FortiGuard services.
fortinet.fortimanager.fmgr_system_fortiguard:
# bypass_validation: false
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
# rc_succeeded: [0, -2, -3, ...]
# rc_failed: [-2, -3, ...]
adom: <your own value>
system_fortiguard:
antispam_cache: <value in [disable, enable]>
antispam_cache_mpercent: <integer>
antispam_cache_ttl: <integer>
antispam_expiration: <integer>
antispam_force_off: <value in [disable, enable]>
antispam_license: <integer>
antispam_timeout: <integer>
auto_join_forticloud: <value in [disable, enable]>
ddns_server_ip: <string>
ddns_server_port: <integer>
load_balance_servers: <integer>
outbreak_prevention_cache: <value in [disable, enable]>
outbreak_prevention_cache_mpercent: <integer>
outbreak_prevention_cache_ttl: <integer>
outbreak_prevention_expiration: <integer>
outbreak_prevention_force_off: <value in [disable, enable]>
outbreak_prevention_license: <integer>
outbreak_prevention_timeout: <integer>
port: <value in [53, 80, 8888, ...]>
sdns_server_ip: <list or string>
sdns_server_port: <integer>
service_account_id: <string>
source_ip: <string>
source_ip6: <string>
update_server_location: <value in [any, usa, automatic, ...]>
webfilter_cache: <value in [disable, enable]>
webfilter_cache_ttl: <integer>
webfilter_expiration: <integer>
webfilter_force_off: <value in [disable, enable]>
webfilter_license: <integer>
webfilter_timeout: <integer>
protocol: <value in [udp, http, https]>
proxy_password: <list or string>
proxy_server_ip: <string>
proxy_server_port: <integer>
proxy_username: <string>
sandbox_region: <string>
avquery_cache_ttl: <integer>
avquery_timeout: <integer>
avquery_cache: <value in [disable, enable]>
avquery_cache_mpercent: <integer>
avquery_license: <integer>
avquery_force_off: <value in [disable, enable]>
fortiguard_anycast: <value in [disable, enable]>
fortiguard_anycast_source: <value in [fortinet, aws, debug]>
interface: <string>
interface_select_method: <value in [auto, sdwan, specify]>
sdns_options:
- "include-question-section"
anycast_sdns_server_ip: <string>
anycast_sdns_server_port: <integer>
persistent_connection: <value in [disable, enable]>
update_build_proxy: <value in [disable, enable]>
update_extdb: <value in [disable, enable]>
update_ffdb: <value in [disable, enable]>
update_uwdb: <value in [disable, enable]>
videofilter_expiration: <integer>
videofilter_license: <integer>
ddns_server_ip6: <string>
vdom: <string>
auto_firmware_upgrade: <value in [disable, enable]>
auto_firmware_upgrade_day:
- "sunday"
- "monday"
- "tuesday"
- "wednesday"
- "thursday"
- "friday"
- "saturday"
auto_firmware_upgrade_end_hour: <integer>
auto_firmware_upgrade_start_hour: <integer>
sandbox_inline_scan: <value in [disable, enable]>
auto_firmware_upgrade_delay: <integer>
gui_prompt_auto_upgrade: <value in [disable, enable]>
FDS_license_expiring_days: <integer>
antispam_cache_mpermille: <integer>
outbreak_prevention_cache_mpermille: <integer>
update_dldb: <value in [disable, enable]>
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The result of the request. Returned: always |
|
The full url requested. Returned: always Sample: |
|
The status of api request. Returned: always Sample: |
|
The api response. Returned: always |
|
The descriptive message of the api response. Returned: always Sample: |
|
The information of the target system. Returned: always |
|
The status the request. Returned: always Sample: |
|
Warning if the parameters used in the playbook are not supported by the current FortiManager version. Returned: complex |