summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/database
diff options
context:
space:
mode:
authorcarey.xu <carey.xuhan@huawei.com>2015-10-12 20:15:22 +0800
committercarey.xu <carey.xuhan@huawei.com>2015-10-13 11:37:11 +0800
commit85d42c56cafb1b7426677c85f5fa0874c0858568 (patch)
treeef51561e1bbd92104713b5f2cd24861e5e942a81 /deploy/adapters/ansible/roles/database
parent2cbacbc060805b446769def612253798f3b7fb03 (diff)
make internal vip and public vip into one group
JIRA: COMPASS-88 Change-Id: Ie40033b99d29e79c6a50b3073f4147109a02d7fa Signed-off-by: carey.xu <carey.xuhan@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/database')
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mariadb.yml8
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mongodb.yml2
2 files changed, 3 insertions, 7 deletions
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