Skip to content

Commit 455e357

Browse files
authored
Fix typo in REST API template (#218)
1 parent 01e544b commit 455e357

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ FEATURES:
3131

3232
BUG FIXES:
3333

34-
Fix a bug when using a single `custom_directives` entry and the http template
34+
* Fix a bug when using a single `custom_directives` entry and the http template.
35+
* Fix typo in the REST API template.
36+
* 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).
3537

3638
## 0.4.2 (October 28, 2021)
3739

defaults/main/template.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -678,8 +678,8 @@ nginx_config_status_file_location: /etc/nginx/conf.d/status.conf
678678
nginx_config_status_backup: true
679679
nginx_config_status_port: 8080 # Optional -- Defaults to 8080
680680
nginx_config_status_access_log: # Optional -- Set to 'false' and remove/comment nested variables to disable access log
681-
location: /var/log/nginx/access.log # Required
682-
name: main # Required
681+
path: /var/log/nginx/access.log # Required
682+
format: main # Required
683683
nginx_config_status_allow: # Optional
684684
- 127.0.0.1
685685
nginx_config_status_deny: # Optional
@@ -695,8 +695,8 @@ nginx_config_rest_api_backup: true
695695
nginx_config_rest_api_port: 8080 # Optional-- Defaults to 8080
696696
nginx_config_rest_api_write: false # Optional
697697
nginx_config_rest_api_access_log: # Optional -- Set to 'false' and remove/comment nested variables to disable access log
698-
location: /var/log/nginx/access.log # Required
699-
name: main # Required
698+
path: /var/log/nginx/access.log # Required
699+
format: main # Required
700700
nginx_config_rest_api_allow: # Optional
701701
- 127.0.0.1
702702
nginx_config_rest_api_deny: # Optional

templates/http/api.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
server {
55
listen {{ nginx_config_rest_api_port | default('8080') }};
66
{% if nginx_config_rest_api_access_log is defined %}
7-
access_log{{ ' off' if not nginx_config_rest_api_access_log }}{{ (' ' + nginx_config_rest_api_access_log['path']) if nginx_config_rest_api_access_log['path'] is defined }}{{ (' ' + nginx_config_rest_api_access_log['format']) if nginx_config_status_rest_api_log['format'] is defined }};
7+
access_log{{ ' off' if not nginx_config_rest_api_access_log }}{{ (' ' + nginx_config_rest_api_access_log['path']) if nginx_config_rest_api_access_log['path'] is defined }}{{ (' ' + nginx_config_rest_api_access_log['format']) if nginx_config_rest_api_log['format'] is defined }};
88
{% endif %}
99
location /api {
1010
{% if nginx_config_rest_api_write is defined %}

0 commit comments

Comments
 (0)