Sfoglia il codice sorgente

[users] add a prereq for createhome to handle the case of an absent subfolder

Fixes #181
tags/v0.45.0
Arthur Lutz 6 anni fa
parent
commit
52ba531d63
1 ha cambiato i file con 10 aggiunte e 0 eliminazioni
  1. +10
    -0
      users/init.sls

+ 10
- 0
users/init.sls Vedi 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…
Annulla
Salva