fmgr_application_list_obj – Configure application control lists.

New in version 2.10.

Synopsis

  • This module is able to configure a FortiManager device by allowing the user to [clone, delete, get, set, update] the following FortiManager json-rpc urls.
  • /pm/config/adom/{adom}/obj/application/list/{list}
  • /pm/config/global/obj/application/list/{list}
  • Examples include all parameters and values need to be adjusted to data sources before usage.
  • Tested with FortiManager v6.0.0

Requirements

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

  • ansible>=2.10.0

Parameters

  • loose_validation - Do parameter validation in a loose way 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 dom
  • workspace_locking_timeout - The maximum time in seconds to wait for other users to release workspace lock type: integer required: false default: 300
  • url_params - parameters in url path type: dict required: true
    • adom - the domain prefix type: str choices: none, global, custom dom
    • list - the object name type: str
  • parameters for method: [clone, set, update] - Configure application control lists.
    • data - No description for the parameter type: dict
      • app-replacemsg - Enable/disable replacement messages for blocked applications. type: str choices: [disable, enable]
      • comment - comments type: str
      • deep-app-inspection - Enable/disable deep application inspection. type: str choices: [disable, enable]
      • entries - No description for the parameter type: array
        • action - Pass or block traffic, or reset connection for traffic from this application. type: str choices: [pass, block, reset]
        • application - No description for the parameter type: array
          • {no-name} - No description for the parameter type: int
        • behavior - No description for the parameter type: array
          • {no-name} - No description for the parameter type: str
        • category - Category ID list. type: str
        • id - Entry ID. type: int
        • log - Enable/disable logging for this application list. type: str choices: [disable, enable]
        • log-packet - Enable/disable packet logging. type: str choices: [disable, enable]
        • parameters - No description for the parameter type: array
          • id - Parameter ID. type: int
          • value - Parameter value. type: str
        • per-ip-shaper - Per-IP traffic shaper. type: str
        • popularity - No description for the parameter type: array
          • {no-name} - No description for the parameter type: str choices: [1, 2, 3, 4, 5]
        • protocols - No description for the parameter type: array
          • {no-name} - No description for the parameter type: str
        • quarantine - Quarantine method. type: str choices: [none, attacker]
        • quarantine-expiry - Duration of quarantine. type: str
        • quarantine-log - Enable/disable quarantine logging. type: str choices: [disable, enable]
        • rate-count - Count of the rate. type: int
        • rate-duration - Duration (sec) of the rate. type: int
        • rate-mode - Rate limit mode. type: str choices: [periodical, continuous]
        • rate-track - Track the packet protocol field. type: str choices: [none, src-ip, dest-ip, dhcp-client-mac, dns-domain]
        • risk - No description for the parameter type: array
          • {no-name} - No description for the parameter type: int
        • session-ttl - Session TTL (0 = default). type: int
        • shaper - Traffic shaper. type: str
        • shaper-reverse - Reverse traffic shaper. type: str
        • sub-category - No description for the parameter type: array
          • {no-name} - No description for the parameter type: int
        • technology - No description for the parameter type: array
          • {no-name} - No description for the parameter type: str
        • vendor - No description for the parameter type: array
          • {no-name} - No description for the parameter type: str
      • extended-log - Enable/disable extended logging. type: str choices: [disable, enable]
      • name - List name. type: str
      • options - No description for the parameter type: array
        • {no-name} - No description for the parameter type: str choices: [allow-dns, allow-icmp, allow-http, allow-ssl, allow-quic]
      • other-application-action - Action for other applications. type: str choices: [pass, block]
      • other-application-log - Enable/disable logging for other applications. type: str choices: [disable, enable]
      • p2p-black-list - No description for the parameter type: array
        • {no-name} - No description for the parameter type: str choices: [skype, edonkey, bittorrent]
      • replacemsg-group - Replacement message group. type: str
      • unknown-application-action - Pass or block traffic from unknown applications. type: str choices: [pass, block]
      • unknown-application-log - Enable/disable logging for unknown applications. type: str choices: [disable, enable]
  • parameters for method: [delete] - Configure application control lists.
  • parameters for method: [get] - Configure application control lists.
    • option - Set fetch option for the request. type: str choices: [object member, chksum, datasrc]

Notes

Note

  • The module may supports multiple method, every method has different parameters definition
  • One method may also have more than one parameter definition collection, each collection is dedicated to one API endpoint
  • The module may include domain dependent urls, the domain can be specified in url_params as adom
  • To run in workspace mode, the paremeter workspace_locking_adom must be included in the task

Examples

