fmgr_antivirus_profile – Configure AntiVirus profiles.

Added in version 1.0.0.

Warning

Starting in version 3.0.0, all input arguments will be named using the underscore naming convention (snake_case).

  • Argument name before 3.0.0: var-name, var name, var.name

  • New argument name starting in 3.0.0: var_name

FortiManager Ansible v2.4+ supports both previous argument name and new underscore name. You will receive deprecation warnings if you keep using the previous argument name. You can ignore the warning by setting deprecation_warnings=False in ansible.cfg.

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.

  • Tested with FortiManager v6.x and v7.x.

Requirements

The below requirements are needed on the host that executes this module.

  • ansible>=2.15.0

FortiManager Version Compatibility

Supported Version Ranges: v6.0.0 -> latest

Parameters

  • access_token -The token to access FortiManager without using username and password. type: str required: false
  • 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
  • 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
  • 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
  • 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
  • adom - The parameter in requested url type: str required: true
  • antivirus_profile - Configure AntiVirus profiles. type: dict
    • analytics_bl_filetype (Alias name: analytics-bl-filetype) Only submit files matching this dlp file-pattern to fortisandbox. type: str more...
    • analytics_db (Alias name: analytics-db) Enable/disable using the fortisandbox signature database to supplement the av signature databases. type: str choices: [disable, enable] more...
    • analytics_max_upload (Alias name: analytics-max-upload) Maximum size of files that can be uploaded to fortisandbox (1 - 395 mbytes, default = 10). type: int more...
    • analytics_wl_filetype (Alias name: analytics-wl-filetype) Do not submit files matching this dlp file-pattern to fortisandbox. type: str more...
    • av_block_log (Alias name: av-block-log) Enable/disable logging for antivirus file blocking. type: str choices: [disable, enable] more...
    • av_virus_log (Alias name: av-virus-log) Enable/disable antivirus logging. type: str choices: [disable, enable] more...
    • comment Comment. type: str more...
    • extended_log (Alias name: extended-log) Enable/disable extended logging for antivirus. type: str choices: [disable, enable] more...
    • ftgd_analytics (Alias name: ftgd-analytics) Settings to control which files are uploaded to fortisandbox. type: str choices: [disable, suspicious, everything] more...
    • inspection_mode (Alias name: inspection-mode) Inspection mode. type: str choices: [proxy, flow-based] more...
    • mobile_malware_db (Alias name: 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 (Alias name: replacemsg-group) Replacement message group customized for this profile. type: str more...
    • scan_mode (Alias name: scan-mode) Choose between full scan mode and quick scan mode. type: str choices: [quick, full, legacy, default] more...
    • feature_set (Alias name: feature-set) Flow/proxy feature set. type: str choices: [proxy, flow] more...
    • cifs type: dict
      • archive_block (Alias name: archive-block) Select the archive types to block. type: list choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
      • archive_log (Alias name: archive-log) Select the archive types to log. type: list 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: list choices: [scan, quarantine, avmonitor] more...
      • outbreak_prevention (Alias name: outbreak-prevention) Enable virus outbreak prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
      • av_scan (Alias name: av-scan) Enable antivirus scan service. type: str choices: [disable, monitor, block] more...
      • external_blocklist (Alias name: 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...
      • fortiai Enable/disable scanning of files by fortiai. type: str choices: [disable, monitor, block] more...
    • content_disarm (Alias name: content-disarm) type: dict
      • cover_page (Alias name: cover-page) Enable/disable inserting a cover page into the disarmed document. type: str choices: [disable, enable] more...
      • detect_only (Alias name: detect-only) Enable/disable only detect disarmable files, do not alter content. type: str choices: [disable, enable] more...
      • error_action (Alias name: error-action) Action to be taken if cdr engine encounters an unrecoverable error. type: str choices: [block, log-only, ignore] more...
      • office_action (Alias name: office-action) Enable/disable stripping of powerpoint action events in microsoft office documents. type: str choices: [disable, enable] more...
      • office_dde (Alias name: office-dde) Enable/disable stripping of dynamic data exchange events in microsoft office documents. type: str choices: [disable, enable] more...
      • office_embed (Alias name: office-embed) Enable/disable stripping of embedded objects in microsoft office documents. type: str choices: [disable, enable] more...
      • office_hylink (Alias name: office-hylink) Enable/disable stripping of hyperlinks in microsoft office documents. type: str choices: [disable, enable] more...
      • office_linked (Alias name: office-linked) Enable/disable stripping of linked objects in microsoft office documents. type: str choices: [disable, enable] more...
      • office_macro (Alias name: office-macro) Enable/disable stripping of macros in microsoft office documents. type: str choices: [disable, enable] more...
      • original_file_destination (Alias name: original-file-destination) Destination to send original file if active content is removed. type: str choices: [fortisandbox, quarantine, discard] more...
      • pdf_act_form (Alias name: 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 (Alias name: pdf-act-gotor) Enable/disable stripping of pdf document actions that access other pdf documents. type: str choices: [disable, enable] more...
      • pdf_act_java (Alias name: pdf-act-java) Enable/disable stripping of pdf document actions that execute javascript code. type: str choices: [disable, enable] more...
      • pdf_act_launch (Alias name: pdf-act-launch) Enable/disable stripping of pdf document actions that launch other applications. type: str choices: [disable, enable] more...
      • pdf_act_movie (Alias name: pdf-act-movie) Enable/disable stripping of pdf document actions that play a movie. type: str choices: [disable, enable] more...
      • pdf_act_sound (Alias name: pdf-act-sound) Enable/disable stripping of pdf document actions that play a sound. type: str choices: [disable, enable] more...
      • pdf_embedfile (Alias name: pdf-embedfile) Enable/disable stripping of embedded files in pdf documents. type: str choices: [disable, enable] more...
      • pdf_hyperlink (Alias name: pdf-hyperlink) Enable/disable stripping of hyperlinks from pdf documents. type: str choices: [disable, enable] more...
      • pdf_javacode (Alias name: pdf-javacode) Enable/disable stripping of javascript code in pdf documents. type: str choices: [disable, enable] more...
    • ftp type: dict
      • archive_block (Alias name: archive-block) Select the archive types to block. type: list choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
      • archive_log (Alias name: archive-log) Select the archive types to log. type: list 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: list choices: [scan, file-filter, quarantine, avquery, avmonitor] more...
      • outbreak_prevention (Alias name: outbreak-prevention) Enable virus outbreak prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
      • av_scan (Alias name: av-scan) Enable antivirus scan service. type: str choices: [disable, monitor, block] more...
      • external_blocklist (Alias name: 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...
      • fortiai Enable/disable scanning of files by fortiai. type: str choices: [disable, monitor, block] more...
    • http type: dict
      • archive_block (Alias name: archive-block) Select the archive types to block. type: list choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
      • archive_log (Alias name: archive-log) Select the archive types to log. type: list choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
      • content_disarm (Alias name: 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: list choices: [scan, file-filter, quarantine, avquery, avmonitor, strict-file] more...
      • outbreak_prevention (Alias name: outbreak-prevention) Enable virus outbreak prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
      • av_optimize (Alias name: av-optimize) type: str choices: [disable, enable] more...
      • av_scan (Alias name: av-scan) Enable antivirus scan service. type: str choices: [disable, monitor, block] more...
      • external_blocklist (Alias name: 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...
      • fortiai Enable/disable scanning of files by fortiai. type: str choices: [disable, monitor, block] more...
      • unknown_content_encoding (Alias name: unknown-content-encoding) Configure the action the fortigate unit will take on unknown content-encoding. type: str choices: [block, inspect, bypass] more...
    • imap type: dict
      • archive_block (Alias name: archive-block) Select the archive types to block. type: list choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
      • archive_log (Alias name: archive-log) Select the archive types to log. type: list choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
      • content_disarm (Alias name: 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: list choices: [scan, file-filter, quarantine, avquery, avmonitor] more...
      • outbreak_prevention (Alias name: outbreak-prevention) Enable virus outbreak prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
      • av_scan (Alias name: av-scan) Enable antivirus scan service. type: str choices: [disable, monitor, block] more...
      • external_blocklist (Alias name: 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...
      • fortiai Enable/disable scanning of files by fortiai. type: str choices: [disable, monitor, block] more...
    • mapi type: dict
      • archive_block (Alias name: archive-block) Select the archive types to block. type: list choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
      • archive_log (Alias name: archive-log) Select the archive types to log. type: list 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: list choices: [scan, quarantine, avquery, avmonitor] more...
      • outbreak_prevention (Alias name: outbreak-prevention) Enable virus outbreak prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
      • av_scan (Alias name: av-scan) Enable antivirus scan service. type: str choices: [disable, monitor, block] more...
      • external_blocklist (Alias name: 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...
      • fortiai Enable/disable scanning of files by fortiai. type: str choices: [disable, monitor, block] more...
    • nac_quar (Alias name: 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 (Alias name: archive-block) Select the archive types to block. type: list choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
      • archive_log (Alias name: archive-log) Select the archive types to log. type: list 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: list choices: [scan, file-filter, quarantine, avquery, avmonitor] more...
      • outbreak_prevention (Alias name: outbreak-prevention) Enable virus outbreak prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
      • av_scan (Alias name: av-scan) Enable antivirus scan service. type: str choices: [disable, monitor, block] more...
      • external_blocklist (Alias name: 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...
      • fortiai Enable/disable scanning of files by fortiai. type: str choices: [disable, monitor, block] more...
    • outbreak_prevention (Alias name: outbreak-prevention) type: dict
      • external_blocklist (Alias name: external-blocklist) Enable/disable external malware blocklist. type: str choices: [disable, enable] more...
      • ftgd_service (Alias name: ftgd-service) Enable/disable fortiguard virus outbreak prevention service. type: str choices: [disable, enable] more...
    • pop3 type: dict
      • archive_block (Alias name: archive-block) Select the archive types to block. type: list choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
      • archive_log (Alias name: archive-log) Select the archive types to log. type: list choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
      • content_disarm (Alias name: 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: list choices: [scan, file-filter, quarantine, avquery, avmonitor] more...
      • outbreak_prevention (Alias name: outbreak-prevention) Enable virus outbreak prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
      • av_scan (Alias name: av-scan) Enable antivirus scan service. type: str choices: [disable, monitor, block] more...
      • external_blocklist (Alias name: 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...
      • fortiai Enable/disable scanning of files by fortiai. type: str choices: [disable, monitor, block] more...
    • smtp type: dict
      • archive_block (Alias name: archive-block) Select the archive types to block. type: list choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
      • archive_log (Alias name: archive-log) Select the archive types to log. type: list choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
      • content_disarm (Alias name: 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: list choices: [scan, file-filter, quarantine, avquery, avmonitor] more...
      • outbreak_prevention (Alias name: outbreak-prevention) Enable virus outbreak prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
      • av_scan (Alias name: av-scan) Enable antivirus scan service. type: str choices: [disable, monitor, block] more...
      • external_blocklist (Alias name: 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...
      • fortiai Enable/disable scanning of files by fortiai. type: str choices: [disable, monitor, block] more...
    • ssh type: dict
      • archive_block (Alias name: archive-block) Select the archive types to block. type: list choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
      • archive_log (Alias name: archive-log) Select the archive types to log. type: list 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: list choices: [avmonitor, quarantine, scan] more...
      • outbreak_prevention (Alias name: outbreak-prevention) Enable virus outbreak prevention service. type: str choices: [disabled, files, full-archive, disable, block, monitor] more...
      • av_scan (Alias name: av-scan) Enable antivirus scan service. type: str choices: [disable, monitor, block] more...
      • external_blocklist (Alias name: 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...
      • fortiai Enable/disable scanning of files by fortiai. type: str choices: [disable, monitor, block] more...
    • smb type: dict
      • archive_block (Alias name: archive-block) type: list choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
      • archive_log (Alias name: archive-log) type: list choices: [encrypted, corrupted, multipart, nested, mailbomb, unhandled, partiallycorrupted, fileslimit, timeout] more...
      • emulator Enable/disable the virus emulator. type: str choices: [disable, enable] more...
      • options type: list choices: [scan, quarantine, avquery, avmonitor] more...
      • outbreak_prevention (Alias name: outbreak-prevention) Enable fortiguard virus outbreak prevention service. type: str choices: [disabled, files, full-archive] more...
    • analytics_accept_filetype (Alias name: analytics-accept-filetype) Only submit files matching this dlp file-pattern to fortisandbox. type: str more...
    • analytics_ignore_filetype (Alias name: analytics-ignore-filetype) Do not submit files matching this dlp file-pattern to fortisandbox. type: str more...
    • ems_threat_feed (Alias name: ems-threat-feed) Enable/disable use of ems threat feed when performing antivirus scan. type: str choices: [disable, enable] more...
    • external_blocklist (Alias name: external-blocklist) One or more external malware block lists. type: list or str more...
    • external_blocklist_archive_scan (Alias name: external-blocklist-archive-scan) Enable/disable external-blocklist archive scanning. type: str choices: [disable, enable] more...
    • external_blocklist_enable_all (Alias name: external-blocklist-enable-all) Enable/disable all external blocklists. type: str choices: [disable, enable] more...
    • outbreak_prevention_archive_scan (Alias name: outbreak-prevention-archive-scan) Enable/disable outbreak-prevention archive scanning. type: str choices: [disable, enable] more...
    • fortindr_error_action (Alias name: fortindr-error-action) Action to take if fortindr encounters an error. type: str choices: [log-only, block, ignore] more...
    • fortindr_timeout_action (Alias name: fortindr-timeout-action) Action to take if fortindr encounters a scan timeout. type: str choices: [log-only, block, ignore] more...
    • fortisandbox_error_action (Alias name: fortisandbox-error-action) Action to take if fortisandbox inline scan encounters an error. type: str choices: [log-only, block, ignore] more...
    • fortisandbox_max_upload (Alias name: fortisandbox-max-upload) Maximum size of files that can be uploaded to fortisandbox. type: int more...
    • fortisandbox_mode (Alias name: fortisandbox-mode) Fortisandbox scan modes. type: str choices: [inline, analytics-suspicious, analytics-everything] more...
    • fortisandbox_timeout_action (Alias name: fortisandbox-timeout-action) Action to take if fortisandbox inline scan encounters a scan timeout. type: str choices: [log-only, block, ignore] more...
    • fortiai_error_action (Alias name: fortiai-error-action) Action to take if fortiai encounters an error. type: str choices: [block, log-only, ignore] more...
    • fortiai_timeout_action (Alias name: fortiai-timeout-action) Action to take if fortiai encounters a scan timeout. type: str choices: [block, log-only, 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

- name: Example playbook
  hosts: fortimanagers
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Configure AntiVirus profiles.
      fortinet.fortimanager.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: fortimanagers
  gather_facts: false
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Retrieve all the antivirus profiles
      fortinet.fortimanager.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:

  • meta - The result of the request.returned: always type: dict
    • 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_data - The data body of the api response. returned: optional type: list or dict
    • response_message - The descriptive message of the api response. returned: always type: str sample: OK
    • system_information - The information of the target system. returned: always type: dict
  • rc - The status the request. returned: always type: int sample: 0
  • version_check_warning - Warning if the parameters used in the playbook are not supported by the current FortiManager version. returned: if at least one parameter not supported by the current FortiManager version type: list

Status

  • This module is not guaranteed to have a backwards compatible interface.

Authors

  • Xinwei Du (@dux-fortinet)

  • Xing Li (@lix-fortinet)

  • Jie Xue (@JieX19)

  • Link Zheng (@chillancezen)

  • Frank Shen (@fshen01)

  • Hongbin Lu (@fgtdev-hblu)