drmofu.fortianalyzer.faz_cli_fmupdate_webspam_fgdsetting (1.3.0) — module

Configure the FortiGuard run parameters.

| "added in version" 1.0.0 of drmofu.fortianalyzer"

Authors: Xinwei Du (@dux-fortinet), Link Zheng (@chillancezen), Jie Xue (@JieX19), Frank Shen (@fshen01), Hongbin Lu (@fgtdev-hblu)

preview | supported by community

Install collection

Install with ansible-galaxy collection install drmofu.fortianalyzer:==1.3.0


Add to requirements.yml

  collections:
    - name: drmofu.fortianalyzer
      version: 1.3.0

Description

This module is able to configure a FortiAnalyzer device.

Examples include all parameters and values which need to be adjusted to data sources before usage.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- collections:
    - fortinet.fortianalyzer
  connection: httpapi
  hosts: fortianalyzer_inventory
  tasks:
    - faz_cli_fmupdate_webspam_fgdsetting:
        cli_fmupdate_webspam_fgdsetting:
          as-preload: disable
          av-preload: disable
          av2-preload: disable
          eventlog-query: disable
          fq-preload: disable
          update-log: disable
          wf-preload: disable
      name: Configure the FortiGuard run parameters.
  vars:
    ansible_httpapi_port: 443
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false

Inputs

    
log_path:
    default: /tmp/fortianalyzer.ansible.log
    description:
    - The path to save log. Used if enable_log is true.
    - Please use absolute path instead of relative path.
    - If the log_path setting is incorrect, the log will be saved in /tmp/fortianalyzer.ansible.log
    required: false
    type: str

rc_failed:
    description: the rc codes list with which the conditions to fail will be overriden
    elements: int
    required: false
    type: list

enable_log:
    default: false
    description: Enable/Disable logging for task
    required: false
    type: bool

access_token:
    description: The token to access FortiManager without using username and password.
    required: false
    type: str

rc_succeeded:
    description: the rc codes list with which the conditions to succeed will be overriden
    elements: int
    required: false
    type: list

proposed_method:
    choices:
    - set
    - update
    - add
    description: The overridden method for the underlying Json RPC request
    required: false
    type: str

bypass_validation:
    default: false
    description: only set to True when module schema diffs with FortiAnalyzer API structure,
      module continues to execute without validating parameters
    required: false
    type: bool

forticloud_access_token:
    description: Authenticate Ansible client with forticloud API access token.
    required: false
    type: str

