fortios_report_layout – Report layout configuration in Fortinet’s FortiOS and FortiGate.

New in version 2.10.

Synopsis

  • This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify report feature and layout category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0

Requirements

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

  • ansible>=2.9.0

FortiOS Version Compatibility


v6.0.0 v6.0.5 v6.0.11 v6.2.0 v6.2.3 v6.2.5 v6.2.7 v6.4.0 v6.4.1 v6.4.4 v7.0.0
fortios_report_layout yes yes yes yes yes yes yes yes yes yes yes

Parameters

  • access_token - Token-based authentication. Generated from GUI of Fortigate. type: str required: False
  • enable_log - Enable/Disable logging for task. type: bool required: False default: False
  • vdom - Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit. type: str default: root
  • state - Indicates whether to create or remove the object. type: str required: True choices: present, absent
  • report_layout - Report layout configuration. type: dict more...
    • body_item - Configure report body item. type: list more...
      • chart - Report item chart name. type: str more...
      • chart_options - Report chart options. type: str choices: include-no-data, hide-title, show-caption more...
      • column - Report section column number. type: int more...
      • content - Report item text content. type: str more...
      • description - Description. type: str more...
      • drill_down_items - Control how drill down charts are shown. type: str more...
      • drill_down_types - Control whether keys from the parent being combined or not. type: str more...
      • hide - Enable/disable hide item in report. type: str choices: enable, disable more...
      • id - Report item ID. type: int required: True more...
      • img_src - Report item image file name. type: str more...
      • list - Configure report list item. type: list more...
        • content - List entry content. type: str more...
        • id - List entry ID. type: int required: True more...
      • list_component - Report item list component. type: str choices: bullet, numbered more...
      • misc_component - Report item miscellaneous component. type: str choices: hline, page-break, column-break, section-start more...
      • parameters - Parameters. type: list more...
        • id - ID. type: int required: True more...
        • name - Field name that match field of parameters defined in dataset. type: str more...
        • value - Value to replace corresponding field of parameters defined in dataset. type: str more...
      • style - Report item style. type: str more...
      • table_caption_style - Table chart caption style. type: str more...
      • table_column_widths - Report item table column widths. type: str more...
      • table_even_row_style - Table chart even row style. type: str more...
      • table_head_style - Table chart head style. type: str more...
      • table_odd_row_style - Table chart odd row style. type: str more...
      • text_component - Report item text component. type: str choices: text, heading1, heading2, heading3 more...
      • title - Report section title. type: str more...
      • top_n - Value of top. type: int more...
      • type - Report item type. type: str choices: text, image, chart, misc more...
    • cutoff_option - Cutoff-option is either run-time or custom. type: str choices: run-time, custom more...
    • cutoff_time - Custom cutoff time to generate report [hh:mm]. type: str more...
    • day - Schedule days of week to generate report. type: str choices: sunday, monday, tuesday, wednesday, thursday, friday, saturday more...
    • description - Description. type: str more...
    • email_recipients - Email recipients for generated reports. type: str more...
    • email_send - Enable/disable sending emails after reports are generated. type: str choices: enable, disable more...
    • format - Report format. type: list choices: pdf more...
    • max_pdf_report - Maximum number of PDF reports to keep at one time (oldest report is overwritten). type: int more...
    • name - Report layout name. type: str required: True more...
    • options - Report layout options. type: list choices: include-table-of-content, auto-numbering-heading, view-chart-as-heading, show-html-navbar-before-heading, dummy-option more...
    • page - Configure report page. type: dict more...
      • column_break_before - Report page auto column break before heading. type: list choices: heading1, heading2, heading3 more...
      • footer - Configure report page footer. type: dict more...
        • footer_item - Configure report footer item. type: list more...
          • content - Report item text content. type: str more...
          • description - Description. type: str more...
          • id - Report item ID. type: int required: True more...
          • img_src - Report item image file name. type: str more...
          • style - Report item style. type: str more...
          • type - Report item type. type: str choices: text, image more...
        • style - Report footer style. type: str more...
      • header - Configure report page header. type: dict more...
        • header_item - Configure report header item. type: list more...
          • content - Report item text content. type: str more...
          • description - Description. type: str more...
          • id - Report item ID. type: int required: True more...
          • img_src - Report item image file name. type: str more...
          • style - Report item style. type: str more...
          • type - Report item type. type: str choices: text, image more...
        • style - Report header style. type: str more...
      • options - Report page options. type: list choices: header-on-first-page, footer-on-first-page more...
      • page_break_before - Report page auto page break before heading. type: list choices: heading1, heading2, heading3 more...
      • paper - Report page paper. type: str choices: a4, letter more...
    • schedule_type - Report schedule type. type: str choices: demand, daily, weekly more...
    • style_theme - Report style theme. type: str more...
    • subtitle - Report subtitle. type: str more...
    • time - Schedule time to generate report [hh:mm]. type: str more...
    • title - Report title. type: str more...

