diff --git a/docker/etc/ha.d/ha.cf b/docker/etc/ha.d/ha.cf new file mode 100644 index 0000000..3fe8af0 --- /dev/null +++ b/docker/etc/ha.d/ha.cf @@ -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 diff --git a/docker/etc/ha.d/haresources b/docker/etc/ha.d/haresources new file mode 100644 index 0000000..7ba51bf --- /dev/null +++ b/docker/etc/ha.d/haresources @@ -0,0 +1 @@ +node-02 IPaddr::192.168.50.100/24/eth0:0 diff --git a/docker/hearthbeat.yml b/docker/hearthbeat.yml new file mode 100644 index 0000000..dbfcdf0 --- /dev/null +++ b/docker/hearthbeat.yml @@ -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