blob: a53328edca775c22fc00f04b35972d5bbf1b0dfc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
---
- name: Storage pool Module Operations on Unity
hosts: localhost
connection: local
vars:
unispherehost: '10.*.*.*'
validate_certs: false
username: 'user'
password: '**'
pool_name: "test_DND"
new_pool_name: "new_pool2"
fast_vp_enabled: "enabled"
fast_cache_enabled: "enabled"
pool_description: "updated"
disk_group_id: "dg_16"
disk_num: 2
raid_type: "RAID10"
stripe_width: "BEST_FIT"
alert_threshold: 50
is_harvest_enabled: true
pool_harvest_high_threshold: 59
pool_harvest_low_threshold: 40
is_snap_harvest_enabled: true
snap_harvest_high_threshold: 80
snap_harvest_low_threshold: 60
pool_type: "DYNAMIC"
tasks:
- name: Get the details of Storage pool by name
dellemc.unity.storagepool:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
pool_name: "Test_Pool"
pool_description: "test pool"
raid_groups:
disk_group_id: "dg_36"
disk_num: 3
raid_type: "RAID10"
stripe_width: "BEST_FIT"
alert_threshold: 50
is_harvest_enabled: true
pool_harvest_high_threshold: 60
pool_harvest_low_threshold: 40
is_snap_harvest_enabled: true
snap_harvest_high_threshold: 70
snap_harvest_low_threshold: 50
fast_vp: "enabled"
fast_cache: "enabled"
pool_type: "DYNAMIC"
state: "present"
- name: Get the details of Storage pool by name
register: result
dellemc.unity.storagepool:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
pool_name: "{{ pool_name }}"
state: "present"
- name: Set storage pool id
ansible.builtin.set_fact:
pool_id: "{{ result.storage_pool_details.id }}"
- name: Get the details of Storage pool by pool id
dellemc.unity.storagepool:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
pool_id: "{{ pool_id }}"
state: "present"
- name: Rename Storage pool by name
dellemc.unity.storagepool:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
pool_name: "{{ pool_name }}"
new_pool_name: "{{ new_pool_name }}"
state: "present"
- name: Update Storage pool description
dellemc.unity.storagepool:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
pool_name: "{{ new_pool_name }}"
pool_description: "{{ pool_description }}"
state: "present"
- name: Update Storage pool description- Idempotent
dellemc.unity.storagepool:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
pool_name: "{{ new_pool_name }}"
pool_description: "{{ pool_description }}"
state: "present"
- name: Update fast_vp by pool name
dellemc.unity.storagepool:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
pool_name: "{{ new_pool_name }}"
fast_vp: "{{ fast_vp_enabled }}"
state: "present"
- name: Update fast_cache by pool name
dellemc.unity.storagepool:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
pool_name: "{{ new_pool_name }}"
fast_cache: "{{ fast_cache_enabled }}"
state: "present"
- name: Rename Storage pool by name
dellemc.unity.storagepool:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
pool_name: "{{ new_pool_name }}"
new_pool_name: "{{ pool_name }}"
state: "present"
- name: Create a Storage pool
dellemc.unity.storagepool:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
pool_name: "test_pool"
pool_description: "Unity test pool."
raid_groups:
disk_group_id: "{{ disk_group_id }}"
disk_num: "{{ disk_num }}"
raid_type: "{{ raid_type }}"
stripe_width: "{{ stripe_width }}"
alert_threshold: "{{ alert_threshold }}"
is_harvest_enabled: "{{ is_harvest_enabled }}"
pool_harvest_high_threshold: "{{ pool_harvest_high_threshold }}"
pool_harvest_low_threshold: "{{ pool_harvest_low_threshold }}"
is_snap_harvest_enabled: "{{ is_snap_harvest_enabled }}"
snap_harvest_high_threshold: "{{ snap_harvest_high_threshold }}"
snap_harvest_low_threshold: "{{ snap_harvest_low_threshold }}"
fast_vp: "{{ fast_vp_enabled }}"
fast_cache: "{{ fast_cache_enabled }}"
pool_type: "DYNAMIC"
state: "present"
- name: Create a StoragePool - idempotency
dellemc.unity.storagepool:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
pool_name: "test_pool"
pool_description: "Unity test pool."
raid_groups:
disk_group_id: "{{ disk_group_id }}"
disk_num: "{{ disk_num }}"
raid_type: "{{ raid_type }}"
stripe_width: "{{ stripe_width }}"
alert_threshold: "{{ alert_threshold }}"
is_harvest_enabled: "{{ is_harvest_enabled }}"
pool_harvest_high_threshold: "{{ pool_harvest_high_threshold }}"
pool_harvest_low_threshold: "{{ pool_harvest_low_threshold }}"
is_snap_harvest_enabled: "{{ is_snap_harvest_enabled }}"
snap_harvest_high_threshold: "{{ snap_harvest_high_threshold }}"
snap_harvest_low_threshold: "{{ snap_harvest_low_threshold }}"
fast_vp: "{{ fast_vp_enabled }}"
fast_cache: "{{ fast_cache_enabled }}"
pool_type: "DYNAMIC"
state: "present"
|