mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-17 05:17:33 +00:00
[PR #12274/4775dfbc backport][stable-13] filesystem: re-enable (and fix) most tests for Alpine (#12276)
filesystem: re-enable (and fix) most tests for Alpine (#12274)
Re-enable (and fix) most tests for Alpine.
(cherry picked from commit 4775dfbcb2)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
265b9bf546
commit
4e09786b01
5 changed files with 21 additions and 7 deletions
|
|
@ -53,6 +53,8 @@
|
|||
# which breaks Bcachefs.get_fs_size(). This seems to be related to the C -> Rust conversion of the CLI tools.
|
||||
# It also seems that it is now impossible to know whether base 2 or 10 units are used... :(
|
||||
- 'not (ansible_facts.distribution in ["Archlinux"] and item.0.key == "bcachefs")'
|
||||
# TODO: bcachefs on Alpine doesn't seem to work for unknown reasons, debug this!
|
||||
- 'not (ansible_facts.distribution in ["Alpine"] and item.0.key == "bcachefs")'
|
||||
# f2fs-tools and reiserfs-utils packages not available with RHEL/CentOS on CI
|
||||
- 'not (ansible_facts.distribution in ["CentOS", "RedHat"] and item.0.key in ["f2fs", "reiserfs"])'
|
||||
- 'not (ansible_facts.os_family == "RedHat" and item.0.key == "btrfs")'
|
||||
|
|
@ -80,10 +82,8 @@
|
|||
# TODO: figure out why it fails, fix it!
|
||||
# btrfs-progs cannot be installed on ArchLinux
|
||||
- 'not (item.0.key == "btrfs" and ansible_facts.distribution == "Archlinux")' # TODO: figure out why it fails, fix it!
|
||||
|
||||
|
||||
# TODO: something seems to be broken on Alpine
|
||||
- 'not (ansible_facts.distribution == "Alpine")'
|
||||
# swap does not work on Alpine due to no -f support in mkswap
|
||||
- 'not (item.0.key == "swap" and ansible_facts.distribution == "Alpine")'
|
||||
|
||||
loop: "{{ query('dict', tested_filesystems)|product(['create_fs', 'reset_fs_uuid', 'overwrite_another_fs', 'remove_fs', 'set_fs_uuid_on_creation', 'set_fs_uuid_on_creation_with_opts'])|list }}"
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
that:
|
||||
- wipefs is changed
|
||||
- blkid.stdout | length == 0
|
||||
- blkid.rc == 2
|
||||
- blkid.rc == 2 or ansible_facts.distribution == 'Alpine'
|
||||
|
||||
# Do it again
|
||||
- name: "Remove filesystem (idempotency)"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@
|
|||
|
||||
- name: "Assert that filesystem UUID is the random UUID set on creation"
|
||||
ansible.builtin.assert:
|
||||
that: (random_uuid | replace('-','')) == ( uuid.stdout | replace('-',''))
|
||||
that: >-
|
||||
(random_uuid | replace('-','')) == ( uuid.stdout | ansible.builtin.regex_replace('.*\\bUUID="?([^"\\s]+)"?.*', '\\1') | replace('-',''))
|
||||
|
||||
- when: (new_uuid | default(false)) is not truthy
|
||||
block:
|
||||
|
|
|
|||
|
|
@ -30,4 +30,5 @@
|
|||
|
||||
- name: "Assert that filesystem UUID is the one set on creation with opt"
|
||||
ansible.builtin.assert:
|
||||
that: (random_uuid2 | replace('-','')) == ( uuid2.stdout | replace('-',''))
|
||||
that: >-
|
||||
(random_uuid2 | replace('-','')) == ( uuid2.stdout | ansible.builtin.regex_replace('.*\\bUUID="?([^"\\s]+)"?.*', '\\1') | replace('-',''))
|
||||
|
|
|
|||
|
|
@ -46,6 +46,18 @@
|
|||
- not (ansible_facts.distribution == 'Ubuntu' and ansible_facts.distribution_version is version('24.04', '<'))
|
||||
- not (ansible_facts.distribution == 'Debian' and ansible_facts.distribution_version is version('12', '<'))
|
||||
|
||||
- name: "Install Alpine specific packages"
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- e2fsprogs-extra
|
||||
- findmnt
|
||||
- util-linux-misc
|
||||
- wipefs
|
||||
- xfsprogs-extra
|
||||
state: present
|
||||
when:
|
||||
- ansible_facts.distribution == 'Alpine'
|
||||
|
||||
- name: "Install btrfs tools (Ubuntu <= 16.04)"
|
||||
ansible.builtin.package:
|
||||
name: btrfs-tools
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue