48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
---
|
|
|
|
- name: Hostinger backup
|
|
hosts: all
|
|
gather_facts: True
|
|
|
|
tasks:
|
|
- name: Include container variables
|
|
include_vars: vars/hostinger.yaml
|
|
include_vars: vars/semaphore-token.yaml
|
|
|
|
- name: Register date
|
|
ansible.builtin.set_fact:
|
|
date: "{{ ansible_date_time.iso8601_basic_short }}"
|
|
|
|
|
|
- name: Include the docker backup playbook
|
|
import_playbook: docker-backup.yaml
|
|
vars:
|
|
backup_location: "/media/backup/docker/"
|
|
containers: containers
|
|
date: ansible_facts.date
|
|
|
|
- name: Include the email playbook
|
|
import_playbook: email.yaml
|
|
vars:
|
|
backup_location: "/media/backup/docker/"
|
|
containers: containers
|
|
date: ansible_facts.date
|
|
|
|
- name: Include the fetch backup playbook
|
|
import_playbook: fetch-backup.yaml
|
|
vars:
|
|
local_backup: "/home/semaphore/backup/"
|
|
backup_location: "/media/backup/docker/"
|
|
containers: containers
|
|
date: ansible_facts.date
|
|
|
|
- name: Run next playbook
|
|
ansible.builtin.uri:
|
|
url: http://ansible.lan/api/integrations/ei0dtntvuz54ot3s
|
|
method: GET
|
|
status_code: 204
|
|
headers:
|
|
Content-Type: application/json
|
|
Authorization: Bearer "{{ token }}"
|
|
run: minisforum
|