27 lines
561 B
YAML
27 lines
561 B
YAML
---
|
|
# This playbook deploys a galera cluster
|
|
|
|
- name: Apply common configuration to all nodes
|
|
hosts: db
|
|
user: root
|
|
tasks:
|
|
- include: ../roles/common/tasks/main.yml
|
|
|
|
- name: Install galera and mariadb on all db nodes
|
|
hosts: db
|
|
user: root
|
|
tasks:
|
|
- include: ../roles/db/tasks/install.yml
|
|
|
|
- name: Start and create cluser on first db node
|
|
hosts: db[0]
|
|
user: root
|
|
tasks:
|
|
- include: ../roles/db/tasks/startcluster.yml
|
|
|
|
- name: Start mysql on other nodes
|
|
hosts: db[1-2]
|
|
user: root
|
|
tasks:
|
|
- include: ../roles/db/tasks/startmysql.yml
|