From 85d42c56cafb1b7426677c85f5fa0874c0858568 Mon Sep 17 00:00:00 2001 From: "carey.xu" Date: Mon, 12 Oct 2015 20:15:22 +0800 Subject: make internal vip and public vip into one group JIRA: COMPASS-88 Change-Id: Ie40033b99d29e79c6a50b3073f4147109a02d7fa Signed-off-by: carey.xu --- deploy/adapters/ansible/roles/database/tasks/mariadb.yml | 8 ++------ deploy/adapters/ansible/roles/database/tasks/mongodb.yml | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'deploy/adapters/ansible/roles/database') diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb.yml index 37c9a2c9..9a9ebda5 100644 --- a/deploy/adapters/ansible/roles/database/tasks/mariadb.yml +++ b/deploy/adapters/ansible/roles/database/tasks/mariadb.yml @@ -28,9 +28,7 @@ register: mysql_init_complete - name: restart first mysql server - shell: service mysql restart --wsrep-cluster-address="gcomm://" - args: - creates: /opt/mysql_init_complete + shell: service mysql restart --wsrep-cluster-address="gcomm://" && touch /opt/mysql_init_complete when: inventory_hostname == haproxy_hosts.keys()[0] and mysql_init_complete.stat.exists == False tags: - mysql_restart @@ -40,9 +38,7 @@ #delay: 5 - name: restart other mysql server - shell: service mysql restart - args: - creates: /opt/mysql_init_complete + shell: service mysql restart && touch /opt/mysql_init_complete tags: - mysql_restart when: inventory_hostname != haproxy_hosts.keys()[0] and mysql_init_complete.stat.exists == False diff --git a/deploy/adapters/ansible/roles/database/tasks/mongodb.yml b/deploy/adapters/ansible/roles/database/tasks/mongodb.yml index a0edcce8..ca61e905 100644 --- a/deploy/adapters/ansible/roles/database/tasks/mongodb.yml +++ b/deploy/adapters/ansible/roles/database/tasks/mongodb.yml @@ -19,7 +19,7 @@ - name: manually restart mongodb server service: name=mongodb state=restarted -- wait_for: port=27017 delay=3 timeout=10 host={{ internal_vip.ip }} +- wait_for: port=27017 delay=3 timeout=30 host={{ internal_vip.ip }} - name: create mongodb user run_once: True -- cgit 1.2.3-korg