Files
ansible/hetzner.yaml

20 lines
458 B
YAML

---
# This playbook backups the customers on hetzner server.
- name: Backup hetzner
hosts: all
gather_facts: true
tasks:
- include_vars: vars/hetzner/secret.yaml
- include_vars: vars/hetzner/variable.yaml
- name: Check if directories exist
stat:
path: "{{ backup_dir }}/{{ item }}"
register: dirs
loop: "{{ lookup('dict', customers) }}"
loop_control:
label: "{{ item.key }}"
- debug: var=dirs