---
- name: Uninstall package
  register: powerflex_activemq_uninstall_output
  environment:
    I_AM_SURE: "{{ i_am_sure | int }}"
  ansible.builtin.package:
    name: "{{ item }}"
    state: "absent"
  with_items:
    - EMC-ScaleIO-activemq
  when: ansible_distribution in ("RedHat", "CentOS", "SLES", "Rocky")

- name: Uninstall deb package
  register: powerflex_activemq_uninstall_deb_output
  ansible.builtin.apt:
    name: "{{ item }}"
    state: absent
  with_items:
    - emc-scaleio-activemq
  when: ansible_distribution == "Ubuntu"