Notes

Note

  • Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks

Examples

- hosts: fortigates
  collections:
    - fortinet.fortios
  connection: httpapi
  vars:
   vdom: "root"
   ansible_httpapi_use_ssl: yes
   ansible_httpapi_validate_certs: no
   ansible_httpapi_port: 443
  tasks:
  - name: Report layout configuration.
    fortios_report_layout:
      vdom:  "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      report_layout:
        body_item:
         -
            chart: "<your_own_value>"
            chart_options: "include-no-data"
            column: "6"
            content: "<your_own_value>"
            description: "<your_own_value>"
            drill_down_items: "<your_own_value>"
            drill_down_types: "<your_own_value>"
            hide: "enable"
            id:  "12"
            img_src: "<your_own_value>"
            list:
             -
                content: "<your_own_value>"
                id:  "16"
            list_component: "bullet"
            misc_component: "hline"
            parameters:
             -
                id:  "20"
                name: "default_name_21"
                value: "<your_own_value>"
            style: "<your_own_value>"
            table_caption_style: "<your_own_value>"
            table_column_widths: "<your_own_value>"
            table_even_row_style: "<your_own_value>"
            table_head_style: "<your_own_value>"
            table_odd_row_style: "<your_own_value>"
            text_component: "text"
            title: "<your_own_value>"
            top_n: "31"
            type: "text"
        cutoff_option: "run-time"
        cutoff_time: "<your_own_value>"
        day: "sunday"
        description: "<your_own_value>"
        email_recipients: "<your_own_value>"
        email_send: "enable"
        format: "pdf"
        max_pdf_report: "40"
        name: "default_name_41"
        options: "include-table-of-content"
        page:
            column_break_before: "heading1"
            footer:
                footer_item:
                 -
                    content: "<your_own_value>"
                    description: "<your_own_value>"
                    id:  "49"
                    img_src: "<your_own_value>"
                    style: "<your_own_value>"
                    type: "text"
                style: "<your_own_value>"
            header:
                header_item:
                 -
                    content: "<your_own_value>"
                    description: "<your_own_value>"
                    id:  "58"
                    img_src: "<your_own_value>"
                    style: "<your_own_value>"
                    type: "text"
                style: "<your_own_value>"
            options: "header-on-first-page"
            page_break_before: "heading1"
            paper: "a4"
        schedule_type: "demand"
        style_theme: "<your_own_value>"
        subtitle: "<your_own_value>"
        time: "<your_own_value>"
        title: "<your_own_value>"

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:

  • build - Build number of the fortigate image returned: always type: str sample: 1547
  • http_method - Last method used to provision the content into FortiGate returned: always type: str sample: PUT
  • http_status - Last result given by FortiGate on last operation applied returned: always type: str sample: 200
  • mkey - Master key (id) used in the last call to FortiGate returned: success type: str sample: id
  • name - Name of the table used to fulfill the request returned: always type: str sample: urlfilter
  • path - Path of the table used to fulfill the request returned: always type: str sample: webfilter
  • revision - Internal revision number returned: always type: str sample: 17.0.2.10658
  • serial - Serial number of the unit returned: always type: str sample: FGVMEVYYQT3AB5352
  • status - Indication of the operation's result returned: always type: str sample: success
  • vdom - Virtual domain used returned: always type: str sample: root
  • version - Version of the FortiGate returned: always type: str sample: v5.6.3

Status

  • This module is not guaranteed to have a backwards compatible interface.

Authors

  • Link Zheng (@chillancezen)
  • Jie Xue (@JieX19)
  • Hongbin Lu (@fgtdev-hblu)
  • Frank Shen (@frankshen01)
  • Miguel Angel Munoz (@mamunozgonzalez)
  • Nicolas Thomas (@thomnico)

Hint

If you notice any issues in this documentation, you can create a pull request to improve it.