kolla-ansible/ansible/roles/prechecks/tasks/database_checks.yml
Alexandru Bogdan Pica 8e3b79440c Implement external MariaDB and pre-configured Databases support
This change allows the following use cases:

1. Using an already-configured MariaDB / MySQL server / Cluster
2. Using already-created DB users, without requiring root DB access.

Update: added external mariadb precheck

Change-Id: I78b0d178306d7c5293b0bf53e445f19f18b4b824
Implements: blueprint external-mariadb-support.
Closes-Bug: #1603121
2018-01-23 13:07:40 +00:00

21 lines
755 B
YAML

---
- name: "Check if external mariadb hosts are reachable from the load balancer"
wait_for:
msg: "The {{ item }} host is not accessible from {{ inventory_hostname }}"
host: "{{ item }}"
port: "{{ database_port }}"
with_items: "{{ groups['mariadb'] }}"
when:
- not enable_mariadb | bool
- enable_external_mariadb_load_balancer | bool
- inventory_hostname in groups['haproxy']
- name: "Check if external database address is reachable from all hosts"
wait_for:
msg: "The {{ database_address }} host is not accessible from {{ inventory_hostname }}"
host: "{{ database_address }}"
port: "{{ database_port }}"
when:
- not enable_mariadb | bool
- not enable_external_mariadb_load_balancer | bool