fmgr_fmupdate_webspam_fgdsetting – Configure the FortiGuard run parameters.
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
- 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
- fmupdate_webspam_fgdsetting - Configure the FortiGuard run parameters. type: dict
- as_cache (Alias name: as-cache) Antispam service maximum memory usage in megabytes (maximum = physical memory-1024, 0: no limit, default = 300). type: int default: 300 more...
- as_log (Alias name: as-log) Antispam log setting (default = nospam). type: str choices: [disable, nospam, all] default: nospam more...
- as_preload (Alias name: as-preload) Enable/disable preloading antispam database to memory (default = disable). type: str choices: [disable, enable] default: disable more...
- av_cache (Alias name: av-cache) Antivirus service maximum memory usage, in megabytes (100 - 500, default = 300). type: int default: 300 more...
- av_log (Alias name: av-log) Antivirus log setting (default = novirus). type: str choices: [disable, novirus, all] default: novirus more...
- av_preload (Alias name: av-preload) Enable/disable preloading antivirus database to memory (default = disable). type: str choices: [disable, enable] default: disable more...
- av2_cache (Alias name: av2-cache) Antispam service maximum memory usage in megabytes (maximum = physical memory-1024, 0: no limit, default = 800). type: int default: 800 more...
- av2_log (Alias name: av2-log) Outbreak prevention log setting (default = noav2). type: str choices: [disable, noav2, all] default: noav2 more...
- av2_preload (Alias name: av2-preload) Enable/disable preloading outbreak prevention database to memory (default = disable). type: str choices: [disable, enable] default: disable more...
- eventlog_query (Alias name: eventlog-query) Enable/disable record query to event-log besides fgd-log (default = disable). type: str choices: [disable, enable] default: disable more...
- fgd_pull_interval (Alias name: fgd-pull-interval) Fgd pull interval setting, in minutes (1 - 1440, default = 10). type: int default: 10 more...
- fq_cache (Alias name: fq-cache) File query service maximum memory usage, in megabytes (100 - 500, default = 300). type: int default: 300 more...
- fq_log (Alias name: fq-log) File query log setting (default = nofilequery). type: str choices: [disable, nofilequery, all] default: nofilequery more...
- fq_preload (Alias name: fq-preload) Enable/disable preloading file query database to memory (default = disable). type: str choices: [disable, enable] default: disable more...
- linkd_log (Alias name: linkd-log) Linkd log setting (default = debug). type: str choices: [emergency, alert, critical, error, warn, notice, info, debug, disable] default: debug more...
- max_client_worker (Alias name: max-client-worker) Max worker for tcp client connection (0~16: 0 means use cpu number up to 4). type: int default: 0 more...
- max_log_quota (Alias name: max-log-quota) Maximum log quota setting, in megabytes (100 - 20480, default = 6144). type: int default: 6144 more...
- max_unrated_site (Alias name: max-unrated-site) Maximum number of unrated site in memory, in kilobytes(10 - 5120, default = 500). type: int default: 500 more...
- restrict_as1_dbver (Alias name: restrict-as1-dbver) Restrict system update to indicated antispam(1) database version (character limit = 127). type: str more...
- restrict_as2_dbver (Alias name: restrict-as2-dbver) Restrict system update to indicated antispam(2) database version (character limit = 127). type: str more...
- restrict_as4_dbver (Alias name: restrict-as4-dbver) Restrict system update to indicated antispam(4) database version (character limit = 127). type: str more...
- restrict_av_dbver (Alias name: restrict-av-dbver) Restrict system update to indicated antivirus database version (character limit = 127). type: str more...
- restrict_av2_dbver (Alias name: restrict-av2-dbver) Restrict system update to indicated outbreak prevention database version (character limit = 127). type: str more...
- restrict_fq_dbver (Alias name: restrict-fq-dbver) Restrict system update to indicated file query database version (character limit = 127). type: str more...
- restrict_wf_dbver (Alias name: restrict-wf-dbver) Restrict system update to indicated web filter database version (character limit = 127). type: str more...
- server_override (Alias name: server-override) Server override. type: dict
more...
- servlist Servlist. type: list
more...
- id Override server id (1 - 10). type: int default: 0 more...
- ip Ipv4 address of the override server. type: str default: 0.0.0.0 more...
- ip6 Ipv6 address of the override server. type: str default: :: more...
- port Port number to use when contacting fortiguard (1 - 65535, default = 443). type: int default: 443 more...
- service_type (Alias name: service-type) Override service type. type: list or str choices: [fgd, fgc, fsa, fgfq, geoip, iot-collect] more...
- status Override status. type: str choices: [disable, enable] default: disable more...
- servlist Servlist. type: list
more...
- stat_log_interval (Alias name: stat-log-interval) Statistic log interval setting, in minutes (1 - 1440, default = 60). type: int default: 60 more...
- stat_sync_interval (Alias name: stat-sync-interval) Synchronization interval for statistic of unrated site in minutes (1 - 60, default = 60). type: int default: 60 more...
- update_interval (Alias name: update-interval) Fortiguard database update wait time if not enough delta files, in hours (2 - 24, default = 6). type: int default: 6 more...
- update_log (Alias name: update-log) Enable/disable update log setting (default = enable). type: str choices: [disable, enable] default: enable more...
- wf_cache (Alias name: wf-cache) Web filter service maximum memory usage, in megabytes (maximum = physical memory-1024, 0 = no limit, default = 600). type: int default: 0 more...
- wf_dn_cache_expire_time (Alias name: wf-dn-cache-expire-time) Web filter dn cache expire time, in minutes (1 - 1440, 0 = never, default = 30). type: int default: 30 more...
- wf_dn_cache_max_number (Alias name: wf-dn-cache-max-number) Maximum number of web filter dn cache (0 = disable, default = 10000). type: int default: 10000 more...
- wf_log (Alias name: wf-log) Web filter log setting (default = nour1) type: str choices: [disable, nourl, all] default: nourl more...
- wf_preload (Alias name: wf-preload) Enable/disable preloading the web filter database into memory (default = disable). type: str choices: [disable, enable] default: enable more...
- iot_cache (Alias name: iot-cache) Iot service maximum memory usage, in megabytes (100 - 500, default = 300). type: int default: 300 more...
- iot_log (Alias name: iot-log) Iot log setting (default = nofilequery). type: str choices: [disable, nofilequery, all, noiot] default: nofilequery more...
- iot_preload (Alias name: iot-preload) Enable/disable preloading iot database to memory (default = disable). type: str choices: [disable, enable] default: disable more...
- restrict_iots_dbver (Alias name: restrict-iots-dbver) Restrict system update to indicated file query database version (character limit = 127). type: str more...
- stat_log (Alias name: stat-log) Stat log setting (default = disable). type: str choices: [emergency, alert, critical, error, warn, notice, info, debug, disable] default: disable more...
- iotv_preload (Alias name: iotv-preload) Enable/disable preloading iot-vulnerability database to memory (default = disable). type: str choices: [disable, enable] default: disable 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 (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 the FortiGuard run parameters.
fortinet.fortimanager.fmgr_fmupdate_webspam_fgdsetting:
# 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, ...]
fmupdate_webspam_fgdsetting:
as_cache: <integer>
as_log: <value in [disable, nospam, all]>
as_preload: <value in [disable, enable]>
av_cache: <integer>
av_log: <value in [disable, novirus, all]>
av_preload: <value in [disable, enable]>
av2_cache: <integer>
av2_log: <value in [disable, noav2, all]>
av2_preload: <value in [disable, enable]>
eventlog_query: <value in [disable, enable]>
fgd_pull_interval: <integer>
fq_cache: <integer>
fq_log: <value in [disable, nofilequery, all]>
fq_preload: <value in [disable, enable]>
linkd_log: <value in [emergency, alert, critical, ...]>
max_client_worker: <integer>
max_log_quota: <integer>
max_unrated_site: <integer>
restrict_as1_dbver: <string>
restrict_as2_dbver: <string>
restrict_as4_dbver: <string>
restrict_av_dbver: <string>
restrict_av2_dbver: <string>
restrict_fq_dbver: <string>
restrict_wf_dbver: <string>
server_override:
servlist:
-
id: <integer>
ip: <string>
ip6: <string>
port: <integer>
service_type: # <list or string>
- "fgd"
- "fgc"
- "fsa"
- "fgfq"
- "geoip"
- "iot-collect"
status: <value in [disable, enable]>
stat_log_interval: <integer>
stat_sync_interval: <integer>
update_interval: <integer>
update_log: <value in [disable, enable]>
wf_cache: <integer>
wf_dn_cache_expire_time: <integer>
wf_dn_cache_max_number: <integer>
wf_log: <value in [disable, nourl, all]>
wf_preload: <value in [disable, enable]>
iot_cache: <integer>
iot_log: <value in [disable, nofilequery, all, ...]>
iot_preload: <value in [disable, enable]>
restrict_iots_dbver: <string>
stat_log: <value in [emergency, alert, critical, ...]>
iotv_preload: <value in [disable, enable]>
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.