mirror of
https://github.com/saltstack-formulas/users-formula.git
synced 2025-02-17 17:54:41 +01:00
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
This commit is contained in:
parent
a93f97fb3d
commit
90021bf848
@ -195,7 +195,7 @@ users_authorized_keys_{{ name }}:
|
|||||||
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…
Reference in New Issue
Block a user