Start playbook for hetzner's server.

This commit is contained in:
2021-11-21 17:00:58 +01:00
parent 3ee74d46cf
commit bf574c22d5
3 changed files with 47 additions and 0 deletions

19
hetzner.yaml Normal file
View File

@@ -0,0 +1,19 @@
---
# 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