Skip to content

Commit

Permalink
Merge pull request #78 from Julien5858/master
Browse files Browse the repository at this point in the history
Validating the config file for haproxy_mode== system
  • Loading branch information
goldyfruit authored Jun 13, 2024
2 parents a6fdc06 + 05a615b commit 553b5c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
src: etc/haproxy/haproxy.cfg.j2
dest: "{{ haproxy_config }}"
mode: "0640"
# FIXME: find a way to validate in Docker mode
# FIXME: below validate config file when system mode
# need to find a way to validate in Docker mode
# validate: "{{ haproxy_bin }} -f %s -c"
validate: "{{ (haproxy_mode == 'system') | ternary(haproxy_bin ~ ' -f %s -c', omit) }}"
notify: Reload haproxy

0 comments on commit 553b5c4

Please sign in to comment.