yoho.reload-cobar.yml
631 Bytes
---
- hosts: cobar-server
remote_user: master
vars_prompt:
- name: "confirmation"
prompt: "Reload cobar. Please Enter COBAR to continue."
private: no
tasks:
- name: --COBAR-- Checking cobar status
command: /home/master/cobar-server/bin/switch.sh status
register: cobar_status
failed_when: cobar_status.rc != 0
changed_when: False
- name: --COBAR-- Reloading cobar
command: /usr/bin/mysql -h localhost -uyh_vpc_bak -p"{{ passwd }}" -P 9066 -e "reload @@config"
register: cobar_reload
failed_when: cobar_reload.rc != 0
changed_when: cobar_reload.rc == 0