drmofu.fortianalyzer.faz_cli_system_sql (1.3.0) — module

SQL settings.

| "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_system_sql:
        cli_system_sql:
          background-rebuild: disable
          # database-name: <value of string>
          # database-type: mysql
          # device-count-high: disable
          # password: foopass
          # prompt-sql-upgrade: disable
          # rebuild-event: disable
          # rebuild-event-start-time: <value of string>
          # server: foo.bar.baz
          # start-time: <value of string>
          # status: disable
          # text-search-index: disable
          # traffic-table-partition-time: <value of integer>
          # ts-index-field:
          #   - category: <value of string>
          #     value: <value of string>
          # username: fooadmin
          # utm-table-partition-time: <value of integer>
      name: SQL settings.
  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

cli_system_sql:
    description: the top level parameters set
    required: false
    suboptions:
      background-rebuild:
        choices:
        - disable
        - enable
        description:
        - Disable/Enable rebuild SQL database in the background.
        - disable - Rebuild SQL database not in the background.
        - enable - Rebuild SQL database in the background.
        type: str
      compress-table-min-age:
        description: Minimum age in days for SQL tables to be compressed.
        type: int
      custom-index:
        description: no description
        elements: dict
        suboptions:
          case-sensitive:
            choices:
            - disable
            - enable
            description:
            - Disable/Enable case sensitive index.
            - disable - Build a case insensitive index.
            - enable - Build a case sensitive index.
            type: str
          device-type:
            choices:
            - FortiGate
            - FortiMail
            - FortiWeb
            - FortiManager
            - FortiClient
            - FortiCache
            - FortiSandbox
            - FortiDDoS
            - FortiAuthenticator
            - FortiProxy
            description:
            - Device type.
            - FortiGate - Device type to FortiGate.
            - FortiMail - Device type to FortiMail.
            - FortiWeb - Device type to FortiWeb.
            type: str
          id:
            description: Add or Edit log index fields.
            type: int
          index-field:
            description: Log field name to be indexed.
            type: str
          log-type:
            choices:
            - app-ctrl
            - attack
            - content
            - dlp
            - emailfilter
            - event
            - generic
            - history
            - traffic
            - virus
            - voip
            - webfilter
            - netscan
            - fct-event
            - fct-traffic
            - fct-netscan
            - waf
            - gtp
            - dns
            - ssh
            - ssl
            - file-filter
            - asset
            - protocol
            - none
            - siem
            - ztna
            - security
            description:
            - Log type.
            - 'app-ctrl '
            - 'attack '
            - 'content '
            - 'dlp '
            - 'emailfilter '
            - 'event '
            - 'generic '
            - 'history '
            - 'traffic '
            - 'virus '
            - 'voip '
            - 'webfilter '
            - 'netscan '
            - 'fct-event '
            - 'fct-traffic '
            - 'fct-netscan '
            - 'waf '
            - 'gtp '
            - 'dns '
            - 'ssh '
            - 'ssl '
            - 'file-filter '
            - 'asset '
            - 'protocol '
            type: str
        type: list
      custom-skipidx:
        description: no description
        elements: dict
        suboptions:
          device-type:
            choices:
            - FortiGate
            - FortiManager
            - FortiClient
            - FortiMail
            - FortiWeb
            - FortiSandbox
            - FortiProxy
            description:
            - Device type.
            - FortiGate - Set device type to FortiGate.
            - FortiManager - Set device type to FortiManager
            - FortiClient - Set device type to FortiClient.
            - FortiMail - Set device type to FortiMail.
            - FortiWeb - Set device type to FortiWeb.
            - FortiSandbox - Set device type to FortiSandbox
            - FortiProxy - Set device type to FortiProxy
            type: str
          id:
            description: Add or Edit log index fields.
            type: int
          index-field:
            description: Field to be added to skip index.
            type: str
          log-type:
            choices:
            - app-ctrl
            - attack
            - content
            - dlp
            - emailfilter
            - event
            - generic
            - history
            - traffic
            - virus
            - voip
            - webfilter
            - netscan
            - fct-event
            - fct-traffic
            - fct-netscan
            - waf
            - gtp
            - dns
            - ssh
            - ssl
            - file-filter
            - asset
            - protocol
            - siem
            - ztna
            - security
            description:
            - Log type.
            - 'app-ctrl '
            - 'attack '
            - 'content '
            - 'dlp '
            - 'emailfilter '
            - 'event '
            - 'generic '
            - 'history '
            - 'traffic '
            - 'virus '
            - 'voip '
            - 'webfilter '
            - 'netscan '
            - 'fct-event '
            - 'fct-traffic '
            - 'fct-netscan '
            - 'waf '
            - 'gtp '
            - 'dns '
            - 'ssh '
            - 'ssl '
            - 'file-filter '
            - 'asset '
            - 'protocol '
            type: str
        type: list
      database-name:
        description: Database name.
        type: str
      database-type:
        choices:
        - mysql
        - postgres
        description:
        - Database type.
        - mysql - MySQL database.
        - postgres - PostgreSQL local database.
        type: str
      device-count-high:
        choices:
        - disable
        - enable
        description:
        - Must set to enable if the count of registered devices is greater than 8000.
        - disable - Set to disable if device count is less than 8000.
        - enable - Set to enable if device count is equal to or greater than 8000.
        type: str
      event-table-partition-time:
        description: Maximum SQL database table partitioning time range in minute (0 for
          unlimited) for event logs.
        type: int
      fct-table-partition-time:
        description: Maximum SQL database table partitioning time range in minute (0 for
          unlimited) for FortiClient logs.
        type: int
      logtype:
        choices:
        - none
        - app-ctrl
        - attack
        - content
        - dlp
        - emailfilter
        - event
        - generic
        - history
        - traffic
        - virus
        - voip
        - webfilter
        - netscan
        - fct-event
        - fct-traffic
        - fct-netscan
        - waf
        - gtp
        - dns
        - ssh
        - ssl
        - file-filter
        - asset
        - protocol
        - siem
        - ztna
        - security
        description: no description
        elements: str
        type: list
      password:
        description: no description
        type: str
      prompt-sql-upgrade:
        choices:
        - disable
        - enable
        description:
        - Prompt to convert log database into SQL database at start time on GUI.
        - disable - Do not prompt to upgrade log database to SQL database at start time
          on GUI.
        - enable - Prompt to upgrade log database to SQL database at start time on GUI.
        type: str
      rebuild-event:
        choices:
        - disable
        - enable
        description:
        - Disable/Enable rebuild event during SQL database rebuilding.
        - disable - Do not rebuild event during SQL database rebuilding.
        - enable - Rebuild event during SQL database rebuilding.
        type: str
      rebuild-event-start-time:
        description: no description
        type: str
      server:
        description: Database IP or hostname.
        type: str
      start-time:
        description: no description
        type: str
      status:
        choices:
        - disable
        - local
        description:
        - SQL database status.
        - disable - Disable SQL database.
        - local - Enable local database.
        type: str
      text-search-index:
        choices:
        - disable
        - enable
        description:
        - Disable/Enable text search index.
        - disable - Do not create text search index.
        - enable - Create text search index.
        type: str
      traffic-table-partition-time:
        description: Maximum SQL database table partitioning time range in minute (0 for
          unlimited) for traffic logs.
        type: int
      ts-index-field:
        description: no description
        elements: dict
        suboptions:
          category:
            description: Category of text search index fields.
            type: str
          value:
            description: Fields of text search index.
            type: str
        type: list
      username:
        description: User name for login remote database.
        type: str
      utm-table-partition-time:
        description: Maximum SQL database table partitioning time range in minute (0 for
          unlimited) for UTM logs.
        type: int
    type: dict

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

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