ansible-personal/roles/common/tasks/ssh-keys.yml
2014-10-11 12:13:45 +03:00

12 lines
402 B
YAML

---
- name: Zero .ssh/authorized_keys for provisioning user
file: dest={{ provisioning_user.home }}/.ssh/authorized_keys state=absent
- name: Add public keys to authorized_keys
authorized_key: { user: '{{ provisioning_user.name }}', key: "{{ lookup('file',item) }}" }
with_fileglob:
# use descriptive names for keys, like: aorth-mzito-rsa.pub
- ssh-pub-keys/*.pub
# vim: set sw=2 ts=2: