mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
23 lines
557 B
YAML
23 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
|