duplicity_playbooks/backup_ovh1.yml

34 lines
1.0 KiB
YAML
Raw Permalink Normal View History

---
- name: backup_ovh1
hosts: localhost
gather_facts: false
vars_files: main.yml
tasks:
- name: Assert environment variable is not empty
ansible.builtin.include_tasks: "tasks/assert_env_var_not_empty.yml"
with_items: "{{ BACKUP_OVH1_REQUIRED_ENV_VARS }}"
- name: Create backup directory
ansible.builtin.file:
path: "{{ WORKDIR }}/backup"
state: directory
# python3-swiftclient is a requirement of duplicity
- name: Install python3-swiftclient
ansible.builtin.package:
name: python3-swiftclient
state: present
2024-04-28 08:28:53 +00:00
- name: Backup standard volume
ansible.builtin.include_tasks: "tasks/backup_volume.yml"
with_items: "{{ BACKUP_OVH1_VOLUMES }}"
2024-04-28 08:28:53 +00:00
- name: Prepare MySQL_DB backup volume
ansible.builtin.include_tasks: "tasks/prepare_MySQL_DB_backup_volume.yml"
- name: Backup last MySQL dumps
ansible.builtin.include_tasks: "tasks/backup_volume.yml"
with_items:
2024-04-28 09:49:38 +00:00
- name: mysql-server_dumps
2024-04-28 08:28:53 +00:00
dir: "{{ WORKDIR }}/backup/MySQL_DB"