24 lines
557 B
YAML
24 lines
557 B
YAML
|
---
|
||
|
- name: test destroy instance
|
||
|
cs_instance:
|
||
|
name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||
|
state: absent
|
||
|
register: instance
|
||
|
- name: verify destroy instance
|
||
|
assert:
|
||
|
that:
|
||
|
- instance|success
|
||
|
- instance|changed
|
||
|
- instance.state == "Destroyed"
|
||
|
|
||
|
- name: test destroy instance idempotence
|
||
|
cs_instance:
|
||
|
name: "{{ cs_resource_prefix }}-vm-{{ instance_number }}"
|
||
|
state: absent
|
||
|
register: instance
|
||
|
- name: verify destroy instance idempotence
|
||
|
assert:
|
||
|
that:
|
||
|
- instance|success
|
||
|
- not instance|changed
|