1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2024-09-20 13:02:31 +02:00
infrastructure/playbooks/fetch-borg-keys.yml

17 lines
464 B
YAML
Raw Normal View History

---
- name: prepare local storage directory
hosts: 127.0.0.1
tasks:
- file: path="{{playbook_dir}}/../borg-keys/" state=directory
- name: fetch borg keys
hosts: borg-clients
tasks:
- name: fetch borg key
command: "/usr/local/bin/borg key export :: /dev/stdout"
register: borg_key
- name: save borg key
local_action: copy content={{ borg_key.stdout }} dest="{{playbook_dir}}/../borg-keys/{{inventory_hostname}}"