Explorar el Código

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

Fixes #181
tags/v0.45.0
Arthur Lutz hace 6 años
padre
commit
52ba531d63
Se han modificado 1 ficheros con 10 adiciones y 0 borrados
  1. +10
    -0
      users/init.sls

+ 10
- 0
users/init.sls Ver fichero

@@ -60,6 +60,16 @@ users_{{ name }}_{{ group }}_group:
{% endif %}
{% 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:
{% if user.get('createhome', True) %}
file.directory:

Cargando…
Cancelar
Guardar