Browse Source

Revert "User files state without defined home directory"

lookup-fix-3
Forrest 8 years ago
parent
commit
b7370f7dfb
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      users/user_files.sls

+ 1
- 2
users/user_files.sls View File

{%- 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 home = user.get('home', "/home/%s" % username) -%}
{%- if user_files.enabled -%} {%- if user_files.enabled -%}


{%- if user_files.source is defined -%} {%- if user_files.source is defined -%}
{%- if not skip_user %} {%- if not skip_user %}
users_userfiles_{{ username }}_recursive: users_userfiles_{{ username }}_recursive:
file.recurse: file.recurse:
- name: {{ home }}
- name: {{ user.home }}
- source: {{ file_source }} - source: {{ file_source }}
- user: {{ username }} - user: {{ username }}
- group: {{ user_group }} - group: {{ user_group }}

Loading…
Cancel
Save