forked from evolix/ansible-roles
haproxy: use loop syntax instead of with_first_found
This commit is contained in:
parent
eacdd2c7f2
commit
b3a62aa9d8
|
@ -100,9 +100,11 @@
|
||||||
dest: /etc/haproxy/haproxy.cfg
|
dest: /etc/haproxy/haproxy.cfg
|
||||||
force: "{{ haproxy_force_config }}"
|
force: "{{ haproxy_force_config }}"
|
||||||
validate: "haproxy -c -f %s"
|
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.{{ 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"
|
- "templates/haproxy/haproxy.default.cfg.j2"
|
||||||
- "haproxy.default.cfg.j2"
|
- "haproxy.default.cfg.j2"
|
||||||
notify: reload haproxy
|
notify: reload haproxy
|
||||||
|
|
Loading…
Reference in a new issue