On netapp cmode, you can do snapmirror delete without break off snapmirror. But with ansible na_ontap_snapmirror module, it seems that it's binary. It will break off and delete the snapmirror, which makes it impossible to resync/reconnect.
use below example:
- name: delete snapmirror
connection: local
netapp.ontap.na_ontap_snapmirror:
<<: *login
state: absent
destination_path: "{{ item.destination.path }}"
relationship_info_only: true
relationship_state: active
source_path: "{{ item.source.path }}"
loop: "{{ sm_list }}"
tags: sm
- name: restore snapmirror
connection: local
netapp.ontap.na_ontap_snapmirror:
<<: *login
state: present
destination_path: "{{ item.destination.path }}"
relationship_type: extended_data_protection
relationship_state: active
source_path: "{{ item.source.path }}"
loop: "{{ sm_list }}"
tags: sm
snapmirror cannot be reconnected/resync'd as it's in "Broken-off" state, source and destination have no common snapshots.