Debian Codegraph @

ansible_collections/ibm/storage_virtualize/playbooks/PBRHA/remove_dr_link.yml

raw symbols SCIP
1 - name: Using the IBM Storage Virtualize collection For PBR configuration
2 hosts: localhost
3 gather_facts: false
4 connection: local
5 vars:
6 dr_partition_name: "{{ clusters[1].partition_name | default(ptn_dr_0) }}"
7 vars_files:
8 - inventory.ini
9 tasks:
10 - name: Fetch auth token for HA AMS cluster
11 register: ha_ams_auth
12 no_log: true
13 ibm.storage_virtualize.ibm_svc_auth:
14 clustername: "{{ clusters[0].clustername }}"
15 username: "{{ clusters[0].username }}"
16 password: "{{ clusters[0].password }}"
17 log_path: "{{ log_path | default('/tmp/ansiblePB.debug') }}"
18
19 - name: Fetch auth token for DR cluster
20 register: dr_auth
21 no_log: true
22 ibm.storage_virtualize.ibm_svc_auth:
23 clustername: "{{ clusters[1].clustername }}"
24 username: "{{ clusters[1].username }}"
25 password: "{{ clusters[1].password }}"
26 log_path: "{{ log_path | default('/tmp/ansiblePB.debug') }}"
27
28 - name: Remove replication policy from VG
29 ibm.storage_virtualize.ibm_svc_manage_volumegroup:
30 clustername: "{{ clusters[0].clustername }}"
31 token: "{{ ha_ams_auth.token }}"
32 log_path: "{{ log_path | default('/tmp/ansiblePB.debug') }}"
33 name: "{{ item }}"
34 state: "present"
35 nodrreplication: true
36 loop: "{{ volume_group_name }}"
37
38 - name: Remove dr-link from HA1 Storage Partition
39 ibm.storage_virtualize.ibm_sv_manage_storage_partition:
40 clustername: "{{ clusters[0].clustername }}"
41 token: "{{ ha_ams_auth.token }}"
42 log_path: "{{ log_path | default('/tmp/ansiblePB.debug') }}"
43 name: "{{ clusters[0].partition_name }}"
44 state: "present"
45 removedrlink: true
46
47 - name: Remove Storage Partition from DR site
48 ibm.storage_virtualize.ibm_sv_manage_storage_partition:
49 clustername: "{{ clusters[1].clustername }}"
50 token: "{{ dr_auth.token }}"
51 log_path: "{{ log_path | default('/tmp/ansiblePB.debug') }}"
52 name: "{{ dr_partition_name }}"
53 state: "absent"