ansible/test/integration/targets/cs_iso/tasks/main.yml

143 lines
4 KiB
YAML
Raw Normal View History

2015-08-23 22:48:32 +02:00
---
- name: setup iso
2015-08-23 22:48:32 +02:00
cs_iso:
name: "{{ cs_resource_prefix }}-iso"
state: absent
register: iso
- name: verify setup iso
2015-08-23 22:48:32 +02:00
assert:
that:
- iso|success
- name: test download iso in check mode
cs_iso:
name: "{{ cs_resource_prefix }}-iso"
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
os_type: Debian GNU/Linux 7(64-bit)
cross_zones: true
register: iso
check_mode: true
- name: verify test download iso in check mode
assert:
that:
- iso|changed
2015-08-23 22:48:32 +02:00
- name: test download iso
cs_iso:
name: "{{ cs_resource_prefix }}-iso"
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
os_type: Debian GNU/Linux 7(64-bit)
cross_zones: true
2015-08-23 22:48:32 +02:00
register: iso
- name: verify test download iso
assert:
that:
- iso|changed
- iso.name == "{{ cs_resource_prefix }}-iso"
- iso.display_text == "{{ cs_resource_prefix }}-iso"
- iso.cross_zones == true
2015-08-23 22:48:32 +02:00
- name: test download iso idempotence
cs_iso:
name: "{{ cs_resource_prefix }}-iso"
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
os_type: Debian GNU/Linux 7(64-bit)
cross_zones: true
2015-08-23 22:48:32 +02:00
register: iso
- name: verify test download iso idempotence
assert:
that:
- not iso|changed
- iso.name == "{{ cs_resource_prefix }}-iso"
- iso.display_text == "{{ cs_resource_prefix }}-iso"
- iso.cross_zones == true
- name: test update iso in check mdoe
cs_iso:
name: "{{ cs_resource_prefix }}-iso"
display_text: "{{ cs_resource_prefix }}-iso display_text"
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
os_type: CentOS 7
cross_zones: true
register: iso
check_mode: true
- name: verify test update iso in check mode
assert:
that:
- iso|changed
- iso.name == "{{ cs_resource_prefix }}-iso"
- iso.display_text == "{{ cs_resource_prefix }}-iso"
- iso.cross_zones == true
- name: test update iso
cs_iso:
name: "{{ cs_resource_prefix }}-iso"
display_text: "{{ cs_resource_prefix }}-iso display_text"
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
os_type: CentOS 7
cross_zones: true
register: iso
- name: verify test update iso
assert:
that:
- iso|changed
- iso.name == "{{ cs_resource_prefix }}-iso"
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
- iso.cross_zones == true
- name: test update iso idempotence
cs_iso:
name: "{{ cs_resource_prefix }}-iso"
display_text: "{{ cs_resource_prefix }}-iso display_text"
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
os_type: CentOS 7
cross_zones: true
register: iso
- name: verify test update iso idempotence
assert:
that:
- not iso|changed
- iso.name == "{{ cs_resource_prefix }}-iso"
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
- iso.cross_zones == true
2015-08-23 22:48:32 +02:00
- name: test remove iso in check mode
cs_iso:
name: "{{ cs_resource_prefix }}-iso"
state: absent
cross_zones: true
register: iso
check_mode: true
- name: verify test remove iso in check mode
assert:
that:
- iso|changed
- iso.name == "{{ cs_resource_prefix }}-iso"
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
- iso.cross_zones == true
2015-08-23 22:48:32 +02:00
- name: test remove iso
cs_iso:
name: "{{ cs_resource_prefix }}-iso"
state: absent
cross_zones: true
2015-08-23 22:48:32 +02:00
register: iso
- name: verify test remove iso
assert:
that:
- iso|changed
- iso.name == "{{ cs_resource_prefix }}-iso"
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
- iso.cross_zones == true
2015-08-23 22:48:32 +02:00
- name: test remove iso idempotence
cs_iso:
name: "{{ cs_resource_prefix }}-iso"
state: absent
cross_zones: true
2015-08-23 22:48:32 +02:00
register: iso
- name: verify test remove iso idempotence
assert:
that:
- not iso|changed