mirror of
https://github.com/saltstack-formulas/users-formula.git
synced 2024-11-28 00:48:22 +01:00
Update user_files.sls
Default path for home folder in user_files.sls if home omitted in pillar.
This commit is contained in:
parent
2763338abe
commit
c05d2e635b
@ -7,6 +7,7 @@ include:
|
|||||||
{%- for username, user in salt['pillar.get']('users', {}).items() if (user.absent is not defined or not user.absent) -%}
|
{%- for username, user in salt['pillar.get']('users', {}).items() if (user.absent is not defined or not user.absent) -%}
|
||||||
{%- set user_files = salt['pillar.get'](('users:' ~ username ~ ':user_files'), {'enabled': False}) -%}
|
{%- set user_files = salt['pillar.get'](('users:' ~ username ~ ':user_files'), {'enabled': False}) -%}
|
||||||
{%- set user_group = salt['pillar.get'](('users:' ~ username ~ ':prime_group:name'), username) -%}
|
{%- set user_group = salt['pillar.get'](('users:' ~ username ~ ':prime_group:name'), username) -%}
|
||||||
|
{%- set user_home = salt['pillar.get'](('users:' ~ username ~ ':home'), '/home/' ~ username ) -%}
|
||||||
{%- if user_files.enabled -%}
|
{%- if user_files.enabled -%}
|
||||||
|
|
||||||
{%- if user_files.source is defined -%}
|
{%- if user_files.source is defined -%}
|
||||||
@ -28,7 +29,7 @@ include:
|
|||||||
{%- if not skip_user %}
|
{%- if not skip_user %}
|
||||||
users_userfiles_{{ username }}_recursive:
|
users_userfiles_{{ username }}_recursive:
|
||||||
file.recurse:
|
file.recurse:
|
||||||
- name: {{ salt['pillar.get']( username ~ 'user:home', '/home/' ~ username )}}
|
- name: {{ user_home }}
|
||||||
- source: {{ file_source }}
|
- source: {{ file_source }}
|
||||||
- user: {{ username }}
|
- user: {{ username }}
|
||||||
- group: {{ user_group }}
|
- group: {{ user_group }}
|
||||||
|
Loading…
Reference in New Issue
Block a user