- hosts: fortimanager-inventory
  collections:
    - fortinet.fortimanager
  connection: httpapi
  vars:
     ansible_httpapi_use_ssl: True
     ansible_httpapi_validate_certs: False
     ansible_httpapi_port: 443
  tasks:

   - name: REQUESTING /PM/CONFIG/OBJ/APPLICATION/LIST/{LIST}
     fmgr_application_list_obj:
        loose_validation: False
        workspace_locking_adom: <value in [global, custom adom]>
        workspace_locking_timeout: 300
        method: <value in [clone, set, update]>
        url_params:
           adom: <value in [none, global, custom dom]>
           list: <value of string>
        params:
           -
              data:
                 app-replacemsg: <value in [disable, enable]>
                 comment: <value of string>
                 deep-app-inspection: <value in [disable, enable]>
                 entries:
                   -
                       action: <value in [pass, block, reset]>
                       application:
                         - <value of integer>
                       behavior:
                         - <value of string>
                       category: <value of string>
                       id: <value of integer>
                       log: <value in [disable, enable]>
                       log-packet: <value in [disable, enable]>
                       parameters:
                         -
                             id: <value of integer>
                             value: <value of string>
                       per-ip-shaper: <value of string>
                       popularity:
                         - <value in [1, 2, 3, ...]>
                       protocols:
                         - <value of string>
                       quarantine: <value in [none, attacker]>
                       quarantine-expiry: <value of string>
                       quarantine-log: <value in [disable, enable]>
                       rate-count: <value of integer>
                       rate-duration: <value of integer>
                       rate-mode: <value in [periodical, continuous]>
                       rate-track: <value in [none, src-ip, dest-ip, ...]>
                       risk:
                         - <value of integer>
                       session-ttl: <value of integer>
                       shaper: <value of string>
                       shaper-reverse: <value of string>
                       sub-category:
                         - <value of integer>
                       technology:
                         - <value of string>
                       vendor:
                         - <value of string>
                 extended-log: <value in [disable, enable]>
                 name: <value of string>
                 options:
                   - <value in [allow-dns, allow-icmp, allow-http, ...]>
                 other-application-action: <value in [pass, block]>
                 other-application-log: <value in [disable, enable]>
                 p2p-black-list:
                   - <value in [skype, edonkey, bittorrent]>
                 replacemsg-group: <value of string>
                 unknown-application-action: <value in [pass, block]>
                 unknown-application-log: <value in [disable, enable]>

   - name: REQUESTING /PM/CONFIG/OBJ/APPLICATION/LIST/{LIST}
     fmgr_application_list_obj:
        loose_validation: False
        workspace_locking_adom: <value in [global, custom adom]>
        workspace_locking_timeout: 300
        method: <value in [get]>
        url_params:
           adom: <value in [none, global, custom dom]>
           list: <value of string>
        params:
           -
              option: <value in [object member, chksum, datasrc]>

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:

  • return values for method: [clone, delete, set, update]
    • status - No description for the parameter type: dict
      • code - No description for the parameter type: int
      • message - No description for the parameter type: str
    • url - No description for the parameter type: str example: /pm/config/adom/{adom}/obj/application/list/{list}
  • return values for method: [get]
    • data - No description for the parameter type: dict
      • app-replacemsg - Enable/disable replacement messages for blocked applications. type: str
      • comment - comments type: str
      • deep-app-inspection - Enable/disable deep application inspection. type: str
      • entries - No description for the parameter type: array
        • action - Pass or block traffic, or reset connection for traffic from this application. type: str
        • application - No description for the parameter type: array
          • {no-name} - No description for the parameter type: int
        • behavior - No description for the parameter type: array
          • {no-name} - No description for the parameter type: str
        • category - Category ID list. type: str
        • id - Entry ID. type: int
        • log - Enable/disable logging for this application list. type: str
        • log-packet - Enable/disable packet logging. type: str
        • parameters - No description for the parameter type: array
          • id - Parameter ID. type: int
          • value - Parameter value. type: str
        • per-ip-shaper - Per-IP traffic shaper. type: str
        • popularity - No description for the parameter type: array
          • {no-name} - No description for the parameter type: str
        • protocols - No description for the parameter type: array
          • {no-name} - No description for the parameter type: str
        • quarantine - Quarantine method. type: str
        • quarantine-expiry - Duration of quarantine. type: str
        • quarantine-log - Enable/disable quarantine logging. type: str
        • rate-count - Count of the rate. type: int
        • rate-duration - Duration (sec) of the rate. type: int
        • rate-mode - Rate limit mode. type: str
        • rate-track - Track the packet protocol field. type: str
        • risk - No description for the parameter type: array
          • {no-name} - No description for the parameter type: int
        • session-ttl - Session TTL (0 = default). type: int
        • shaper - Traffic shaper. type: str
        • shaper-reverse - Reverse traffic shaper. type: str
        • sub-category - No description for the parameter type: array
          • {no-name} - No description for the parameter type: int
        • technology - No description for the parameter type: array
          • {no-name} - No description for the parameter type: str
        • vendor - No description for the parameter type: array
          • {no-name} - No description for the parameter type: str
      • extended-log - Enable/disable extended logging. type: str
      • name - List name. type: str
      • options - No description for the parameter type: array
        • {no-name} - No description for the parameter type: str
      • other-application-action - Action for other applications. type: str
      • other-application-log - Enable/disable logging for other applications. type: str
      • p2p-black-list - No description for the parameter type: array
        • {no-name} - No description for the parameter type: str
      • replacemsg-group - Replacement message group. type: str
      • unknown-application-action - Pass or block traffic from unknown applications. type: str
      • unknown-application-log - Enable/disable logging for unknown applications. type: str
    • status - No description for the parameter type: dict
      • code - No description for the parameter type: int
      • message - No description for the parameter type: str
    • url - No description for the parameter type: str example: /pm/config/adom/{adom}/obj/application/list/{list}

Status

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

Authors

  • Frank Shen (@fshen01)
  • Link Zheng (@zhengl)

Hint

If you notice any issues in this documentation, you can create a pull request to improve it.