2023-04-26 15:34:45 +02:00

8 lines
309 B
YAML

- name: add ssh keys
ansible.posix.authorized_key:
user: "{{ ansible_user }}"
state: present
# copy file present on the controller to the remote host
# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/copy_module.html
key: "{{ lookup('file', '~/.ssh/default.pub') }}"