2019-01-30 00:56:57 +00: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-08 23:15:11 +00:00
|
|
|
dnf:
|
2019-01-30 00:56:57 +00:00
|
|
|
name: "{{ astream_name }}"
|
2018-11-08 23:15:11 +00:00
|
|
|
state: present
|
|
|
|
register: dnf_result
|
|
|
|
|
2019-01-30 00:56:57 +00:00
|
|
|
- name: verify installation of "{{ astream_name }}" module
|
2018-11-08 23:15:11 +00:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not dnf_result.failed"
|
|
|
|
- "dnf_result.changed"
|
|
|
|
|
2019-01-30 00:56:57 +00:00
|
|
|
- name: install "{{ astream_name }}" module again
|
2018-11-08 23:15:11 +00:00
|
|
|
dnf:
|
2019-01-30 00:56:57 +00:00
|
|
|
name: "{{ astream_name }}"
|
2018-11-08 23:15:11 +00:00
|
|
|
state: present
|
|
|
|
register: dnf_result
|
|
|
|
|
2019-01-30 00:56:57 +00:00
|
|
|
- name: verify installation of "{{ astream_name }}" module again
|
2018-11-08 23:15:11 +00:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not dnf_result.failed"
|
|
|
|
- "not dnf_result.changed"
|
|
|
|
|
2019-01-30 00:56:57 +00:00
|
|
|
- name: uninstall "{{ astream_name }}" module
|
2018-11-08 23:15:11 +00:00
|
|
|
dnf:
|
2019-01-30 00:56:57 +00:00
|
|
|
name: "{{ astream_name }}"
|
2018-11-08 23:15:11 +00:00
|
|
|
state: absent
|
|
|
|
register: dnf_result
|
|
|
|
|
2019-01-30 00:56:57 +00:00
|
|
|
- name: verify uninstallation of "{{ astream_name }}" module
|
2018-11-08 23:15:11 +00:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not dnf_result.failed"
|
|
|
|
- "dnf_result.changed"
|
|
|
|
|
2019-01-30 00:56:57 +00:00
|
|
|
- name: uninstall "{{ astream_name }}" module again
|
2018-11-08 23:15:11 +00:00
|
|
|
dnf:
|
2019-01-30 00:56:57 +00:00
|
|
|
name: "{{ astream_name }}"
|
2019-01-23 21:52:03 +00:00
|
|
|
state: absent
|
2018-11-08 23:15:11 +00:00
|
|
|
register: dnf_result
|
|
|
|
|
2019-01-30 00:56:57 +00:00
|
|
|
- name: verify uninstallation of "{{ astream_name }}" module again
|
2018-11-08 23:15:11 +00:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not dnf_result.failed"
|
|
|
|
- "not dnf_result.changed"
|