fix(tasks): select the btrfs filesystem by uuid instead of device
Lint Markdown files / markdown-lint (push) Successful in 7s
Ansible Linter / ansible-lint (push) Successful in 5m6s
Molecule / Molecule (push) Successful in 7m19s
Release Ansible Role / Release Ansible Role (push) Successful in 3m17s

This commit is contained in:
2026-09-29 15:38:57 +02:00
parent fb39904bab
commit 4cd30fc1f9
+8 -1
View File
@@ -23,10 +23,17 @@
msg: "Determined device {{ _unix_users_btrfs_device.stdout }} does not have a btrfs filesystem"
when: _unix_users_device_filesystem != 'btrfs'
# Select by UUID, device matching fails for symlinked devices like /dev/mapper/* (community.general#11331).
- name: "Find btrfs filesystem UUID"
ansible.builtin.command:
cmd: "findmnt -no UUID -T {{ _unix_users_home }}"
register: _unix_users_btrfs_uuid
changed_when: false
# The subvolume stays root owned until the user exists. It is chowned further below, after the user was created.
- name: "Create btrfs volume for unix user: {{ unix_user.key }}"
community.general.btrfs_subvolume:
filesystem_device: "{{ _unix_users_btrfs_device.stdout }}"
filesystem_uuid: "{{ _unix_users_btrfs_uuid.stdout }}"
name: "{{ _unix_users_home }}"
state: present