Validate haproxy conf after assemble

Right now we don't ensure haproxy conf validity and if it's incorrect
role will fail on attempt to reload haproxy. However it's really worth
adding validation step and do not proceed if configuration is wrong

Change-Id: I54717d4f7230b8d8dff2d293592831cc88c51d24
This commit is contained in:
Dmitriy Rabotyagov
2022-10-05 13:37:07 +02:00
parent a502817a89
commit 9fc079a65d

View File

@@ -28,6 +28,7 @@
assemble: assemble:
src: "/etc/haproxy/conf.d" src: "/etc/haproxy/conf.d"
dest: "/etc/haproxy/haproxy.cfg" dest: "/etc/haproxy/haproxy.cfg"
validate: /usr/sbin/haproxy -c -f %s
notify: Reload haproxy notify: Reload haproxy
tags: tags:
- haproxy-general-config - haproxy-general-config