2022-08-05 20:16:36 +02:00
|
|
|
---
|
|
|
|
# Copyright (c) Ansible Project
|
|
|
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
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:
|
2023-05-21 14:40:25 +02:00
|
|
|
- include_tasks: 'zypper_repository.yml'
|
2020-03-09 10:11:07 +01:00
|
|
|
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
|