Skip to content

Commit 06b8f5a

Browse files
authored
Remove semicolons from custom_options (#259)
This will fix custom blocks such as `if` blocks not working as intended unless a comment sign is added at the end of each line
1 parent 55c2f53 commit 06b8f5a

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

molecule/common/playbook_template.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,11 @@
298298
html_file_location: /usr/share/nginx/html
299299
autoindex: false
300300
custom_options:
301-
- fastcgi_split_path_info ^(.+\.php)(/.+)$
302-
- fastcgi_pass unix:/run/php/php7.2-fpm.sock
303-
- fastcgi_index index.php
304-
- include fastcgi_params
305-
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name
301+
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
302+
- fastcgi_pass unix:/run/php/php7.2-fpm.sock;
303+
- fastcgi_index index.php;
304+
- include fastcgi_params;
305+
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
306306
sub_filter:
307307
# sub_filters: []
308308
last_modified: "off"

templates/http/default.conf.j2

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ upstream {{ item.value.upstreams[upstream].name }} {
1717
{% endif %}
1818
{% if item.value.upstreams[upstream].custom_options is defined and item.value.upstreams[upstream].custom_options | length %}
1919
{% for inline_option in item.value.upstreams[upstream].custom_options %}
20-
{{ inline_option }};
20+
{{ inline_option }}
2121
{% endfor %}
2222
{% endif %}
2323
}
@@ -72,7 +72,7 @@ auth_request_set {{ item.value.auth_request_set_http.name }} {{ item.value.auth_
7272

7373
{% if item.value.custom_options is defined and item.value.custom_options | length %}
7474
{% for inline_option in item.value.custom_options %}
75-
{{ inline_option }};
75+
{{ inline_option }}
7676
{% endfor %}
7777
{% endif %}
7878

@@ -181,7 +181,7 @@ server {
181181
{% endif %}
182182
{% if item.value.servers[server].custom_options is defined and item.value.servers[server].custom_options | length %}
183183
{% for inline_option in item.value.servers[server].custom_options %}
184-
{{ inline_option }};
184+
{{ inline_option }}
185185
{% endfor %}
186186
{% endif %}
187187

@@ -370,7 +370,7 @@ server {
370370
{% endif %}
371371
{% if item.value.servers[server].reverse_proxy.locations[location].custom_options is defined and item.value.servers[server].reverse_proxy.locations[location].custom_options | length %}
372372
{% for inline_option in item.value.servers[server].reverse_proxy.locations[location].custom_options %}
373-
{{ inline_option }};
373+
{{ inline_option }}
374374
{% endfor %}
375375
{% endif %}
376376
{% if (item.value.servers[server].reverse_proxy.health_check_plus is defined) and item.value.servers[server].reverse_proxy.health_check_plus %}
@@ -403,7 +403,7 @@ server {
403403
{% endif %}
404404
{% if item.value.servers[server].web_server.locations[location].custom_options is defined and item.value.servers[server].web_server.locations[location].custom_options | length %}
405405
{% for inline_option in item.value.servers[server].web_server.locations[location].custom_options %}
406-
{{ inline_option }};
406+
{{ inline_option }}
407407
{% endfor %}
408408
{% endif %}
409409
{% if item.value.servers[server].web_server.locations[location].proxy_hide_headers is defined %}

templates/nginx.conf.j2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ worker_rlimit_nofile {{ nginx_main_template.worker_rlimit_nofile }};
4040

4141
{% if nginx_main_template.custom_options is defined and nginx_main_template.custom_options | length %}
4242
{% for inline_option in nginx_main_template.custom_options %}
43-
{{ inline_option }};
43+
{{ inline_option }}
4444
{% endfor %}
4545
{% endif %}
4646

@@ -52,7 +52,7 @@ events {
5252
worker_connections {{ nginx_main_template.worker_connections }};
5353
{% if nginx_main_template.events_custom_options is defined and nginx_main_template.events_custom_options | length %}
5454
{% for inline_option in nginx_main_template.events_custom_options %}
55-
{{ inline_option }};
55+
{{ inline_option }}
5656
{% endfor %}
5757
{% endif %}
5858
}
@@ -115,7 +115,7 @@ http {
115115
{% endif %}
116116
{% if nginx_main_template.http_custom_options is defined and nginx_main_template.http_custom_options | length %}
117117
{% for inline_option in nginx_main_template.http_custom_options %}
118-
{{ inline_option }};
118+
{{ inline_option }}
119119
{% endfor %}
120120
{% endif %}
121121
include /etc/nginx/conf.d/*.conf;
@@ -126,7 +126,7 @@ http {
126126
stream {
127127
{% if nginx_main_template.stream_custom_options is defined and nginx_main_template.stream_custom_options | length %}
128128
{% for inline_option in nginx_main_template.stream_custom_options %}
129-
{{ inline_option }};
129+
{{ inline_option }}
130130
{% endfor %}
131131
{% endif %}
132132
include /etc/nginx/conf.d/stream/*.conf;

templates/stream/default.conf.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ upstream {{ item.value.upstreams[upstream].name }} {
1717
{% endif %}
1818
{% if item.value.upstreams[upstream].custom_options is defined and item.value.upstreams[upstream].custom_options | length %}
1919
{% for inline_option in item.value.upstreams[upstream].custom_options %}
20-
{{ inline_option }};
20+
{{ inline_option }}
2121
{% endfor %}
2222
{% endif %}
2323
}
@@ -26,7 +26,7 @@ upstream {{ item.value.upstreams[upstream].name }} {
2626

2727
{% if item.value.custom_options is defined and item.value.custom_options | length %}
2828
{% for inline_option in item.value.custom_options %}
29-
{{ inline_option }};
29+
{{ inline_option }}
3030
{% endfor %}
3131
{% endif %}
3232

@@ -105,7 +105,7 @@ server {
105105
{% endif %}
106106
{% if item.value.network_streams[stream].custom_options is defined and item.value.network_streams[stream].custom_options | length %}
107107
{% for inline_option in item.value.network_streams[stream].custom_options %}
108-
{{ inline_option }};
108+
{{ inline_option }}
109109
{% endfor %}
110110
{% endif %}
111111
}

0 commit comments

Comments
 (0)