Skip to content

Commit a4b34d8

Browse files
authored
Merge pull request #310 from boerngen-schmidt-next/patch-1
Added parameter to use specified configuration file
2 parents 47b0735 + f554676 commit a4b34d8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

roles/keepalived/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
- name: "Verify Keepalived configuration."
142142
become: true
143143
ansible.builtin.command:
144-
cmd: "{{ keepalived_executable_path | quote }} --config-test {{ keepalived_conf_file_path | quote }}"
144+
cmd: "{{ keepalived_executable_path | quote }} --config-test --use-file {{ keepalived_conf_file_path | quote }}"
145145
register: "config_check"
146146
changed_when: "config_check.rc != 0"
147147

roles/keepalived/templates/keepalived.service.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RuntimeDirectory=keepalived
1515
PIDFile={{ keepalived_pid_file_path }}
1616
KillMode=process
1717
EnvironmentFile=-{{ keepalived_sysconfig_file_path }}
18-
ExecStart={{ keepalived_executable_path }} -p {{ keepalived_pid_file_path }} $KEEPALIVED_OPTIONS
18+
ExecStart={{ keepalived_executable_path }} -p {{ keepalived_pid_file_path }} --use-file {{ keepalived_conf_file_path }} $KEEPALIVED_OPTIONS
1919
ExecReload=/bin/kill -HUP $MAINPID
2020

2121
[Install]

0 commit comments

Comments
 (0)