Sfoglia il codice sorgente

Merge pull request #165 from bbinet/make-home-parent-dir

Create user home parent dir if makedirs is True
pull/189/head
Filip Pytloun 5 anni fa
parent
commit
a866852f5f
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. +9
    -0
      linux/system/user.sls

+ 9
- 0
linux/system/user.sls Vedi File

@@ -23,6 +23,15 @@ system_group_{{ name }}:
- user: system_user_{{ name }}
{%- endif %}

{%- if user.get('makedirs') %}
system_user_home_parentdir_{{ user.home }}:
file.directory:
- name: {{ user.home | path_join("..") }}
- makedirs: true
- require_in:
- user: system_user_{{ name }}
{%- endif %}

system_user_{{ name }}:
user.present:
- name: {{ name }}

Loading…
Annulla
Salva