security_web_filter_profile - Web Filter Profile Resource

Added in version 1.0.0.

Synopsis

Web Filter Profile Resource.

Use API “/resource-api/v2/security/web-filter-profile/{direction}/{primaryKey}”.

Requirements

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

  • ansible>=2.17.0

Parameters

  • state The state of the module. "present" means update the resource. This resource can't be deleted, and does not support "absent" state.type: strchoices: ['present', 'absent']default: present
  • force_behavior Specify this option to force the method to use to interact with the resource.type: strchoices: ['none', 'read', 'create', 'update', 'delete']default: none
  • bypass_validation Bypass validation of the module.type: booldefault: False
  • params The parameters of the module.[Required]type: dict
    • direction [Required]type: str
    • primary_key [Required]type: str
    • fortiguard_filters type: listelements: dict
      • action type: strchoices: ['allow', 'block', 'monitor', 'warning']
      • category type: dict
        • primary_key type: str
        • datasource type: str
      • warning_duration type: str
    • fortiguard_local_category_filters type: listelements: dict
      • action type: strchoices: ['allow', 'block', 'disable', 'monitor', 'warning']
      • category type: dict
        • primary_key type: str
        • datasource type: str
      • warning_duration type: str
    • fqdn_threat_feed_filters type: listelements: dict
      • action type: strchoices: ['allow', 'block', 'disable', 'monitor', 'warning']
      • category type: dict
        • primary_key type: str
        • datasource type: str
      • warning_duration type: str
    • use_fortiguard_filters type: strchoices: ['disable', 'enable']
    • block_invalid_url type: strchoices: ['disable', 'enable']
    • enforce_safe_search type: strchoices: ['disable', 'enable']
    • traffic_on_rating_error type: strchoices: ['disable', 'enable']
    • content_filters type: listelements: dict
      • status type: strchoices: ['disable', 'enable']
      • pattern type: str
      • pattern_type type: strchoices: ['regexp', 'wildcard']
      • lang type: strchoices: ['cyrillic', 'french', 'japanese', 'korean', 'simch', 'spanish', 'thai', 'trach', 'western']
      • action type: strchoices: ['block', 'exempt']
      • score type: int
    • url_filters type: listelements: dict
      • status type: strchoices: ['disable', 'enable']
      • url type: str
      • type type: strchoices: ['regex', 'simple', 'wildcard']
      • action type: strchoices: ['allow', 'block', 'exempt', 'monitor']
    • http_headers type: listelements: dict
      • name type: str
      • action type: strchoices: ['add-to-request', 'add-to-response', 'remove-from-request', 'remove-from-response']
      • content type: str
      • destinations type: listelements: dict
        • primary_key type: str
        • datasource type: strchoices: ['network/host-groups', 'network/hosts']

Examples

- name: Update security web filter profile
  hosts: fortisase
  gather_facts: false
  vars:
    direction: "outbound-profiles" # outbound-profiles or internal-profiles
    profile_group: "profile_ansible"
  tasks:
    - name: Ensure security group exists, otherwise create it
      fortinet.fortisase.security_profile_group:
        params:
          direction: "{{ direction }}"
          primary_key: "{{ profile_group }}"
    - name: Update security web filter profile
      fortinet.fortisase.security_web_filter_profile:
        params:
          direction: "{{ direction }}"
          primary_key: "{{ profile_group }}"
          block_invalid_url: "disable"
          content_filters: []
          enforce_safe_search: "disable"
          fqdn_threat_feed_filters: []
          http_headers: []
          traffic_on_rating_error: "enable"
          url_filters: []
          use_fortiguard_filters: "enable"

Return Values

  • http_code type: intreturned: always
  • response type: rawreturned: always

Authors

  • Xinwei Du (@dux-fortinet)