fmgr_antivirus_profile – Configure AntiVirus profiles.¶
New in version 2.10.
Synopsis¶
- This module is able to configure a FortiManager device.
- Examples include all parameters and values need to be adjusted to data sources before usage.
Requirements¶
The below requirements are needed on the host that executes this module.
- ansible>=2.9.0
FortiManager Version Compatibility¶
6.0.0 |
6.2.1 |
6.2.3 |
6.2.5 |
6.4.0 |
6.4.2 |
6.4.5 |
7.0.0 |
7.2.0 |
|
| antivirus_profile | yes | yes | yes | yes | yes | yes | yes | yes | yes |
Parameters¶
- enable_log - Enable/Disable logging for task type: bool required: false default: False
- forticloud_access_token - Access token of forticloud managed API users, this option is available with FortiManager later than 6.4.0 type: str required: false
- proposed_method - The overridden method for the underlying Json RPC request type: str required: false choices: set, update, add
- bypass_validation - Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters type: bool required: false default: False
- workspace_locking_adom - Acquire the workspace lock if FortiManager is running in workspace mode type: str required: false choices: global, custom adom including root
- workspace_locking_timeout - The maximum time in seconds to wait for other users to release workspace lock type: integer required: false default: 300
- rc_succeeded - The rc codes list with which the conditions to succeed will be overriden type: list required: false
- rc_failed - The rc codes list with which the conditions to fail will be overriden type: list required: false
- state - The directive to create, update or delete an object type: str required: true choices: present, absent
- adom - The parameter in requested url type: str required: true
- antivirus_profile - no description type: dict
- analytics-bl-filetype - Only submit files matching this DLP file-pattern to FortiSandbox. type: str more...
- analytics-db - Enable/disable using the FortiSandbox signature database to supplement the AV signature databases. type: str choices: [disable, enable] more...
- analytics-max-upload - Maximum size of files that can be uploaded to FortiSandbox (1 - 395 MBytes, default = 10). type: int more...
- analytics-wl-filetype - Do not submit files matching this DLP file-pattern to FortiSandbox. type: str more...
- av-block-log - Enable/disable logging for AntiVirus file blocking. type: str choices: [disable, enable] more...
- av-virus-log - Enable/disable AntiVirus logging. type: str choices: [disable, enable] more...
- comment - Comment. type: str more...
- extended-log - Enable/disable extended logging for antivirus. type: str choices: [disable, enable] more...
- ftgd-analytics - Settings to control which files are uploaded to FortiSandbox. type: str choices: [disable, suspicious, everything] more...
- inspection-mode - Inspection mode. type: str choices: [proxy, flow-based] more...
- mobile-malware-db - Enable/disable using the mobile malware signature database. type: str choices: [disable, enable] more...
- name - Profile name. type: str more...
- replacemsg-group - Replacement message group customized for this profile. type: str more...
- scan-mode - Choose between full scan mode and quick scan mode. type: str choices: [quick, full, legacy, default] more...
- feature-set - Flow/proxy feature set. type: str choices: [proxy, flow] more...
- cifs type: dict
- archive-block - Select the archive types to block. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- archive-log - Select the archive types to log. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- emulator - Enable/disable the virus emulator. type: str choices: [disable, enable] more...
- options - Enable/disable CIFS AntiVirus scanning, monitoring, and quarantine. type: array choices: [scan, quarantine, avmonitor] more...
- outbreak-prevention - Enable Virus Outbreak Prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
- av-scan - Enable AntiVirus scan service. type: str choices: [disable, monitor, block] more...
- external-blocklist - Enable external-blocklist. type: str choices: [disable, monitor, block] more...
- quarantine - Enable/disable quarantine for infected files. type: str choices: [disable, enable] more...
- fortindr - Enable scanning of files by FortiNDR. type: str choices: [disable, block, monitor] more...
- fortisandbox - Enable scanning of files by FortiSandbox. type: str choices: [disable, block, monitor] more...
- content-disarm type: dict
- cover-page - Enable/disable inserting a cover page into the disarmed document. type: str choices: [disable, enable] more...
- detect-only - Enable/disable only detect disarmable files, do not alter content. type: str choices: [disable, enable] more...
- error-action - Action to be taken if CDR engine encounters an unrecoverable error. type: str choices: [block, log-only, ignore] more...
- office-action - Enable/disable stripping of PowerPoint action events in Microsoft Office documents. type: str choices: [disable, enable] more...
- office-dde - Enable/disable stripping of Dynamic Data Exchange events in Microsoft Office documents. type: str choices: [disable, enable] more...
- office-embed - Enable/disable stripping of embedded objects in Microsoft Office documents. type: str choices: [disable, enable] more...
- office-hylink - Enable/disable stripping of hyperlinks in Microsoft Office documents. type: str choices: [disable, enable] more...
- office-linked - Enable/disable stripping of linked objects in Microsoft Office documents. type: str choices: [disable, enable] more...
- office-macro - Enable/disable stripping of macros in Microsoft Office documents. type: str choices: [disable, enable] more...
- original-file-destination - Destination to send original file if active content is removed. type: str choices: [fortisandbox, quarantine, discard] more...
- pdf-act-form - Enable/disable stripping of PDF document actions that submit data to other targets. type: str choices: [disable, enable] more...
- pdf-act-gotor - Enable/disable stripping of PDF document actions that access other PDF documents. type: str choices: [disable, enable] more...
- pdf-act-java - Enable/disable stripping of PDF document actions that execute JavaScript code. type: str choices: [disable, enable] more...
- pdf-act-launch - Enable/disable stripping of PDF document actions that launch other applications. type: str choices: [disable, enable] more...
- pdf-act-movie - Enable/disable stripping of PDF document actions that play a movie. type: str choices: [disable, enable] more...
- pdf-act-sound - Enable/disable stripping of PDF document actions that play a sound. type: str choices: [disable, enable] more...
- pdf-embedfile - Enable/disable stripping of embedded files in PDF documents. type: str choices: [disable, enable] more...
- pdf-hyperlink - Enable/disable stripping of hyperlinks from PDF documents. type: str choices: [disable, enable] more...
- pdf-javacode - Enable/disable stripping of JavaScript code in PDF documents. type: str choices: [disable, enable] more...
- ftp type: dict
- archive-block - Select the archive types to block. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- archive-log - Select the archive types to log. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- emulator - Enable/disable the virus emulator. type: str choices: [disable, enable] more...
- options - Enable/disable FTP AntiVirus scanning, monitoring, and quarantine. type: array choices: [scan, file-filter, quarantine, avquery, avmonitor] more...
- outbreak-prevention - Enable Virus Outbreak Prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
- av-scan - Enable AntiVirus scan service. type: str choices: [disable, monitor, block] more...
- external-blocklist - Enable external-blocklist. type: str choices: [disable, monitor, block] more...
- quarantine - Enable/disable quarantine for infected files. type: str choices: [disable, enable] more...
- fortindr - Enable scanning of files by FortiNDR. type: str choices: [disable, block, monitor] more...
- fortisandbox - Enable scanning of files by FortiSandbox. type: str choices: [disable, block, monitor] more...
- http type: dict
- archive-block - Select the archive types to block. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- archive-log - Select the archive types to log. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- content-disarm - Enable Content Disarm and Reconstruction for this protocol. type: str choices: [disable, enable] more...
- emulator - Enable/disable the virus emulator. type: str choices: [disable, enable] more...
- options - Enable/disable HTTP AntiVirus scanning, monitoring, and quarantine. type: array choices: [scan, file-filter, quarantine, avquery, avmonitor, strict-file] more...
- outbreak-prevention - Enable Virus Outbreak Prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
- av-scan - Enable AntiVirus scan service. type: str choices: [disable, monitor, block] more...
- external-blocklist - Enable external-blocklist. type: str choices: [disable, monitor, block] more...
- quarantine - Enable/disable quarantine for infected files. type: str choices: [disable, enable] more...
- fortindr - Enable scanning of files by FortiNDR. type: str choices: [disable, block, monitor] more...
- fortisandbox - Enable scanning of files by FortiSandbox. type: str choices: [disable, block, monitor] more...
- imap type: dict
- archive-block - Select the archive types to block. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- archive-log - Select the archive types to log. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- content-disarm - Enable Content Disarm and Reconstruction for this protocol. type: str choices: [disable, enable] more...
- emulator - Enable/disable the virus emulator. type: str choices: [disable, enable] more...
- executables - Treat Windows executable files as viruses for the purpose of blocking or monitoring. type: str choices: [default, virus] more...
- options - Enable/disable IMAP AntiVirus scanning, monitoring, and quarantine. type: array choices: [scan, file-filter, quarantine, avquery, avmonitor] more...
- outbreak-prevention - Enable Virus Outbreak Prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
- av-scan - Enable AntiVirus scan service. type: str choices: [disable, monitor, block] more...
- external-blocklist - Enable external-blocklist. type: str choices: [disable, monitor, block] more...
- quarantine - Enable/disable quarantine for infected files. type: str choices: [disable, enable] more...
- fortindr - Enable scanning of files by FortiNDR. type: str choices: [disable, block, monitor] more...
- fortisandbox - Enable scanning of files by FortiSandbox. type: str choices: [disable, block, monitor] more...
- mapi type: dict
- archive-block - Select the archive types to block. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- archive-log - Select the archive types to log. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- emulator - Enable/disable the virus emulator. type: str choices: [disable, enable] more...
- executables - Treat Windows executable files as viruses for the purpose of blocking or monitoring. type: str choices: [default, virus] more...
- options - Enable/disable MAPI AntiVirus scanning, monitoring, and quarantine. type: array choices: [scan, quarantine, avquery, avmonitor] more...
- outbreak-prevention - Enable Virus Outbreak Prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
- av-scan - Enable AntiVirus scan service. type: str choices: [disable, monitor, block] more...
- external-blocklist - Enable external-blocklist. type: str choices: [disable, monitor, block] more...
- quarantine - Enable/disable quarantine for infected files. type: str choices: [disable, enable] more...
- fortindr - Enable scanning of files by FortiNDR. type: str choices: [disable, block, monitor] more...
- fortisandbox - Enable scanning of files by FortiSandbox. type: str choices: [disable, block, monitor] more...
- nac-quar type: dict
- expiry - Duration of quarantine. type: str more...
- infected - Enable/Disable quarantining infected hosts to the banned user list. type: str choices: [none, quar-src-ip, quar-interface] more...
- log - Enable/disable AntiVirus quarantine logging. type: str choices: [disable, enable] more...
- nntp type: dict
- archive-block - Select the archive types to block. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- archive-log - Select the archive types to log. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- emulator - Enable/disable the virus emulator. type: str choices: [disable, enable] more...
- options - Enable/disable NNTP AntiVirus scanning, monitoring, and quarantine. type: array choices: [scan, file-filter, quarantine, avquery, avmonitor] more...
- outbreak-prevention - Enable Virus Outbreak Prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
- av-scan - Enable AntiVirus scan service. type: str choices: [disable, monitor, block] more...
- external-blocklist - Enable external-blocklist. type: str choices: [disable, monitor, block] more...
- quarantine - Enable/disable quarantine for infected files. type: str choices: [disable, enable] more...
- fortindr - Enable scanning of files by FortiNDR. type: str choices: [disable, block, monitor] more...
- fortisandbox - Enable scanning of files by FortiSandbox. type: str choices: [disable, block, monitor] more...
- outbreak-prevention type: dict
- external-blocklist - Enable/disable external malware blocklist. type: str choices: [disable, enable] more...
- ftgd-service - Enable/disable FortiGuard Virus outbreak prevention service. type: str choices: [disable, enable] more...
- pop3 type: dict
- archive-block - Select the archive types to block. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- archive-log - Select the archive types to log. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- content-disarm - Enable Content Disarm and Reconstruction for this protocol. type: str choices: [disable, enable] more...
- emulator - Enable/disable the virus emulator. type: str choices: [disable, enable] more...
- executables - Treat Windows executable files as viruses for the purpose of blocking or monitoring. type: str choices: [default, virus] more...
- options - Enable/disable POP3 AntiVirus scanning, monitoring, and quarantine. type: array choices: [scan, file-filter, quarantine, avquery, avmonitor] more...
- outbreak-prevention - Enable Virus Outbreak Prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
- av-scan - Enable AntiVirus scan service. type: str choices: [disable, monitor, block] more...
- external-blocklist - Enable external-blocklist. type: str choices: [disable, monitor, block] more...
- quarantine - Enable/disable quarantine for infected files. type: str choices: [disable, enable] more...
- fortindr - Enable scanning of files by FortiNDR. type: str choices: [disable, block, monitor] more...
- fortisandbox - Enable scanning of files by FortiSandbox. type: str choices: [disable, block, monitor] more...
- smtp type: dict
- archive-block - Select the archive types to block. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- archive-log - Select the archive types to log. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- content-disarm - Enable Content Disarm and Reconstruction for this protocol. type: str choices: [disable, enable] more...
- emulator - Enable/disable the virus emulator. type: str choices: [disable, enable] more...
- executables - Treat Windows executable files as viruses for the purpose of blocking or monitoring. type: str choices: [default, virus] more...
- options - Enable/disable SMTP AntiVirus scanning, monitoring, and quarantine. type: array choices: [scan, file-filter, quarantine, avquery, avmonitor] more...
- outbreak-prevention - Enable Virus Outbreak Prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
- av-scan - Enable AntiVirus scan service. type: str choices: [disable, monitor, block] more...
- external-blocklist - Enable external-blocklist. type: str choices: [disable, monitor, block] more...
- quarantine - Enable/disable quarantine for infected files. type: str choices: [disable, enable] more...
- fortindr - Enable scanning of files by FortiNDR. type: str choices: [disable, block, monitor] more...
- fortisandbox - Enable scanning of files by FortiSandbox. type: str choices: [disable, block, monitor] more...
- ssh type: dict
- archive-block - Select the archive types to block. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- archive-log - Select the archive types to log. type: array choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
- emulator - Enable/disable the virus emulator. type: str choices: [disable, enable] more...
- options - Enable/disable SFTP and SCP AntiVirus scanning, monitoring, and quarantine. type: array choices: [avmonitor, quarantine, scan] more...
- outbreak-prevention - Enable Virus Outbreak Prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
- av-scan - Enable AntiVirus scan service. type: str choices: [disable, monitor, block] more...
- external-blocklist - Enable external-blocklist. type: str choices: [disable, monitor, block] more...
- quarantine - Enable/disable quarantine for infected files. type: str choices: [disable, enable] more...
- fortindr - Enable scanning of files by FortiNDR. type: str choices: [disable, block, monitor] more...
- fortisandbox - Enable scanning of files by FortiSandbox. type: str choices: [disable, block, monitor] more...
- analytics-accept-filetype - Only submit files matching this DLP file-pattern to FortiSandbox. type: str more...
- analytics-ignore-filetype - Do not submit files matching this DLP file-pattern to FortiSandbox. type: str more...
- ems-threat-feed - Enable/disable use of EMS threat feed when performing AntiVirus scan. type: str choices: [disable, enable] more...
- external-blocklist - One or more external malware block lists. type: str more...
- external-blocklist-archive-scan - Enable/disable external-blocklist archive scanning. type: str choices: [disable, enable] more...
- external-blocklist-enable-all - Enable/disable all external blocklists. type: str choices: [disable, enable] more...
- outbreak-prevention-archive-scan - Enable/disable outbreak-prevention archive scanning. type: str choices: [disable, enable] more...
- fortindr-error-action - Action to take if FortiNDR encounters an error. type: str choices: [log-only, block, ignore] more...
- fortindr-timeout-action - Action to take if FortiNDR encounters a scan timeout. type: str choices: [log-only, block, ignore] more...
- fortisandbox-error-action - Action to take if FortiSandbox inline scan encounters an error. type: str choices: [log-only, block, ignore] more...
- fortisandbox-max-upload - Maximum size of files that can be uploaded to FortiSandbox. type: int more...
- fortisandbox-mode - FortiSandbox scan modes. type: str choices: [inline, analytics-suspicious, analytics-everything] more...
- fortisandbox-timeout-action - Action to take if FortiSandbox inline scan encounters a scan timeout. type: str choices: [log-only, block, ignore] more...
Notes¶
Note
- Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work.
- To create or update an object, use state: present directive.
- To delete an object, use state: absent directive
- Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded
Examples¶
- hosts: fortimanager00
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure AntiVirus profiles.
fmgr_antivirus_profile:
adom: ansible
state: present
antivirus_profile:
analytics-db: disable
analytics-max-upload: 20
av-block-log: disable
av-virus-log: disable
comment: 'test comment'
extended-log: disable
ftgd-analytics: disable
inspection-mode: proxy
mobile-malware-db: disable
name: 'antivirus-profile'
scan-mode: quick
- name: gathering fortimanager facts
hosts: fortimanager00
gather_facts: no
connection: httpapi
collections:
- fortinet.fortimanager
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: retrieve all the antivirus profiles
fmgr_fact:
facts:
selector: 'antivirus_profile'
params:
adom: 'ansible'
profile: 'your_value'
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:
- request_url - The full url requested returned: always type: str sample: /sys/login/user
- response_code - The status of api request returned: always type: int sample: 0
- response_message - The descriptive message of the api response returned: always type: str sample: OK
- response_data - The data body of the api response returned: optional type: list or dict