You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

18 lines
410 B

- name: backup keys file
become: false
ansible.builtin.copy:
src: "/home/pi/.ssh/authorized_keys"
dest: "/home/pi/.ssh/authorized_keys.bak"
remote_src: yes
owner: pi
group: pi
mode: '0644'
- name: install key
become: false
ansible.posix.authorized_key:
user: "pi"
state: present
# exclusive: yes
key: "{{ lookup('file', '/home/olli/.ssh/id_ed25519.pub') }}"