浏览代码

Update user_files.sls

Default path for home folder in user_files.sls if home omitted in pillar.
tags/v0.45.0
Roman 9 年前
父节点
当前提交
c05d2e635b
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      users/user_files.sls

+ 2
- 1
users/user_files.sls 查看文件

@@ -7,6 +7,7 @@ include:
{%- 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_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.source is defined -%}
@@ -28,7 +29,7 @@ include:
{%- if not skip_user %}
users_userfiles_{{ username }}_recursive:
file.recurse:
- name: {{ salt['pillar.get']( username ~ 'user:home', '/home/' ~ username )}}
- name: {{ user_home }}
- source: {{ file_source }}
- user: {{ username }}
- group: {{ user_group }}

正在加载...
取消
保存