16d6fcf514
- use single include_vars task rather than multiple set_fact tasks - use multi-line YAML to break up long conditionals - use version() test rather than direct comparisions - use different appstream package on RHEL since '@swig:3.0/default' is not working in the GA
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
# FUTURE - look at including AppStream support in our local repo
|
|
- name: Include distribution specific variables
|
|
include_vars: "{{ ansible_facts.distribution }}.yml"
|
|
|
|
- name: install "{{ astream_name }}" module
|
|
dnf:
|
|
name: "{{ astream_name }}"
|
|
state: present
|
|
register: dnf_result
|
|
|
|
- name: verify installation of "{{ astream_name }}" module
|
|
assert:
|
|
that:
|
|
- "not dnf_result.failed"
|
|
- "dnf_result.changed"
|
|
|
|
- name: install "{{ astream_name }}" module again
|
|
dnf:
|
|
name: "{{ astream_name }}"
|
|
state: present
|
|
register: dnf_result
|
|
|
|
- name: verify installation of "{{ astream_name }}" module again
|
|
assert:
|
|
that:
|
|
- "not dnf_result.failed"
|
|
- "not dnf_result.changed"
|
|
|
|
- name: uninstall "{{ astream_name }}" module
|
|
dnf:
|
|
name: "{{ astream_name }}"
|
|
state: absent
|
|
register: dnf_result
|
|
|
|
- name: verify uninstallation of "{{ astream_name }}" module
|
|
assert:
|
|
that:
|
|
- "not dnf_result.failed"
|
|
- "dnf_result.changed"
|
|
|
|
- name: uninstall "{{ astream_name }}" module again
|
|
dnf:
|
|
name: "{{ astream_name }}"
|
|
state: absent
|
|
register: dnf_result
|
|
|
|
- name: verify uninstallation of "{{ astream_name }}" module again
|
|
assert:
|
|
that:
|
|
- "not dnf_result.failed"
|
|
- "not dnf_result.changed"
|