set user and group of user dir in pillartags/v0.45.0
empty_password: False | empty_password: False | ||||
system: False | system: False | ||||
home: /custom/buser | home: /custom/buser | ||||
homedir_owner: buser | |||||
homedir_group: primarygroup | |||||
user_dir_mode: 750 | user_dir_mode: 750 | ||||
createhome: True | createhome: True | ||||
roomnumber: "A-1" | roomnumber: "A-1" |
{% if user.get('createhome', True) %} | {% if user.get('createhome', True) %} | ||||
file.directory: | file.directory: | ||||
- name: {{ home }} | - name: {{ home }} | ||||
- user: {{ name }} | |||||
- group: {{ user_group }} | |||||
- user: {{ user.get('homedir_owner', name) }} | |||||
- group: {{ user.get('homedir_group', user_group) }} | |||||
- mode: {{ user.get('user_dir_mode', '0750') }} | - mode: {{ user.get('user_dir_mode', '0750') }} | ||||
- require: | - require: | ||||
- user: users_{{ name }}_user | - user: users_{{ name }}_user |