mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-29 07:29:13 +00:00
[PR #12222/53bde7f0 backport][stable-12] Add OpenSuSE Tumbleweed target to CI (#12224)
Add OpenSuSE Tumbleweed target to CI (#12222)
* Add OpenSuSE Tumbleweed target to CI.
* Adjust tests.
(cherry picked from commit 53bde7f011)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
7d171e4441
commit
8babb3e3e9
17 changed files with 112 additions and 59 deletions
|
|
@ -348,6 +348,8 @@ stages:
|
|||
test: debian-bookworm/3.11
|
||||
- name: Debian 13 Trixie
|
||||
test: debian-13-trixie/3.13
|
||||
- name: OpenSuSE Tumbleweed
|
||||
test: opensuse-tumbleweed/3.13
|
||||
- name: ArchLinux
|
||||
test: archlinux/3.14
|
||||
groups:
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
# https://bugs.launchpad.net/ubuntu/+source/ureadahead/+bug/997838
|
||||
when:
|
||||
- not (ansible_facts.distribution == "Ubuntu" and ansible_facts.distribution_major_version|int == 14)
|
||||
- not (ansible_facts.os_family == "Suse" and ansible_facts.distribution_major_version|int == 15)
|
||||
- not (ansible_facts.os_family == "Suse")
|
||||
- not (ansible_facts.distribution == 'Archlinux') # TODO: package seems to be broken, cannot be downloaded from mirrors?
|
||||
- not (ansible_facts.distribution == 'Alpine') # TODO: not sure what's wrong here, the module doesn't return what the tests expect
|
||||
- not (ansible_facts.distribution == 'Debian' and ansible_facts.distribution_major_version|int == 13) # TODO: not sure what's wrong here, the module doesn't return what the tests expect
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@
|
|||
# TODO: remove Ubuntu 24.04 or newer from the list
|
||||
# TODO: remove Debian 13 (Trixie) from the list
|
||||
when: >
|
||||
ansible_facts.distribution in ('Alpine', 'openSUSE Leap', 'CentOS', 'Fedora', 'Archlinux')
|
||||
ansible_facts.distribution in ('Alpine', 'openSUSE Leap', 'openSUSE Tumbleweed', 'CentOS', 'Fedora', 'Archlinux', 'Suse')
|
||||
or ansible_facts.os_family == 'Suse'
|
||||
or (ansible_facts.distribution == 'Ubuntu' and ansible_facts.distribution_major_version | int >= 24)
|
||||
or (ansible_facts.distribution == 'Debian' and ansible_facts.distribution_major_version == '13')
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@
|
|||
- 'not (ansible_facts.distribution == "Alpine" and item.0.key == "reiserfs")'
|
||||
# reiserfsprogs packages no longer available with Arch Linux
|
||||
- 'not (ansible_facts.distribution == "Archlinux" and item.0.key == "reiserfs")'
|
||||
# reiserfsprogs packages no longer available with OpenSuSE
|
||||
- 'not (ansible_facts.os_family == "Suse" and item.0.key == "reiserfs")'
|
||||
# reiserfsprogs packages no longer available with Ubuntu 26.04
|
||||
- 'not (item.0.key == "reiserfs" and ansible_facts.distribution == "Ubuntu" and (ansible_facts.distribution_major_version | int >= 26))'
|
||||
# ocfs2 only available on Debian based distributions
|
||||
|
|
|
|||
|
|
@ -58,10 +58,9 @@
|
|||
when:
|
||||
- ansible_facts.distribution == 'Fedora' and (ansible_facts.distribution_major_version | int < 35)
|
||||
|
||||
- name: "Install reiserfs and util-linux-systemd (for findmnt) (OpenSuse)"
|
||||
- name: "Install util-linux-systemd (for findmnt) (OpenSuse)"
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- reiserfs
|
||||
- util-linux-systemd
|
||||
state: present
|
||||
when:
|
||||
|
|
|
|||
7
tests/integration/targets/gem/vars/Suse.yml
Normal file
7
tests/integration/targets/gem/vars/Suse.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
# 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
|
||||
|
||||
test_packages:
|
||||
- "rubygems"
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
# passlib is dead and doesn't work with recent bcrypt versions anymore
|
||||
# (https://foss.heptapod.net/python-libs/passlib/-/work_items/196)
|
||||
- ansible_facts.distribution != 'Ubuntu' or ansible_facts.distribution_version is version('26.04', '<')
|
||||
- ansible_facts.os_family != 'Suse'
|
||||
block:
|
||||
- name: install passlib
|
||||
ansible.builtin.pip:
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@
|
|||
when:
|
||||
# The pass package is no longer available in EPEL, so only test on Fedora, OpenSUSE, FreeBSD, macOS, and Ubuntu
|
||||
# https://lists.zx2c4.com/pipermail/password-store/2019-July/003689.html
|
||||
- ansible_facts.distribution in ['FreeBSD', 'MacOSX', 'openSUSE Leap', 'Ubuntu']
|
||||
- ansible_facts.distribution in ['FreeBSD', 'MacOSX', 'openSUSE Leap', 'openSUSE Tumbleweed', 'Ubuntu']
|
||||
|
|
|
|||
|
|
@ -15,11 +15,10 @@
|
|||
- "{{ role_path }}/vars"
|
||||
|
||||
- name: Install package
|
||||
action: "{{ ansible_facts.pkg_mgr }}"
|
||||
args:
|
||||
ansible.builtin.package:
|
||||
name: "{{ passwordstore_packages }}"
|
||||
state: present
|
||||
when: ansible_facts.pkg_mgr in ['apt', 'dnf', 'yum', 'pkgng', 'community.general.pkgng']
|
||||
when: ansible_facts.pkg_mgr in ['apt', 'dnf', 'yum', 'pkgng', 'community.general.pkgng'] or ansible_facts.distribution == 'openSUSE Tumbleweed'
|
||||
|
||||
- block:
|
||||
# OpenSUSE Leap>=15.0 don't include password-store in main repo
|
||||
|
|
@ -34,7 +33,7 @@
|
|||
state: present
|
||||
update_cache: true
|
||||
disable_gpg_check: true
|
||||
when: ansible_facts.pkg_mgr in ['zypper', 'community.general.zypper']
|
||||
when: ansible_facts.distribution == 'openSUSE Leap'
|
||||
|
||||
# See https://github.com/gopasspw/gopass/issues/1849#issuecomment-802789285
|
||||
- name: Install gopass on Debian
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
# 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
|
||||
|
||||
passwordstore_packages:
|
||||
- gopass
|
||||
- password-store
|
||||
|
|
@ -8,7 +8,9 @@
|
|||
# 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
|
||||
|
||||
- block:
|
||||
- when:
|
||||
- ansible_facts.os_family != 'Suse'
|
||||
block:
|
||||
- name: Install EPEL repository (only effective in RHEL)
|
||||
include_role:
|
||||
name: setup_epel
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@
|
|||
|
||||
- name: Install apache via zypper
|
||||
community.general.zypper:
|
||||
name: apache2
|
||||
name:
|
||||
- apache2
|
||||
- apache2-utils
|
||||
state: present
|
||||
when: "ansible_facts.os_family == 'Suse'"
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ redis_packages:
|
|||
- redis-server
|
||||
openSUSE Leap:
|
||||
- redis
|
||||
openSUSE Tumbleweed:
|
||||
- redis
|
||||
Fedora:
|
||||
- redis
|
||||
CentOS:
|
||||
|
|
@ -28,6 +30,7 @@ redis_user:
|
|||
Debian: redis
|
||||
Ubuntu: redis
|
||||
openSUSE Leap: redis
|
||||
openSUSE Tumbleweed: redis
|
||||
Fedora: "{{ '998' if ansible_facts.distribution_major_version is version('41', '>=') else 'redis' }}"
|
||||
CentOS: redis
|
||||
FreeBSD: redis
|
||||
|
|
@ -38,6 +41,7 @@ redis_bin:
|
|||
Debian: /usr/bin/redis-server
|
||||
Ubuntu: /usr/bin/redis-server
|
||||
openSUSE Leap: /usr/sbin/redis-server
|
||||
openSUSE Tumbleweed: /usr/sbin/redis-server
|
||||
Fedora: "/usr/bin/{{ 'valkey-server' if ansible_facts.distribution_major_version is version('41', '>=') else 'redis-server' }}"
|
||||
CentOS: /usr/bin/redis-server
|
||||
FreeBSD: /usr/local/bin/redis-server
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@
|
|||
|
||||
- import_tasks: setup_redis_cluster.yml
|
||||
when:
|
||||
- ansible_facts.distribution in ['CentOS', 'Fedora', 'FreeBSD', 'openSUSE Leap', 'Ubuntu', 'Debian', 'Archlinux', 'Alpine']
|
||||
- ansible_facts.distribution in ['CentOS', 'Fedora', 'FreeBSD', 'openSUSE Leap', 'openSUSE Tumbleweed', 'Ubuntu', 'Debian', 'Archlinux', 'Alpine']
|
||||
|
|
|
|||
|
|
@ -6,10 +6,22 @@
|
|||
- name: get hello package version
|
||||
shell: zypper --xmlout se -svx hello | grep 'name="hello"' | grep 'repository="Main Repository"' | sed 's/.*edition="\([^ ]*\)".*/\1/'
|
||||
register: hello_version
|
||||
when: ansible_facts.distribution == 'openSUSE Leap'
|
||||
|
||||
- name: set URL of test package
|
||||
- name: set URL of test package (Leap)
|
||||
set_fact:
|
||||
hello_package_url: https://download.opensuse.org/distribution/leap/{{ ansible_facts.distribution_version }}/repo/oss/x86_64/hello-{{ hello_version.stdout }}.x86_64.rpm
|
||||
when: ansible_facts.distribution == 'openSUSE Leap'
|
||||
|
||||
- name: get hello package version
|
||||
shell: zypper --xmlout se -svx hello | grep 'name="hello"' | grep 'repository="openSUSE-Tumbleweed-Oss"' | sed 's/.*edition="\([^ ]*\)".*/\1/'
|
||||
register: hello_version_tumbleweed
|
||||
when: ansible_facts.distribution == 'openSUSE Tumbleweed'
|
||||
|
||||
- name: set URL of test package (Tumbleweed)
|
||||
set_fact:
|
||||
hello_package_url: https://download.opensuse.org/tumbleweed/repo/oss/x86_64/hello-{{ hello_version_tumbleweed.stdout }}.x86_64.rpm
|
||||
when: ansible_facts.distribution == 'openSUSE Tumbleweed'
|
||||
|
||||
- debug: var=hello_package_url
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
[systemsmanagement_Uyuni_Utils]
|
||||
name=Several utilities to develop, build or release Uyuni (openSUSE_Leap_15.3)
|
||||
name=Several utilities to develop, build or release Uyuni ({{ ansible_facts.distribution.replace(' ', '_') }}_15.3)
|
||||
type=rpm-md
|
||||
baseurl=https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Utils/openSUSE_Leap_15.3/
|
||||
baseurl=https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Utils/{{ ansible_facts.distribution.replace(' ', '_') }}_15.3/
|
||||
gpgcheck=1
|
||||
gpgkey=https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Utils/openSUSE_Leap_15.3/repodata/repomd.xml.key
|
||||
gpgkey=https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Utils/{{ ansible_facts.distribution.replace(' ', '_') }}_15.3/repodata/repomd.xml.key
|
||||
enabled=1
|
||||
|
|
|
|||
|
|
@ -3,6 +3,18 @@
|
|||
# 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
|
||||
|
||||
- set_fact:
|
||||
os_repository_name_videolan: Leap_{{ ansible_facts.distribution_version }}
|
||||
os_repository_name: "openSUSE_Leap_{{ ansible_facts.distribution_version }}"
|
||||
os_release_ver: "{{ ansible_facts.distribution.replace(' ', '_') }}"
|
||||
when: ansible_facts.distribution == 'openSUSE Leap'
|
||||
|
||||
- set_fact:
|
||||
os_repository_name_videolan: Tumbleweed
|
||||
os_repository_name: openSUSE_Tumbleweed
|
||||
os_release_ver: "{{ ansible_facts.distribution.replace(' ', '_') }}"
|
||||
when: ansible_facts.distribution == 'openSUSE Tumbleweed'
|
||||
|
||||
- name: Delete test repo
|
||||
community.general.zypper_repository:
|
||||
name: test
|
||||
|
|
@ -42,7 +54,7 @@
|
|||
community.general.zypper_repository:
|
||||
name: test
|
||||
state: present
|
||||
repo: http://download.videolan.org/pub/vlc/SuSE/Leap_{{ ansible_facts.distribution_version }}/
|
||||
repo: http://download.videolan.org/pub/vlc/SuSE/{{ os_repository_name_videolan }}/
|
||||
register: zypper_result
|
||||
|
||||
- name: Verify change on URL only change
|
||||
|
|
@ -55,7 +67,7 @@
|
|||
name: testrefresh
|
||||
refresh: false
|
||||
state: present
|
||||
repo: http://download.videolan.org/pub/vlc/SuSE/Leap_{{ ansible_facts.distribution_version }}/
|
||||
repo: http://download.videolan.org/pub/vlc/SuSE/{{ os_repository_name_videolan }}/
|
||||
|
||||
- name: check refreshoption
|
||||
command: zypper -x lr testrefresh
|
||||
|
|
@ -71,7 +83,7 @@
|
|||
name: testprio
|
||||
priority: 55
|
||||
state: present
|
||||
repo: http://download.videolan.org/pub/vlc/SuSE/Leap_{{ ansible_facts.distribution_version }}/
|
||||
repo: http://download.videolan.org/pub/vlc/SuSE/{{ os_repository_name_videolan }}/
|
||||
|
||||
- name: check refreshoption
|
||||
command: zypper -x lr testprio
|
||||
|
|
@ -114,8 +126,8 @@
|
|||
state: present
|
||||
repo: "{{ item }}"
|
||||
with_items:
|
||||
- http://download.opensuse.org/repositories/science/openSUSE_Leap_{{ ansible_facts.distribution_version }}/
|
||||
- http://download.opensuse.org/repositories/devel:/languages:/ruby/openSUSE_Leap_{{ ansible_facts.distribution_version }}/
|
||||
- http://download.opensuse.org/repositories/science/{{ os_repository_name }}/
|
||||
- http://download.opensuse.org/repositories/devel:/languages:/ruby/{{ os_repository_name }}/
|
||||
|
||||
- name: check repo is updated by name
|
||||
command: zypper lr samename
|
||||
|
|
@ -129,7 +141,7 @@
|
|||
|
||||
- name: remove last added repos (by URL to test that)
|
||||
community.general.zypper_repository:
|
||||
repo: http://download.opensuse.org/repositories/devel:/languages:/ruby/openSUSE_Leap_{{ ansible_facts.distribution_version }}/
|
||||
repo: http://download.opensuse.org/repositories/devel:/languages:/ruby/{{ os_repository_name }}/
|
||||
state: absent
|
||||
|
||||
# FIXME: this currently fails with `Repository 'Apache_PHP_Modules' is invalid.`
|
||||
|
|
@ -141,46 +153,48 @@
|
|||
# auto_import_keys: true
|
||||
# state: "present"
|
||||
|
||||
- name: add a repo by releasever
|
||||
community.general.zypper_repository:
|
||||
name: releaseverrepo
|
||||
repo: http://download.opensuse.org/repositories/devel:/languages:/ruby/openSUSE_Leap_$releasever/
|
||||
state: present
|
||||
register: add_repo
|
||||
- when: ansible_facts.distribution == 'openSUSE Leap'
|
||||
block:
|
||||
- name: add a repo by releasever
|
||||
community.general.zypper_repository:
|
||||
name: releaseverrepo
|
||||
repo: http://download.opensuse.org/repositories/devel:/languages:/ruby/openSUSE_Leap_$releasever/
|
||||
state: present
|
||||
register: add_repo
|
||||
|
||||
- name: add a repo by releasever again
|
||||
community.general.zypper_repository:
|
||||
name: releaseverrepo
|
||||
repo: http://download.opensuse.org/repositories/devel:/languages:/ruby/openSUSE_Leap_$releasever/
|
||||
state: present
|
||||
register: add_repo_again
|
||||
- name: add a repo by releasever again
|
||||
community.general.zypper_repository:
|
||||
name: releaseverrepo
|
||||
repo: http://download.opensuse.org/repositories/devel:/languages:/ruby/openSUSE_Leap_$releasever/
|
||||
state: present
|
||||
register: add_repo_again
|
||||
|
||||
- name: no update in case of $releasever usage in url
|
||||
assert:
|
||||
that:
|
||||
- add_repo is changed
|
||||
- add_repo_again is not changed
|
||||
- name: no update in case of $releasever usage in url
|
||||
assert:
|
||||
that:
|
||||
- add_repo is changed
|
||||
- add_repo_again is not changed
|
||||
|
||||
- name: remove added repo
|
||||
community.general.zypper_repository:
|
||||
repo: http://download.opensuse.org/repositories/devel:/languages:/ruby/openSUSE_Leap_{{ ansible_facts.distribution_version }}/
|
||||
state: absent
|
||||
register: remove_repo
|
||||
- name: remove added repo
|
||||
community.general.zypper_repository:
|
||||
repo: http://download.opensuse.org/repositories/devel:/languages:/ruby/{{ os_repository_name }}/
|
||||
state: absent
|
||||
register: remove_repo
|
||||
|
||||
- name: verify repo was removed
|
||||
assert:
|
||||
that:
|
||||
- remove_repo is changed
|
||||
- name: verify repo was removed
|
||||
assert:
|
||||
that:
|
||||
- remove_repo is changed
|
||||
|
||||
- name: get list of files in /etc/zypp/repos.d/
|
||||
command: ls /etc/zypp/repos.d/
|
||||
changed_when: false
|
||||
register: releaseverrepo_etc_zypp_reposd
|
||||
- name: get list of files in /etc/zypp/repos.d/
|
||||
command: ls /etc/zypp/repos.d/
|
||||
changed_when: false
|
||||
register: releaseverrepo_etc_zypp_reposd
|
||||
|
||||
- name: verify removal of file releaseverrepo.repo in /etc/zypp/repos.d/
|
||||
assert:
|
||||
that:
|
||||
- "'releaseverrepo' not in releaseverrepo_etc_zypp_reposd.stdout"
|
||||
- name: verify removal of file releaseverrepo.repo in /etc/zypp/repos.d/
|
||||
assert:
|
||||
that:
|
||||
- "'releaseverrepo' not in releaseverrepo_etc_zypp_reposd.stdout"
|
||||
|
||||
- name: add a repo by basearch
|
||||
community.general.zypper_repository:
|
||||
|
|
@ -220,7 +234,7 @@
|
|||
block:
|
||||
- name: add new repository via url to .repo file
|
||||
community.general.zypper_repository:
|
||||
repo: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/openSUSE_Leap_{{ ansible_facts.distribution_version }}/systemsmanagement:Uyuni:Stable.repo
|
||||
repo: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/{{ os_repository_name }}/systemsmanagement:Uyuni:Stable.repo
|
||||
state: present
|
||||
register: added_by_repo_file
|
||||
|
||||
|
|
@ -237,7 +251,7 @@
|
|||
|
||||
- name: add same repository via url to .repo file again to verify idempotency
|
||||
community.general.zypper_repository:
|
||||
repo: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/openSUSE_Leap_{{ ansible_facts.distribution_version }}/systemsmanagement:Uyuni:Stable.repo
|
||||
repo: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/{{ os_repository_name }}/systemsmanagement:Uyuni:Stable.repo
|
||||
state: present
|
||||
register: added_again_by_repo_file
|
||||
|
||||
|
|
@ -248,7 +262,7 @@
|
|||
|
||||
- name: remove repository via url to .repo file
|
||||
community.general.zypper_repository:
|
||||
repo: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/openSUSE_Leap_{{ ansible_facts.distribution_version }}/systemsmanagement:Uyuni:Stable.repo
|
||||
repo: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/{{ os_repository_name }}/systemsmanagement:Uyuni:Stable.repo
|
||||
state: absent
|
||||
register: removed_by_repo_file
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue