Skip to content

Commit e92e632

Browse files
author
Pierre Buyle
committed
Support inclusion of additional configuration file per site.
1 parent 1991d08 commit e92e632

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,11 @@ The following variables are available to configure the role:
9898
- **limit_conn**: (optional) The limit_conn for the site (defaults to
9999
```arbeit 32```).
100100
- **enabled**: Whether or not the site should be enabled (defaults to true).
101-
* **rewrites**: A list of rewrites directives, using the following structure:
101+
- **rewrites**: (optional) A list of rewrites directives, using the following structure:
102102
- **regex**: The regular expression used to match the URI.
103103
- **replacement**: The replacement pattern used for the rewrite.
104-
- **flags**: (optiona) The flag parameter for the rewrite.
104+
- **flags**: (optional) The flag parameter for the rewrite.
105+
- **includes**: (optional) A list of additional Nginx configuration files to incldue for the site.
105106

106107

107108
Examples

templates/sites-available/drupal-site.j2

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ server {
6767
{% endfor %}
6868
{%- endif %}
6969

70+
{% if item.includes is defined %}
71+
## Custom include(s)
72+
{% for include in item.includes %}
73+
include {{ include }};
74+
{% endfor %}
75+
{% endif %}
76+
7077

7178
{% if not nginx_drupal_use_boost -%}
7279
{% if not nginx_drupal_escape_uri -%}
@@ -245,6 +252,13 @@ server {
245252
{% endfor %}
246253
{%- endif %}
247254

255+
{% if item.includes is defined %}
256+
## Custom include(s)
257+
{% for include in item.includes %}
258+
include {{ include }};
259+
{% endfor %}
260+
{% endif %}
261+
248262
{% if not nginx_drupal_use_boost -%}
249263
{% if not nginx_drupal_escape_uri -%}
250264
################################################################

0 commit comments

Comments
 (0)