Skip to content
Snippets Groups Projects
Commit 654a7ed0 authored by Simon Michnowicz's avatar Simon Michnowicz
Browse files

update NAT role with keepalived service file

parent ef5300d3
No related branches found
No related tags found
1 merge request!460Upcoming maintenance
......@@ -68,6 +68,11 @@
become: true
become_user: root
- name: Template keepalived service file
template: dest=/etc/systemd/system/keepalived.service src=keepalived.service.j2
become: true
become_user: root
- name: Enable and start keepalived
service:
name: keepalived
......@@ -75,3 +80,11 @@
enabled: yes
become: true
become_user: root
- name: Restart iptables service
service:
name: iptables
state: restarted
become: true
become_user: root
# systemd servive unit file for Keepalived
[Unit]
Description=Keepalived service for High Availability with VRRP
After=network.target network-online.target
ConditionFileNotEmpty=/etc/keepalived/keepalived.conf
[Service]
Type=simple
ExecStart=/usr/sbin/keepalived --dont-fork
ExecReload=/bin/kill -s HUP $MAINPID #Define the procedure of killing the processes belonging to the Keepalived service unit.
KillMode=process
[Install]
WantedBy=multi-user.target
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment