ansible/test/integration/roles/test_cs_instance/tasks/absent.yml

24 lines
557 B
YAML
Raw Normal View History

2015-05-03 16:06:30 +02:00
---
- 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