- users | - users | ||||
{% for name, user in pillar.get('users', {}).items() if user.absent is not defined or not user.absent %} | {% for name, user in pillar.get('users', {}).items() if user.absent is not defined or not user.absent %} | ||||
{%- set current = salt.user.info(name) -%} | |||||
{%- if user == None -%} | {%- if user == None -%} | ||||
{%- set user = {} -%} | {%- set user = {} -%} | ||||
{%- endif -%} | {%- endif -%} | ||||
{%- set home = user.get('home', "/home/%s" % name) -%} | |||||
{%- set home = user.get('home', current.get('home', "/home/%s" % name)) -%} | |||||
{%- set manage = user.get('manage_bashrc', False) -%} | {%- set manage = user.get('manage_bashrc', False) -%} | ||||
{%- if 'prime_group' in user and 'name' in user['prime_group'] %} | {%- if 'prime_group' in user and 'name' in user['prime_group'] %} | ||||
{%- set user_group = user.prime_group.name -%} | {%- set user_group = user.prime_group.name -%} |
- users | - users | ||||
{% for name, user in pillar.get('users', {}).items() if user.absent is not defined or not user.absent %} | {% for name, user in pillar.get('users', {}).items() if user.absent is not defined or not user.absent %} | ||||
{%- set current = salt.user.info(name) -%} | |||||
{%- if user == None -%} | {%- if user == None -%} | ||||
{%- set user = {} -%} | {%- set user = {} -%} | ||||
{%- endif -%} | {%- endif -%} | ||||
{%- set home = user.get('home', "/home/%s" % name) -%} | |||||
{%- set home = user.get('home', current.get('home', "/home/%s" % name)) -%} | |||||
{%- set manage = user.get('manage_profile', False) -%} | {%- set manage = user.get('manage_profile', False) -%} | ||||
{%- if 'prime_group' in user and 'name' in user['prime_group'] %} | {%- if 'prime_group' in user and 'name' in user['prime_group'] %} | ||||
{%- set user_group = user.prime_group.name -%} | {%- set user_group = user.prime_group.name -%} |
{% set userfile_dirs = salt['cp.list_master_dirs'](prefix='users/files/user/') -%} | {% set userfile_dirs = salt['cp.list_master_dirs'](prefix='users/files/user/') -%} | ||||
{%- 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 current = salt.user.info(username) -%} | |||||
{%- 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 ) -%} | |||||
{%- set user_home = salt['pillar.get'](('users:' ~ username ~ ':home'), current.get('home', '/home/' ~ username )) -%} | |||||
{%- if user_files.enabled -%} | {%- if user_files.enabled -%} | ||||
{%- if user_files.source is defined -%} | {%- if user_files.source is defined -%} |
- vim | - vim | ||||
{% for name, user in pillar.get('users', {}).items() if user.absent is not defined or not user.absent %} | {% for name, user in pillar.get('users', {}).items() if user.absent is not defined or not user.absent %} | ||||
{%- set current = salt.user.info(name) -%} | |||||
{%- if user == None -%} | {%- if user == None -%} | ||||
{%- set user = {} -%} | {%- set user = {} -%} | ||||
{%- endif -%} | {%- endif -%} | ||||
{%- set home = user.get('home', "/home/%s" % name) -%} | |||||
{%- set home = user.get('home', current.get('home', "/home/%s" % name)) -%} | |||||
{%- set manage = user.get('manage_vimrc', False) -%} | {%- set manage = user.get('manage_vimrc', False) -%} | ||||
{%- if 'prime_group' in user and 'name' in user['prime_group'] %} | {%- if 'prime_group' in user and 'name' in user['prime_group'] %} | ||||
{%- set user_group = user.prime_group.name -%} | {%- set user_group = user.prime_group.name -%} |