Files
ansible-shared/user/tasks/authorize.yml
2020-04-22 18:04:16 -06:00

8 lines
294 B
YAML

---
# Authorize this key to this users ~/.ssh/authorized_keys file
- name: Adding {{ user }} SSH key to {{ ssh_into }} users ~/.ssh/authorized_keys
authorized_key:
user: '{{ item }}'
key: "{{ lookup('file', user_path + '/keys/' + user + '.key.pub') }}"
with_items: '{{ ssh_into }}'