Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tasks/config/upload-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
src: "{{ item['src'] }}"
dest: "{{ item['dest'] | default('/etc/ssl/certs') }}"
backup: "{{ item['backup'] | default(true) }}"
mode: "0640"
mode: "0644"
loop: "{{ nginx_config_upload_ssl_crt }}"
notify: (Handler - NGINX Config) Run NGINX

Expand Down
16 changes: 8 additions & 8 deletions templates/http/modules.j2
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,17 @@ log_format {{ format['name'] }}{{ (' escape=' + format['escape'] | string) if fo
{% if log['access'] is defined and log['access'] is boolean and not log['access'] | bool %}
access_log {{ 'off' }};
{% elif log['access'] is defined %}
{% for log in log['access'] %}
access_log {{ 'off' if not log else log['path'] if log['path'] is defined }}{{ (' ' + log['format'] | string) if log['format'] is defined -}}
{{- (' buffer=' + log['buffer'] | string) if log['buffer'] is defined -}}
{{- ' gzip' if log['gzip'] is defined and log['access']['gzip'] is boolean and log['gzip'] | bool else (' gzip=' + log['gzip'] | string) if log['gzip'] is defined and log['gzip'] is string -}}
{{- (' flush=' + log['flush'] | string) if log['flush'] is defined -}}
{{- (' if=' + log['if']) if log['if'] is defined }};
{% for access_item in log['access'] %}
access_log {{ 'off' if not access_item else access_item['path'] if access_item['path'] is defined }}{{ (' ' + access_item['format'] | string) if access_item['format'] is defined -}}
{{- (' buffer=' + access_item['buffer'] | string) if access_item['buffer'] is defined -}}
{{- ' gzip' if access_item['gzip'] is defined and access_item['gzip'] is boolean and access_item['gzip'] | bool else (' gzip=' + access_item['gzip'] | string) if access_item['gzip'] is defined -}}
{{- (' flush=' + access_item['flush'] | string) if access_item['flush'] is defined -}}
{{- (' if=' + access_item['if']) if access_item['if'] is defined }};
{% endfor %}
{% endif %}
{% if log['error'] is defined %}{# This does not belong here but we are making an exception #}
{% for log in log['error'] if (log['error'] is not mapping and log['error'] is not string) %}
error_log {{ log if log is string else log['file'] }}{{ (' ' + log['level'] | string) if log['level'] is defined }};
{% for error_item in log['error'] if (log['error'] is not mapping and log['error'] is not string) %}
error_log {{ error_item if error_item is string else error_item['file'] }}{{ (' ' + error_item['level'] | string) if error_item['level'] is defined }};
{% else %}
error_log {{ log['error'] if log['error'] is string else log['error']['file'] }}{{ (' ' + log['error']['level'] | string) if log['error']['level'] is defined }};
{% endfor %}
Expand Down
Loading