:source: faz_fact.py :orphan: .. _faz_fact: faz_fact -- Gather FortiAnalyzer Facts. +++++++++++++++++++++++++++++++++++++++ .. versionadded:: 1.0.0 .. contents:: :local: :depth: 1 Synopsis -------- - This module is able to configure a FortiAnalyzer device. - Examples include all parameters and values need to be adjusted to data sources before usage. - Tested with FortiAnalyzer v6.x and v7.x. Requirements ------------ The below requirements are needed on the host that executes this module. - ansible>=2.16.0 Parameters ---------- .. raw:: html Notes ----- .. note:: - Selector is a mandatory parameter for the module, and the params is varying depending on the selector. - Parameter ``adom`` can be ``null`` or ``''`` for all administrative domains, ``global`` for global domain and any other custom domain strings. and a particular fact may not support all kinds of domains. - In parameters section, ``null`` and ``''`` are identical if you are fetching all objects under that selector category. - 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 -------- .. code-block:: yaml+jinja - 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) 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: .. raw:: html Status ------ - This module is not guaranteed to have a backwards compatible interface. Authors ------- - Xinwei Du (@dux-fortinet) - Maxx Liu (@MaxxLiu22) - Link Zheng (@chillancezen) - Jie Xue (@JieX19) - Frank Shen (@fshen01) - Hongbin Lu (@fgtdev-hblu)