Browse Source

Merge pull request #182 from arthurlogilab/createhome

[users] add a prereq for createhome to handle the case of an absent s…
tags/v0.45.0
Niels Abspoel 6 years ago
parent
commit
6fc624db9e
No account linked to committer's email address
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      users/init.sls

+ 10
- 0
users/init.sls View File

{% 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:

Loading…
Cancel
Save