cli_fmupdate_webspam_fgdsetting:
    description: the top level parameters set
    required: false
    suboptions:
      as-cache:
        description: 'Antispam service maximum memory usage in megabytes (Maximum = Physical
          memory-1024, 0: no limit, default = 300).'
        type: int
      as-log:
        choices:
        - disable
        - nospam
        - all
        description:
        - Antispam log setting (default = nospam).
        - disable - Disable spam log.
        - nospam - Log non-spam events.
        - all - Log all spam lookups.
        type: str
      as-preload:
        choices:
        - disable
        - enable
        description:
        - Enable/disable preloading antispam database to memory (default = disable).
        - disable - Disable antispam database preload.
        - enable - Enable antispam database preload.
        type: str
      av-cache:
        description: Antivirus service maximum memory usage, in megabytes (100 - 500,
          default = 300).
        type: int
      av-log:
        choices:
        - disable
        - novirus
        - all
        description:
        - Antivirus log setting (default = novirus).
        - disable - Disable virus log.
        - novirus - Log non-virus events.
        - all - Log all virus lookups.
        type: str
      av-preload:
        choices:
        - disable
        - enable
        description:
        - Enable/disable preloading antivirus database to memory (default = disable).
        - disable - Disable antivirus database preload.
        - enable - Enable antivirus database preload.
        type: str
      av2-cache:
        description: 'Antispam service maximum memory usage in megabytes (Maximum = Physical
          memory-1024, 0: no limit, default = 800).'
        type: int
      av2-log:
        choices:
        - disable
        - noav2
        - all
        description:
        - Outbreak prevention log setting (default = noav2).
        - disable - Disable av2 log.
        - noav2 - Log non-av2 events.
        - all - Log all av2 lookups.
        type: str
      av2-preload:
        choices:
        - disable
        - enable
        description:
        - Enable/disable preloading outbreak prevention database to memory (default =
          disable).
        - disable - Disable outbreak prevention database preload.
        - enable - Enable outbreak prevention database preload.
        type: str
      eventlog-query:
        choices:
        - disable
        - enable
        description:
        - Enable/disable record query to event-log besides fgd-log (default = disable).
        - disable - Record query to event-log besides fgd-log.
        - enable - Do not log to event-log.
        type: str
      fgd-pull-interval:
        description: Fgd pull interval setting, in minutes (1 - 1440, default = 10).
        type: int
      fq-cache:
        description: File query service maximum memory usage, in megabytes (100 - 500,
          default = 300).
        type: int
      fq-log:
        choices:
        - disable
        - nofilequery
        - all
        description:
        - File query log setting (default = nofilequery).
        - disable - Disable file query log.
        - nofilequery - Log non-file query events.
        - all - Log all file query events.
        type: str
      fq-preload:
        choices:
        - disable
        - enable
        description:
        - Enable/disable preloading file query database to memory (default = disable).
        - disable - Disable file query db preload.
        - enable - Enable file query db preload.
        type: str
      iot-cache:
        description: IoT service maximum memory usage, in megabytes (100 - 500, default
          = 300).
        type: int
      iot-log:
        choices:
        - disable
        - nofilequery
        - all
        description:
        - IoT log setting (default = nofilequery).
        - disable - Disable IoT log.
        - nofilequery - Log non-IoT events.
        - all - Log all IoT events.
        type: str
      iot-preload:
        choices:
        - disable
        - enable
        description:
        - Enable/disable preloading IoT database to memory (default = disable).
        - disable - Disable IoT db preload.
        - enable - Enable IoT db preload.
        type: str
      iotv-preload:
        choices:
        - disable
        - enable
        description:
        - Enable/disable preloading IoT-Vulnerability database to memory (default = disable).
        - disable - Disable IoT-Vulnerability db preload.
        - enable - Enable IoT-Vulnerability db preload.
        type: str
      linkd-log:
        choices:
        - emergency
        - alert
        - critical
        - error
        - warn
        - notice
        - info
        - debug
        - disable
        description:
        - Linkd log setting (default = debug).
        - emergency - The unit is unusable.
        - alert - Immediate action is required
        - critical - Functionality is affected.
        - error - Functionality is probably affected.
        - warn - Functionality might be affected.
        - notice - Information about normal events.
        - info - General information.
        - debug - Debug information.
        - disable - Linkd logging is disabled.
        type: str
      max-client-worker:
        description: 'max worker for tcp client connection (0~16: 0 means use cpu number
          up to 4).'
        type: int
      max-log-quota:
        description: Maximum log quota setting, in megabytes (100 - 20480, default = 6144).
        type: int
      max-unrated-site:
        description: Maximum number of unrated site in memory, in kilobytes(10 - 5120,
          default = 500).
        type: int
      restrict-as1-dbver:
        description: Restrict system update to indicated antispam(1) database version
          (character limit = 127).
        type: str
      restrict-as2-dbver:
        description: Restrict system update to indicated antispam(2) database version
          (character limit = 127).
        type: str
      restrict-as4-dbver:
        description: Restrict system update to indicated antispam(4) database version
          (character limit = 127).
        type: str
      restrict-av-dbver:
        description: Restrict system update to indicated antivirus database version (character
          limit = 127).
        type: str
      restrict-av2-dbver:
        description: Restrict system update to indicated outbreak prevention database
          version (character limit = 127).
        type: str
      restrict-fq-dbver:
        description: Restrict system update to indicated file query database version (character
          limit = 127).
        type: str
      restrict-iots-dbver:
        description: Restrict system update to indicated file query database version (character
          limit = 127).
        type: str
      restrict-wf-dbver:
        description: Restrict system update to indicated web filter database version (character
          limit = 127).
        type: str
      server-override:
        description: no description
        required: false
        suboptions:
          servlist:
            description: no description
            elements: dict
            suboptions:
              id:
                description: Override server ID (1 - 10).
                type: int
              ip:
                description: IPv4 address of the override server.
                type: str
              ip6:
                description: IPv6 address of the override server.
                type: str
              port:
                description: Port number to use when contacting FortiGuard (1 - 65535,
                  default = 443).
                type: int
              service-type:
                choices:
                - fgd
                - fgc
                - fsa
                - fgfq
                - geoip
                - iot-collect
                description:
                - Override service type.
                - fgd - Server override config for fgd
                - fgc - Server override config for fgc
                - fsa - Server override config for fsa
                type: str
            type: list
          status:
            choices:
            - disable
            - enable
            description:
            - Override status.
            - disable - Disable setting.
            - enable - Enable setting.
            type: str
        type: dict
      stat-log-interval:
        description: Statistic log interval setting, in minutes (1 - 1440, default = 60).
        type: int
      stat-sync-interval:
        description: Synchronization interval for statistic of unrated site in minutes
          (1 - 60, default = 60).
        type: int
      update-interval:
        description: FortiGuard database update wait time if not enough delta files, in
          hours (2 - 24, default = 6).
        type: int
      update-log:
        choices:
        - disable
        - enable
        description:
        - Enable/disable update log setting (default = enable).
        - disable - Disable update log.
        - enable - Enable update log.
        type: str
      wf-cache:
        description: Web filter service maximum memory usage, in megabytes (maximum =
          Physical memory-1024, 0 = no limit, default = 600).
        type: int
      wf-dn-cache-expire-time:
        description: Web filter DN cache expire time, in minutes (1 - 1440, 0 = never,
          default = 30).
        type: int
      wf-dn-cache-max-number:
        description: Maximum number of Web filter DN cache (0 = disable, default = 10000).
        type: int
      wf-log:
        choices:
        - disable
        - nourl
        - all
        description:
        - Web filter log setting (default = nour1)
        - disable - Disable URL log.
        - nourl - Log non-URL events.
        - all - Log all URL lookups.
        type: str
      wf-preload:
        choices:
        - disable
        - enable
        description:
        - Enable/disable preloading the web filter database into memory (default = disable).
        - disable - Disable web filter database preload.
        - enable - Enable web filter database preload.
        type: str
    type: dict

Outputs

meta:
  contains:
    request_url:
      description: The full url requested
      returned: always
      sample: /sys/login/user
      type: str
    response_code:
      description: The status of api request
      returned: always
      sample: 0
      type: int
    response_data:
      description: The api response
      returned: always
      type: list
    response_message:
      description: The descriptive message of the api response
      returned: always
      sample: OK.
      type: str
    system_information:
      description: The information of the target system.
      returned: always
      type: dict
  description: The result of the request.
  returned: always
  type: dict
rc:
  description: The status the request.
  returned: always
  sample: 0
  type: int
version_check_warning:
  description: Warning if the parameters used in the playbook are not supported by
    the current fortianalyzer version.
  returned: complex
  type: list