fortinet.fortios.fortios_dlp_profile module – Configure DLP profiles in Fortinet’s FortiOS and FortiGate.
Note
This module is part of the fortinet.fortios collection (version 2.3.9).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install fortinet.fortios
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: fortinet.fortios.fortios_dlp_profile
.
New in fortinet.fortios 2.0.0
Synopsis
This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify dlp feature and profile 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.15
Parameters
Parameter |
Comments |
---|---|
Token-based authentication. Generated from GUI of Fortigate. |
|
Configure DLP profiles. |
|
Comment. |
|
Enable/disable DLP logging. Choices:
|
|
Enable/disable extended logging for data loss prevention. Choices:
|
|
Flow/proxy feature set. Choices:
|
|
Protocols to always content archive. Choices:
|
|
Enable/disable NAC quarantine logging. Choices:
|
|
Name of the DLP profile. |
|
Replacement message group used by this DLP profile. Source system.replacemsg-group.name. |
|
Set up DLP rules for this profile. |
|
Action to take with content that this DLP profile matches. Choices:
|
|
Enable/disable DLP archiving. Choices:
|
|
Quarantine duration in days, hours, minutes (format = dddhhmm). |
|
Match files greater than or equal to this size (KB). |
|
Select the number of a DLP file pattern table to match. Source dlp.filepattern.id. |
|
Select the type of content to match. Choices:
|
|
ID. see <a href=’#notes’>Notes</a>. |
|
MIP label dictionary. Source dlp.dictionary.name. |
|
Percentage of fingerprints in the fingerprint databases designated with the selected sensitivity to match. |
|
Filter name. |
|
Check messages or files over one or more of these protocols. Choices:
|
|
Select a DLP file pattern sensitivity to match. |
|
Select a DLP sensitivity. Source dlp.sensitivity.name. |
|
Select DLP sensors. |
|
Address name. Source dlp.sensor.name. |
|
Select the severity or threat level that matches this filter. Choices:
|
|
Select whether to check the content of messages (an email message) or files (downloaded files or email attachments). Choices:
|
|
Protocols to always log summary. Choices:
|
|
Enable/Disable logging for task. Choices:
|
|
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. |
|
Add or delete a member under specified attribute path. When member_state is specified, the state option is ignored. Choices:
|
|
Indicates whether to create or remove the object. Choices:
|
|
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. Default: |
Notes
Note
Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
The module supports check_mode.
Examples
- name: Configure DLP profiles.
fortinet.fortios.fortios_dlp_profile:
vdom: "{{ vdom }}"
state: "present"
access_token: "<your_own_value>"
dlp_profile:
comment: "Comment."
dlp_log: "enable"
extended_log: "enable"
feature_set: "flow"
full_archive_proto: "smtp"
nac_quar_log: "enable"
name: "default_name_9"
replacemsg_group: "<your_own_value> (source system.replacemsg-group.name)"
rule:
-
action: "allow"
archive: "disable"
expiry: "<your_own_value>"
file_size: "0"
file_type: "0"
filter_by: "sensor"
id: "18"
label: "<your_own_value> (source dlp.dictionary.name)"
match_percentage: "10"
name: "default_name_21"
proto: "smtp"
sensitivity:
-
name: "default_name_24 (source dlp.sensitivity.name)"
sensor:
-
name: "default_name_26 (source dlp.sensor.name)"
severity: "info"
type: "file"
summary_proto: "smtp"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Build number of the fortigate image Returned: always Sample: |
|
Last method used to provision the content into FortiGate Returned: always Sample: |
|
Last result given by FortiGate on last operation applied Returned: always Sample: |
|
Master key (id) used in the last call to FortiGate Returned: success Sample: |
|
Name of the table used to fulfill the request Returned: always Sample: |
|
Path of the table used to fulfill the request Returned: always Sample: |
|
Internal revision number Returned: always Sample: |
|
Serial number of the unit Returned: always Sample: |
|
Indication of the operation’s result Returned: always Sample: |
|
Virtual domain used Returned: always Sample: |
|
Version of the FortiGate Returned: always Sample: |