0
0
mirror of https://github.com/saltstack-formulas/users-formula.git synced 2024-11-28 02:57:55 +01:00

Merge pull request #182 from arthurlogilab/createhome

[users] add a prereq for createhome to handle the case of an absent s…
This commit is contained in:
Niels Abspoel 2018-07-11 19:36:23 +02:00 committed by GitHub
commit 6fc624db9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,6 +60,16 @@ users_{{ name }}_{{ group }}_group:
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{# in case home subfolder doesn't exist, create it before the user exists #}
{% if user.get('createhome', True) %}
users_{{ name }}_user_prereq:
file.directory:
- name: {{ home }}
- makedirs: True
- prereq:
- user: users_{{ name }}_user
{%- endif %}
users_{{ name }}_user: users_{{ name }}_user:
{% if user.get('createhome', True) %} {% if user.get('createhome', True) %}
file.directory: file.directory: