Set a default for the home directory.

This commit is contained in:
Andrea Dell'Amico 2024-03-20 16:13:46 +01:00
parent b597a98a79
commit 6940c65a79
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 2 additions and 1 deletions

View File

@ -49,6 +49,7 @@
groups: "{{ item.groups | default(omit) }}"
append: true
comment: "{{ item.name | default(item.login) }}"
home: "{% if item.home is defined %}{{ item.home }}/{{ item.login }}{% else %}/home/{{ item.login }}{% endif %}"
createhome: "{{ item.createhome | default(true) }}"
shell: "{{ item.shell | default('/bin/bash') }}"
password: "{{ item.password | default('*') }}"
@ -90,7 +91,7 @@
groups: "{{ item.groups | default(omit) }}"
append: true
comment: "{{ item.name | default(item.login) }}"
home: "{{ item.home }}/{{ item.login }}"
home: "{% if item.home is defined %}{{ item.home }}/{{ item.login }}{% else %}/home/{{ item.login }}{% endif %}"
createhome: "{{ item.createhome | default(true) }}"
shell: "{{ item.shell | default('/bin/bash') }}"
password: "{{ item.password | default('*') }}"