Browse Source

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
lookup-fix-3
Leif Ringstad 9 years ago
parent
commit
90021bf848
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      users/init.sls

+ 1
- 1
users/init.sls View File

file.managed: file.managed:
- name: {{ home }}/.ssh/authorized_keys - name: {{ home }}/.ssh/authorized_keys
- user: {{ name }} - user: {{ name }}
- group: {{ name }}
- group: {{ user_group }}
- mode: 600 - mode: 600
{% if 'ssh_auth_file' in user %} {% if 'ssh_auth_file' in user %}
- contents: | - contents: |

Loading…
Cancel
Save