fortinet.fortimanager.fmgr_application_list (2.4.0) — module

Configure application control lists.

| "added in version" 1.0.0 of fortinet.fortimanager"

Authors: Xinwei Du (@dux-fortinet), Xing Li (@lix-fortinet), Jie Xue (@JieX19), Link Zheng (@chillancezen), Frank Shen (@fshen01), Hongbin Lu (@fgtdev-hblu)

preview | supported by community

Install collection

Install with ansible-galaxy collection install fortinet.fortimanager:==2.4.0


Add to requirements.yml

  collections:
    - name: fortinet.fortimanager
      version: 2.4.0

Description

This module is able to configure a FortiManager device.

Examples include all parameters and values which need to be adjusted to data sources before usage.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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 application control lists.
      fortinet.fortimanager.fmgr_application_list:
        adom: ansible
        state: present
        application_list:
          app-replacemsg: enable
          comment: "ansible-test-comment"
          deep-app-inspection: enable
          extended-log: disable
          name: "ansible-test"
          other-application-action: pass
          other-application-log: disable
          unknown-application-action: pass
          unknown-application-log: disable
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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 application list
      fortinet.fortimanager.fmgr_fact:
        facts:
          selector: "application_list"
          params:
            adom: "ansible"
            list: "your_value"

Inputs

    
adom:
    description: The parameter (adom) in requested url.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    description: The directive to create, update or delete an object.
    required: true
    type: str

rc_failed:
    description: The rc codes list with which the conditions to fail will be overriden.
    elements: int
    type: list

enable_log:
    default: false
    description: Enable/Disable logging for task.
    type: bool

access_token:
    description: The token to access FortiManager without using username and password.
    type: str

rc_succeeded:
    description: The rc codes list with which the conditions to succeed will be overriden.
    elements: int
    type: list

proposed_method:
    choices:
    - update
    - set
    - add
    description: The overridden method for the underlying Json RPC request.
    type: str

