2019-01-30 01:56:57 +01:00
|
|
|
# FUTURE - look at including AppStream support in our local repo
|
|
|
|
- name: set package for RHEL
|
|
|
|
set_fact:
|
|
|
|
astream_name: '@swig:3.0/default'
|
|
|
|
when: ansible_distribution == 'RedHat'
|
|
|
|
|
|
|
|
- name: set package for Fedora
|
|
|
|
set_fact:
|
|
|
|
astream_name: '@ninja:master/default'
|
|
|
|
when: ansible_distribution == 'Fedora'
|
|
|
|
|
|
|
|
- name: install "{{ astream_name }}" module
|
2018-11-09 00:15:11 +01:00
|
|
|
dnf:
|
2019-01-30 01:56:57 +01:00
|
|
|
name: "{{ astream_name }}"
|
2018-11-09 00:15:11 +01:00
|
|
|
state: present
|
|
|
|
register: dnf_result
|
|
|
|
|
2019-01-30 01:56:57 +01:00
|
|
|
- name: verify installation of "{{ astream_name }}" module
|
2018-11-09 00:15:11 +01:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not dnf_result.failed"
|
|
|
|
- "dnf_result.changed"
|
|
|
|
|
2019-01-30 01:56:57 +01:00
|
|
|
- name: install "{{ astream_name }}" module again
|
2018-11-09 00:15:11 +01:00
|
|
|
dnf:
|
2019-01-30 01:56:57 +01:00
|
|
|
name: "{{ astream_name }}"
|
2018-11-09 00:15:11 +01:00
|
|
|
state: present
|
|
|
|
register: dnf_result
|
|
|
|
|
2019-01-30 01:56:57 +01:00
|
|
|
- name: verify installation of "{{ astream_name }}" module again
|
2018-11-09 00:15:11 +01:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not dnf_result.failed"
|
|
|
|
- "not dnf_result.changed"
|
|
|
|
|
2019-01-30 01:56:57 +01:00
|
|
|
- name: uninstall "{{ astream_name }}" module
|
2018-11-09 00:15:11 +01:00
|
|
|
dnf:
|
2019-01-30 01:56:57 +01:00
|
|
|
name: "{{ astream_name }}"
|
2018-11-09 00:15:11 +01:00
|
|
|
state: absent
|
|
|
|
register: dnf_result
|
|
|
|
|
2019-01-30 01:56:57 +01:00
|
|
|
- name: verify uninstallation of "{{ astream_name }}" module
|
2018-11-09 00:15:11 +01:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not dnf_result.failed"
|
|
|
|
- "dnf_result.changed"
|
|
|
|
|
2019-01-30 01:56:57 +01:00
|
|
|
- name: uninstall "{{ astream_name }}" module again
|
2018-11-09 00:15:11 +01:00
|
|
|
dnf:
|
2019-01-30 01:56:57 +01:00
|
|
|
name: "{{ astream_name }}"
|
2019-01-23 22:52:03 +01:00
|
|
|
state: absent
|
2018-11-09 00:15:11 +01:00
|
|
|
register: dnf_result
|
|
|
|
|
2019-01-30 01:56:57 +01:00
|
|
|
- name: verify uninstallation of "{{ astream_name }}" module again
|
2018-11-09 00:15:11 +01:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not dnf_result.failed"
|
|
|
|
- "not dnf_result.changed"
|