diff options
author | QiLiang <liangqi1@huawei.com> | 2016-09-07 10:46:46 +0800 |
---|---|---|
committer | QiLiang <liangqi1@huawei.com> | 2016-09-07 12:57:47 +0800 |
commit | 297cd1ba745e4acc57cd31a80cd6c9bd68883c00 (patch) | |
tree | 6a4123a69fd2c1842f68ba941007d44928a524b3 /deploy/adapters/ansible/roles/database | |
parent | 40752d2aa8796a72e55f9493beb3841f2bfbb43f (diff) |
Restart mysql in centos-no-ha scenario
JIRA: COMPASS-482
Change-Id: Id26a0acbe9b725e236021a4b324960eef02b48eb
Signed-off-by: QiLiang <liangqi1@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/database')
-rw-r--r-- | deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml | 18 |
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 |