If you have a scenario where you have 3 or more clusters with the same vserver name, this module cannot peer any more than the first cluster.
Source1: cluster1
Vserver Name: fsx
Source2: cluster2
Vserver Name: fsx
Dest1: cluster3
Vserver Name: fsx
I wish to peer cluster1 and cluster2 to cluster 3. Two source clusters, one destination. In my environment, there could be 20 source clusters and 1 destination.
Looping through, we would first cluster peer these. The cluster peer process is successful as each cluster is uniquely named and the UUID is used by the cluster peer process. Result =
Peer Cluster Name Cluster Serial Number Availability Authentication
------------------------- --------------------- -------------- --------------
FsxId0b9c77877f09dc7b9 (cluster1) 1-80-000011 Available ok
FsxId0c239b3a9e77ffaaf (cluster2) 1-80-000011 Available ok```
Next, we want to vserver peer both source SVMs to the destination. We do so using the following ansible code:
``` - name: Create vserver peer from {{ source_cluster }} to {{ destination_cluster }}
netapp.ontap.na_ontap_vserver_peer:
state: present
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
vserver: "{{ vserver_name }}"
validate_certs: no
https: true
use_rest: always
peer_cluster: "{{ destination_cluster_name }}"
peer_vserver: "{{ destination_vserver_name }}"
local_name_for_peer: "{{ destination_cluster }}"
local_name_for_source: "{{ source_cluster }}"
applications:
- 'snapmirror'
peer_options:
hostname: "{{ netapp_destination_hostname }}"
username: "{{ netapp_destination_username }}"
password: "{{ netapp_destination_password }}"
validate_certs: no
https: true
use_rest: always```
CONTINUED AS COMMENT