Add hearthbeat configuration
This commit is contained in:
parent
066c870389
commit
585e71c2a4
8
docker/etc/ha.d/ha.cf
Normal file
8
docker/etc/ha.d/ha.cf
Normal 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
|
1
docker/etc/ha.d/haresources
Normal file
1
docker/etc/ha.d/haresources
Normal file
@ -0,0 +1 @@
|
|||||||
|
node-02 IPaddr::192.168.50.100/24/eth0:0
|
23
docker/hearthbeat.yml
Normal file
23
docker/hearthbeat.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user