dux_fortinet.fortianalyzer_dev.faz_fact (1.4.0) — module

Gather FortiAnalyzer facts.

| "added in version" 1.0.0 of dux_fortinet.fortianalyzer_dev"

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 dux_fortinet.fortianalyzer_dev:==1.4.0


Add to requirements.yml

  collections:
    - name: dux_fortinet.fortianalyzer_dev
      version: 1.4.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.
- name: Gathering fortianalyzer facts
  hosts: fortianalyzers
  gather_facts: false
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Fetch adom
      fortinet.fortianalyzer.faz_fact:
        facts:
          selector: "dvmdb_adom"
          filter:
            - - "os_ver"
              - "=="
              - "7.0"
            - "&&"
            - - "state"
              - "=="
              - "1"
          fields:
            - "name"
            - "restricted_prds"
          # option: "object member" # "count", "object member" or "syntax"
          sortings:
            - "restricted_prds": -1 # sort based on restricted_prds first (-1, descending)
            - "oid": 1 # if restricted_prds are same, then, sort based on oid (1, ascending)

Inputs

    
facts:
    description: the top level parameters set
    required: true
    suboptions:
      extra_params:
        description: Extra parameters for each different selector.
        type: dict
      fields:
        description:
        - Limit the output by returning only the attributes specified in the string array.
        - If none specified, all attributes will be returned.
        elements: raw
        type: list
      filter:
        description: Filter the result according to a set of criteria.
        elements: raw
        type: list
      option:
        description:
        - Set fetch option for the request. If no option is specified, by default the
          attributes of the objects will be returned.
        - See more details in FNDN API documents.
        type: raw
      params:
        description: The specific parameters for each different selector.
        type: dict
      selector:
        choices:
        - cli_fmupdate_analyzer_virusreport
        - cli_fmupdate_avips_advancedlog
        - cli_fmupdate_avips_webproxy
        - cli_fmupdate_customurllist
        - cli_fmupdate_diskquota
        - cli_fmupdate_fctservices
        - cli_fmupdate_fdssetting
        - cli_fmupdate_fdssetting_pushoverride
        - cli_fmupdate_fdssetting_pushoverridetoclient
        - cli_fmupdate_fdssetting_pushoverridetoclient_announceip
        - cli_fmupdate_fdssetting_serveroverride
        - cli_fmupdate_fdssetting_serveroverride_servlist
        - cli_fmupdate_fdssetting_updateschedule
        - cli_fmupdate_fwmsetting
        - cli_fmupdate_fwmsetting_upgradetimeout
        - cli_fmupdate_multilayer
        - cli_fmupdate_publicnetwork
        - cli_fmupdate_serveraccesspriorities
        - cli_fmupdate_serveraccesspriorities_privateserver
        - cli_fmupdate_serveroverridestatus
        - cli_fmupdate_service
        - cli_fmupdate_webspam_fgdsetting
        - cli_fmupdate_webspam_fgdsetting_serveroverride
        - cli_fmupdate_webspam_fgdsetting_serveroverride_servlist
        - cli_fmupdate_webspam_webproxy
        - cli_metafields_system_admin_user
        - cli_system_admin_group
        - cli_system_admin_group_member
        - cli_system_admin_ldap
        - cli_system_admin_ldap_adom
        - cli_system_admin_profile
        - cli_system_admin_profile_datamaskcustomfields
        - cli_system_admin_profile_writepasswdprofiles
        - cli_system_admin_profile_writepasswduserlist
        - cli_system_admin_radius
        - cli_system_admin_setting
        - cli_system_admin_tacacs
        - cli_system_admin_user
        - cli_system_admin_user_adom
        - cli_system_admin_user_adomexclude
        - cli_system_admin_user_dashboard
        - cli_system_admin_user_dashboardtabs
        - cli_system_admin_user_metadata
        - cli_system_admin_user_policypackage
        - cli_system_admin_user_restrictdevvdom
        - cli_system_alertconsole
        - cli_system_alertemail
        - cli_system_alertevent
        - cli_system_alertevent_alertdestination
        - cli_system_autodelete
        - cli_system_autodelete_dlpfilesautodeletion
        - cli_system_autodelete_logautodeletion
        - cli_system_autodelete_quarantinefilesautodeletion
        - cli_system_autodelete_reportautodeletion
        - cli_system_backup_allsettings
        - cli_system_centralmanagement
        - cli_system_certificate_ca
        - cli_system_certificate_crl
        - cli_system_certificate_local
        - cli_system_certificate_oftp
        - cli_system_certificate_remote
        - cli_system_certificate_ssh
        - cli_system_connector
        - cli_system_csf
        - cli_system_csf_fabricconnector
        - cli_system_csf_trustedlist
        - cli_system_dns
        - cli_system_docker
        - cli_system_fips
        - cli_system_fortiview_autocache
        - cli_system_fortiview_setting
        - cli_system_global
        - cli_system_guiact
        - cli_system_ha
        - cli_system_ha_peer
        - cli_system_ha_privatepeer
        - cli_system_ha_vip
        - cli_system_interface
        - cli_system_interface_ipv6
        - cli_system_interface_member
        - cli_system_localinpolicy
        - cli_system_localinpolicy6
        - cli_system_locallog_disk_filter
        - cli_system_locallog_disk_setting
        - cli_system_locallog_fortianalyzer2_filter
        - cli_system_locallog_fortianalyzer2_setting
        - cli_system_locallog_fortianalyzer3_filter
        - cli_system_locallog_fortianalyzer3_setting
        - cli_system_locallog_fortianalyzer_filter
        - cli_system_locallog_fortianalyzer_setting
        - cli_system_locallog_memory_filter
        - cli_system_locallog_memory_setting
        - cli_system_locallog_setting
        - cli_system_locallog_syslogd2_filter
        - cli_system_locallog_syslogd2_setting
        - cli_system_locallog_syslogd3_filter
        - cli_system_locallog_syslogd3_setting
        - cli_system_locallog_syslogd_filter
        - cli_system_locallog_syslogd_setting
        - cli_system_log_alert
        - cli_system_log_devicedisable
        - cli_system_log_fospolicystats
        - cli_system_log_interfacestats
        - cli_system_log_ioc
        - cli_system_log_maildomain
        - cli_system_log_pcapfile
        - cli_system_log_ratelimit
        - cli_system_log_ratelimit_device
        - cli_system_log_ratelimit_ratelimits
        - cli_system_log_settings
        - cli_system_log_settings_rollinganalyzer
        - cli_system_log_settings_rollinglocal
        - cli_system_log_settings_rollingregular
        - cli_system_log_topology
        - cli_system_logfetch_clientprofile
        - cli_system_logfetch_clientprofile_devicefilter
        - cli_system_logfetch_clientprofile_logfilter
        - cli_system_logfetch_serversettings
        - cli_system_logforward
        - cli_system_logforward_devicefilter
        - cli_system_logforward_logfieldexclusion
        - cli_system_logforward_logfilter
        - cli_system_logforward_logmaskingcustom
        - cli_system_logforwardservice
        - cli_system_mail
        - cli_system_metadata_admins
        - cli_system_ntp
        - cli_system_ntp_ntpserver
        - cli_system_passwordpolicy
        - cli_system_performance
        - cli_system_report_autocache
        - cli_system_report_estbrowsetime
        - cli_system_report_group
        - cli_system_report_group_chartalternative
        - cli_system_report_group_groupby
        - cli_system_report_setting
        - cli_system_route
        - cli_system_route6
        - cli_system_saml
        - cli_system_saml_fabricidp
        - cli_system_saml_serviceproviders
        - cli_system_sniffer
        - cli_system_snmp_community
        - cli_system_snmp_community_hosts
        - cli_system_snmp_community_hosts6
        - cli_system_snmp_sysinfo
        - cli_system_snmp_user
        - cli_system_socfabric
        - cli_system_socfabric_trustedlist
        - cli_system_sql
        - cli_system_sql_customindex
        - cli_system_sql_customskipidx
        - cli_system_sql_tsindexfield
        - cli_system_sslciphersuites
        - cli_system_status
        - cli_system_syslog
        - cli_system_webproxy
        - cli_system_workflow_approvalmatrix
        - cli_system_workflow_approvalmatrix_approver
        - dvmdb_adom
        - dvmdb_device
        - dvmdb_device_haslave
        - dvmdb_device_vdom
        - dvmdb_folder
        - dvmdb_group
        - eventmgmt_alertfilter
        - eventmgmt_alertlogs
        - eventmgmt_alertlogs_count
        - eventmgmt_alerts
        - eventmgmt_alerts_count
        - eventmgmt_alerts_export
        - eventmgmt_alerts_extradetails
        - eventmgmt_basichandlers_export
        - eventmgmt_correlationhandlers_export
        - fazsys_enduseravatar
        - fazsys_forticare_licinfo
        - fazsys_language_fonts_export
        - fazsys_language_fonts_list
        - fazsys_language_translationfile_export
        - fazsys_language_translationfile_list
        - fazsys_monitor_logforwardstatus
        - fortiview_run
        - incidentmgmt_attachments
        - incidentmgmt_attachments_count
        - incidentmgmt_epeuhistory
        - incidentmgmt_incidents
        - incidentmgmt_incidents_count
        - ioc_license_state
        - ioc_rescan_history
        - ioc_rescan_run
        - logview_logfields
        - logview_logfiles_data
        - logview_logfiles_search
        - logview_logfiles_state
        - logview_logsearch
        - logview_logsearch_count
        - logview_logstats
        - logview_pcapfile
        - report_adom_root_template_language
        - report_graphfile
        - report_graphfile_data
        - report_graphfile_list
        - report_reports_data
        - report_reports_state
        - report_run
        - report_template_export
        - report_template_list
        - soar_config_connectors
        - soar_config_playbooks
        - soar_fosconnector_automationrules
        - soar_playbook_export
        - soar_playbook_monitor
        - soar_playbook_run
        - soar_subnet_export
        - soar_task_monitor
        - sys_ha_status
        - sys_status
        - task_task
        - task_task_history
        - task_task_line
        - task_task_line_history
        - ueba_endpoints
        - ueba_endpoints_stats
        - ueba_endpoints_vuln
        - ueba_endusers
        - ueba_endusers_stats
        - ueba_otview
        description: selector of the retrieved fortianalyzer facts.
        required: true
        type: str
      sortings:
        description: Sorting rules list. Items are returned in ascending(1) or descending(-1)
          order of fields in the list.
        elements: dict
        type: list
    type: dict

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
    type: str

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

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

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

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

forticloud_access_token:
    description: Access token of FortiCloud managed API users, this option is available
      with FortiManager later than 6.4.0.
    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