ScaleComputing / HyperCoreAnsibleCollection

Official Ansible collection for Scale Computing SC//HyperCore (HC3) v1 API
GNU General Public License v3.0
12 stars 8 forks source link

:lady_beetle: Bug: failure to delete alert emails if there are multiples with the same address #264

Closed shoriminimoe closed 8 months ago

shoriminimoe commented 9 months ago

Describe the bug

The collection is unable to delete an alert email if a duplicate is present.

To Reproduce Steps to reproduce the behavior:

  1. Start with a cluster containing multiple duplicate alert email targets
  2. Attempt to delete one using the email_alert module
  3. Delete fails

Expected behavior

The collection should be able to delete an alert email when there are duplicates

Screenshots

Example with duplicate emails image

Attempting to delete the email address with the following playbook results in a failure

---
- name: Delete alert email
  hosts: all
  connection: local
  gather_facts: false
  environment:
    SC_HOST: "https://{{ inventory_hostname }}"
    SC_USERNAME: "{{ sc_username }}"
    SC_PASSWORD: "{{ sc_password }}"
​
  tasks:
    - name: Delete alert email
      scale_computing.hypercore.email_alert:
        state: absent
        email: alerts3@scalecomputing.com

Failure message: image

System Info (please complete the following information):

Additional context