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

New in version 2.8.

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

Parameters

  • access_token - Token-based authentication. Generated from GUI of Fortigate. type: str required: 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. This attribute was present already in previous version in a deeper level. It has been moved out to this outer level. type: str required: False choices: present, absent
  • report_layout - Report layout configuration. type: dict
    • state - B(Deprecated) type: str required: False choices: present, absent
    • body_item - Configure report body item. type: list
      • chart - Report item chart name. type: str
      • chart_options - Report chart options. type: str choices: include-no-data, hide-title, show-caption
      • column - Report section column number. type: int
      • content - Report item text content. type: str
      • description - Description. type: str
      • drill_down_items - Control how drill down charts are shown. type: str
      • drill_down_types - Control whether keys from the parent being combined or not. type: str
      • hide - Enable/disable hide item in report. type: str choices: enable, disable
      • id - Report item ID. type: int required: True
      • img_src - Report item image file name. type: str
      • list - Configure report list item. type: list
        • content - List entry content. type: str
        • id - List entry ID. type: int required: True
      • list_component - Report item list component. type: str choices: bullet, numbered
      • misc_component - Report item miscellaneous component. type: str choices: hline, page-break, column-break, section-start
      • parameters - Parameters. type: list
        • id - ID. type: int required: True
        • name - Field name that match field of parameters defined in dataset. type: str
        • value - Value to replace corresponding field of parameters defined in dataset. type: str
      • style - Report item style. type: str
      • table_caption_style - Table chart caption style. type: str
      • table_column_widths - Report item table column widths. type: str
      • table_even_row_style - Table chart even row style. type: str
      • table_head_style - Table chart head style. type: str
      • table_odd_row_style - Table chart odd row style. type: str
      • text_component - Report item text component. type: str choices: text, heading1, heading2, heading3
      • title - Report section title. type: str
      • top_n - Value of top. type: int
      • type - Report item type. type: str choices: text, image, chart, misc
    • cutoff_option - Cutoff-option is either run-time or custom. type: str choices: run-time, custom
    • cutoff_time - Custom cutoff time to generate report [hh:mm]. type: str
    • day - Schedule days of week to generate report. type: str choices: sunday, monday, tuesday, wednesday, thursday, friday, saturday
    • description - Description. type: str
    • email_recipients - Email recipients for generated reports. type: str
    • email_send - Enable/disable sending emails after reports are generated. type: str choices: enable, disable
    • format - Report format. type: str choices: pdf
    • max_pdf_report - Maximum number of PDF reports to keep at one time (oldest report is overwritten). type: int
    • name - Report layout name. type: str required: True
    • options - Report layout options. type: str choices: include-table-of-content, auto-numbering-heading, view-chart-as-heading, show-html-navbar-before-heading, dummy-option
    • page - Configure report page. type: dict
      • column_break_before - Report page auto column break before heading. type: str choices: heading1, heading2, heading3
      • footer - Configure report page footer. type: dict
        • footer_item - Configure report footer item. type: list
          • content - Report item text content. type: str
          • description - Description. type: str
          • id - Report item ID. type: int required: True
          • img_src - Report item image file name. type: str
          • style - Report item style. type: str
          • type - Report item type. type: str choices: text, image
        • style - Report footer style. type: str
      • header - Configure report page header. type: dict
        • header_item - Configure report header item. type: list
          • content - Report item text content. type: str
          • description - Description. type: str
          • id - Report item ID. type: int required: True
          • img_src - Report item image file name. type: str
          • style - Report item style. type: str
          • type - Report item type. type: str choices: text, image
        • style - Report header style. type: str
      • options - Report page options. type: str choices: header-on-first-page, footer-on-first-page
      • page_break_before - Report page auto page break before heading. type: str choices: heading1, heading2, heading3
      • paper - Report page paper. type: str choices: a4, letter
    • schedule_type - Report schedule type. type: str choices: demand, daily, weekly
    • style_theme - Report style theme. type: str
    • subtitle - Report subtitle. type: str
    • time - Schedule time to generate report [hh:mm]. type: str
    • title - Report title. type: str

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.