Start playbook for hetzner's server.
This commit is contained in:
19
hetzner.yaml
Normal file
19
hetzner.yaml
Normal 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
|
||||
Reference in New Issue
Block a user