2020-03-09 10:11:07 +01:00
|
|
|
- name: collect repo configuration before test
|
|
|
|
shell: "grep . /etc/zypp/repos.d/*"
|
|
|
|
register: before
|
|
|
|
|
|
|
|
- name: ensure zypper ref works
|
|
|
|
command: zypper -n ref
|
|
|
|
|
|
|
|
- block:
|
|
|
|
- include: 'zypper_repository.yml'
|
|
|
|
always:
|
|
|
|
- name: remove repositories added during test
|
2020-03-30 11:06:48 +02:00
|
|
|
community.general.zypper_repository:
|
2020-03-09 10:11:07 +01:00
|
|
|
name: "{{item}}"
|
|
|
|
state: absent
|
|
|
|
with_items:
|
|
|
|
- chrome1
|
|
|
|
- chrome2
|
|
|
|
- test
|
|
|
|
- testrefresh
|
|
|
|
- testprio
|
2020-12-05 16:02:01 +01:00
|
|
|
- Apache_PHP_Modules
|
2021-10-08 07:40:30 +02:00
|
|
|
- systemsmanagement_Uyuni_Stable
|
|
|
|
- systemsmanagement_Uyuni_Utils
|
2020-03-09 10:11:07 +01:00
|
|
|
|
|
|
|
- name: collect repo configuration after test
|
|
|
|
shell: "grep . /etc/zypp/repos.d/*"
|
|
|
|
register: after
|
|
|
|
|
|
|
|
- name: verify repo configuration has been restored
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- before.stdout == after.stdout
|
|
|
|
|
|
|
|
- name: ensure zypper ref still works
|
|
|
|
command: zypper -n ref
|