ansible-role-keepalived/tasks/main.yml

26 lines
475 B
YAML
Raw Normal View History

2019-04-12 16:29:11 +00:00
---
- name: install package
package:
name: keepalived
retries: 2
register: result
until: result is succeeded
tags: keepalived
- name: copy configuration file
template:
src: keepalived.conf.j2
dest: /etc/keepalived/keepalived.conf
owner: root
group: root
mode: 0600
notify: restart keepalived
tags: keepalived
- name: enable and start the service
service:
name: keepalived
state: started
enabled: yes
tags: keepalived