---
- name: Test remove resources
  hosts: localhost
  gather_facts: false
  tasks:

    - name: POSITIVE test -> Remove thin volume
      infinidat.infinibox.infini_vol:
        name: "{{ auto_prefix }}vol"
        pool: "{{ auto_prefix }}pool"
        state: absent
        user: "{{ user }}"
        password: "{{ password }}"
        system: "{{ system }}"

    - name: IDEMPOTENT test -> Remove volume again
      infinidat.infinibox.infini_vol:
        name: "{{ auto_prefix }}vol"
        pool: "{{ auto_prefix }}pool"
        state: absent
        user: "{{ user }}"
        password: "{{ password }}"
        system: "{{ system }}"

    - name: POSITIVE test -> Remove pool
      infinidat.infinibox.infini_pool:
        name: "{{ auto_prefix }}pool"
        state: absent
        user: "{{ user }}"
        password: "{{ password }}"
        system: "{{ system }}"
