From b7739e10100a0caeffe5b0717b26a21bb48b3c99 Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 29 Oct 2024 19:12:14 +0800 Subject: [PATCH 1/2] update default home directory Signed-off-by: Jack --- roles/_common/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/_common/tasks/install.yml b/roles/_common/tasks/install.yml index 4f0f4f77f..c4e5a5575 100644 --- a/roles/_common/tasks/install.yml +++ b/roles/_common/tasks/install.yml @@ -37,7 +37,7 @@ system: true shell: "/usr/sbin/nologin" group: "{{ _common_system_group }}" - home: "{{ _common_config_dir | default('/') }}" + home: "{{ _common_config_dir | default('/') | ternary(_common_config_dir, '/') }}" create_home: false become: true when: _common_system_user not in ansible_facts.getent_passwd From 5bba79eb9d8b70fa8f56637147144fad6d645291 Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 29 Oct 2024 20:12:09 +0800 Subject: [PATCH 2/2] Update roles/_common/tasks/install.yml Co-authored-by: gardar Signed-off-by: Jack --- roles/_common/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/_common/tasks/install.yml b/roles/_common/tasks/install.yml index c4e5a5575..7ff5a852c 100644 --- a/roles/_common/tasks/install.yml +++ b/roles/_common/tasks/install.yml @@ -37,7 +37,7 @@ system: true shell: "/usr/sbin/nologin" group: "{{ _common_system_group }}" - home: "{{ _common_config_dir | default('/') | ternary(_common_config_dir, '/') }}" + home: "{{ _common_config_dir | default('/', true) }}" create_home: false become: true when: _common_system_user not in ansible_facts.getent_passwd