Add hearthbeat configuration

This commit is contained in:
pgrondek 2020-05-25 22:52:02 +02:00
parent 066c870389
commit 585e71c2a4
3 changed files with 32 additions and 0 deletions

8
docker/etc/ha.d/ha.cf Normal file
View File

@ -0,0 +1,8 @@
node node-01
ucast eth0 192.168.50.101
node node-02
ucast eth0 192.168.50.102
node node-03
ucast eth0 192.168.50.103

View File

@ -0,0 +1 @@
node-02 IPaddr::192.168.50.100/24/eth0:0

23
docker/hearthbeat.yml Normal file
View File

@ -0,0 +1,23 @@
---
- name: install and configure heartbeat
hosts: docker_swarm
become_method: sudo
become_user: root
become: yes
tasks:
- name: install heartbeat
apt:
update_cache: yes
pkg:
- heartbeat
- name: copy configuration
copy:
src: etc/ha.d/ha.cf
dest: /etc/ha.d/ha.cf
- name: copy resources
copy:
src: etc/ha.d/haresources
dest: /etc/ha.d/haresources