faz_report_config_layout_component – Config component.

Added in version 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.

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.

Requirements

The below requirements are needed on the host that executes this module.

  • ansible>=2.15.0

FortiAnalyzer Version Compatibility

Supported Version Ranges: v6.2.1 -> latest

Parameters

  • 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
  • layout-id The parameter in requested url type: str required: true
  • report_config_layout_component Config component. type: dict
    • component_id type: int more...
    • type type: str choices: [graphic, column-break, macro, section, chart, heading2, heading3, heading1, page-break, text] more...
    • variable reference: /report/adom/<adom-name>/config/layout/<layout-id>/component/<component-id>/variable type: list of dict more...
      • not type: str choices: [enable, disable] more...
      • var type: str more...
      • var_value type: str more...
      • description type: str more...
      • drilldown_flag type: str choices: [enable, disable] default: disable more...
      • status type: str choices: [enable, disable] default: disable more...
      • var_expression type: str more...
      • var_type type: str choices: [ip, integer, string, datetime] more...
      • view_mask type: int default: 0 more...
    • alignment type: int more...
    • bg_color type: str more...
    • category type: str more...
    • chart type: str more...
    • chart_option type: str choices: [calc-average, none] more...
    • column type: str choices: [1, 2] default: more...
    • customized type: int default: 0 more...
    • device_mode type: str choices: [variable, specify] default: variable more...
    • devices type: str default: All_FortiGate more...
    • drill_down_report type: str choices: [enable, disable] default: disable more...
    • filter_logic type: str choices: [all, any] default: all more...
    • filter_mode type: str choices: [override, inherit] default: inherit more...
    • font_color type: str more...
    • font_family type: str more...
    • font_size type: int more...
    • font_type type: str choices: [bold-italic, bold, undefined, italic, normal] default: undefined more...
    • graphic type: str more...
    • include_other type: str choices: [enable, disable] default: enable more...
    • ldap_query type: str choices: [auto, enable, disable] default: auto more...
    • ldap_server type: str more...
    • ldap_user_case_change type: str choices: [upper, lower, disable] default: more...
    • left_margin type: int more...
    • macro type: str more...
    • not_vdom type: str choices: [enable, disable] default: disable more...
    • period_end [YYYY-MM-DD], [HH:MM:SS] type: list of dict more...
    • period_last_n type: int more...
    • period_mode type: str choices: [variable, specify] default: variable more...
    • period_opt type: str choices: [faz, dev] default: more...
    • period_start [YYYY-MM-DD], [HH:MM:SS] type: list of dict more...
    • right_margin type: int more...
    • table_color type: str choices: [default, blue, green, red] default: default more...
    • text type: str more...
    • 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...
    • title type: str more...
    • vdom type: str more...
    • week_start type: str choices: [wed, sun, fri, thr, mon, tue, sat] default: more...
    • width type: int more...

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

- name: Example playbook
  hosts: fortianalyzers
  connection: httpapi
  vars:
    ansible_network_os: fortinet.fortianalyzer.fortianalyzer
    ansible_httpapi_port: 443
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
  tasks:
    - name: Config component.
      fortinet.fortianalyzer.faz_report_config_layout_component:
        # bypass_validation: false
        # rc_succeeded: [0, -2, -3, ...]
        # rc_failed: [-2, -3, ...]
        adom: <your own value>
        layout_id: <your own value>
        state: <value in [present, absent]>
        report_config_layout_component:
          component_id: <value of integer>
          type: <value in [graphic, column-break, macro, ...]>
          variable:
            - not: <value in [enable, disable]>
              var: <value of string>
              var_value: <value of string>
              description: <value of string>
              drilldown_flag: <value in [enable, disable]>
              status: <value in [enable, disable]>
              var_expression: <value of string>
              var_type: <value in [ip, integer, string, ...]>
              view_mask: <value of integer>
          alignment: <value of integer>
          bg_color: <value of string>
          category: <value of string>
          chart: <value of string>
          chart_option: <value in [calc-average, none]>
          column: <value in [1, 2]>
          customized: <value of integer>
          device_mode: <value in [variable, specify]>
          devices: <value of string>
          drill_down_report: <value in [enable, disable]>
          filter_logic: <value in [all, any]>
          filter_mode: <value in [override, inherit]>
          font_color: <value of string>
          font_family: <value of string>
          font_size: <value of integer>
          font_type: <value in [bold-italic, bold, undefined, ...]>
          graphic: <value of string>
          include_other: <value in [enable, disable]>
          ldap_query: <value in [auto, enable, disable]>
          ldap_server: <value of string>
          ldap_user_case_change: <value in [upper, lower, disable]>
          left_margin: <value of integer>
          macro: <value of string>
          not_vdom: <value in [enable, disable]>
          period_end: <value of dict>
          period_last_n: <value of integer>
          period_mode: <value in [variable, specify]>
          period_opt: <value in [faz, dev]>
          period_start: <value of dict>
          right_margin: <value of integer>
          table_color: <value in [default, blue, green, ...]>
          text: <value of string>
          time_period: <value in [last-n-weeks, last-month, last-7-days, ...]>
          title: <value of string>
          vdom: <value of string>
          week_start: <value in [wed, sun, fri, ...]>
          width: <value of integer>

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:

  • 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)