there is a typo in line 7 of templates/http/api.conf.j2
Closed this issue · 1 comments
Describe the bug
A clear and concise description of what the bug is.
there is a typo in line 7 of templates/http/api.conf.j2, in a result, the format can never been appended to the access_log line
the value: (status_rest_api_log)
nginx_config_status_rest_api_log['format']
should be (rest_api_access_log)
nginx_config_rest_api_access_log['format']
this is the line:
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 }};
besides, it is "name" vs "format" in the defaults/main/template.yml , you may also want to make it consistent. (as well as location vs path)
nginx_config_rest_api_access_log: # Optional -- Set to 'false' and remove/comment nested variables to disable access log
location: /var/log/nginx/api_access.log # Required
name: main # Required
To reproduce
Steps to reproduce the behavior:
- Deploy NGINX Config role using playbook.yml
- View output/logs/configuration on '...'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Your environment
- Version of the NGINX Config role or specific commit
- Version of Ansible
- Version of Jinja2 (if you are using any templating capability)
- Target deployment platform
Additional context
Add any other context about the problem here.
Good catch!
The naming is inconsistent since I am in the middle of refactoring the whole config engine (http is done, working on streams atm). That being said, while fixing this bug I can def bring the naming conventions for these parameters up to par.
P.S.: I am relatively busy these days so PRs are more than welcome -- this issue should be an 'easy' fix 😄