Debian Codegraph @

ansible_collections/ibm/storage_virtualize/playbooks/volume_migrate.yml

raw symbols SCIP
1 - name: Using Storage Virtualize collection to initiate migration
2 hosts: localhost
3 vars:
4 auxcluster: 'x.x.x.x'
5 auxusername: 'auxusername'
6 auxpassword: 'auxpassword'
7 clustername: 'clustername'
8 username: 'username'
9 password: 'password'
10 cgname: 'Group_cg11'
11 remote_cluster: 'Cluster_x.x.x.x'
12 masterpool: 'site1pool1'
13 mastervol: 'master'
14 relname: 'scopy5'
15 auxvol: 'auxvol'
16 fcwwpn: 'fcwwpn'
17 size: 1
18 unit: 'gb'
19 remote_pool: 'remote_pool'
20 gather_facts: false
21 connection: local
22 tasks:
23 - name: Fetch authorization token for aux
24 register: auth
25 no_log: true
26 ibm.storage_virtualize.ibm_svc_auth:
27 clustername: "{{ auxcluster }}"
28 username: "{{ auxusername }}"
29 password: "{{ auxpassword }}"
30 - name: Fetch authorization token for master
31 register: results
32 no_log: true
33 ibm.storage_virtualize.ibm_svc_auth:
34 clustername: "{{ clustername }}"
35 username: "{{ username }}"
36 password: "{{ password }}"
37 - name: "Create host"
38 ibm.storage_virtualize.ibm_svc_host:
39 clustername: "{{ clustername }}"
40 username: "{{ username }}"
41 password: "{{ password }}"
42 name: host_xyz
43 state: present
44 fcwwpn: "{{ fcwwpn }}"
45 protocol: scsi
46 - name: "Create source volume source_vol_1 "
47 ibm.storage_virtualize.ibm_svc_manage_volume:
48 clustername: "{{ clustername }}"
49 token: "{{ results.token }}"
50 pool: "{{ masterpool }}"
51 name: "source_vol_1"
52 size: "{{ size }}"
53 unit: "{{ unit }}"
54 state: present
55 - name: Map Source volume to a host
56 ibm.storage_virtualize.ibm_svc_vol_map:
57 clustername: "{{ clustername }}"
58 token: "{{ results.token }}"
59 volname: "source_vol_1"
60 host: "host_xyz"
61 state: present
62 - name: Try to initiate a volume migration with replicate_hosts as true when no hosts exists on targets system as on source system"
63 ibm.storage_virtualize.ibm_svc_manage_migration:
64 source_volume: "source_vol_1"
65 target_volume: "target_vol_1"
66 clustername: "{{ clustername }}"
67 remote_cluster: "{{ remote_cluster }}"
68 token: "{{ results.token }}"
69 state: initiate
70 replicate_hosts: true
71 remote_token: "{{ auth.token }}"
72 relationship_name: "mmapping_1"
73 remote_pool: "{{ remote_pool }}"
74 - name: Switch replication direction of a migration relationship when all host are mapped"
75 ibm.storage_virtualize.ibm_svc_manage_migration:
76 relationship_name: "mmapping_1"
77 clustername: "{{ clustername }}"
78 token: "{{ results.token }}"
79 state: switch