ansible/test/integration/targets/dnf/tasks/modularity.yml
Sam Doran 16d6fcf514
Improve dnf test formatting and fix RHEL 8 module name (#58648)
- 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
2019-07-03 11:11:20 -04:00

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"