Skip to content

Commit 21e03b2

Browse files
authored
Adding nginx_main_template.http_custom_includes (#270)
1 parent 902d4ff commit 21e03b2

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

defaults/main/template.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ nginx_main_template:
4949
types: "text/html"
5050
# custom_options: []
5151
# http_custom_options: []
52+
# http_custom_includes: []
5253
# events_custom_options: []
5354
stream_enable: false
5455
# stream_custom_options: []

molecule/common/playbook_template.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
- master_process on;
4545
http_custom_options:
4646
- aio off;
47+
http_custom_includes:
48+
- "/etc/nginx/sites-enabled/*.conf"
4749
events_custom_options:
4850
- accept_mutex off;
4951
stream_enable: true

templates/nginx.conf.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ http {
119119
{% endfor %}
120120
{% endif %}
121121
include /etc/nginx/conf.d/*.conf;
122+
{% if nginx_main_template.http_custom_includes is defined and nginx_main_template.http_custom_includes | length %}
123+
{% for inline_include in nginx_main_template.http_custom_includes %}
124+
include {{ inline_include }};
125+
{% endfor %}
126+
{% endif %}
122127
}
123128
{% endif %}
124129

0 commit comments

Comments
 (0)