fmgr_fmupdate_webspam_fgdsetting – Configure the FortiGuard run parameters.

New in version 2.0.0.

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 v6.x and v7.x.

Requirements

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

  • ansible>=2.9.0

FortiManager Version Compatibility


6.0.0
True
6.2.0 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.2.7 6.2.8 6.2.9 6.2.10
True True True True True True True True True True
6.4.0 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 6.4.6 6.4.7 6.4.8 6.4.9 6.4.10 6.4.11
True True True True True True True True True True True True
7.0.0 7.0.1 7.0.2 7.0.3 7.0.4 7.0.5 7.0.6 7.0.7
True True True True True True True True
7.2.0 7.2.1 7.2.2
True True True
7.4.0
True

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 - Antispam service maximum memory usage in megabytes (Maximum = Physical memory-1024, 0: no limit, default = 300). type: int default: 300 more...
    • as-log - Antispam log setting (default = nospam). type: str choices: [disable, nospam, all] default: nospam more...
    • as-preload - Enable/disable preloading antispam database to memory (default = disable). type: str choices: [disable, enable] default: disable more...
    • av-cache - Antivirus service maximum memory usage, in megabytes (100 - 500, default = 300). type: int default: 300 more...
    • av-log - Antivirus log setting (default = novirus). type: str choices: [disable, novirus, all] default: novirus more...
    • av-preload - Enable/disable preloading antivirus database to memory (default = disable). type: str choices: [disable, enable] default: disable more...
    • 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 - Outbreak prevention log setting (default = noav2). type: str choices: [disable, noav2, all] default: noav2 more...
    • av2-preload - Enable/disable preloading outbreak prevention database to memory (default = disable). type: str choices: [disable, enable] default: disable more...
    • 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 - Fgd pull interval setting, in minutes (1 - 1440, default = 10). type: int default: 10 more...
    • fq-cache - File query service maximum memory usage, in megabytes (100 - 500, default = 300). type: int default: 300 more...
    • fq-log - File query log setting (default = nofilequery). type: str choices: [disable, nofilequery, all] default: nofilequery more...
    • fq-preload - Enable/disable preloading file query database to memory (default = disable). type: str choices: [disable, enable] default: disable more...
    • 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 - max worker for tcp client connection (0~16: 0 means use cpu number up to 4). type: int default: 0 more...
    • max-log-quota - Maximum log quota setting, in megabytes (100 - 20480, default = 6144). type: int default: 6144 more...
    • max-unrated-site - Maximum number of unrated site in memory, in kilobytes(10 - 5120, default = 500). type: int default: 500 more...
    • restrict-as1-dbver - Restrict system update to indicated antispam(1) database version (character limit = 127). type: str more...
    • restrict-as2-dbver - Restrict system update to indicated antispam(2) database version (character limit = 127). type: str more...
    • restrict-as4-dbver - Restrict system update to indicated antispam(4) database version (character limit = 127). type: str more...
    • restrict-av-dbver - Restrict system update to indicated antivirus database version (character limit = 127). type: str more...
    • restrict-av2-dbver - Restrict system update to indicated outbreak prevention database version (character limit = 127). type: str more...
    • restrict-fq-dbver - Restrict system update to indicated file query database version (character limit = 127). type: str more...
    • restrict-wf-dbver - Restrict system update to indicated web filter database version (character limit = 127). type: str more...
    • server-override type: dict
      • servlist - Servlist. type: array 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 - Override service type. type: array choices: [fgd, fgc, fsa] more...
      • status - Override status. type: str choices: [disable, enable] default: disable more...
    • stat-log-interval - Statistic log interval setting, in minutes (1 - 1440, default = 60). type: int default: 60 more...
    • stat-sync-interval - Synchronization interval for statistic of unrated site in minutes (1 - 60, default = 60). type: int default: 60 more...
    • 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 - Enable/disable update log setting (default = enable). type: str choices: [disable, enable] default: enable more...
    • 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 - Web filter DN cache expire time, in minutes (1 - 1440, 0 = never, default = 30). type: int default: 30 more...
    • wf-dn-cache-max-number - Maximum number of Web filter DN cache (0 = disable, default = 10000). type: int default: 10000 more...
    • wf-log - Web filter log setting (default = nour1) type: str choices: [disable, nourl, all] default: nourl more...
    • wf-preload - Enable/disable preloading the web filter database into memory (default = disable). type: str choices: [disable, enable] default: enable more...
    • iot-cache - IoT service maximum memory usage, in megabytes (100 - 500, default = 300). type: int default: 300 more...
    • iot-log - IoT log setting (default = nofilequery). type: str choices: [disable, nofilequery, all] default: nofilequery more...
    • iot-preload - Enable/disable preloading IoT database to memory (default = disable). type: str choices: [disable, enable] default: disable more...
    • restrict-iots-dbver - Restrict system update to indicated file query database version (character limit = 127). type: str more...
    • 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

