瀏覽代碼

Merge pull request #182 from arthurlogilab/createhome

[users] add a prereq for createhome to handle the case of an absent s…
master
Niels Abspoel 6 年之前
父節點
當前提交
6fc624db9e
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 10 行新增0 行删除
  1. +10
    -0
      users/init.sls

+ 10
- 0
users/init.sls 查看文件

@@ -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:

Loading…
取消
儲存