fortinet.fortimanager.fmgr_pkg_header_shapingpolicy (2.4.0) — module

Configure shaping policies.

| "added in version" 2.0.0 of fortinet.fortimanager"

Authors: Xinwei Du (@dux-fortinet), Xing Li (@lix-fortinet), Jie Xue (@JieX19), Link Zheng (@chillancezen), Frank Shen (@fshen01), Hongbin Lu (@fgtdev-hblu)

preview | supported by community

Install collection

Install with ansible-galaxy collection install fortinet.fortimanager:==2.4.0


Add to requirements.yml

  collections:
    - name: fortinet.fortimanager
      version: 2.4.0

Description

This module is able to configure a FortiManager device.

Examples include all parameters and values which need to be adjusted to data sources before usage.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Example playbook (generated based on argument schema)
  hosts: fortimanagers
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Configure shaping policies.
      fortinet.fortimanager.fmgr_pkg_header_shapingpolicy:
        # bypass_validation: false
        workspace_locking_adom: <value in [global, custom adom including root]>
        workspace_locking_timeout: 300
        # rc_succeeded: [0, -2, -3, ...]
        # rc_failed: [-2, -3, ...]
        pkg: <your own value>
        state: present # <value in [present, absent]>
        pkg_header_shapingpolicy:
          app_category: <list or string>
          app_group: <list or string>
          application: <list or integer>
          class_id: <integer or string>
          comment: <string>
          diffserv_forward: <value in [disable, enable]>
          diffserv_reverse: <value in [disable, enable]>
          diffservcode_forward: <string>
          diffservcode_rev: <string>
          dstaddr: <list or string>
          dstaddr6: <list or string>
          dstintf: <list or string>
          groups: <list or string>
          id: <integer>
          internet_service: <value in [disable, enable]>
          internet_service_custom: <list or string>
          internet_service_custom_group: <list or string>
          internet_service_group: <list or string>
          internet_service_id: <list or string>
          internet_service_src: <value in [disable, enable]>
          internet_service_src_custom: <list or string>
          internet_service_src_custom_group: <list or string>
          internet_service_src_group: <list or string>
          internet_service_src_id: <list or string>
          ip_version: <value in [4, 6]>
          per_ip_shaper: <string>
          schedule: <string>
          service: <list or string>
          srcaddr: <list or string>
          srcaddr6: <list or string>
          srcintf: <list or string>
          status: <value in [disable, enable]>
          tos: <string>
          tos_mask: <string>
          tos_negate: <value in [disable, enable]>
          traffic_shaper: <string>
          traffic_shaper_reverse: <string>
          url_category: <list or string>
          users: <list or string>
          uuid: <string>
          internet_service_name: <list or string>
          internet_service_src_name: <list or string>
          class_id_reverse: <integer>
          service_type: <value in [service, internet-service]>
          uuid_idx: <integer>
          cos: <string>
          cos_mask: <string>
          traffic_type: <value in [forwarding, local-in, local-out]>

Inputs

    
pkg:
    description: The parameter (pkg) in requested url.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    description: The directive to create, update or delete an object.
    required: true
    type: str

rc_failed:
    description: The rc codes list with which the conditions to fail will be overriden.
    elements: int
    type: list

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

access_token:
    description: The token to access FortiManager without using username and password.
    type: str

rc_succeeded:
    description: The rc codes list with which the conditions to succeed will be overriden.
    elements: int
    type: list

proposed_method:
    choices:
    - update
    - set
    - add
    description: The overridden method for the underlying Json RPC request.
    type: str

bypass_validation:
    default: false
    description: Only set to True when module schema diffs with FortiManager API structure,
      module continues to execute without validating parameters.
    type: bool

workspace_locking_adom:
    description: The adom to lock for FortiManager running in workspace mode, the value
      can be global and others including root.
    type: str

forticloud_access_token:
    description: Authenticate Ansible client with forticloud API access token.
    type: str

