From: Ralf Jung Date: Sun, 17 Jun 2018 21:08:35 +0000 (+0200) Subject: only redirect to https if we have letsencrypt X-Git-Url: https://git.ralfj.de/ansible.git/commitdiff_plain/d69da4e51b13227263fb0f5588d65e92e4acb2d1?ds=inline only redirect to https if we have letsencrypt --- diff --git a/roles/apache/templates/000-default.conf b/roles/apache/templates/000-default.conf index 23f6f5e..0d68ad6 100644 --- a/roles/apache/templates/000-default.conf +++ b/roles/apache/templates/000-default.conf @@ -1,6 +1,10 @@ # redirect all undefined virtual hosts to {{ apache.default_host }} +{% if 'letsencrypt' in group_names %} Redirect temp / https://{{ apache.default_host }}/ +{% else %} + Redirect temp / http://{{ apache.default_host }}/ +{% endif %} {% if 'letsencrypt' in group_names %}