---
- name: Downloadable ACL
  hosts: ise_servers
  gather_facts: false
  tasks:
    - name: Get all
      cisco.ise.downloadable_acl_info:
        ise_hostname: "{{ ise_hostname }}"
        ise_username: "{{ ise_username }}"
        ise_password: "{{ ise_password }}"
        ise_verify: "{{ ise_verify }}"
      register: result

    - name: Print all
      ansible.builtin.debug:
        var: result

    - name: Get by id
      cisco.ise.downloadable_acl_info:
        ise_hostname: "{{ ise_hostname }}"
        ise_username: "{{ ise_username }}"
        ise_password: "{{ ise_password }}"
        ise_verify: "{{ ise_verify }}"
        id: d704e911-a916-11eb-8830-2ec507028ea8
      register: result

    - name: Create or update an downloadable_acl
      cisco.ise.downloadable_acl:
        ise_hostname: "{{ ise_hostname }}"
        ise_username: "{{ ise_username }}"
        ise_password: "{{ ise_password }}"
        ise_verify: "{{ ise_verify }}"
        state: present
        name: DENY_SOME_IPV4_TRAFFIC
        description: Deny some ipv4 traffic
        dacl: deny ip any host 10.1.1.2
        daclType: IPV4
      register: result

    - name: Print result
      ansible.builtin.debug:
        var: result
