Update to 2021-12-13 23:00

This commit is contained in:
Daniel Berteaud
2021-12-13 23:00:23 +01:00
parent 48a37b3126
commit b5d29ac05d
5 changed files with 42 additions and 2 deletions

View File

@@ -34,6 +34,7 @@ sshd_password_auth: True
#
# User configuration
ssh_users: []
#ssh_users:
# - name: dani
# create_user: False

View File

@@ -56,13 +56,12 @@
- name: Deploy ssh user keys
authorized_key:
user: "{{ item.name }}"
key: "{{ item.ssh_keys| default([]) | join(\"\n\") }}"
key: "{{ item.ssh_keys | default([]) | flatten | join(\"\n\") }}"
key_options: "{{ item.key_options | default([]) | join(',') }}"
path: "{{ item.keys_file | default('/etc/ssh/authorized_keys/' ~ item.name ~ '/authorized_keys') }}"
manage_dir: False
exclusive: True
ignore_errors: True # Needed eg, if LDAP isn't available on first run
#when: item.ssh_keys is defined
loop: "{{ ssh_users }}"
tags: ssh