pkg_header_shapingpolicy:
    description: The top level parameters set.
    required: false
    suboptions:
      app-category:
        description: (list or str) Deprecated, please rename it to app_category.
        type: raw
      app-group:
        description: (list or str) Deprecated, please rename it to app_group.
        type: raw
      application:
        description: (list) No description.
        type: raw
      class-id:
        description: (int or str) Deprecated, please rename it to class_id.
        type: raw
      class-id-reverse:
        description: Deprecated, please rename it to class_id_reverse.
        type: int
      comment:
        description: No description.
        type: str
      cos:
        description: VLAN CoS bit pattern.
        type: str
      cos-mask:
        description: Deprecated, please rename it to cos_mask. VLAN CoS evaluated bits.
        type: str
      diffserv-forward:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to diffserv_forward.
        type: str
      diffserv-reverse:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to diffserv_reverse.
        type: str
      diffservcode-forward:
        description: Deprecated, please rename it to diffservcode_forward.
        type: str
      diffservcode-rev:
        description: Deprecated, please rename it to diffservcode_rev.
        type: str
      dstaddr:
        description: (list or str) No description.
        type: raw
      dstaddr6:
        description: (list or str) No description.
        type: raw
      dstintf:
        description: (list or str) No description.
        type: raw
      groups:
        description: (list or str) No description.
        type: raw
      id:
        description: No description.
        required: true
        type: int
      internet-service:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to internet_service.
        type: str
      internet-service-custom:
        description: (list or str) Deprecated, please rename it to internet_service_custom.
        type: raw
      internet-service-custom-group:
        description: (list or str) Deprecated, please rename it to internet_service_custom_group.
        type: raw
      internet-service-group:
        description: (list or str) Deprecated, please rename it to internet_service_group.
        type: raw
      internet-service-id:
        description: (list or str) Deprecated, please rename it to internet_service_id.
        type: raw
      internet-service-name:
        description: (list or str) Deprecated, please rename it to internet_service_name.
        type: raw
      internet-service-src:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to internet_service_src.
        type: str
      internet-service-src-custom:
        description: (list or str) Deprecated, please rename it to internet_service_src_custom.
        type: raw
      internet-service-src-custom-group:
        description: (list or str) Deprecated, please rename it to internet_service_src_custom_group.
        type: raw
      internet-service-src-group:
        description: (list or str) Deprecated, please rename it to internet_service_src_group.
        type: raw
      internet-service-src-id:
        description: (list or str) Deprecated, please rename it to internet_service_src_id.
        type: raw
      internet-service-src-name:
        description: (list or str) Deprecated, please rename it to internet_service_src_name.
        type: raw
      ip-version:
        choices:
        - '4'
        - '6'
        description: Deprecated, please rename it to ip_version.
        type: str
      per-ip-shaper:
        description: Deprecated, please rename it to per_ip_shaper.
        type: str
      schedule:
        description: No description.
        type: str
      service:
        description: (list or str) No description.
        type: raw
      service-type:
        choices:
        - service
        - internet-service
        description: Deprecated, please rename it to service_type.
        type: str
      srcaddr:
        description: (list or str) No description.
        type: raw
      srcaddr6:
        description: (list or str) No description.
        type: raw
      srcintf:
        description: (list or str) No description.
        type: raw
      status:
        choices:
        - disable
        - enable
        description: No description.
        type: str
      tos:
        description: No description.
        type: str
      tos-mask:
        description: Deprecated, please rename it to tos_mask.
        type: str
      tos-negate:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to tos_negate.
        type: str
      traffic-shaper:
        description: Deprecated, please rename it to traffic_shaper.
        type: str
      traffic-shaper-reverse:
        description: Deprecated, please rename it to traffic_shaper_reverse.
        type: str
      traffic-type:
        choices:
        - forwarding
        - local-in
        - local-out
        description: Deprecated, please rename it to traffic_type. Traffic type.
        type: str
      url-category:
        description: (list or str) Deprecated, please rename it to url_category.
        type: raw
      users:
        description: (list or str) No description.
        type: raw
      uuid:
        description: No description.
        type: str
      uuid-idx:
        description: Deprecated, please rename it to uuid_idx.
        type: int
    type: dict

workspace_locking_timeout:
    default: 300
    description: The maximum time in seconds to wait for other user to release the workspace
      lock.
    type: int

Outputs

meta:
  contains:
    request_url:
      description: The full url requested.
      returned: always
      sample: /sys/login/user
      type: str
    response_code:
      description: The status of api request.
      returned: always
      sample: 0
      type: int
    response_data:
      description: The api response.
      returned: always
      type: list
    response_message:
      description: The descriptive message of the api response.
      returned: always
      sample: OK.
      type: str
    system_information:
      description: The information of the target system.
      returned: always
      type: dict
  description: The result of the request.
  returned: always
  type: dict
rc:
  description: The status the request.
  returned: always
  sample: 0
  type: int
version_check_warning:
  description: Warning if the parameters used in the playbook are not supported by
    the current FortiManager version.
  returned: complex
  type: list