Story #8536
closedOption to not configure ipv6 listening in nginx config
100%
Description
For environment with ipv6 disabled, provide a option/check to determine if ipv6 listener should be configured.
In roles/pulp_webserver/templates/nginx.conf.j2, the configuration default to always listen on both ipv4 and ipv6.
{% if pulp_webserver_disable_https | bool %}
listen {{ pulp_webserver_http_port }} default_server deferred;
listen [::]:{{ pulp_webserver_http_port }} default_server deferred;
{% else %}
listen {{ pulp_webserver_https_port }} default_server deferred ssl;
listen [::]:{{ pulp_webserver_https_port }} default_server deferred ssl;
One option may be to base this on the ansible_all_ipv6_addresses fact.
{% if pulp_webserver_disable_https | bool %}
listen {{ pulp_webserver_http_port }} default_server deferred;
{% if ansible_all_ipv6_addresses != [] %}
listen [::]:{{ pulp_webserver_http_port }} default_server deferred;
{% endif %}
{% else %}
listen {{ pulp_webserver_https_port }} default_server deferred ssl;
{% if ansible_all_ipv6_addresses != [] %}
listen [::]:{{ pulp_webserver_https_port }} default_server deferred ssl;
{% endif %}
Related issues
Updated by pulpbot over 3 years ago
- Status changed from NEW to POST
Added by Fabricio Aguiar over 3 years ago
Added by Fabricio Aguiar over 3 years ago
Revision b7ab750d | View on GitHub
Only listen IPv6 when it is configured on the managed host
Updated by Anonymous over 3 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset ansible-pulp|b7ab750d073a33e6f8547022f7ff359f9f74597a.
Updated by fao89 over 3 years ago
- Has duplicate Issue #8583: pulp_webserver should work with IPv6 disabled added
Updated by fao89 over 3 years ago
- Has duplicate Issue #8069: pulp_installer: Add if block for enabling/disabling IPv6 based on the presence of IPv6 interfaces on the host added
Added by Fabricio Aguiar over 3 years ago
Revision e944bf29 | View on GitHub
Only listen IPv6 when it is configured on the managed host
https://pulp.plan.io/issues/8536 closes #8536
(cherry picked from commit b7ab750d073a33e6f8547022f7ff359f9f74597a)
Added by Fabricio Aguiar over 3 years ago
Revision e944bf29 | View on GitHub
Only listen IPv6 when it is configured on the managed host
https://pulp.plan.io/issues/8536 closes #8536
(cherry picked from commit b7ab750d073a33e6f8547022f7ff359f9f74597a)
Updated by pulpbot over 3 years ago
Updated by ttereshc over 3 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
- Sprint/Milestone set to 3.12.2
Added by Fabricio Aguiar over 3 years ago
Revision ae68d1e9 | View on GitHub
Only listen IPv6 when it is configured on the managed host
https://pulp.plan.io/issues/8536 closes #8536
(cherry picked from commit b7ab750d073a33e6f8547022f7ff359f9f74597a) (cherry picked from commit e944bf2903f4f6911bb73694d2cac099f79a5b29)
Added by Fabricio Aguiar over 3 years ago
Revision ae68d1e9 | View on GitHub
Only listen IPv6 when it is configured on the managed host
https://pulp.plan.io/issues/8536 closes #8536
(cherry picked from commit b7ab750d073a33e6f8547022f7ff359f9f74597a) (cherry picked from commit e944bf2903f4f6911bb73694d2cac099f79a5b29)
Only listen IPv6 when it is configured on the managed host
https://pulp.plan.io/issues/8536 closes #8536