From 409466869acfad1b123577eeedf1e4a42b683bb6 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Fri, 24 Nov 2023 10:31:26 +0100 Subject: [PATCH] fix: support btrfs subvolume for unix user's home dir --- tasks/create_unix_user.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks/create_unix_user.yml b/tasks/create_unix_user.yml index d0ec5a9..0032511 100644 --- a/tasks/create_unix_user.yml +++ b/tasks/create_unix_user.yml @@ -7,7 +7,8 @@ - name: "Create btrfs volume for unix user: {{ unix_user.key }}" community.general.btrfs_subvolume: name: "{{ user_user_home }}" - when: unix_user.value.btrfs + when: unix_user.value.btrfs is defined and + unix_user.value.btrfs - name: "Create unix user without additional groups and uid: {{ unix_user.key }}" ansible.builtin.user: @@ -76,7 +77,8 @@ owner: "{{ unix_user.key }}" group: "{{ unix_user.value.group | default('users') }}" state: directory - when: unix_user.value.btrfs + when: unix_user.value.btrfs is defined and + unix_user.value.btrfs - name: "Create .ssh directory for unix user: {{ unix_user.key }}" ansible.builtin.file: