f704a78029
blueprint database-backup-recovery Introduce a new option, mariadb_backup, which takes a backup of all databases hosted in MariaDB. Backups are performed using XtraBackup, the output of which is saved to a dedicated Docker volume on the target host (which defaults to the first node in the MariaDB cluster). It supports either full (the default) or incremental backups. Change-Id: Ied224c0d19b8734aa72092aaddd530155999dbc3
24 lines
675 B
YAML
24 lines
675 B
YAML
---
|
|
- name: Detect openstack_release variable
|
|
hosts: mariadb
|
|
gather_facts: false
|
|
tasks:
|
|
- name: Get current kolla-ansible version number
|
|
local_action: command python -c "import pbr.version; print(pbr.version.VersionInfo('kolla-ansible'))"
|
|
register: kolla_ansible_version
|
|
changed_when: false
|
|
when: openstack_release == "auto"
|
|
|
|
- name: Set openstack_release variable
|
|
set_fact:
|
|
openstack_release: "{{ kolla_ansible_version.stdout }}"
|
|
when: openstack_release == "auto"
|
|
tags: always
|
|
|
|
- name: Backup MariaDB
|
|
hosts: mariadb
|
|
roles:
|
|
- { role: mariadb,
|
|
tags: mariadb,
|
|
when: enable_xtrabackup | bool }
|