diff --git a/defaults/main.yml b/defaults/main.yml index 3eb137c..79ce2b5 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -87,8 +87,6 @@ nginx_basic_auth_users: [] nginx_webroot: /usr/share/nginx/html nginx_letsencrypt_managed: True nginx_websockets_support: False -# Set it to 'ssl http2' if the nginx version supports it -nginx_ssl_type: ssl # When we do not use letsencrypt: # nginx_ssl_cert_file: '{{ pki_dir }}/certs/nginx.crt' # nginx_ssl_cert_key: '{{ pki_dir }}/keys/nginx.key' diff --git a/templates/nginx-virthost.j2 b/templates/nginx-virthost.j2 index d5f52b9..9303f0c 100644 --- a/templates/nginx-virthost.j2 +++ b/templates/nginx-virthost.j2 @@ -187,11 +187,7 @@ server { {% if item.ssl_enabled %} server { - {% if item.https_port is defined %} - listen {{ item.https_port }} {{ nginx_ssl_type }}; - {% else %} - listen {{ https_port | default('443') }} {{ nginx_ssl_type }}; - {% endif %} + listen {% if item.https_port is defined %} {{ item.https_port }} {% else %} {{ https_port | default('443') }} {% endif %} ssl {% if ansible_distribution_release != "trusty" %} http2{% endif %}; server_name {{ item.server_name }} {% if item.serveraliases is defined %}{{ item.serveraliases }}{% endif %}; {% if item.access_log is defined %}