security_services - Service Resource

Added in version 1.0.0.

Synopsis

Service Resource.

Use API “/resource-api/v2/security/services”.

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 create or update the resource, "absent" means delete the resource.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
    • primary_key [Required]type: str
    • proxy type: bool
    • category type: strchoices: ['Authentication', 'Email', 'File Access', 'General', 'Network Services', 'Remote Access', 'Tunneling', 'Uncategorized', 'VoIP, Messaging & Other Applications', 'Web Access', 'Web Proxy']
    • protocol type: str
    • protocol_number type: int
    • icmp_type type: int
    • udp_portrange type: listelements: dict
      • destination type: dict
        • low type: int
        • high type: int
      • source type: dict
        • low type: int
        • high type: int
    • sctp_portrange type: listelements: dict
      • destination type: dict
        • low type: int
        • high type: int
      • source type: dict
        • low type: int
        • high type: int
    • tcp_portrange type: listelements: dict
      • destination type: dict
        • low type: int
        • high type: int
      • source type: dict
        • low type: int
        • high type: int

Examples

- name: Security service
  hosts: fortisase
  gather_facts: false
  vars:
    primary_key: "service_example"
  tasks:
    - name: Create/Update security service
      fortinet.fortisase.security_services:
        state: present
        params:
          primary_key: "{{ primary_key }}"
          proxy: false
          category: "Email"
          protocol: "TCP/UDP/SCTP"
          tcp_portrange:
            - destination:
                low: 25
    - name: Delete security service
      fortinet.fortisase.security_services:
        state: absent
        params:
          primary_key: "{{ primary_key }}"

Return Values

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

Authors

  • Xinwei Du (@dux-fortinet)