From 90021bf848de1d34c1f77af01a5b7de60a82f0a9 Mon Sep 17 00:00:00 2001 From: Leif Ringstad Date: Tue, 15 Dec 2015 21:21:00 +0100 Subject: [PATCH] Use the primary group for the user when creating authorized_keys If a primary group is set on the user, and a authorized_keys is provied in ssh_auth_file, the formula fails. This solves that by using the user_group set earlier in the formula --- users/init.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/init.sls b/users/init.sls index d0bad39..a2270f2 100644 --- a/users/init.sls +++ b/users/init.sls @@ -195,7 +195,7 @@ users_authorized_keys_{{ name }}: file.managed: - name: {{ home }}/.ssh/authorized_keys - user: {{ name }} - - group: {{ name }} + - group: {{ user_group }} - mode: 600 {% if 'ssh_auth_file' in user %} - contents: |