Make ssl optional for listeners (#215)
This commit is contained in:
parent
d661ff4db9
commit
0b176f847a
@ -347,6 +347,7 @@ This is a sample playbook file for deploying the Ansible Galaxy NGINX role in a
|
||||
listen_localhost:
|
||||
ip: 0.0.0.0
|
||||
port: 8081
|
||||
ssl: false
|
||||
opts: []
|
||||
server_name: localhost
|
||||
error_page: /usr/share/nginx/html
|
||||
@ -371,6 +372,7 @@ This is a sample playbook file for deploying the Ansible Galaxy NGINX role in a
|
||||
listen_localhost:
|
||||
ip: 0.0.0.0
|
||||
port: 8082
|
||||
ssl: false
|
||||
opts: []
|
||||
server_name: localhost
|
||||
error_page: /usr/share/nginx/html
|
||||
|
@ -64,6 +64,7 @@ nginx_http_template:
|
||||
listen_localhost:
|
||||
ip: localhost # Wrap in square brackets for IPv6 addresses
|
||||
port: 8081
|
||||
ssl: true
|
||||
opts: [] # Listen opts like http2 which will be added (ssl is automatically added if you specify 'ssl:').
|
||||
server_name: localhost
|
||||
include_files: []
|
||||
|
@ -80,7 +80,7 @@ auth_request_set {{ item.value.auth_request_set_http.name }} {{ item.value.auth_
|
||||
{% for server in item.value.servers %}
|
||||
server {
|
||||
{% for listen in item.value.servers[server].listen %}
|
||||
listen {% if item.value.servers[server].listen[listen].ip is defined and item.value.servers[server].listen[listen].ip | length %}{{ item.value.servers[server].listen[listen].ip }}:{% endif %}{{ item.value.servers[server].listen[listen].port }}{% if item.value.servers[server].ssl is defined and item.value.servers[server].ssl %} ssl{% endif %}{% if item.value.servers[server].listen[listen].opts is defined and item.value.servers[server].listen[listen].opts | length %} {{ item.value.servers[server].listen[listen].opts | join(" ") }}{% endif %};
|
||||
listen {% if item.value.servers[server].listen[listen].ip is defined and item.value.servers[server].listen[listen].ip | length %}{{ item.value.servers[server].listen[listen].ip }}:{% endif %}{{ item.value.servers[server].listen[listen].port }}{% if item.value.servers[server].listen[listen].ssl is defined and item.value.servers[server].listen[listen].ssl %} ssl{% endif %}{% if item.value.servers[server].listen[listen].opts is defined and item.value.servers[server].listen[listen].opts | length %} {{ item.value.servers[server].listen[listen].opts | join(" ") }}{% endif %};
|
||||
{% endfor %}
|
||||
server_name {{ item.value.servers[server].server_name | default('localhost') }};
|
||||
{% if item.value.servers[server].ssl is defined and item.value.servers[server].ssl %}
|
||||
|
Loading…
Reference in New Issue
Block a user