|
66 | 66 | name: stratisd |
67 | 67 | state: started |
68 | 68 |
|
69 | | - - name: Create one Stratis pool with one volume |
70 | | - include_role: |
71 | | - name: linux-system-roles.storage |
72 | | - vars: |
73 | | - storage_pools: |
74 | | - - name: foo |
75 | | - disks: "{{ unused_disks }}" |
76 | | - type: stratis |
77 | | - volumes: |
78 | | - - name: test1 |
79 | | - size: "{{ volume_size }}" |
80 | | - mount_point: "{{ mount_location }}" |
81 | | - |
82 | | - - name: Verify role results |
83 | | - include_tasks: verify-role-results.yml |
84 | | - |
85 | | - - name: Repeat the previous invocation to verify idempotence |
86 | | - include_role: |
87 | | - name: linux-system-roles.storage |
88 | | - vars: |
89 | | - storage_pools: |
90 | | - - name: foo |
91 | | - disks: "{{ unused_disks }}" |
92 | | - type: stratis |
93 | | - volumes: |
94 | | - - name: test1 |
95 | | - size: "{{ volume_size }}" |
96 | | - mount_point: "{{ mount_location }}" |
97 | | - |
98 | | - - name: Verify role results |
99 | | - include_tasks: verify-role-results.yml |
100 | | - |
101 | | - - name: Add second filesystem to the pool |
102 | | - include_role: |
103 | | - name: linux-system-roles.storage |
104 | | - vars: |
105 | | - storage_pools: |
106 | | - - name: foo |
107 | | - disks: "{{ unused_disks }}" |
108 | | - type: stratis |
109 | | - volumes: |
110 | | - - name: test1 |
111 | | - size: "{{ volume_size }}" |
112 | | - mount_point: "{{ mount_location }}" |
113 | | - - name: test2 |
114 | | - size: "{{ volume_size }}" |
115 | | - mount_point: "{{ mount_location_2 }}" |
116 | | - |
117 | | - - name: Verify role results |
118 | | - include_tasks: verify-role-results.yml |
119 | | - |
120 | | - - name: Clean up |
121 | | - include_role: |
122 | | - name: linux-system-roles.storage |
123 | | - vars: |
124 | | - storage_pools: |
125 | | - - name: foo |
126 | | - disks: "{{ unused_disks }}" |
127 | | - type: stratis |
128 | | - state: absent |
129 | | - volumes: |
130 | | - - name: test1 |
131 | | - size: "{{ volume_size }}" |
132 | | - mount_point: "{{ mount_location }}" |
133 | | - state: absent |
134 | | - - name: test2 |
135 | | - size: "{{ volume_size }}" |
136 | | - mount_point: "{{ mount_location_2 }}" |
137 | | - state: absent |
138 | | - |
139 | | - - name: Verify role results |
140 | | - include_tasks: verify-role-results.yml |
141 | | - |
142 | | - - name: Run test only if blivet supports this functionality |
143 | | - when: ((is_fedora and blivet_pkg_version is version("3.10.0-1", ">=")) or |
144 | | - (is_rhel10 and blivet_pkg_version is version("3.10.0-1", ">=")) or |
145 | | - (is_rhel9 and blivet_pkg_version is version("3.6.0-15", ">="))) |
| 69 | + - name: One pool/volume test |
146 | 70 | block: |
147 | | - - name: Create encrypted Stratis pool |
148 | | - include_role: |
149 | | - name: linux-system-roles.storage |
| 71 | + - name: Create one Stratis pool with one volume |
| 72 | + include_role: name: linux-system-roles.storage |
150 | 73 | vars: |
151 | 74 | storage_pools: |
152 | 75 | - name: foo |
153 | 76 | disks: "{{ unused_disks }}" |
154 | 77 | type: stratis |
155 | | - encryption: true |
156 | | - encryption_password: yabbadabbadoo |
157 | 78 | volumes: |
158 | 79 | - name: test1 |
159 | 80 | size: "{{ volume_size }}" |
|
170 | 91 | - name: foo |
171 | 92 | disks: "{{ unused_disks }}" |
172 | 93 | type: stratis |
173 | | - encryption: true |
174 | | - encryption_password: yabbadabbadoo |
175 | 94 | volumes: |
176 | 95 | - name: test1 |
177 | 96 | size: "{{ volume_size }}" |
|
180 | 99 | - name: Verify role results |
181 | 100 | include_tasks: verify-role-results.yml |
182 | 101 |
|
183 | | - - name: Clean up |
| 102 | + - name: Add second filesystem to the pool |
184 | 103 | include_role: |
185 | 104 | name: linux-system-roles.storage |
186 | 105 | vars: |
187 | 106 | storage_pools: |
188 | 107 | - name: foo |
189 | 108 | disks: "{{ unused_disks }}" |
190 | 109 | type: stratis |
191 | | - state: absent |
192 | 110 | volumes: |
193 | 111 | - name: test1 |
194 | 112 | size: "{{ volume_size }}" |
195 | 113 | mount_point: "{{ mount_location }}" |
196 | | - state: absent |
197 | | - |
198 | | - - name: Verify role results |
199 | | - include_tasks: verify-role-results.yml |
200 | | - |
201 | | - - name: Create one Stratis pool on one disk |
202 | | - include_role: |
203 | | - name: linux-system-roles.storage |
204 | | - vars: |
205 | | - storage_pools: |
206 | | - - name: foo |
207 | | - disks: "{{ unused_disks[0] }}" |
208 | | - type: stratis |
209 | | - |
210 | | - - name: Verify role results |
211 | | - include_tasks: verify-role-results.yml |
212 | | - |
213 | | - - name: Add the second disk to the pool |
214 | | - include_role: |
215 | | - name: linux-system-roles.storage |
216 | | - vars: |
217 | | - storage_pools: |
218 | | - - name: foo |
219 | | - disks: "{{ [unused_disks[0], unused_disks[1]] }}" |
220 | | - type: stratis |
| 114 | + - name: test2 |
| 115 | + size: "{{ volume_size }}" |
| 116 | + mount_point: "{{ mount_location_2 }}" |
221 | 117 |
|
222 | 118 | - name: Verify role results |
223 | 119 | include_tasks: verify-role-results.yml |
224 | 120 |
|
| 121 | + always: |
225 | 122 | - name: Clean up |
226 | 123 | include_role: |
227 | 124 | name: linux-system-roles.storage |
|
236 | 133 | size: "{{ volume_size }}" |
237 | 134 | mount_point: "{{ mount_location }}" |
238 | 135 | state: absent |
| 136 | + - name: test2 |
| 137 | + size: "{{ volume_size }}" |
| 138 | + mount_point: "{{ mount_location_2 }}" |
| 139 | + state: absent |
| 140 | + |
| 141 | + - name: Verify role results |
| 142 | + include_tasks: verify-role-results.yml |
| 143 | + |
| 144 | + - name: Run test only if blivet supports this functionality |
| 145 | + when: ((is_fedora and blivet_pkg_version is version("3.10.0-1", ">=")) or |
| 146 | + (is_rhel10 and blivet_pkg_version is version("3.10.0-1", ">=")) or |
| 147 | + (is_rhel9 and blivet_pkg_version is version("3.6.0-15", ">="))) |
| 148 | + block: |
| 149 | + - name: Test encrypted pool |
| 150 | + block: |
| 151 | + - name: Create encrypted Stratis pool |
| 152 | + include_role: |
| 153 | + name: linux-system-roles.storage |
| 154 | + vars: |
| 155 | + storage_pools: |
| 156 | + - name: foo |
| 157 | + disks: "{{ unused_disks }}" |
| 158 | + type: stratis |
| 159 | + encryption: true |
| 160 | + encryption_password: yabbadabbadoo |
| 161 | + volumes: |
| 162 | + - name: test1 |
| 163 | + size: "{{ volume_size }}" |
| 164 | + mount_point: "{{ mount_location }}" |
| 165 | + |
| 166 | + - name: Verify role results |
| 167 | + include_tasks: verify-role-results.yml |
| 168 | + |
| 169 | + - name: Repeat the previous invocation to verify idempotence |
| 170 | + include_role: |
| 171 | + name: linux-system-roles.storage |
| 172 | + vars: |
| 173 | + storage_pools: |
| 174 | + - name: foo |
| 175 | + disks: "{{ unused_disks }}" |
| 176 | + type: stratis |
| 177 | + encryption: true |
| 178 | + encryption_password: yabbadabbadoo |
| 179 | + volumes: |
| 180 | + - name: test1 |
| 181 | + size: "{{ volume_size }}" |
| 182 | + mount_point: "{{ mount_location }}" |
| 183 | + |
| 184 | + - name: Verify role results |
| 185 | + include_tasks: verify-role-results.yml |
| 186 | + |
| 187 | + always: |
| 188 | + - name: Clean up |
| 189 | + include_role: |
| 190 | + name: linux-system-roles.storage |
| 191 | + vars: |
| 192 | + storage_pools: |
| 193 | + - name: foo |
| 194 | + disks: "{{ unused_disks }}" |
| 195 | + type: stratis |
| 196 | + state: absent |
| 197 | + volumes: |
| 198 | + - name: test1 |
| 199 | + size: "{{ volume_size }}" |
| 200 | + mount_point: "{{ mount_location }}" |
| 201 | + state: absent |
| 202 | + |
| 203 | + - name: Verify role results |
| 204 | + include_tasks: verify-role-results.yml |
| 205 | + |
| 206 | + - name: Test one disk pool |
| 207 | + block: |
| 208 | + - name: Create one Stratis pool on one disk |
| 209 | + include_role: |
| 210 | + name: linux-system-roles.storage |
| 211 | + vars: |
| 212 | + storage_pools: |
| 213 | + - name: foo |
| 214 | + disks: "{{ unused_disks[0] }}" |
| 215 | + type: stratis |
| 216 | + |
| 217 | + - name: Verify role results |
| 218 | + include_tasks: verify-role-results.yml |
| 219 | + |
| 220 | + - name: Add the second disk to the pool |
| 221 | + include_role: |
| 222 | + name: linux-system-roles.storage |
| 223 | + vars: |
| 224 | + storage_pools: |
| 225 | + - name: foo |
| 226 | + disks: "{{ [unused_disks[0], unused_disks[1]] }}" |
| 227 | + type: stratis |
| 228 | + |
| 229 | + - name: Verify role results |
| 230 | + include_tasks: verify-role-results.yml |
| 231 | + |
| 232 | + always: |
| 233 | + - name: Clean up |
| 234 | + include_role: |
| 235 | + name: linux-system-roles.storage |
| 236 | + vars: |
| 237 | + storage_pools: |
| 238 | + - name: foo |
| 239 | + disks: "{{ unused_disks }}" |
| 240 | + type: stratis |
| 241 | + state: absent |
| 242 | + volumes: |
| 243 | + - name: test1 |
| 244 | + size: "{{ volume_size }}" |
| 245 | + mount_point: "{{ mount_location }}" |
| 246 | + state: absent |
239 | 247 |
|
240 | 248 | - name: Verify role results |
241 | 249 | include_tasks: verify-role-results.yml |
|
248 | 256 | nbde_server_manage_selinux: true |
249 | 257 | nbde_server_port: 7500 |
250 | 258 |
|
251 | | - - name: Create encrypted Stratis pool with Clevis/Tang |
252 | | - include_role: |
253 | | - name: linux-system-roles.storage |
254 | | - vars: |
255 | | - storage_pools: |
256 | | - - name: foo |
257 | | - disks: "{{ unused_disks[0] }}" |
258 | | - type: stratis |
259 | | - encryption: true |
260 | | - encryption_password: yabbadabbadoo |
261 | | - encryption_clevis_pin: tang |
262 | | - encryption_tang_url: localhost:7500 |
263 | | - |
264 | | - - name: Verify role results |
265 | | - include_tasks: verify-role-results.yml |
266 | | - |
267 | | - - name: Clean up |
268 | | - include_role: |
269 | | - name: linux-system-roles.storage |
270 | | - vars: |
271 | | - storage_pools: |
272 | | - - name: foo |
273 | | - disks: "{{ unused_disks[0] }}" |
274 | | - type: stratis |
275 | | - state: absent |
| 259 | + - name: Clevis/Tang test |
| 260 | + block: |
| 261 | + - name: Create encrypted Stratis pool with Clevis/Tang |
| 262 | + include_role: |
| 263 | + name: linux-system-roles.storage |
| 264 | + vars: |
| 265 | + storage_pools: |
| 266 | + - name: foo |
| 267 | + disks: "{{ unused_disks[0] }}" |
| 268 | + type: stratis |
| 269 | + encryption: true |
| 270 | + encryption_password: yabbadabbadoo |
| 271 | + encryption_clevis_pin: tang |
| 272 | + encryption_tang_url: localhost:7500 |
| 273 | + |
| 274 | + - name: Verify role results |
| 275 | + include_tasks: verify-role-results.yml |
| 276 | + |
| 277 | + always: |
| 278 | + - name: Clean up |
| 279 | + include_role: |
| 280 | + name: linux-system-roles.storage |
| 281 | + vars: |
| 282 | + storage_pools: |
| 283 | + - name: foo |
| 284 | + disks: "{{ unused_disks[0] }}" |
| 285 | + type: stratis |
| 286 | + state: absent |
276 | 287 |
|
277 | 288 | - name: Verify role results |
278 | 289 | include_tasks: verify-role-results.yml |
0 commit comments