25 lines
475 B
YAML
25 lines
475 B
YAML
---
|
|
- 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
|