:source: faz_report_config_layout.py
:orphan:
.. _faz_report_config_layout:
faz_report_config_layout -- Config layout.
++++++++++++++++++++++++++++++++++++++++++
.. versionadded:: 1.5.0
.. warning::
Starting in version 2.0.0, all variables will be named in the underscore naming convention.
- Possible variable names before 2.0.0: ``variable-name``, ``variable name``, ``variable.name``
- Corresponding variable names since 2.0.0: ``variable_name``
FortiAnalyzer Ansible v1.4+ supports both previous argument name and new underscore name.
You will receive deprecation warnings if you keep using the previous argument name.
You can ignore the warning by setting deprecation_warnings=False in ansible.cfg.
.. 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.
- This module supports check mode and diff mode.
Requirements
------------
The below requirements are needed on the host that executes this module.
- ansible>=2.16.0
FortiAnalyzer Version Compatibility
------------------------------------
.. raw:: html
Supported Version Ranges: v6.2.1 -> latest
Parameters
----------
.. raw:: html
- access_token The token to access FortiAnalyzer without using ansible_username and ansible_password. type: str
- bypass_validation Only set to True when module schema diffs with FortiAnalyzer API structure, module continues to execute without validating parameters type: bool default: False
- enable_log Enable/Disable logging for task type: bool default: False
- forticloud_access_token Access token of forticloud analyzer API users. type: str
- log_path 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.logtype: str default: "/tmp/fortianalyzer.ansible.log"
- proposed_method The overridden method for the underlying Json RPC request type: str choices: set, update, add
- version_check If set to True, it will check whether the parameters used are supported by the corresponding version of FortiAnazlyer locally based on FNDN data. A warning will be returned in version_check_warning if there is a mismatch. This warning is only a suggestion and may not be accurate. type: bool default: True
- rc_succeeded The rc codes list with which the conditions to succeed will be overriden type: list
- rc_failed The rc codes list with which the conditions to fail will be overriden type: list
- state The directive to create, update or delete an object type: str required: true choices: present, absent
- adom The parameter in requested url type: str required: true
- report_config_layout Config layout. type: dict
- body type: str more...
Supported Version Ranges: v6.2.1 -> v7.4.2
- component reference: /report/adom/<adom-name>/config/layout/<layout-id>/component type: list of dict
more...
Supported Version Ranges: v6.2.1 -> latest
- component_id type: int more...
Supported Version Ranges: v6.2.1 -> v7.4.2
- type type: str choices: [graphic, column-break, macro, section, chart, heading2, heading3, heading1, page-break, text] more...
Supported Version Ranges: v6.2.1 -> v7.4.2
- variable reference: /report/adom/<adom-name>/config/layout/<layout-id>/component/<component-id>/variable type: list of dict
more...
Supported Version Ranges: v6.2.1 -> latest
- not type: str choices: [enable, disable] more...
Supported Version Ranges: v6.2.1 -> v7.4.2
- var type: str more...
Supported Version Ranges: v6.2.1 -> v7.4.2
- var_value type: str more...
Supported Version Ranges: v6.2.1 -> v7.4.2
- description type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13, v7.4.3 -> latest
- drilldown_flag type: str choices: [enable, disable] default: disable more...
Supported Version Ranges: v6.2.2 -> v6.2.13, v7.4.3 -> latest
- status type: str choices: [enable, disable] default: disable more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- var_expression type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- var_type type: str choices: [ip, integer, string, datetime] more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- view_mask type: int default: 0 more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- alignment type: int more...
Supported Version Ranges: v6.2.2 -> v6.2.13, v7.4.3 -> latest
- bg_color type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13, v7.4.3 -> latest
- category type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13, v7.4.3 -> latest
- chart type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13, v7.4.3 -> latest
- chart_option type: str choices: [calc-average, none] more...
Supported Version Ranges: v6.2.2 -> v6.2.13, v7.4.3 -> latest
- column type: str choices: [1, 2] default: more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- customized type: int default: 0 more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- device_mode type: str choices: [variable, specify] default: variable more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- devices type: str default: All_FortiGate more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- drill_down_report type: str choices: [enable, disable] default: disable more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- filter_logic type: str choices: [all, any] default: all more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- filter_mode type: str choices: [override, inherit] default: inherit more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- font_color type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- font_family type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- font_size type: int more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- font_type type: str choices: [bold-italic, bold, undefined, italic, normal] default: undefined more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- graphic type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- include_other type: str choices: [enable, disable] default: enable more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- ldap_query type: str choices: [auto, enable, disable] default: auto more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- ldap_server type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- ldap_user_case_change type: str choices: [upper, lower, disable] default: more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- left_margin type: int more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- macro type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- not_vdom type: str choices: [enable, disable] default: disable more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- period_end [YYYY-MM-DD], [HH:MM:SS] type: list of dict
more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- period_last_n type: int more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- period_mode type: str choices: [variable, specify] default: variable more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- period_opt type: str choices: [faz, dev] default: more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- period_start [YYYY-MM-DD], [HH:MM:SS] type: list of dict
more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- right_margin type: int more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- table_color type: str choices: [default, blue, green, red] default: default more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- text type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- time_period type: str choices: [last-n-weeks, last-month, last-7-days, last-week, yesterday, this-month, this-week, last-30-days, last-quarter, last-2-weeks, this-quarter, last-n-days, last-14-days, this-year, other, today, last-n-hours] default: more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- title type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- vdom type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- week_start type: str choices: [wed, sun, fri, thr, mon, tue, sat] default: more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- width type: int more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- description type: str more...
Supported Version Ranges: v6.2.1 -> v7.4.2
- footer reference: /report/adom/<adom-name>/config/layout/<layout-id>/footer type: list of dict
more...
Supported Version Ranges: v6.2.1 -> latest
- footer_id type: int more...
Supported Version Ranges: v6.2.1 -> latest
- type type: str choices: [text, graphic, minicover] more...
Supported Version Ranges: v6.2.1 -> latest
- graphic type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13, v7.4.3 -> latest
- text type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13, v7.4.3 -> latest
- header reference: /report/adom/<adom-name>/config/layout/<layout-id>/header type: list of dict
more...
Supported Version Ranges: v6.2.1 -> latest
- header_id type: int more...
Supported Version Ranges: v6.2.1 -> latest
- type type: str choices: [text, graphic, minicover] more...
Supported Version Ranges: v6.2.1 -> latest
- graphic type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13, v7.4.3 -> latest
- text type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13, v7.4.3 -> latest
- language type: str more...
Supported Version Ranges: v6.2.1 -> v7.4.2
- layout_id type: int more...
Supported Version Ranges: v6.2.1 -> v7.4.2
- subtitle type: str more...
Supported Version Ranges: v6.2.1 -> v7.4.2
- title type: str more...
Supported Version Ranges: v6.2.1 -> v7.4.2
- alignment type: str choices: [right, center, left] default: left more...
Supported Version Ranges: v6.2.2 -> v6.2.13, v7.4.3 -> latest
- bg_color type: str default: #FFFFFF more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- category type: str more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- chart_heading_level type: int default: 2 more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- chart_info_display type: str choices: [enable, disable] default: disable more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- coverpage_background_image type: str default: {sys_img_path}/def_cover_bgimg_ver1.png more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- coverpage_bottom_image type: str default: more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- coverpage_custom_text1 type: str default: more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- coverpage_custom_text2 type: str default: more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- coverpage_enable_create_time type: str choices: [enable, disable] default: enable more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- coverpage_enable_time_period type: str choices: [enable, disable] default: enable more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- coverpage_footer_bgcolor type: str default: transparent more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- coverpage_footer_left type: str default: more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- coverpage_footer_right type: str default: more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- coverpage_text_color type: str default: #000000 more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- coverpage_title type: str default: {default} more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- coverpage_top_image type: str default: more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- coverpage_top_image_position type: str choices: [right, center, left] default: center more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- dev_type type: str choices: [FortiSandbox, FortiWeb, Fabric, Syslog, FortiCache, FortiAuthenticator, FortiMail, FortiProxy, FortiManager, FortiNAC, FortiAnalyzer, FortiClient, FortiDDoS, FortiGate, FortiFirewall] default: FortiGate more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- folder_id type: int default: 0 more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- font_color type: str default: #000000 more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- font_family type: str default: "Open Sans" more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- font_size type: int default: 12 more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- font_type type: str choices: [bold-italic, bold, undefined, italic, normal] default: normal more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- footer_bgcolor type: str default: #FFFFFF more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- header_bgcolor type: str default: #FFFFFF more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- hide_report_title type: int default: 0 more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- hide_rowid type: int default: 0 more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- include_empty_charts type: str choices: [enable, disable] default: enable more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- is_template type: str choices: [enable, disable] default: disable more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- left_margin type: int default: 6 more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- protected type: str choices: [enable, disable] default: disable more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- report_tag type: str default: more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- right_margin type: int default: 6 more...
Supported Version Ranges: v6.2.2 -> v6.2.13
- folders reference: /sql-report/layout/folders type: list of dict
more...
Supported Version Ranges: v7.0.0 -> latest
- folder_id type: int more...
Supported Version Ranges: v7.0.0 -> latest
Notes
-----
.. note::
- 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
--------
.. code-block:: yaml+jinja
- name: Example playbook
hosts: fortianalyzers
connection: httpapi
gather_facts: false
vars:
ansible_network_os: fortinet.fortianalyzer.fortianalyzer
ansible_httpapi_port: 443
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
tasks:
- name: Config layout.
fortinet.fortianalyzer.faz_report_config_layout:
# bypass_validation: false
# rc_succeeded: [0, -2, -3, ...]
# rc_failed: [-2, -3, ...]
adom:
state: present #
report_config_layout:
layout_id: 0 # Required variable, integer
# body:
# component:
# - component_id:
# type:
# variable:
# - not:
# var:
# var_value:
# description:
# drilldown_flag:
# status:
# var_expression:
# var_type:
# view_mask:
# alignment:
# bg_color:
# category:
# chart:
# chart_option:
# column:
# customized:
# device_mode:
# devices:
# drill_down_report:
# filter_logic:
# filter_mode:
# font_color:
# font_family:
# font_size:
# font_type:
# graphic:
# include_other:
# ldap_query:
# ldap_server:
# ldap_user_case_change:
# left_margin:
# macro:
# not_vdom:
# period_end:
# period_last_n:
# period_mode:
# period_opt:
# period_start:
# right_margin:
# table_color:
# text:
# time_period:
# title:
# vdom:
# week_start:
# width:
# description:
# footer:
# - footer_id:
# type:
# graphic:
# text:
# header:
# - header_id:
# type:
# graphic:
# text:
# language:
# subtitle:
# title:
# alignment:
# bg_color:
# category:
# chart_heading_level:
# chart_info_display:
# coverpage_background_image:
# coverpage_bottom_image:
# coverpage_custom_text1:
# coverpage_custom_text2:
# coverpage_enable_create_time:
# coverpage_enable_time_period:
# coverpage_footer_bgcolor:
# coverpage_footer_left:
# coverpage_footer_right:
# coverpage_text_color:
# coverpage_title:
# coverpage_top_image:
# coverpage_top_image_position:
# dev_type:
# folder_id:
# font_color:
# font_family:
# font_size:
# font_type:
# footer_bgcolor:
# header_bgcolor:
# hide_report_title:
# hide_rowid:
# include_empty_charts:
# is_template:
# left_margin:
# protected:
# report_tag:
# right_margin:
# folders:
# - folder_id:
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
- 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 sample: 0
- version_check_warning Warning if the parameters used in the playbook are not supported by the current fortianalyzer version. returned: if params are not supported in the current version type: list
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)