5d17100118
- Replace hardcoded haproxy monitor user with variable. - Rename mariadb_backup variable to mariadb_backup_possible. - Drop creation of monitor user in handlers as this is now handled in register.yml for good reason. Change-Id: I255a79d36ae18ca42d0befd00b235ca509197db3
24 lines
817 B
YAML
24 lines
817 B
YAML
---
|
|
- name: Taking {{ mariadb_backup_type }} database backup via Mariabackup
|
|
become: true
|
|
kolla_docker:
|
|
action: "start_container"
|
|
command: "bash -c 'sudo -E kolla_set_configs && /usr/local/bin/kolla_mariadb_backup.sh'"
|
|
common_options: "{{ docker_common_options }}"
|
|
detach: False
|
|
image: "{{ mariabackup_image_full }}"
|
|
name: "mariabackup"
|
|
restart_policy: no
|
|
remove_on_exit: True
|
|
environment:
|
|
BACKUP_TYPE: "{{ mariadb_backup_type }}"
|
|
volumes:
|
|
- "{{ node_config_directory }}/mariabackup/:{{ container_config_directory }}/:ro"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "mariadb:/var/lib/mysql"
|
|
- "mariadb_backup:/backup"
|
|
- "kolla_logs:/var/log/kolla/"
|
|
when:
|
|
- inventory_hostname == mariadb_backup_host
|
|
- mariadb_backup_possible | bool
|