haproxy: use loop syntax instead of with_first_found
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
eacdd2c7f2
commit
b3a62aa9d8
|
@ -100,9 +100,11 @@
|
|||
dest: /etc/haproxy/haproxy.cfg
|
||||
force: "{{ haproxy_force_config }}"
|
||||
validate: "haproxy -c -f %s"
|
||||
with_first_found:
|
||||
loop: "{{ query('first_found', templates) }}"
|
||||
vars:
|
||||
templates:
|
||||
- "templates/haproxy/haproxy.{{ inventory_hostname }}.cfg.j2"
|
||||
- "templates/haproxy/haproxy.{{ host_group }}.cfg.j2"
|
||||
- "templates/haproxy/haproxy.{{ host_group | default('all') }}.cfg.j2"
|
||||
- "templates/haproxy/haproxy.default.cfg.j2"
|
||||
- "haproxy.default.cfg.j2"
|
||||
notify: reload haproxy
|
||||
|
|
Loading…
Reference in a new issue