mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
# 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
|
|
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"
|