At this moment, we have one hardware watcher configured only in the
swarm-master node. Now that we are familiar with the way Consul watches work, we can use Ansible to deploy hardware monitoring to all the nodes of the Swarm cluster.
We'll run the Ansible playbook first, and then explore the roles that were used to setup the checks:
vagrant ssh cd ansible-playbook /vagrant/ansible/swarm-healing.yml \ -i /vagrant/ansible/hosts/prod
swarm-healing.yml playbook is as follows:
- hosts: swarm remote_user: vagrant serial: 1 sudo: yes vars: - debian_version: vivid - docker_cfg_dest: /lib/systemd/system/docker.service - is_systemd: true roles: - common - docker ...