From 78914053ae544ce2bce2f90a0061d5ec7c1c2bff Mon Sep 17 00:00:00 2001 From: Ion Dulgheru Date: Tue, 2 Feb 2016 15:58:39 +0200 Subject: [PATCH 1/3] also load ssh keys from pillar data --- users/init.sls | 1 + 1 file changed, 1 insertion(+) diff --git a/users/init.sls b/users/init.sls index a2270f2..ca44a40 100644 --- a/users/init.sls +++ b/users/init.sls @@ -141,6 +141,7 @@ users_{{ name }}_user: {% if 'ssh_keys' in user or 'ssh_auth' in user or 'ssh_auth_file' in user or + 'ssh_auth_pillar' in user or 'ssh_auth.absent' in user or 'ssh_config' in user %} user_keydir_{{ name }}: From dd27842da3903ebc456aaefcb7e0e7e099272261 Mon Sep 17 00:00:00 2001 From: Peter Hadadi Date: Thu, 10 Mar 2016 21:47:19 +0100 Subject: [PATCH 2/3] User files state without defined home directory --- users/user_files.sls | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/users/user_files.sls b/users/user_files.sls index 66363ae..9914598 100644 --- a/users/user_files.sls +++ b/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 home = user.get('home', "/home/%s" % 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: {{ user.home }} + - name: {{ home }} - source: {{ file_source }} - user: {{ username }} - group: {{ user_group }} From b7370f7dfba30dac95da6d10a239583a278bd80c Mon Sep 17 00:00:00 2001 From: Forrest Date: Thu, 12 May 2016 11:18:44 -0700 Subject: [PATCH 3/3] Revert "User files state without defined home directory" --- users/user_files.sls | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/users/user_files.sls b/users/user_files.sls index 9914598..66363ae 100644 --- a/users/user_files.sls +++ b/users/user_files.sls @@ -7,7 +7,6 @@ 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 home = user.get('home', "/home/%s" % username) -%} {%- if user_files.enabled -%} {%- if user_files.source is defined -%} @@ -29,7 +28,7 @@ include: {%- if not skip_user %} users_userfiles_{{ username }}_recursive: file.recurse: - - name: {{ home }} + - name: {{ user.home }} - source: {{ file_source }} - user: {{ username }} - group: {{ user_group }}