diff --git a/tests/integration/targets/filesystem/tasks/main.yml b/tests/integration/targets/filesystem/tasks/main.yml index 9f897a8caa..f18868e46f 100644 --- a/tests/integration/targets/filesystem/tasks/main.yml +++ b/tests/integration/targets/filesystem/tasks/main.yml @@ -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 }}" diff --git a/tests/integration/targets/filesystem/tasks/remove_fs.yml b/tests/integration/targets/filesystem/tasks/remove_fs.yml index c5428b309f..e3a90b104a 100644 --- a/tests/integration/targets/filesystem/tasks/remove_fs.yml +++ b/tests/integration/targets/filesystem/tasks/remove_fs.yml @@ -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)" diff --git a/tests/integration/targets/filesystem/tasks/set_fs_uuid_on_creation.yml b/tests/integration/targets/filesystem/tasks/set_fs_uuid_on_creation.yml index e75dfcb0dd..19868b1129 100644 --- a/tests/integration/targets/filesystem/tasks/set_fs_uuid_on_creation.yml +++ b/tests/integration/targets/filesystem/tasks/set_fs_uuid_on_creation.yml @@ -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: diff --git a/tests/integration/targets/filesystem/tasks/set_fs_uuid_on_creation_with_opts.yml b/tests/integration/targets/filesystem/tasks/set_fs_uuid_on_creation_with_opts.yml index 02d3c5f36b..ad0a33b6cf 100644 --- a/tests/integration/targets/filesystem/tasks/set_fs_uuid_on_creation_with_opts.yml +++ b/tests/integration/targets/filesystem/tasks/set_fs_uuid_on_creation_with_opts.yml @@ -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('-','')) diff --git a/tests/integration/targets/filesystem/tasks/setup.yml b/tests/integration/targets/filesystem/tasks/setup.yml index c331c580a2..23faddfe93 100644 --- a/tests/integration/targets/filesystem/tasks/setup.yml +++ b/tests/integration/targets/filesystem/tasks/setup.yml @@ -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