Skip to content

Commit 7ce7d1f

Browse files
authored
Fix bugged conditional check in the http/ssl.j2 Jinja2 template (#220)
1 parent 455e357 commit 7ce7d1f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ BUG FIXES:
3434
* Fix a bug when using a single `custom_directives` entry and the http template.
3535
* Fix typo in the REST API template.
3636
* Fix incorrect REST API and status log variable names in [`defaults/main/template.yml`](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/defaults/main/template.yml).
37+
* Fix bugged conditional check in the `http/ssl.j2` Jinja2 template.
3738

3839
## 0.4.2 (October 28, 2021)
3940

templates/http/ssl.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ ssl_reject_handshake {{ ssl['reject_handshake'] | ternary('on', 'off') }};
6868
{% if ssl['session_cache'] is defined %}
6969
ssl_session_cache {{ 'off' if not ssl['session_cache'] -}}
7070
{{- 'none' if (ssl['session_cache'] == 'none') -}}
71-
{{- ('builtin' if ssl['session_cache']['builtin']['enable'] is defined and ssl['session_cache']['builtin']['enable'] is boolean and ssl['session_cache']['builtin']['enable'] | bool) + (':' + ssl['session_cache']['builtin']['size'] | string) if ssl['session_cache']['builtin']['size'] is defined -}}
71+
{{- 'builtin' if ssl['session_cache']['builtin']['enable'] is defined and ssl['session_cache']['builtin']['enable'] is boolean and ssl['session_cache']['builtin']['enable'] | bool }}{{ (':' + ssl['session_cache']['builtin']['size'] | string) if ssl['session_cache']['builtin']['size'] is defined -}}
7272
{{- ('shared:' + ssl['session_cache']['shared']['name'] | string + ':' + ssl['session_cache']['shared']['size'] | string) if ssl['session_cache']['shared']['name'] is defined and ssl['session_cache']['shared']['size'] is defined }};
7373
{% endif %}
7474
{% if ssl['session_ticket_key'] is defined and ssl['session_ticket_key'] is not mapping %}
@@ -106,4 +106,4 @@ ssl_verify_client {{ (ssl['verify_client'] | ternary('on', 'off')) if ssl['verif
106106
ssl_verify_depth {{ ssl['verify_depth'] }};
107107
{% endif %}
108108

109-
{% endmacro %}
109+
{% endmacro %}

0 commit comments

Comments
 (0)