Commit 26f9a7b6 authored by Oyvind.Gjesdal's avatar Oyvind.Gjesdal
Browse files

add first item in results array, skipped, fall back to default false if...

add first item in results array, skipped, fall back to default false if skipped not set. Always redirect if ssl is true, regardless of type
parent f6387be7
......@@ -44,12 +44,12 @@
- name: "include digicert-uib"
include_tasks: "uib_ssl.yml"
# don't include if debug task was skipped (no items with uib type)
when: "not apache_vhost_has_ssl_digicert.results.skipped | bool"
when: "not apache_vhost_has_ssl_digicert.results[0].skipped | default(false) | bool"
#check if some vhost has certbot set for ssl
- name: Include local tasks for ssl template and certbot
include_tasks: "certbot_ssl.yml"
when: "not apache_vhost_has_ssl_certbot.results.skipped | bool"
when: "not apache_vhost_has_ssl_certbot.results[0].skipped | default(false) | bool"
# check if some vhost as uib set for ssl
- name: Add apache vhosts configuration.
......
......@@ -42,7 +42,7 @@ Require all denied
{% endif %}
{%endif %}
{% if vhost.ssl is defined and vhost.ssl == true and (digicert_certificate is defined or (vhost.ssl_type=='uib' or vhosts.ssl_type is undefined)) %}
{% if vhost.ssl is defined and vhost.ssl == true %}
{{ vhost.http_only_extra_parameters | default('') }}
Redirect Permanent / https://{{ vhost.servername }}/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment