ansible-role-borgbackup/tasks/storagebox.yml

13 lines
361 B
YAML
Raw Normal View History

2023-05-08 10:36:42 +02:00
---
- name: "Storagebox | Read key from file"
ansible.builtin.slurp:
src: "{{ borg_ssh_key_file_path }}.pub"
register: ssh_key
check_mode: true
- name: "Storagebox | Copy key to Hetzner"
ansible.posix.authorized_key:
user: "{{ hetzner_storagebox_user }}"
key: "{{ (ssh_key.content | b64decode) }}"
delegate_to: "{{ hetzner_storagebox }}"