We use na_ontap_aggregate to attach an object-store to a list of aggregates. The initial play attaches the object-stores fine. The task fails ungracefully when the play is re-run. We need to code in additional checks to account for this.
- name: Attach Object-store to Data Aggregates
netapp.ontap.na_ontap_aggregate:
state: present
service_state: online
name: "{{ item.name }}"
object_store_name: "{{ objectstore_to_configure.name }}"
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
validate_certs: "{{ validate_certs }}"
loop: "{{ aggregates }}"