lix_fortinet.fortios.fortios_report_layout (102.2.120) — module

Report layout configuration in Fortinet's FortiOS and FortiGate.

| "added in version" 2.0.0 of lix_fortinet.fortios"

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

preview | supported by community

Install collection

Install with ansible-galaxy collection install lix_fortinet.fortios:==102.2.120


Add to requirements.yml

  collections:
    - name: lix_fortinet.fortios
      version: 102.2.120

Description

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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: "2147483647"
            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: "0"
            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: "31"
        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>"

Inputs

    
vdom:
    default: root
    description:
    - 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

state:
    choices:
    - present
    - absent
    description:
    - Indicates whether to create or remove the object.
    required: true
    type: str

enable_log:
    default: false
    description:
    - Enable/Disable logging for task.
    required: false
    type: bool

member_path:
    description:
    - Member attribute path to operate on.
    - Delimited by a slash character if there are more than one attribute.
    - Parameter marked with member_path is legitimate for doing member operation.
    type: str

access_token:
    description:
    - Token-based authentication. Generated from GUI of Fortigate.
    required: false
    type: str

member_state:
    choices:
    - present
    - absent
    description:
    - Add or delete a member under specified attribute path.
    - When member_state is specified, the state option is ignored.
    type: str

report_layout:
    default: null
    description:
    - Report layout configuration.
    suboptions:
      body_item:
        description:
        - Configure report body item.
        elements: dict
        suboptions:
          chart:
            description:
            - Report item chart name.
            type: str
          chart_options:
            choices:
            - include-no-data
            - hide-title
            - show-caption
            description:
            - Report chart options.
            elements: str
            type: list
          column:
            description:
            - Report section column number.
            type: int
          content:
            description:
            - Report item text content.
            type: str
          description:
            description:
            - Description.
            type: str
          drill_down_items:
            description:
            - Control how drill down charts are shown.
            type: str
          drill_down_types:
            description:
            - Control whether keys from the parent being combined or not.
            type: str
          hide:
            choices:
            - enable
            - disable
            description:
            - Enable/disable hide item in report.
            type: str
          id:
            description:
            - Report item ID.
            type: int
          img_src:
            description:
            - Report item image file name.
            type: str
          list:
            description:
            - Configure report list item.
            elements: dict
            suboptions:
              content:
                description:
                - List entry content.
                type: str
              id:
                description:
                - List entry ID.
                type: int
            type: list
          list_component:
            choices:
            - bullet
            - numbered
            description:
            - Report item list component.
            type: str
          misc_component:
            choices:
            - hline
            - page-break
            - column-break
            - section-start
            description:
            - Report item miscellaneous component.
            type: str
          parameters:
            description:
            - Parameters.
            elements: dict
            suboptions:
              id:
                description:
                - ID.
                type: int
              name:
                description:
                - Field name that match field of parameters defined in dataset.
                type: str
              value:
                description:
                - Value to replace corresponding field of parameters defined in dataset.
                type: str
            type: list
          style:
            description:
            - Report item style.
            type: str
          table_caption_style:
            description:
            - Table chart caption style.
            type: str
          table_column_widths:
            description:
            - Report item table column widths.
            type: str
          table_even_row_style:
            description:
            - Table chart even row style.
            type: str
          table_head_style:
            description:
            - Table chart head style.
            type: str
          table_odd_row_style:
            description:
            - Table chart odd row style.
            type: str
          text_component:
            choices:
            - text
            - heading1
            - heading2
            - heading3
            description:
            - Report item text component.
            type: str
          title:
            description:
            - Report section title.
            type: str
          top_n:
            description:
            - Value of top.
            type: int
          type:
            choices:
            - text
            - image
            - chart
            - misc
            description:
            - Report item type.
            type: str
        type: list
      cutoff_option:
        choices:
        - run-time
        - custom
        description:
        - Cutoff-option is either run-time or custom.
        type: str
      cutoff_time:
        description:
        - Custom cutoff time to generate report (format = hh:mm).
        type: str
      day:
        choices:
        - sunday
        - monday
        - tuesday
        - wednesday
        - thursday
        - friday
        - saturday
        description:
        - Schedule days of week to generate report.
        type: str
      description:
        description:
        - Description.
        type: str
      email_recipients:
        description:
        - Email recipients for generated reports.
        type: str
      email_send:
        choices:
        - enable
        - disable
        description:
        - Enable/disable sending emails after reports are generated.
        type: str
      format:
        choices:
        - pdf
        description:
        - Report format.
        elements: str
        type: list
      max_pdf_report:
        description:
        - Maximum number of PDF reports to keep at one time (oldest report is overwritten).
        type: int
      name:
        description:
        - Report layout name.
        required: true
        type: str
      options:
        choices:
        - include-table-of-content
        - auto-numbering-heading
        - view-chart-as-heading
        - show-html-navbar-before-heading
        - dummy-option
        description:
        - Report layout options.
        elements: str
        type: list
      page:
        description:
        - Configure report page.
        suboptions:
          column_break_before:
            choices:
            - heading1
            - heading2
            - heading3
            description:
            - Report page auto column break before heading.
            elements: str
            type: list
          footer:
            description:
            - Configure report page footer.
            suboptions:
              footer_item:
                description:
                - Configure report footer item.
                elements: dict
                suboptions:
                  content:
                    description:
                    - Report item text content.
                    type: str
                  description:
                    description:
                    - Description.
                    type: str
                  id:
                    description:
                    - Report item ID.
                    type: int
                  img_src:
                    description:
                    - Report item image file name.
                    type: str
                  style:
                    description:
                    - Report item style.
                    type: str
                  type:
                    choices:
                    - text
                    - image
                    description:
                    - Report item type.
                    type: str
                type: list
              style:
                description:
                - Report footer style.
                type: str
            type: dict
          header:
            description:
            - Configure report page header.
            suboptions:
              header_item:
                description:
                - Configure report header item.
                elements: dict
                suboptions:
                  content:
                    description:
                    - Report item text content.
                    type: str
                  description:
                    description:
                    - Description.
                    type: str
                  id:
                    description:
                    - Report item ID.
                    type: int
                  img_src:
                    description:
                    - Report item image file name.
                    type: str
                  style:
                    description:
                    - Report item style.
                    type: str
                  type:
                    choices:
                    - text
                    - image
                    description:
                    - Report item type.
                    type: str
                type: list
              style:
                description:
                - Report header style.
                type: str
            type: dict
          options:
            choices:
            - header-on-first-page
            - footer-on-first-page
            description:
            - Report page options.
            elements: str
            type: list
          page_break_before:
            choices:
            - heading1
            - heading2
            - heading3
            description:
            - Report page auto page break before heading.
            elements: str
            type: list
          paper:
            choices:
            - a4
            - letter
            description:
            - Report page paper.
            type: str
        type: dict
      schedule_type:
        choices:
        - demand
        - daily
        - weekly
        description:
        - Report schedule type.
        type: str
      style_theme:
        description:
        - Report style theme.
        type: str
      subtitle:
        description:
        - Report subtitle.
        type: str
      time:
        description:
        - Schedule time to generate report (format = hh:mm).
        type: str
      title:
        description:
        - Report title.
        type: str
    type: dict

Outputs

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