diff options
author | QiLiang <liangqi1@huawei.com> | 2016-09-07 10:46:46 +0800 |
---|---|---|
committer | qi liang <liangqi1@huawei.com> | 2016-09-07 07:19:10 +0000 |
commit | 11f6bd1154b5ad29aab7382feb28868dfbf9a88f (patch) | |
tree | 395995d1560cb008f54d926bef0f968f980bbd55 | |
parent | b38dbe58b5da95b91e684d29b61ce1522e23719f (diff) |
Restart mysql in centos-no-ha scenario
JIRA: COMPASS-482
Change-Id: Id26a0acbe9b725e236021a4b324960eef02b48eb
Signed-off-by: QiLiang <liangqi1@huawei.com>
-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 |