Debian Codegraph @

ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_redfish_storage_controller.yml

raw symbols SCIP
1 ---
2 - name: Dell OpenManage Ansible iDRAC Redfish Storage Controller service.
3 hosts: idrac
4 gather_facts: false
5
6 tasks:
7 - name: Assign dedicated hot spare.
8 dellemc.openmanage.idrac_redfish_storage_controller:
9 baseuri: "{{ baseuri }}"
10 username: "{{ username }}"
11 password: "{{ password }}"
12 command: "AssignSpare"
13 ca_path: "/path/to/ca_cert.pem"
14 volume_id:
15 - "Disk.Virtual.0:RAID.Slot.1-1"
16 target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
17 tags:
18 - assign_dedicated_hot_spare
19 delegate_to: localhost
20
21 - name: Assign global hot spare.
22 dellemc.openmanage.idrac_redfish_storage_controller:
23 baseuri: "{{ baseuri }}"
24 username: "{{ username }}"
25 password: "{{ password }}"
26 command: "AssignSpare"
27 ca_path: "/path/to/ca_cert.pem"
28 target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
29 tags:
30 - assign_global_hot_spare
31 delegate_to: localhost
32
33 - name: Unassign hot spare
34 dellemc.openmanage.idrac_redfish_storage_controller:
35 baseuri: "{{ baseuri }}"
36 username: "{{ username }}"
37 password: "{{ password }}"
38 ca_path: "/path/to/ca_cert.pem"
39 target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
40 command: UnassignSpare
41 tags:
42 - un-assign-hot-spare
43 delegate_to: localhost
44
45 - name: Set controller encryption key.
46 dellemc.openmanage.idrac_redfish_storage_controller:
47 baseuri: "{{ baseuri }}"
48 username: "{{ username }}"
49 password: "{{ password }}"
50 ca_path: "/path/to/ca_cert.pem"
51 command: "SetControllerKey"
52 controller_id: "RAID.Slot.1-1"
53 key: "PassPhrase@123"
54 key_id: "mykeyid123"
55 tags:
56 - set_controller_key
57 delegate_to: localhost
58
59 - name: Rekey in LKM mode.
60 dellemc.openmanage.idrac_redfish_storage_controller:
61 baseuri: "{{ baseuri }}"
62 username: "{{ username }}"
63 password: "{{ password }}"
64 ca_path: "/path/to/ca_cert.pem"
65 command: "ReKey"
66 controller_id: "RAID.Slot.1-1"
67 key: "NewPassPhrase@123"
68 key_id: "newkeyid123"
69 old_key: "OldPassPhrase@123"
70 tags:
71 - rekey_lkm
72 delegate_to: localhost
73
74 - name: Rekey in SEKM mode.
75 dellemc.openmanage.idrac_redfish_storage_controller:
76 baseuri: "{{ baseuri }}"
77 username: "{{ username }}"
78 password: "{{ password }}"
79 ca_path: "/path/to/ca_cert.pem"
80 command: "ReKey"
81 controller_id: "RAID.Slot.1-1"
82 mode: "SEKM"
83 tags:
84 - rekey_sekm
85 delegate_to: localhost
86
87 - name: Remove controller key.
88 dellemc.openmanage.idrac_redfish_storage_controller:
89 baseuri: "{{ baseuri }}"
90 username: "{{ username }}"
91 password: "{{ password }}"
92 ca_path: "/path/to/ca_cert.pem"
93 command: "RemoveControllerKey"
94 controller_id: "RAID.Slot.1-1"
95 tags:
96 - remove_controller_key
97 delegate_to: localhost
98
99 - name: Reset controller configuration.
100 dellemc.openmanage.idrac_redfish_storage_controller:
101 baseuri: "{{ baseuri }}"
102 username: "{{ username }}"
103 password: "{{ password }}"
104 ca_path: "/path/to/ca_cert.pem"
105 command: "ResetConfig"
106 controller_id: "RAID.Slot.1-1"
107 tags:
108 - reset_config
109 delegate_to: localhost
110
111 - name: Enable controller encryption
112 dellemc.openmanage.idrac_redfish_storage_controller:
113 baseuri: "{{ baseuri }}"
114 username: "{{ username }}"
115 password: "{{ password }}"
116 ca_path: "/path/to/ca_cert.pem"
117 command: "EnableControllerEncryption"
118 controller_id: "RAID.Slot.1-1"
119 mode: "LKM"
120 key: "your_Key@123"
121 key_id: "your_Keyid@123"
122 tags:
123 - enable-encrypt
124 delegate_to: localhost
125
126 - name: Blink physical disk.
127 dellemc.openmanage.idrac_redfish_storage_controller:
128 baseuri: "{{ baseuri }}"
129 username: "{{ username }}"
130 password: "{{ password }}"
131 ca_path: "/path/to/ca_cert.pem"
132 command: "BlinkTarget"
133 target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
134 tags:
135 - blink-target
136 delegate_to: localhost
137
138 - name: Blink virtual drive.
139 dellemc.openmanage.idrac_redfish_storage_controller:
140 baseuri: "{{ baseuri }}"
141 username: "{{ username }}"
142 password: "{{ password }}"
143 ca_path: "/path/to/ca_cert.pem"
144 command: "BlinkTarget"
145 volume_id: "Disk.Virtual.0:RAID.Slot.1-1"
146 tags:
147 - blink-volume
148 delegate_to: localhost
149
150 - name: Unblink physical disk.
151 dellemc.openmanage.idrac_redfish_storage_controller:
152 baseuri: "{{ baseuri }}"
153 username: "{{ username }}"
154 password: "{{ password }}"
155 ca_path: "/path/to/ca_cert.pem"
156 command: "UnBlinkTarget"
157 target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
158 tags:
159 - unblink-target
160 delegate_to: localhost
161
162 - name: Unblink virtual drive.
163 dellemc.openmanage.idrac_redfish_storage_controller:
164 baseuri: "{{ baseuri }}"
165 username: "{{ username }}"
166 password: "{{ password }}"
167 ca_path: "/path/to/ca_cert.pem"
168 command: "UnBlinkTarget"
169 volume_id: "Disk.Virtual.0:RAID.Slot.1-1"
170 tags:
171 - unblink-drive
172 delegate_to: localhost
173
174 - name: Convert physical disk to RAID
175 dellemc.openmanage.idrac_redfish_storage_controller:
176 baseuri: "{{ baseuri }}"
177 username: "{{ username }}"
178 password: "{{ password }}"
179 ca_path: "/path/to/ca_cert.pem"
180 command: "ConvertToRAID"
181 target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
182 tags:
183 - convert-raid
184 delegate_to: localhost
185
186 - name: Convert physical disk to non-RAID
187 dellemc.openmanage.idrac_redfish_storage_controller:
188 baseuri: "{{ baseuri }}"
189 username: "{{ username }}"
190 password: "{{ password }}"
191 ca_path: "/path/to/ca_cert.pem"
192 command: "ConvertToNonRAID"
193 target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
194 tags:
195 - convert-non-raid
196 delegate_to: localhost
197
198 - name: Change physical disk state to online.
199 dellemc.openmanage.idrac_redfish_storage_controller:
200 baseuri: "{{ baseuri }}"
201 username: "{{ username }}"
202 password: "{{ password }}"
203 ca_path: "/path/to/ca_cert.pem"
204 command: "ChangePDStateToOnline"
205 target: "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1"
206 tags:
207 - pd-state-online
208 delegate_to: localhost
209
210 - name: Change physical disk state to offline.
211 dellemc.openmanage.idrac_redfish_storage_controller:
212 baseuri: "{{ baseuri }}"
213 username: "{{ username }}"
214 password: "{{ password }}"
215 ca_path: "/path/to/ca_cert.pem"
216 command: "ChangePDStateToOnline"
217 target: "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1"
218 tags:
219 - pd-state-offline
220 delegate_to: localhost
221
222 - name: Lock virtual drive
223 dellemc.openmanage.idrac_redfish_storage_controller:
224 baseuri: "{{ baseuri }}"
225 username: "{{ username }}"
226 password: "{{ password }}"
227 ca_path: "/path/to/ca_cert.pem"
228 command: "LockVirtualDisk"
229 volume_id: "Disk.Virtual.0:RAID.SL.3-1"
230 tags:
231 - lock
232 delegate_to: localhost
233
234 - name: Online Capacity Expansion of a volume using target
235 dellemc.openmanage.idrac_redfish_storage_controller:
236 baseuri: "{{ baseuri }}"
237 username: "{{ username }}"
238 password: "{{ password }}"
239 ca_path: "/path/to/ca_cert.pem"
240 command: "OnlineCapacityExpansion"
241 volume_id: "Disk.Virtual.0:RAID.Integrated.1-1"
242 target:
243 - "Disk.Bay.3:Enclosure.Internal.0-0:RAID.Integrated.1-1"
244 tags:
245 - oce_target
246 delegate_to: localhost
247
248 - name: Online Capacity Expansion of a volume using size
249 dellemc.openmanage.idrac_redfish_storage_controller:
250 baseuri: "{{ baseuri }}"
251 username: "{{ username }}"
252 password: "{{ password }}"
253 ca_path: "/path/to/ca_cert.pem"
254 command: "OnlineCapacityExpansion"
255 volume_id: "Disk.Virtual.0:RAID.Integrated.1-1"
256 size: 363786
257 tags:
258 - oce_size
259 delegate_to: localhost
260
261 - name: Set controller attributes.
262 dellemc.openmanage.idrac_redfish_storage_controller:
263 baseuri: "{{ baseuri }}"
264 username: "{{ username }}"
265 password: "{{ password }}"
266 ca_path: "/path/to/ca_cert.pem"
267 controller_id: "RAID.Slot.1-1"
268 attributes:
269 ControllerMode: "HBA"
270 apply_time: "OnReset"
271 tags:
272 - controller
273 delegate_to: localhost
274
275 - name: Configure Controller attributes at Maintenance window
276 dellemc.openmanage.idrac_redfish_storage_controller:
277 baseuri: "{{ baseuri }}"
278 username: "{{ username }}"
279 password: "{{ password }}"
280 ca_path: "/path/to/ca_cert.pem"
281 controller_id: "RAID.Slot.1-1"
282 attributes:
283 CheckConsistencyMode: Normal
284 CopybackMode: "Off"
285 LoadBalanceMode: Disabled
286 apply_time: AtMaintenanceWindowStart
287 maintenance_window:
288 start_time: "2022-09-30T05:15:40-05:00"
289 duration: 1200
290 delegate_to: localhost
291
292 - name: Perform Secure Erase operation on SED drive
293 dellemc.openmanage.idrac_redfish_storage_controller:
294 baseuri: "192.168.0.1:443"
295 username: "user_name"
296 password: "user_password"
297 ca_path: "/path/to/ca_cert.pem"
298 controller_id: "RAID.Slot.1-1"
299 command: "SecureErase"
300 target: "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1"
301 delegate_to: localhost