2015-08-23 20:48:32 +00:00
|
|
|
---
|
2017-05-26 10:19:47 +00:00
|
|
|
- name: setup iso
|
2015-08-23 20:48:32 +00:00
|
|
|
cs_iso:
|
|
|
|
name: "{{ cs_resource_prefix }}-iso"
|
|
|
|
state: absent
|
|
|
|
register: iso
|
2017-05-26 10:19:47 +00:00
|
|
|
- name: verify setup iso
|
2015-08-23 20:48:32 +00:00
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- iso is successful
|
2015-08-23 20:48:32 +00:00
|
|
|
|
2017-05-26 10:19:47 +00:00
|
|
|
- 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)
|
2017-07-11 21:37:27 +00:00
|
|
|
cross_zones: true
|
2017-05-26 10:19:47 +00:00
|
|
|
register: iso
|
|
|
|
check_mode: true
|
|
|
|
- name: verify test download iso in check mode
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- iso is changed
|
2017-05-26 10:19:47 +00:00
|
|
|
|
2015-08-23 20:48:32 +00: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)
|
2017-07-11 21:37:27 +00:00
|
|
|
cross_zones: true
|
2015-08-23 20:48:32 +00:00
|
|
|
register: iso
|
|
|
|
- name: verify test download iso
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- iso is changed
|
2015-08-23 20:48:32 +00:00
|
|
|
- iso.name == "{{ cs_resource_prefix }}-iso"
|
2017-07-10 21:06:46 +00:00
|
|
|
- iso.display_text == "{{ cs_resource_prefix }}-iso"
|
2017-07-11 21:37:27 +00:00
|
|
|
- iso.cross_zones == true
|
2015-08-23 20:48:32 +00: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)
|
2017-07-11 21:37:27 +00:00
|
|
|
cross_zones: true
|
2015-08-23 20:48:32 +00:00
|
|
|
register: iso
|
|
|
|
- name: verify test download iso idempotence
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- iso is not changed
|
2015-08-23 20:48:32 +00:00
|
|
|
- iso.name == "{{ cs_resource_prefix }}-iso"
|
2017-07-10 21:06:46 +00:00
|
|
|
- iso.display_text == "{{ cs_resource_prefix }}-iso"
|
2017-07-11 21:37:27 +00:00
|
|
|
- iso.cross_zones == true
|
2017-07-10 21:06:46 +00:00
|
|
|
|
|
|
|
- name: test update iso in check mdoe
|
|
|
|
cs_iso:
|
|
|
|
name: "{{ cs_resource_prefix }}-iso"
|
2017-07-11 21:36:34 +00:00
|
|
|
display_text: "{{ cs_resource_prefix }}-iso display_text"
|
2017-07-10 21:06:46 +00:00
|
|
|
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
|
|
|
|
os_type: CentOS 7
|
2017-07-11 21:37:27 +00:00
|
|
|
cross_zones: true
|
2017-07-10 21:06:46 +00:00
|
|
|
register: iso
|
|
|
|
check_mode: true
|
|
|
|
- name: verify test update iso in check mode
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- iso is changed
|
2017-07-10 21:06:46 +00:00
|
|
|
- iso.name == "{{ cs_resource_prefix }}-iso"
|
|
|
|
- iso.display_text == "{{ cs_resource_prefix }}-iso"
|
2017-07-11 21:37:27 +00:00
|
|
|
- iso.cross_zones == true
|
2017-07-10 21:06:46 +00:00
|
|
|
|
|
|
|
- name: test update iso
|
|
|
|
cs_iso:
|
|
|
|
name: "{{ cs_resource_prefix }}-iso"
|
2017-07-11 21:36:34 +00:00
|
|
|
display_text: "{{ cs_resource_prefix }}-iso display_text"
|
2017-07-10 21:06:46 +00:00
|
|
|
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
|
|
|
|
os_type: CentOS 7
|
2017-07-11 21:37:27 +00:00
|
|
|
cross_zones: true
|
2017-07-10 21:06:46 +00:00
|
|
|
register: iso
|
|
|
|
- name: verify test update iso
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- iso is changed
|
2017-07-10 21:06:46 +00:00
|
|
|
- iso.name == "{{ cs_resource_prefix }}-iso"
|
2017-07-11 21:36:34 +00:00
|
|
|
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
|
2017-07-11 21:37:27 +00:00
|
|
|
- iso.cross_zones == true
|
2017-07-10 21:06:46 +00:00
|
|
|
|
|
|
|
- name: test update iso idempotence
|
|
|
|
cs_iso:
|
|
|
|
name: "{{ cs_resource_prefix }}-iso"
|
2017-07-11 21:37:27 +00:00
|
|
|
display_text: "{{ cs_resource_prefix }}-iso display_text"
|
2017-07-10 21:06:46 +00:00
|
|
|
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
|
|
|
|
os_type: CentOS 7
|
2017-07-11 21:37:27 +00:00
|
|
|
cross_zones: true
|
2017-07-10 21:06:46 +00:00
|
|
|
register: iso
|
|
|
|
- name: verify test update iso idempotence
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- iso is not changed
|
2017-07-10 21:06:46 +00:00
|
|
|
- iso.name == "{{ cs_resource_prefix }}-iso"
|
2017-07-11 21:36:34 +00:00
|
|
|
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
|
2017-07-11 21:37:27 +00:00
|
|
|
- iso.cross_zones == true
|
2015-08-23 20:48:32 +00:00
|
|
|
|
2017-05-26 10:19:47 +00:00
|
|
|
- name: test remove iso in check mode
|
|
|
|
cs_iso:
|
|
|
|
name: "{{ cs_resource_prefix }}-iso"
|
|
|
|
state: absent
|
2017-07-11 21:37:27 +00:00
|
|
|
cross_zones: true
|
2017-05-26 10:19:47 +00:00
|
|
|
register: iso
|
|
|
|
check_mode: true
|
|
|
|
- name: verify test remove iso in check mode
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- iso is changed
|
2017-05-26 10:19:47 +00:00
|
|
|
- iso.name == "{{ cs_resource_prefix }}-iso"
|
2017-07-11 21:36:34 +00:00
|
|
|
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
|
2017-07-11 21:37:27 +00:00
|
|
|
- iso.cross_zones == true
|
2015-08-23 20:48:32 +00:00
|
|
|
|
|
|
|
- name: test remove iso
|
|
|
|
cs_iso:
|
|
|
|
name: "{{ cs_resource_prefix }}-iso"
|
|
|
|
state: absent
|
2017-07-11 21:37:27 +00:00
|
|
|
cross_zones: true
|
2015-08-23 20:48:32 +00:00
|
|
|
register: iso
|
|
|
|
- name: verify test remove iso
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- iso is changed
|
2015-08-23 20:48:32 +00:00
|
|
|
- iso.name == "{{ cs_resource_prefix }}-iso"
|
2017-07-11 21:36:34 +00:00
|
|
|
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
|
2017-07-11 21:37:27 +00:00
|
|
|
- iso.cross_zones == true
|
2015-08-23 20:48:32 +00:00
|
|
|
|
|
|
|
- name: test remove iso idempotence
|
|
|
|
cs_iso:
|
|
|
|
name: "{{ cs_resource_prefix }}-iso"
|
|
|
|
state: absent
|
2017-07-11 21:37:27 +00:00
|
|
|
cross_zones: true
|
2015-08-23 20:48:32 +00:00
|
|
|
register: iso
|
|
|
|
- name: verify test remove iso idempotence
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- iso is not changed
|