Files
fedora-infra_ansible/roles/keepalived/tasks/main.yml
Patrick Uiterwijk adcbf72f03 Packageize this, packageize that, packageize the world
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2017-10-08 22:25:52 +00:00

38 lines
937 B
YAML

#
# role for keepalived
# This role needs several variables defined:
#
# keepalived_interface - interface to listen on
# keepalived_priority - priority of this host
# keepalived_ipaddress - virtual ip address on master host
#
- name: Install keepalived package
package: state=present name=keepalived
tags:
- packages
- keepalived
- name: Install keepalived template
template: src=keepalived.conf.j2 dest=/etc/keepalived/keepalived.conf
tags:
- config
- keepalived
notify:
- restart keepalived
- name: Install keepalived failover script for host (or default)
copy: src={{ item }} dest=/usr/local/bin/keepalived-notify.sh mode=755
with_first_found:
- keepalived-notify.sh.{{ inventory_hostname }}
- keepalived-notify.sh
tags:
- config
- keepalived
- name: Make sure keepalived is set to start and is running
service: state=started enabled=true name=keepalived
tags:
- service
- keepalived