Skip to content
Snippets Groups Projects
Commit 05c73be5 authored by jurgenhaas's avatar jurgenhaas
Browse files

Merge branch 'master' into 'master'

Master

See merge request ansible-roles/drupal!6
parents 28abc2c3 54b60763
No related branches found
No related tags found
1 merge request!6Master
......@@ -90,18 +90,33 @@
AuthType {{ drupal_domain.apache_auth.type }}
AuthName "{{ drupal_domain.apache_auth.name }}"
AuthUserFile {{ webRoot }}/passwords/{{ drupal_domain.apache_auth.user }}
{% if drupal_domain.apache_auth.extra_users is defined %}
{% if drupal_domain.apache_auth.ips is defined %}
{% for ip in drupal_domain.apache_auth.ips %}
SetEnvIF X-Forwarded-For ^{{ ip|regex_escape() }}$ AllowIP
{% endfor %}
{% endif %}
{% if drupal_domain.apache_auth.extra_users is defined or drupal_domain.apache_auth.ips is defined %}
<RequireAny>
{% if drupal_domain.apache_auth.extra_users is defined %}
{% for user in drupal_domain.apache_auth.extra_users %}
{% if user.expression is defined %}
<RequireAll>
Require expr "{{ user.expression }}"
Require user {{ user.user }}
</RequireAll>
{% else %}
Require user {{ user.user }}
{% endif %}
{% endfor %}
<RequireAll>
Require {% if drupal_domain.apache_auth.password is defined %}user {{ drupal_domain.apache_auth.user }}{% else %}all granted{% endif %}
{% endif %}
{% if drupal_domain.apache_auth.ips is defined %}
Require env AllowIP
{% for ip in drupal_domain.apache_auth.ips %}
Require ip {{ ip }}
{% endfor %}
{% endif %}
Require {% if drupal_domain.apache_auth.password is defined %}user {{ drupal_domain.apache_auth.user }}{% else %}all granted{% endif %}
</RequireAll>
</RequireAny>
{% else %}
Require user {{ drupal_domain.apache_auth.user }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment