Made a new host group for the first db in the cluster

This commit is contained in:
2016-02-12 11:10:54 -05:00
parent 15bd0b203a
commit b7dce43756
2 changed files with 5 additions and 2 deletions

3
hosts
View File

@@ -9,6 +9,9 @@ db1-hostname
db2-hostname
db3-hostname
[db_first_cluster_node]
db1-hostname
[proxy]
haproxy-hostname

View File

@@ -14,13 +14,13 @@
- include: ../roles/db/tasks/install.yml
- name: Start and create cluser on first db node
hosts: db[0]
hosts: db_first_cluster_node
user: root
tasks:
- include: ../roles/db/tasks/startcluster.yml
- name: Start mysql on other nodes
hosts: db[1-2]
hosts: db
user: root
tasks:
- include: ../roles/db/tasks/startmysql.yml