allow multiple upstream groups from list
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
4f1f3036dd
commit
5a1a3e6ef1
@ -103,8 +103,8 @@ nginx_vhosts_default:
|
||||
# @var nginx_vhosts_default:example: >
|
||||
# nginx_vhosts_default:
|
||||
# - file: default
|
||||
# upstream:
|
||||
# name: my_pool
|
||||
# upstreams:
|
||||
# - name: my_pool
|
||||
# servers: []
|
||||
# servers:
|
||||
# - port: 80
|
||||
|
@ -1,12 +1,14 @@
|
||||
#jinja2: lstrip_blocks: True
|
||||
{{ ansible_managed | comment }}
|
||||
{% if item.upstreams is defined and item.upstreams %}
|
||||
{% for upstream in item.upstreams %}
|
||||
|
||||
{% if item.upstream is defined and item.upstream %}
|
||||
upstream {{ item.upstream.name }} {
|
||||
{% for upserver in item.upstream.servers %}
|
||||
upstream {{ upstream.name }} {
|
||||
{% for upserver in upstream.servers %}
|
||||
server {{ upserver }};
|
||||
{% endfor %}
|
||||
}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% for server in item.servers %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user