--- # 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: Create backup directory file: path: "{{ backup_dir }}" state: directory - name: Check if customer directories exist file: path: "{{ backup_dir }}/{{ item.key }}" state: directory loop: "{{ lookup('dict', customers) }}" loop_control: label: "{{ item.key }}"