fortios_firewall_shaper_traffic_shaper – Configure shared traffic shaper 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 firewall_shaper feature and traffic_shaper 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 |
|
fortios_firewall_shaper_traffic_shaper | 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
- firewall_shaper_traffic_shaper - Configure shared traffic shaper. type: dict
more...
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
firewall_shaper_traffic_shaper yes yes yes yes yes yes yes yes yes yes - bandwidth_unit - Unit of measurement for guaranteed and maximum bandwidth for this shaper (Kbps, Mbps or Gbps). type: str choices: kbps, mbps, gbps
more...
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
bandwidth_unit yes yes yes yes yes yes yes yes yes yes [kbps] yes yes yes yes yes yes yes yes yes yes [mbps] yes yes yes yes yes yes yes yes yes yes [gbps] yes yes yes yes yes yes yes yes yes yes - diffserv - Enable/disable changing the DiffServ setting applied to traffic accepted by this shaper. type: str choices: enable, disable
more...
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
diffserv yes yes yes yes yes yes yes yes yes yes [enable] yes yes yes yes yes yes yes yes yes yes [disable] yes yes yes yes yes yes yes yes yes yes - diffservcode - DiffServ setting to be applied to traffic accepted by this shaper. type: str
more...
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
diffservcode yes yes yes yes yes yes yes yes yes yes - dscp_marking_method - Select DSCP marking method. type: str choices: multi-stage, static
more...
v6.2.0
v6.2.3
v6.2.5
v6.2.7
v6.4.0
v6.4.1
v6.4.4
dscp_marking_method yes yes yes yes yes yes yes [multi-stage] yes yes yes yes yes yes yes [static] yes yes yes yes yes yes yes - exceed_bandwidth - Exceed bandwidth used for DSCP multi-stage marking. Units depend on the bandwidth-unit setting. type: int
more...
v6.2.0
v6.2.3
v6.2.5
v6.2.7
v6.4.0
v6.4.1
v6.4.4
exceed_bandwidth yes yes yes yes yes yes yes - exceed_class_id - Class ID for traffic in [guaranteed-bandwidth, maximum-bandwidth]. Source firewall.traffic-class.class-id. type: int
more...
v6.2.0
v6.2.3
v6.2.5
v6.2.7
v6.4.0
v6.4.1
v6.4.4
exceed_class_id yes yes yes yes yes yes yes - exceed_dscp - DSCP mark for traffic in [guaranteed-bandwidth, exceed-bandwidth]. type: str
more...
v6.2.0
v6.2.3
v6.2.5
v6.2.7
v6.4.0
v6.4.1
v6.4.4
exceed_dscp yes yes yes yes yes yes yes - guaranteed_bandwidth - Amount of bandwidth guaranteed for this shaper (0 - 16776000). Units depend on the bandwidth-unit setting. type: int
more...
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
guaranteed_bandwidth yes yes yes yes yes yes yes yes yes yes - maximum_bandwidth - Upper bandwidth limit enforced by this shaper (0 - 16776000). 0 means no limit. Units depend on the bandwidth-unit setting. type: int
more...
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
maximum_bandwidth yes yes yes yes yes yes yes yes yes yes - maximum_dscp - DSCP mark for traffic in [exceed-bandwidth, maximum-bandwidth]. type: str
more...
v6.2.0
v6.2.3
v6.2.5
v6.2.7
v6.4.0
v6.4.1
v6.4.4
maximum_dscp yes yes yes yes yes yes yes - name - Traffic shaper name. type: str required: True
more...
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
name yes yes yes yes yes yes yes yes yes yes - overhead - Per-packet size overhead used in rate computations. type: int
more...
v6.2.0
v6.2.3
v6.2.5
v6.2.7
v6.4.0
v6.4.1
v6.4.4
overhead yes yes yes yes yes yes yes - per_policy - Enable/disable applying a separate shaper for each policy. For example, if enabled the guaranteed bandwidth is applied separately for each policy. type: str choices: disable, enable
more...
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
per_policy yes yes yes yes yes yes yes yes yes yes [disable] yes yes yes yes yes yes yes yes yes yes [enable] yes yes yes yes yes yes yes yes yes yes - priority - Higher priority traffic is more likely to be forwarded without delays and without compromising the guaranteed bandwidth. type: str choices: low, medium, high
more...
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
priority yes yes yes yes yes yes yes yes yes yes [low] yes yes yes yes yes yes yes yes yes yes [medium] yes yes yes yes yes yes yes yes yes yes [high] yes yes yes yes yes yes yes yes yes yes
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: Configure shared traffic shaper.
fortios_firewall_shaper_traffic_shaper:
vdom: "{{ vdom }}"
state: "present"
access_token: "<your_own_value>"
firewall_shaper_traffic_shaper:
bandwidth_unit: "kbps"
diffserv: "enable"
diffservcode: "<your_own_value>"
dscp_marking_method: "multi-stage"
exceed_bandwidth: "7"
exceed_class_id: "8 (source firewall.traffic-class.class-id)"
exceed_dscp: "<your_own_value>"
guaranteed_bandwidth: "10"
maximum_bandwidth: "11"
maximum_dscp: "<your_own_value>"
name: "default_name_13"
overhead: "14"
per_policy: "disable"
priority: "low"
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