mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
557 B
YAML
24 lines
557 B
YAML
10 years ago
|
---
|
||
|
- 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
|