aboutsummaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
authorshuai chen <chenshuai@huawei.com>2016-09-08 02:22:34 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-09-08 02:22:34 +0000
commit6911e5491ec95eb7878595e186e6f2ff0bd4d237 (patch)
tree1c539fde98258660c443b496a5f6b71d556920d4 /deploy
parent5fbd0c26cbc7496dcb7a368f208f520494d280ed (diff)
parent11f6bd1154b5ad29aab7382feb28868dfbf9a88f (diff)
Merge "Restart mysql in centos-no-ha scenario" into stable/colorado
Diffstat (limited to 'deploy')
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml
index b18ae8f7..780fc322 100644
--- a/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml
@@ -41,6 +41,24 @@
script: remove_user.sh
when: ansible_os_family == "RedHat"
+- name: restart mysql for centos noha
+ service:
+ name: mysql
+ state: restarted
+ when: >
+ inventory_hostname == haproxy_hosts.keys()[0]
+ and haproxy_hosts|length == 1
+ and ansible_os_family == "RedHat"
+
+- name: restart mysql second time for centos noha
+ service:
+ name: mysql
+ state: restarted
+ when: >
+ inventory_hostname == haproxy_hosts.keys()[0]
+ and haproxy_hosts|length == 1
+ and ansible_os_family == "RedHat"
+
- name: restart first nodes
service:
name: mysql