I would like to restart my MariaDB cluster with Ansible.

I applied serial option to run script on servers one by one, but at the end of the script (= after build cluster), I would like to run command on each of these server to carefully restart cluster, which means restart MariaDB server on node one, wait till all are synchronized again, and continue with others, but I don't have idea, which Ansible function (module) should I use.

I tried delegate_to, run_once, but I have failed when I was trying to run anything on first server as a last step of this playbook. Could you please help me?


You should take a look at the wait_for module https://docs.ansible.com/ansible/2.5/modules/wait_for_module.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.