:source: fortios_application_list.py
:orphan:
.. fortios_application_list:
fortios_application_list -- Configure application control lists in Fortinet's FortiOS and FortiGate.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.. versionadded:: 2.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify application feature and list 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.16
Tips
----
Using member operation to add an element to an existing object.
FortiOS Version Compatibility
-----------------------------
Supported Version Ranges: v6.0.0 -> v7.6.6
Parameters
----------
.. raw:: html
- 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
- member_path - Member attribute path to operate on. type: str
- member_state - Add or delete a member under specified attribute path. type: str choices: present, absent
- state - Indicates whether to create or remove the object. type: str required: true choices: present, absent
- application_list - Configure application control lists. type: dict
more...
| Supported Version Ranges |
| application_list |
v6.0.0 -> 7.6.6 |
- app_replacemsg - Enable/disable replacement messages for blocked applications. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| app_replacemsg |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
- comment - Comments. type: str
more...
|
Supported Version Ranges |
| comment |
v6.0.0 -> 7.6.6 |
- control_default_network_services - Enable/disable enforcement of protocols over selected ports. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| control_default_network_services |
v6.2.0 -> 7.6.6 |
| [disable] |
v6.2.0 -> 7.6.6 |
| [enable] |
v6.2.0 -> 7.6.6 |
- deep_app_inspection - Enable/disable deep application inspection. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| deep_app_inspection |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
- default_network_services - Default network service entries. type: list member_path: default_network_services:id
more...
| Supported Version Ranges |
| default_network_services |
v6.2.0 -> 7.6.6 |
- id - Entry ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.2.0 -> 7.6.6 |
- port - Port number. type: int
more...
|
Supported Version Ranges |
| port |
v6.2.0 -> 7.6.6 |
- services - Network protocols. type: list choices: http, ssh, telnet, ftp, dns, smtp, pop3, imap, snmp, nntp, https
more...
|
Supported Version Ranges |
| services |
v6.2.0 -> 7.6.6 |
| [http] |
v6.2.0 -> 7.6.6 |
| [ssh] |
v6.2.0 -> 7.6.6 |
| [telnet] |
v6.2.0 -> 7.6.6 |
| [ftp] |
v6.2.0 -> 7.6.6 |
| [dns] |
v6.2.0 -> 7.6.6 |
| [smtp] |
v6.2.0 -> 7.6.6 |
| [pop3] |
v6.2.0 -> 7.6.6 |
| [imap] |
v6.2.0 -> 7.6.6 |
| [snmp] |
v6.2.0 -> 7.6.6 |
| [nntp] |
v6.2.0 -> 7.6.6 |
| [https] |
v6.2.0 -> 7.6.6 |
- violation_action - Action for protocols not in the allowlist for selected port. type: str choices: pass, monitor, block
more...
|
Supported Version Ranges |
| violation_action |
v6.2.0 -> 7.6.6 |
| [pass] |
v6.2.0 -> 7.6.6 |
| [monitor] |
v6.2.0 -> 7.6.6 |
| [block] |
v6.2.0 -> 7.6.6 |
- enforce_default_app_port - Enable/disable default application port enforcement for allowed applications. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| enforce_default_app_port |
v6.2.0 -> 7.6.6 |
| [disable] |
v6.2.0 -> 7.6.6 |
| [enable] |
v6.2.0 -> 7.6.6 |
- entries - Application list entries. type: list member_path: entries:id
more...
| Supported Version Ranges |
| entries |
v6.0.0 -> 7.6.6 |
- action - Pass or block traffic, or reset connection for traffic from this application. type: str choices: pass, block, reset
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [pass] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
| [reset] |
v6.0.0 -> 7.6.6 |
- application - ID of allowed applications. type: list member_path: entries:id/application:id
more...
| Supported Version Ranges |
| application |
v6.0.0 -> 7.6.6 |
- id - Application IDs. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.0.0 -> 7.6.6 |
- behavior - Application behavior filter. type: list
- category - Category ID list. type: list member_path: entries:id/category:id
more...
| Supported Version Ranges |
| category |
v6.0.0 -> 7.6.6 |
- id - Application category ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.0.0 -> 7.6.6 |
- exclusion - ID of excluded applications. type: list member_path: entries:id/exclusion:id
more...
| Supported Version Ranges |
| exclusion |
v6.2.7 -> v6.2.7 |
v6.4.4 -> 7.6.6 |
- id - Excluded application IDs. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.2.7 -> v6.2.7 |
v6.4.4 -> 7.6.6 |
- id - Entry ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.0.0 -> 7.6.6 |
- log - Enable/disable logging for this application list. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| log |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
- log_packet - Enable/disable packet logging. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| log_packet |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
- parameters - Application parameters. type: list member_path: entries:id/parameters:id
more...
| Supported Version Ranges |
| parameters |
v6.0.0 -> 7.6.6 |
- id - Parameter tuple ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.0.0 -> 7.6.6 |
- members - Parameter tuple members. type: list member_path: entries:id/parameters:id/members:id
more...
| Supported Version Ranges |
| members |
v6.4.0 -> 7.6.6 |
- id - Parameter. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.4.0 -> 7.6.6 |
- name - Parameter name. type: str
more...
|
Supported Version Ranges |
| name |
v6.4.0 -> 7.6.6 |
- value - Parameter value. type: str
more...
|
Supported Version Ranges |
| value |
v6.4.0 -> 7.6.6 |
- value - Parameter value. type: str
more...
|
Supported Version Ranges |
| value |
v6.0.0 -> v6.2.7 |
- per_ip_shaper - Per-IP traffic shaper. Source firewall.shaper.per-ip-shaper.name. type: str
more...
|
Supported Version Ranges |
| per_ip_shaper |
v6.0.0 -> 7.6.6 |
- popularity - Application popularity filter (1 - 5, from least to most popular). type: list choices: 1, 2, 3, 4, 5
more...
|
Supported Version Ranges |
| popularity |
v6.0.0 -> 7.6.6 |
| [1] |
v6.0.0 -> 7.6.6 |
| [2] |
v6.0.0 -> 7.6.6 |
| [3] |
v6.0.0 -> 7.6.6 |
| [4] |
v6.0.0 -> 7.6.6 |
| [5] |
v6.0.0 -> 7.6.6 |
- protocols - Application protocol filter. type: list
- quarantine - Quarantine method. type: str choices: none, attacker
more...
|
Supported Version Ranges |
| quarantine |
v6.0.0 -> 7.6.6 |
| [none] |
v6.0.0 -> 7.6.6 |
| [attacker] |
v6.0.0 -> 7.6.6 |
- quarantine_expiry - Duration of quarantine. (Format type: str
more...
|
Supported Version Ranges |
| quarantine_expiry |
v6.0.0 -> 7.6.6 |
- quarantine_log - Enable/disable quarantine logging. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| quarantine_log |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
- rate_count - Count of the rate. type: int
more...
|
Supported Version Ranges |
| rate_count |
v6.0.0 -> 7.6.6 |
- rate_duration - Duration (sec) of the rate. type: int
more...
|
Supported Version Ranges |
| rate_duration |
v6.0.0 -> 7.6.6 |
- rate_mode - Rate limit mode. type: str choices: periodical, continuous
more...
|
Supported Version Ranges |
| rate_mode |
v6.0.0 -> 7.6.6 |
| [periodical] |
v6.0.0 -> 7.6.6 |
| [continuous] |
v6.0.0 -> 7.6.6 |
- rate_track - Track the packet protocol field. type: str choices: none, src-ip, dest-ip, dhcp-client-mac, dns-domain
more...
|
Supported Version Ranges |
| rate_track |
v6.0.0 -> 7.6.6 |
| [none] |
v6.0.0 -> 7.6.6 |
| [src-ip] |
v6.0.0 -> 7.6.6 |
| [dest-ip] |
v6.0.0 -> 7.6.6 |
| [dhcp-client-mac] |
v6.0.0 -> 7.6.6 |
| [dns-domain] |
v6.0.0 -> 7.6.6 |
- risk - Risk, or impact, of allowing traffic from this application to occur (1 - 5; Low, Elevated, Medium, High, and Critical). type: list member_path: entries:id/risk:level
more...
| Supported Version Ranges |
| risk |
v6.0.0 -> 7.6.6 |
- level - Risk, or impact, of allowing traffic from this application to occur (1 - 5; Low, Elevated, Medium, High, and Critical). see Notes. type: int required: true
more...
|
Supported Version Ranges |
| level |
v6.0.0 -> 7.6.6 |
- session_ttl - Session TTL (0 = default). type: int
more...
|
Supported Version Ranges |
| session_ttl |
v6.0.0 -> 7.6.6 |
- shaper - Traffic shaper. Source firewall.shaper.traffic-shaper.name. type: str
more...
|
Supported Version Ranges |
| shaper |
v6.0.0 -> 7.6.6 |
- shaper_reverse - Reverse traffic shaper. Source firewall.shaper.traffic-shaper.name. type: str
more...
|
Supported Version Ranges |
| shaper_reverse |
v6.0.0 -> 7.6.6 |
- sub_category - Application Sub-category ID list. type: list member_path: entries:id/sub_category:id
more...
| Supported Version Ranges |
| sub_category |
v6.0.0 -> v6.2.7 |
- id - Application sub-category ID. see Notes. type: int required: true
more...
|
Supported Version Ranges |
| id |
v6.0.0 -> v6.2.7 |
- technology - Application technology filter. type: list
- vendor - Application vendor filter. type: list
- extended_log - Enable/disable extended logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| extended_log |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- force_inclusion_ssl_di_sigs - Enable/disable forced inclusion of SSL deep inspection signatures. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| force_inclusion_ssl_di_sigs |
v6.2.0 -> v6.2.0 |
v6.2.5 -> 7.6.6 |
| [disable] |
v6.2.0 -> v6.2.0 |
| [enable] |
v6.2.0 -> v6.2.0 |
- name - List name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.0.0 -> 7.6.6 |
- options - Basic application protocol signatures allowed by default. type: list choices: allow-dns, allow-icmp, allow-http, allow-ssl, allow-quic
more...
|
Supported Version Ranges |
| options |
v6.0.0 -> 7.6.6 |
| [allow-dns] |
v6.0.0 -> 7.6.6 |
| [allow-icmp] |
v6.0.0 -> 7.6.6 |
| [allow-http] |
v6.0.0 -> 7.6.6 |
| [allow-ssl] |
v6.0.0 -> 7.6.6 |
| [allow-quic] |
v6.0.0 -> v7.2.2 |
- other_application_action - Action for other applications. type: str choices: pass, block
more...
|
Supported Version Ranges |
| other_application_action |
v6.0.0 -> 7.6.6 |
| [pass] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- other_application_log - Enable/disable logging for other applications. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| other_application_log |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
- p2p_black_list - P2P applications to be black listed. type: list choices: skype, edonkey, bittorrent
more...
|
Supported Version Ranges |
| p2p_black_list |
v6.0.0 -> v6.4.4 |
| [skype] |
v6.0.0 -> v6.4.4 |
| [edonkey] |
v6.0.0 -> v6.4.4 |
| [bittorrent] |
v6.0.0 -> v6.4.4 |
- p2p_block_list - P2P applications to be block listed. type: list choices: skype, edonkey, bittorrent
more...
|
Supported Version Ranges |
| p2p_block_list |
v7.0.0 -> 7.6.6 |
| [skype] |
v7.0.0 -> 7.6.6 |
| [edonkey] |
v7.0.0 -> 7.6.6 |
| [bittorrent] |
v7.0.0 -> 7.6.6 |
- replacemsg_group - Replacement message group. Source system.replacemsg-group.name. type: str
more...
|
Supported Version Ranges |
| replacemsg_group |
v6.0.0 -> 7.6.6 |
- unknown_application_action - Pass or block traffic from unknown applications. type: str choices: pass, block
more...
|
Supported Version Ranges |
| unknown_application_action |
v6.0.0 -> 7.6.6 |
| [pass] |
v6.0.0 -> 7.6.6 |
| [block] |
v6.0.0 -> 7.6.6 |
- unknown_application_log - Enable/disable logging for unknown applications. type: str choices: disable, enable
more...
|
Supported Version Ranges |
| unknown_application_log |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
Notes
-----
.. note::
- Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
- The module supports check_mode.
Examples
--------
.. code-block:: yaml+jinja
- name: Configure application control lists.
fortinet.fortios.fortios_application_list:
vdom: "{{ vdom }}"
state: "present"
access_token: ""
application_list:
app_replacemsg: "disable"
comment: "Comments."
control_default_network_services: "disable"
deep_app_inspection: "disable"
default_network_services:
-
id: "8"
port: "0"
services: "http"
violation_action: "pass"
enforce_default_app_port: "disable"
entries:
-
action: "pass"
application:
-
id: "16"
behavior: ""
category:
-
id: "19"
exclusion:
-
id: "21"
id: "22"
log: "disable"
log_packet: "disable"
parameters:
-
id: "26"
members:
-
id: "28"
name: "default_name_29"
value: ""
value: ""
per_ip_shaper: " (source firewall.shaper.per-ip-shaper.name)"
popularity: "1"
protocols: ""
quarantine: "none"
quarantine_expiry: ""
quarantine_log: "disable"
rate_count: "0"
rate_duration: "60"
rate_mode: "periodical"
rate_track: "none"
risk:
-
level: ""
session_ttl: "0"
shaper: " (source firewall.shaper.traffic-shaper.name)"
shaper_reverse: " (source firewall.shaper.traffic-shaper.name)"
sub_category:
-
id: "48"
technology: ""
vendor: ""
extended_log: "enable"
force_inclusion_ssl_di_sigs: "disable"
name: "default_name_53"
options: "allow-dns"
other_application_action: "pass"
other_application_log: "disable"
p2p_black_list: "skype"
p2p_block_list: "skype"
replacemsg_group: " (source system.replacemsg-group.name)"
unknown_application_action: "pass"
unknown_application_log: "disable"
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:
.. raw:: html
- 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.