Debian Codegraph @

ansible_collections/community/aws/tests/integration/targets/redshift_subnet_group/tasks/main.yml

raw
1 ---
2 # redshift_subnet_group integration tests
3 #
4 # Current module limitations:
5 # - check_mode not supported
6 # - Tagging not supported
7 # - Module is not idempotent
8 # - Returned values *very* limited
9 #
10 - module_defaults:
11 group/aws:
12 access_key: '{{ aws_access_key }}'
13 secret_key: '{{ aws_secret_key }}'
14 session_token: '{{ security_token | default(omit) }}'
15 region: '{{ aws_region }}'
16 block:
17
18 # ============================================================
19
20 - name: Create Subnet Group with no subnets - check_mode
21 redshift_subnet_group:
22 state: present
23 name: '{{ group_name }}'
24 register: create_group
25 ignore_errors: True
26 check_mode: True
27
28 - name: Check result - Create Subnet Group with no subnets - check_mode
29 assert:
30 that:
31 - create_group is failed
32 # Check we caught the issue before trying to create
33 - '"CreateClusterSubnetGroup" not in create_group.resource_actions'
34 # Check that we don't refer to the boto3 parameter
35 - '"subnetIds" not in create_group.msg'
36 # Loosely check the message
37 - '"subnet" in create_group.msg'
38 - '"At least" in create_group.msg'
39
40 - name: Create Subnet Group with no subnets
41 redshift_subnet_group:
42 state: present
43 name: '{{ group_name }}'
44 register: create_group
45 ignore_errors: True
46
47 - name: Check result - Create Subnet Group with no subnets
48 assert:
49 that:
50 - create_group is failed
51 # Check we caught the issue before trying to create
52 - '"CreateClusterSubnetGroup" not in create_group.resource_actions'
53 # Check that we don't refer to the boto3 parameter
54 - '"subnetIds" not in create_group.msg'
55 # Loosely check the message
56 - '"subnet" in create_group.msg'
57 - '"At least" in create_group.msg'
58
59 # ============================================================
60 # Setup infra needed for tests
61 - name: create a VPC
62 ec2_vpc_net:
63 state: present
64 name: '{{ vpc_name }}'
65 cidr_block: '{{ vpc_cidr }}'
66 tags:
67 TestPrefix: '{{ resource_prefix }}'
68 register: vpc_result
69
70 - name: create subnets
71 ec2_vpc_subnet:
72 state: present
73 cidr: '{{ item.cidr }}'
74 az: '{{ item.zone }}'
75 vpc_id: '{{ vpc_result.vpc.id }}'
76 tags:
77 Name: '{{ item.name }}'
78 TestPrefix: '{{ resource_prefix }}'
79 register: vpc_subnet_create
80 loop:
81 - name: '{{ subnet_name_a }}'
82 cidr: '{{ subnet_cidr_a }}'
83 zone: '{{ subnet_zone_a }}'
84 - name: '{{ subnet_name_b }}'
85 cidr: '{{ subnet_cidr_b }}'
86 zone: '{{ subnet_zone_b }}'
87 - name: '{{ subnet_name_c }}'
88 cidr: '{{ subnet_cidr_c }}'
89 zone: '{{ subnet_zone_c }}'
90 - name: '{{ subnet_name_d }}'
91 cidr: '{{ subnet_cidr_d }}'
92 zone: '{{ subnet_zone_d }}'
93
94 - name: Store IDs of subnets and VPC
95 set_fact:
96 vpc_id: '{{ vpc_result.vpc.id }}'
97 subnet_id_a: '{{ vpc_subnet_create.results[0].subnet.id }}'
98 subnet_id_b: '{{ vpc_subnet_create.results[1].subnet.id }}'
99 subnet_id_c: '{{ vpc_subnet_create.results[2].subnet.id }}'
100 subnet_id_d: '{{ vpc_subnet_create.results[3].subnet.id }}'
101
102 # ============================================================
103
104 - name: Create Subnet Group - check_mode
105 redshift_subnet_group:
106 state: present
107 group_name: '{{ group_name }}'
108 group_description: '{{ description_default }}'
109 group_subnets:
110 - '{{ subnet_id_a }}'
111 - '{{ subnet_id_b }}'
112 register: create_group
113 check_mode: True
114
115 - name: Check result - Create Subnet Group - check_mode
116 assert:
117 that:
118 - create_group is successful
119 - create_group is changed
120
121 - name: Create Subnet Group
122 redshift_subnet_group:
123 state: present
124 group_name: '{{ group_name }}'
125 group_description: '{{ description_default }}'
126 group_subnets:
127 - '{{ subnet_id_a }}'
128 - '{{ subnet_id_b }}'
129 register: create_group
130
131 - name: Check result - Create Subnet Group
132 assert:
133 that:
134 - create_group is successful
135 - create_group is changed
136 - '"group" in create_group'
137 - '"name" in create_group.group'
138 - '"vpc_id" in create_group.group'
139 - create_group.group.name == group_name
140 - create_group.group.vpc_id == vpc_id
141 - '"cluster_subnet_group" in create_group'
142 - '"description" in create_group.cluster_subnet_group'
143 - '"subnet_ids" in create_group.cluster_subnet_group'
144 - '"vpc_id" in create_group.cluster_subnet_group'
145 - create_group.cluster_subnet_group.name == group_name
146 - create_group.cluster_subnet_group.description == description_default
147 - subnet_id_a in create_group.cluster_subnet_group.subnet_ids
148 - subnet_id_b in create_group.cluster_subnet_group.subnet_ids
149 - subnet_id_c not in create_group.cluster_subnet_group.subnet_ids
150 - subnet_id_d not in create_group.cluster_subnet_group.subnet_ids
151 - create_group.cluster_subnet_group.vpc_id == vpc_id
152
153 - name: Create Subnet Group - idempotency - check_mode
154 redshift_subnet_group:
155 state: present
156 group_name: '{{ group_name }}'
157 group_description: '{{ description_default }}'
158 group_subnets:
159 - '{{ subnet_id_a }}'
160 - '{{ subnet_id_b }}'
161 register: create_group
162 check_mode: True
163
164 - name: Check result - Create Subnet Group - idempotency - check_mode
165 assert:
166 that:
167 - create_group is successful
168 - create_group is not changed
169
170 - name: Create Subnet Group - idempotency
171 redshift_subnet_group:
172 state: present
173 group_name: '{{ group_name }}'
174 group_description: '{{ description_default }}'
175 group_subnets:
176 - '{{ subnet_id_a }}'
177 - '{{ subnet_id_b }}'
178 register: create_group
179
180 - name: Check result - Create Subnet Group - idempotency
181 assert:
182 that:
183 - create_group is successful
184 - create_group is not changed
185 - '"group" in create_group'
186 - '"name" in create_group.group'
187 - '"vpc_id" in create_group.group'
188 - create_group.group.name == group_name
189 - create_group.group.vpc_id == vpc_id
190 - '"cluster_subnet_group" in create_group'
191 - '"description" in create_group.cluster_subnet_group'
192 - '"subnet_ids" in create_group.cluster_subnet_group'
193 - '"vpc_id" in create_group.cluster_subnet_group'
194 - create_group.cluster_subnet_group.name == group_name
195 - create_group.cluster_subnet_group.description == description_default
196 - subnet_id_a in create_group.cluster_subnet_group.subnet_ids
197 - subnet_id_b in create_group.cluster_subnet_group.subnet_ids
198 - subnet_id_c not in create_group.cluster_subnet_group.subnet_ids
199 - subnet_id_d not in create_group.cluster_subnet_group.subnet_ids
200 - create_group.cluster_subnet_group.vpc_id == vpc_id
201
202 # ============================================================
203
204 - name: Update Subnet Group Description - check_mode
205 redshift_subnet_group:
206 state: present
207 group_name: '{{ group_name }}'
208 group_description: '{{ description_updated }}'
209 ## No longer mandatory
210 # group_subnets:
211 # - '{{ subnet_id_a }}'
212 # - '{{ subnet_id_b }}'
213 register: update_description
214 check_mode: True
215
216 - name: Check result - Update Subnet Group Description - check_mode
217 assert:
218 that:
219 - update_description is successful
220 - update_description is changed
221
222 - name: Update Subnet Group Description
223 redshift_subnet_group:
224 state: present
225 group_name: '{{ group_name }}'
226 group_description: '{{ description_updated }}'
227 ## No longer mandatory
228 # group_subnets:
229 # - '{{ subnet_id_a }}'
230 # - '{{ subnet_id_b }}'
231 register: update_description
232
233 - name: Check result - Update Subnet Group Description
234 assert:
235 that:
236 - update_description is successful
237 - update_description is changed
238 - '"group" in update_description'
239 - '"name" in update_description.group'
240 - '"vpc_id" in update_description.group'
241 - update_description.group.name == group_name
242 - update_description.group.vpc_id == vpc_id
243 - '"cluster_subnet_group" in update_description'
244 - '"description" in update_description.cluster_subnet_group'
245 - '"subnet_ids" in update_description.cluster_subnet_group'
246 - '"vpc_id" in update_description.cluster_subnet_group'
247 - update_description.cluster_subnet_group.name == group_name
248 - update_description.cluster_subnet_group.description == description_updated
249 - subnet_id_a in update_description.cluster_subnet_group.subnet_ids
250 - subnet_id_b in update_description.cluster_subnet_group.subnet_ids
251 - subnet_id_c not in update_description.cluster_subnet_group.subnet_ids
252 - subnet_id_d not in update_description.cluster_subnet_group.subnet_ids
253 - update_description.cluster_subnet_group.vpc_id == vpc_id
254
255 - name: Update Subnet Group Description - idempotency - check_mode
256 redshift_subnet_group:
257 state: present
258 group_name: '{{ group_name }}'
259 group_description: '{{ description_updated }}'
260 ## No longer mandatory
261 # group_subnets:
262 # - '{{ subnet_id_a }}'
263 # - '{{ subnet_id_b }}'
264 register: update_description
265 check_mode: True
266
267 - name: Check result - Update Subnet Group Description - idempotency - check_mode
268 assert:
269 that:
270 - update_description is successful
271 - update_description is not changed
272
273 - name: Update Subnet Group Description - idempotency
274 redshift_subnet_group:
275 state: present
276 group_name: '{{ group_name }}'
277 group_description: '{{ description_updated }}'
278 ## No longer mandatory
279 # group_subnets:
280 # - '{{ subnet_id_a }}'
281 # - '{{ subnet_id_b }}'
282 register: update_description
283
284 - name: Check result - Update Subnet Group Description - idempotency
285 assert:
286 that:
287 - update_description is successful
288 - update_description is not changed
289 - '"group" in update_description'
290 - '"name" in update_description.group'
291 - '"vpc_id" in update_description.group'
292 - update_description.group.name == group_name
293 - update_description.group.vpc_id == vpc_id
294 - '"cluster_subnet_group" in update_description'
295 - '"description" in update_description.cluster_subnet_group'
296 - '"subnet_ids" in update_description.cluster_subnet_group'
297 - '"vpc_id" in update_description.cluster_subnet_group'
298 - update_description.cluster_subnet_group.name == group_name
299 - update_description.cluster_subnet_group.description == description_updated
300 - subnet_id_a in update_description.cluster_subnet_group.subnet_ids
301 - subnet_id_b in update_description.cluster_subnet_group.subnet_ids
302 - subnet_id_c not in update_description.cluster_subnet_group.subnet_ids
303 - subnet_id_d not in update_description.cluster_subnet_group.subnet_ids
304 - update_description.cluster_subnet_group.vpc_id == vpc_id
305
306 # ============================================================
307
308 - name: Update Subnet Group subnets - check_mode
309 redshift_subnet_group:
310 state: present
311 group_name: '{{ group_name }}'
312 ## No longer mandatory
313 # group_description: '{{ description_updated }}'
314 group_subnets:
315 - '{{ subnet_id_c }}'
316 - '{{ subnet_id_d }}'
317 register: update_subnets
318 check_mode: True
319
320 - name: Check result - Update Subnet Group subnets - check_mode
321 assert:
322 that:
323 - update_subnets is successful
324 - update_subnets is changed
325
326 - name: Update Subnet Group subnets
327 redshift_subnet_group:
328 state: present
329 group_name: '{{ group_name }}'
330 ## No longer mandatory
331 # group_description: '{{ description_updated }}'
332 group_subnets:
333 - '{{ subnet_id_c }}'
334 - '{{ subnet_id_d }}'
335 register: update_subnets
336
337 - name: Check result - Update Subnet Group subnets
338 assert:
339 that:
340 - update_subnets is successful
341 - update_subnets is changed
342 - '"group" in update_subnets'
343 - '"name" in update_subnets.group'
344 - '"vpc_id" in update_subnets.group'
345 - update_subnets.group.name == group_name
346 - update_subnets.group.vpc_id == vpc_id
347 - '"cluster_subnet_group" in update_subnets'
348 - '"description" in update_subnets.cluster_subnet_group'
349 - '"subnet_ids" in update_subnets.cluster_subnet_group'
350 - '"vpc_id" in update_subnets.cluster_subnet_group'
351 - update_subnets.cluster_subnet_group.name == group_name
352 - update_subnets.cluster_subnet_group.description == description_updated
353 - subnet_id_a not in update_subnets.cluster_subnet_group.subnet_ids
354 - subnet_id_b not in update_subnets.cluster_subnet_group.subnet_ids
355 - subnet_id_c in update_subnets.cluster_subnet_group.subnet_ids
356 - subnet_id_d in update_subnets.cluster_subnet_group.subnet_ids
357 - update_subnets.cluster_subnet_group.vpc_id == vpc_id
358
359 - name: Update Subnet Group subnets - idempotency - check_mode
360 redshift_subnet_group:
361 state: present
362 group_name: '{{ group_name }}'
363 ## No longer mandatory
364 # group_description: '{{ description_updated }}'
365 group_subnets:
366 - '{{ subnet_id_c }}'
367 - '{{ subnet_id_d }}'
368 register: update_subnets
369 check_mode: True
370
371 - name: Check result - Update Subnet Group subnets - idempotency - check_mode
372 assert:
373 that:
374 - update_subnets is successful
375 - update_subnets is not changed
376
377 - name: Update Subnet Group subnets - idempotency
378 redshift_subnet_group:
379 state: present
380 group_name: '{{ group_name }}'
381 ## No longer mandatory
382 # group_description: '{{ description_updated }}'
383 group_subnets:
384 - '{{ subnet_id_c }}'
385 - '{{ subnet_id_d }}'
386 register: update_subnets
387
388 - name: Check result - Update Subnet Group subnets - idempotency
389 assert:
390 that:
391 - update_subnets is successful
392 - update_subnets is not changed
393 - '"group" in update_subnets'
394 - '"name" in update_subnets.group'
395 - '"vpc_id" in update_subnets.group'
396 - update_subnets.group.name == group_name
397 - update_subnets.group.vpc_id == vpc_id
398 - '"cluster_subnet_group" in update_subnets'
399 - '"description" in update_subnets.cluster_subnet_group'
400 - '"subnet_ids" in update_subnets.cluster_subnet_group'
401 - '"vpc_id" in update_subnets.cluster_subnet_group'
402 - update_subnets.cluster_subnet_group.name == group_name
403 - update_subnets.cluster_subnet_group.description == description_updated
404 - subnet_id_a not in update_subnets.cluster_subnet_group.subnet_ids
405 - subnet_id_b not in update_subnets.cluster_subnet_group.subnet_ids
406 - subnet_id_c in update_subnets.cluster_subnet_group.subnet_ids
407 - subnet_id_d in update_subnets.cluster_subnet_group.subnet_ids
408 - update_subnets.cluster_subnet_group.vpc_id == vpc_id
409
410 # ============================================================
411
412 - name: Delete Subnet Group - check_mode
413 redshift_subnet_group:
414 state: absent
415 group_name: '{{ group_name }}'
416 register: delete_group
417 check_mode: True
418
419 - name: Check result - Delete Subnet Group - check_mode
420 assert:
421 that:
422 - delete_group is changed
423
424 - name: Delete Subnet Group
425 redshift_subnet_group:
426 state: absent
427 group_name: '{{ group_name }}'
428 register: delete_group
429
430 - name: Check result - Delete Subnet Group
431 assert:
432 that:
433 - delete_group is changed
434
435 - name: Delete Subnet Group - idempotency - check_mode
436 redshift_subnet_group:
437 state: absent
438 group_name: '{{ group_name }}'
439 register: delete_group
440 check_mode: True
441
442 - name: Check result - Delete Subnet Group - idempotency - check_mode
443 assert:
444 that:
445 - delete_group is not changed
446
447 - name: Delete Subnet Group - idempotency
448 redshift_subnet_group:
449 state: absent
450 group_name: '{{ group_name }}'
451 register: delete_group
452
453 - name: Check result - Delete Subnet Group - idempotency
454 assert:
455 that:
456 - delete_group is not changed
457
458 # ============================================================
459
460 - name: Create minimal Subnet Group - check_mode
461 redshift_subnet_group:
462 state: present
463 name: '{{ group_name }}'
464 subnets:
465 - '{{ subnet_id_a }}'
466 register: create_group
467 check_mode: True
468
469 - name: Check result - Create minimal Subnet Group - check_mode
470 assert:
471 that:
472 - create_group is successful
473 - create_group is changed
474
475 - name: Create minimal Subnet Group
476 redshift_subnet_group:
477 state: present
478 name: '{{ group_name }}'
479 subnets:
480 - '{{ subnet_id_a }}'
481 register: create_group
482
483 - name: Check result - Create minimal Subnet Group
484 assert:
485 that:
486 - create_group is successful
487 - create_group is changed
488 - '"group" in create_group'
489 - '"name" in create_group.group'
490 - '"vpc_id" in create_group.group'
491 - create_group.group.name == group_name
492 - create_group.group.vpc_id == vpc_id
493 - '"cluster_subnet_group" in create_group'
494 - '"description" in create_group.cluster_subnet_group'
495 - '"subnet_ids" in create_group.cluster_subnet_group'
496 - '"vpc_id" in create_group.cluster_subnet_group'
497 - create_group.cluster_subnet_group.name == group_name
498 - create_group.cluster_subnet_group.description == group_name
499 - subnet_id_a in create_group.cluster_subnet_group.subnet_ids
500 - subnet_id_b not in create_group.cluster_subnet_group.subnet_ids
501 - subnet_id_c not in create_group.cluster_subnet_group.subnet_ids
502 - subnet_id_d not in create_group.cluster_subnet_group.subnet_ids
503 - create_group.cluster_subnet_group.vpc_id == vpc_id
504
505 - name: Create minimal Subnet Group - idempotency - check_mode
506 redshift_subnet_group:
507 state: present
508 name: '{{ group_name }}'
509 subnets:
510 - '{{ subnet_id_a }}'
511 register: create_group
512 check_mode: True
513
514 - name: Check result - Create minimal Subnet Group - idempotency - check_mode
515 assert:
516 that:
517 - create_group is successful
518 - create_group is not changed
519
520 - name: Create minimal Subnet Group - idempotency
521 redshift_subnet_group:
522 state: present
523 name: '{{ group_name }}'
524 subnets:
525 - '{{ subnet_id_a }}'
526 register: create_group
527
528 - name: Check result - Create minimal Subnet Group - idempotency
529 assert:
530 that:
531 - create_group is successful
532 - create_group is not changed
533 - '"group" in create_group'
534 - '"name" in create_group.group'
535 - '"vpc_id" in create_group.group'
536 - create_group.group.name == group_name
537 - create_group.group.vpc_id == vpc_id
538 - '"cluster_subnet_group" in create_group'
539 - '"description" in create_group.cluster_subnet_group'
540 - '"subnet_ids" in create_group.cluster_subnet_group'
541 - '"vpc_id" in create_group.cluster_subnet_group'
542 - create_group.cluster_subnet_group.name == group_name
543 - create_group.cluster_subnet_group.description == group_name
544 - subnet_id_a in create_group.cluster_subnet_group.subnet_ids
545 - subnet_id_b not in create_group.cluster_subnet_group.subnet_ids
546 - subnet_id_c not in create_group.cluster_subnet_group.subnet_ids
547 - subnet_id_d not in create_group.cluster_subnet_group.subnet_ids
548 - create_group.cluster_subnet_group.vpc_id == vpc_id
549
550 # ============================================================
551
552 - name: Full Update Subnet Group - check_mode
553 redshift_subnet_group:
554 state: present
555 name: '{{ group_name }}'
556 description: '{{ description_updated }}'
557 subnets:
558 - '{{ subnet_id_a }}'
559 - '{{ subnet_id_b }}'
560 register: update_complex
561 check_mode: True
562
563 - name: Check result - Full Update Subnet Group - check_mode
564 assert:
565 that:
566 - update_complex is successful
567 - update_complex is changed
568
569 - name: Full Update Subnet Group
570 redshift_subnet_group:
571 state: present
572 name: '{{ group_name }}'
573 description: '{{ description_updated }}'
574 subnets:
575 - '{{ subnet_id_a }}'
576 - '{{ subnet_id_b }}'
577 register: update_complex
578
579 - name: Check result - Full Update Subnet Group
580 assert:
581 that:
582 - update_complex is successful
583 - update_complex is changed
584 - '"group" in update_complex'
585 - '"name" in update_complex.group'
586 - '"vpc_id" in update_complex.group'
587 - update_complex.group.name == group_name
588 - update_complex.group.vpc_id == vpc_id
589 - '"cluster_subnet_group" in update_complex'
590 - '"description" in update_complex.cluster_subnet_group'
591 - '"subnet_ids" in update_complex.cluster_subnet_group'
592 - '"vpc_id" in update_complex.cluster_subnet_group'
593 - update_complex.cluster_subnet_group.name == group_name
594 - update_complex.cluster_subnet_group.description == description_updated
595 - subnet_id_a in update_complex.cluster_subnet_group.subnet_ids
596 - subnet_id_b in update_complex.cluster_subnet_group.subnet_ids
597 - subnet_id_c not in update_complex.cluster_subnet_group.subnet_ids
598 - subnet_id_d not in update_complex.cluster_subnet_group.subnet_ids
599 - update_complex.cluster_subnet_group.vpc_id == vpc_id
600
601 - name: Full Update Subnet Group - idempotency - check_mode
602 redshift_subnet_group:
603 state: present
604 name: '{{ group_name }}'
605 description: '{{ description_updated }}'
606 subnets:
607 - '{{ subnet_id_a }}'
608 - '{{ subnet_id_b }}'
609 register: update_complex
610 check_mode: True
611
612 - name: Check result - Full Update Subnet Group - idempotency - check_mode
613 assert:
614 that:
615 - update_complex is successful
616 - update_complex is not changed
617
618 - name: Full Update Subnet Group - idempotency
619 redshift_subnet_group:
620 state: present
621 name: '{{ group_name }}'
622 description: '{{ description_updated }}'
623 subnets:
624 - '{{ subnet_id_a }}'
625 - '{{ subnet_id_b }}'
626 register: update_complex
627
628 - name: Check result - Full Update Subnet Group - idempotency
629 assert:
630 that:
631 - update_complex is successful
632 - update_complex is not changed
633 - '"group" in update_complex'
634 - '"name" in update_complex.group'
635 - '"vpc_id" in update_complex.group'
636 - update_complex.group.name == group_name
637 - update_complex.group.vpc_id == vpc_id
638 - '"cluster_subnet_group" in update_complex'
639 - '"description" in update_complex.cluster_subnet_group'
640 - '"subnet_ids" in update_complex.cluster_subnet_group'
641 - '"vpc_id" in update_complex.cluster_subnet_group'
642 - update_complex.cluster_subnet_group.name == group_name
643 - update_complex.cluster_subnet_group.description == description_updated
644 - subnet_id_a in update_complex.cluster_subnet_group.subnet_ids
645 - subnet_id_b in update_complex.cluster_subnet_group.subnet_ids
646 - subnet_id_c not in update_complex.cluster_subnet_group.subnet_ids
647 - subnet_id_d not in update_complex.cluster_subnet_group.subnet_ids
648 - update_complex.cluster_subnet_group.vpc_id == vpc_id
649
650 # ============================================================
651
652 - name: Delete Subnet Group
653 redshift_subnet_group:
654 state: absent
655 name: '{{ group_name }}'
656 register: delete_group
657
658 - name: Check result - Delete Subnet Group
659 assert:
660 that:
661 - delete_group is changed
662
663 always:
664
665 ################################################
666 # TEARDOWN STARTS HERE
667 ################################################
668
669 - name: Delete Subnet Group
670 redshift_subnet_group:
671 state: absent
672 group_name: '{{ group_name }}'
673 ignore_errors: True
674
675 - name: tidy up subnet
676 ec2_vpc_subnet:
677 state: absent
678 cidr: '{{ item }}'
679 vpc_id: '{{ vpc_result.vpc.id }}'
680 loop:
681 - '{{ subnet_cidr_a }}'
682 - '{{ subnet_cidr_b }}'
683 - '{{ subnet_cidr_c }}'
684 - '{{ subnet_cidr_d }}'
685 ignore_errors: True
686
687 - name: tidy up VPC
688 ec2_vpc_net:
689 state: absent
690 name: '{{ vpc_name }}'
691 cidr_block: '{{ vpc_cidr }}'
692 ignore_errors: True