parent
088a33b33a
commit
60796abcd5
@ -17,7 +17,7 @@
|
|||||||
- name: "Enable Nginx @CentOS-AppStream dnf modules"
|
- name: "Enable Nginx @CentOS-AppStream dnf modules"
|
||||||
shell:
|
shell:
|
||||||
args:
|
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
|
register: dnf_module_enable
|
||||||
changed_when: dnf_module_enable.stdout != 'ENABLED'
|
changed_when: dnf_module_enable.stdout != 'ENABLED'
|
||||||
when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "8"
|
when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "8"
|
||||||
|
@ -221,6 +221,10 @@
|
|||||||
port: 8082
|
port: 8082
|
||||||
weight: 1
|
weight: 1
|
||||||
health_check: max_fails=3 fail_timeout=5s
|
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:
|
frontend:
|
||||||
template_file: http/default.conf.j2
|
template_file: http/default.conf.j2
|
||||||
conf_file_name: frontend_default.conf
|
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 }};
|
zone {{ item.value.upstreams[upstream].zone_name }} {{ item.value.upstreams[upstream].zone_size }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for server in item.value.upstreams[upstream].servers %}
|
{% 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 %}
|
{% endfor %}
|
||||||
{% if item.value.upstreams[upstream].sticky_cookie %}
|
{% if item.value.upstreams[upstream].sticky_cookie %}
|
||||||
sticky cookie srv_id expires=1h path=/;
|
sticky cookie srv_id expires=1h path=/;
|
||||||
|
Loading…
Reference in New Issue
Block a user