2014-10-11 11:13:45 +02:00
|
|
|
---
|
|
|
|
- name: Zero .ssh/authorized_keys for provisioning user
|
2022-09-10 17:09:12 +02:00
|
|
|
ansible.builtin.file: dest={{ provisioning_user.home }}/.ssh/authorized_keys state=absent
|
2014-10-11 11:13:45 +02:00
|
|
|
|
|
|
|
- name: Add public keys to authorized_keys
|
2023-08-23 20:33:22 +02:00
|
|
|
ansible.posix.authorized_key: { user: "{{ provisioning_user.name }}", key: "{{ lookup('file',item) }}" }
|
2014-10-11 11:13:45 +02:00
|
|
|
with_fileglob:
|
|
|
|
# use descriptive names for keys, like: aorth-mzito-rsa.pub
|
|
|
|
- ssh-pub-keys/*.pub
|
|
|
|
|
|
|
|
# vim: set sw=2 ts=2:
|