parent
088a33b33a
commit
60796abcd5
@ -17,7 +17,7 @@
|
||||
- name: "Enable Nginx @CentOS-AppStream dnf modules"
|
||||
shell:
|
||||
args:
|
||||
cmd: dnf module info nginx | grep -q 'Stream.*\[e\]' && echo -n ENABLED || dnf module enable -y nginx # noqa 204 303
|
||||
cmd: dnf module info nginx | grep -q 'Stream.*\[e\]' && echo -n ENABLED || dnf module enable -y nginx # noqa 204 303
|
||||
register: dnf_module_enable
|
||||
changed_when: dnf_module_enable.stdout != 'ENABLED'
|
||||
when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "8"
|
||||
|
@ -221,6 +221,10 @@
|
||||
port: 8082
|
||||
weight: 1
|
||||
health_check: max_fails=3 fail_timeout=5s
|
||||
backend_server_2:
|
||||
address: unix:/var/run/control.unit.sock
|
||||
weight: 1
|
||||
health_check: max_fails=3 fail_timeout=5s
|
||||
frontend:
|
||||
template_file: http/default.conf.j2
|
||||
conf_file_name: frontend_default.conf
|
||||
|
@ -10,7 +10,7 @@ upstream {{ item.value.upstreams[upstream].name }} {
|
||||
zone {{ item.value.upstreams[upstream].zone_name }} {{ item.value.upstreams[upstream].zone_size }};
|
||||
{% endif %}
|
||||
{% for server in item.value.upstreams[upstream].servers %}
|
||||
server {{ item.value.upstreams[upstream].servers[server].address }}:{{ item.value.upstreams[upstream].servers[server].port }} weight={{ item.value.upstreams[upstream].servers[server].weight|default("1") }} {{ item.value.upstreams[upstream].servers[server].health_check|default("") }};
|
||||
server {{ item.value.upstreams[upstream].servers[server].address }}{{(":" + item.value.upstreams[upstream].servers[server].port | string) if item.value.upstreams[upstream].servers[server].port is defined}} weight={{ item.value.upstreams[upstream].servers[server].weight | default("1") }} {{ item.value.upstreams[upstream].servers[server].health_check | default("") }};
|
||||
{% endfor %}
|
||||
{% if item.value.upstreams[upstream].sticky_cookie %}
|
||||
sticky cookie srv_id expires=1h path=/;
|
||||
|
Loading…
Reference in New Issue
Block a user