application_list:
    description: The top level parameters set.
    required: false
    suboptions:
      app-replacemsg:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to app_replacemsg. Enable/disable replacement
          messages for blocked applications.
        type: str
      comment:
        description: Comments
        type: str
      control-default-network-services:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to control_default_network_services.
          Enable/disable enforcement of protocols over selected ports.
        type: str
      deep-app-inspection:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to deep_app_inspection. Enable/disable
          deep application inspection.
        type: str
      default-network-services:
        description: Deprecated, please rename it to default_network_services. Default-Network-Services.
        elements: dict
        suboptions:
          id:
            description: Entry ID.
            type: int
          port:
            description: Port number.
            type: int
          services:
            choices:
            - http
            - ssh
            - telnet
            - ftp
            - dns
            - smtp
            - pop3
            - imap
            - snmp
            - nntp
            - https
            description: Network protocols.
            elements: str
            type: list
          violation-action:
            choices:
            - block
            - monitor
            - pass
            description: Deprecated, please rename it to violation_action. Action for
              protocols not white listed under selected port.
            type: str
        type: list
      enforce-default-app-port:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to enforce_default_app_port. Enable/disable
          default application port enforcement for allowed ...
        type: str
      entries:
        description: Entries.
        elements: dict
        suboptions:
          action:
            choices:
            - pass
            - block
            - reset
            description: Pass or block traffic, or reset connection for traffic from this
              application.
            type: str
          application:
            description: (list) ID of allowed applications.
            type: raw
          behavior:
            description: (list) Application behavior filter.
            type: raw
          category:
            description: (list or str) Category ID list.
            type: raw
          exclusion:
            description: (list) ID of excluded applications.
            type: raw
          id:
            description: Entry ID.
            type: int
          log:
            choices:
            - disable
            - enable
            description: Enable/disable logging for this application list.
            type: str
          log-packet:
            choices:
            - disable
            - enable
            description: Deprecated, please rename it to log_packet. Enable/disable packet
              logging.
            type: str
          parameters:
            description: Parameters.
            elements: dict
            suboptions:
              id:
                description: Parameter ID.
                type: int
              members:
                description: Members.
                elements: dict
                suboptions:
                  id:
                    description: Parameter.
                    type: int
                  name:
                    description: Parameter name.
                    type: str
                  value:
                    description: Parameter value.
                    type: str
                type: list
              value:
                description: Parameter value.
                type: str
            type: list
          per-ip-shaper:
            description: Deprecated, please rename it to per_ip_shaper. Per-IP traffic
              shaper.
            type: str
          popularity:
            choices:
            - '1'
            - '2'
            - '3'
            - '4'
            - '5'
            description: Application popularity filter
            elements: str
            type: list
          protocols:
            description: (list) Application protocol filter.
            type: raw
          quarantine:
            choices:
            - none
            - attacker
            description: Quarantine method.
            type: str
          quarantine-expiry:
            description: Deprecated, please rename it to quarantine_expiry. Duration of
              quarantine.
            type: str
          quarantine-log:
            choices:
            - disable
            - enable
            description: Deprecated, please rename it to quarantine_log. Enable/disable
              quarantine logging.
            type: str
          rate-count:
            description: Deprecated, please rename it to rate_count. Count of the rate.
            type: int
          rate-duration:
            description: Deprecated, please rename it to rate_duration. Duration
            type: int
          rate-mode:
            choices:
            - periodical
            - continuous
            description: Deprecated, please rename it to rate_mode. Rate limit mode.
            type: str
          rate-track:
            choices:
            - none
            - src-ip
            - dest-ip
            - dhcp-client-mac
            - dns-domain
            description: Deprecated, please rename it to rate_track. Track the packet
              protocol field.
            type: str
          risk:
            description: (list) Risk, or impact, of allowing traffic from this application
              to occur
            type: raw
          session-ttl:
            description: Deprecated, please rename it to session_ttl. Session TTL
            type: int
          shaper:
            description: Traffic shaper.
            type: str
          shaper-reverse:
            description: Deprecated, please rename it to shaper_reverse. Reverse traffic
              shaper.
            type: str
          sub-category:
            description: (list) Deprecated, please rename it to sub_category. Application
              Sub-category ID list.
            type: raw
          tags:
            description: Tag filter.
            type: str
          technology:
            description: (list) Application technology filter.
            type: raw
          vendor:
            description: (list) Application vendor filter.
            type: raw
        type: list
      extended-log:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to extended_log. Enable/disable extended
          logging.
        type: str
      force-inclusion-ssl-di-sigs:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to force_inclusion_ssl_di_sigs. Enable/disable
          forced inclusion of SSL deep inspection signat...
        type: str
      name:
        description: List name.
        required: true
        type: str
      options:
        choices:
        - allow-dns
        - allow-icmp
        - allow-http
        - allow-ssl
        - allow-quic
        description: Basic application protocol signatures allowed by default.
        elements: str
        type: list
      other-application-action:
        choices:
        - pass
        - block
        description: Deprecated, please rename it to other_application_action. Action
          for other applications.
        type: str
      other-application-log:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to other_application_log. Enable/disable
          logging for other applications.
        type: str
      p2p-black-list:
        choices:
        - skype
        - edonkey
        - bittorrent
        description: Deprecated, please rename it to p2p_black_list. P2P applications
          to be black listed.
        elements: str
        type: list
      p2p-block-list:
        choices:
        - skype
        - edonkey
        - bittorrent
        description: Deprecated, please rename it to p2p_block_list. P2P applications
          to be blocklisted.
        elements: str
        type: list
      replacemsg-group:
        description: Deprecated, please rename it to replacemsg_group. Replacement message
          group.
        type: str
      unknown-application-action:
        choices:
        - pass
        - block
        description: Deprecated, please rename it to unknown_application_action. Pass
          or block traffic from unknown applications.
        type: str
      unknown-application-log:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to unknown_application_log. Enable/disable
          logging for unknown applications.
        type: str
    type: dict

bypass_validation:
    default: false
    description: Only set to True when module schema diffs with FortiManager API structure,
      module continues to execute without validating parameters.
    type: bool

workspace_locking_adom:
    description: The adom to lock for FortiManager running in workspace mode, the value
      can be global and others including root.
    type: str

forticloud_access_token:
    description: Authenticate Ansible client with forticloud API access token.
    type: str

workspace_locking_timeout:
    default: 300
    description: The maximum time in seconds to wait for other user to release the workspace
      lock.
    type: int

Outputs

meta:
  contains:
    request_url:
      description: The full url requested.
      returned: always
      sample: /sys/login/user
      type: str
    response_code:
      description: The status of api request.
      returned: always
      sample: 0
      type: int
    response_data:
      description: The api response.
      returned: always
      type: list
    response_message:
      description: The descriptive message of the api response.
      returned: always
      sample: OK.
      type: str
    system_information:
      description: The information of the target system.
      returned: always
      type: dict
  description: The result of the request.
  returned: always
  type: dict
rc:
  description: The status the request.
  returned: always
  sample: 0
  type: int
version_check_warning:
  description: Warning if the parameters used in the playbook are not supported by
    the current FortiManager version.
  returned: complex
  type: list