- hosts: fortimanager-inventory
  collections:
    - fortinet.fortimanager
  connection: httpapi
  vars:
     ansible_httpapi_use_ssl: True
     ansible_httpapi_validate_certs: False
     ansible_httpapi_port: 443
  tasks:
   - name: Configure the FortiGuard run parameters.
     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: <value of integer>
           as-log: <value in [disable, nospam, all]>
           as-preload: <value in [disable, enable]>
           av-cache: <value of integer>
           av-log: <value in [disable, novirus, all]>
           av-preload: <value in [disable, enable]>
           av2-cache: <value of integer>
           av2-log: <value in [disable, noav2, all]>
           av2-preload: <value in [disable, enable]>
           eventlog-query: <value in [disable, enable]>
           fgd-pull-interval: <value of integer>
           fq-cache: <value of integer>
           fq-log: <value in [disable, nofilequery, all]>
           fq-preload: <value in [disable, enable]>
           linkd-log: <value in [emergency, alert, critical, ...]>
           max-client-worker: <value of integer>
           max-log-quota: <value of integer>
           max-unrated-site: <value of integer>
           restrict-as1-dbver: <value of string>
           restrict-as2-dbver: <value of string>
           restrict-as4-dbver: <value of string>
           restrict-av-dbver: <value of string>
           restrict-av2-dbver: <value of string>
           restrict-fq-dbver: <value of string>
           restrict-wf-dbver: <value of string>
           server-override:
              servlist:
                -
                    id: <value of integer>
                    ip: <value of string>
                    ip6: <value of string>
                    port: <value of integer>
                    service-type:
                      - fgd
                      - fgc
                      - fsa
              status: <value in [disable, enable]>
           stat-log-interval: <value of integer>
           stat-sync-interval: <value of integer>
           update-interval: <value of integer>
           update-log: <value in [disable, enable]>
           wf-cache: <value of integer>
           wf-dn-cache-expire-time: <value of integer>
           wf-dn-cache-max-number: <value of integer>
           wf-log: <value in [disable, nourl, all]>
           wf-preload: <value in [disable, enable]>
           iot-cache: <value of integer>
           iot-log: <value in [disable, nofilequery, all]>
           iot-preload: <value in [disable, enable]>
           restrict-iots-dbver: <value of string>
           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 0
  • version_check_warning - Warning if the parameters used in the playbook are not supported by the current FortiManager version. returned: if at least on parameter mpt supported by the current FortiManager version type: list 0

Status

  • This module is not guaranteed to have a backwards compatible interface.

Authors

  • Xinwei Du (@dux-fortinet)
  • Xing Li (@lix-fortinet)
  • Jie Xue (@JieX19)
  • Link Zheng (@chillancezen)
  • Frank Shen (@fshen01)
  • Hongbin Lu (@fgtdev-hblu)

Hint

If you notice any issues in this documentation, you can create a pull request to improve it.