Skip to content

Commit

Permalink
Merge pull request #1 from justereseau/feat/custom_template
Browse files Browse the repository at this point in the history
Allow custom template usage
  • Loading branch information
lucasmaurice authored Nov 10, 2020
2 parents 31ce91d + fad75d6 commit cac3db1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ A list of backend servers (name and address) to which HAProxy will distribute re

A list of extra global variables to add to the global configuration section inside `haproxy.cfg`.

haproxy_custom_config_template: 'haproxy.cfg.j2'

Specify your own `haproxy.cfg` template file.

## Dependencies

None.
Expand Down
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

- name: Copy HAProxy configuration in place.
template:
src: haproxy.cfg.j2
src: "{{ haproxy_custom_config_template | default('haproxy.cfg.j2') }}"
dest: /etc/haproxy/haproxy.cfg
mode: 0644
validate: haproxy -f %s -c -q
Expand Down

0 comments on commit cac3db1

Please sign in to comment.