You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to override juste one setting (server_names_hash_bucket_size) in the default main template.
Comments in the file state "# Defaults are the values found in a fresh NGINX installation." so I thought enabling nginx_config_main_template_enable and just overriding the right subkey would do the trick as it would keep the others values.
This didn't work, so I commented out my modification about the custom setting and tried to apply the role with only nginx_config_main_template_enable set to true but it fails as well.
Using the role with nginx_config_main_template_enable set to true fails with default role values.
TASK [nginxinc.nginx-config : Dynamically generate NGINX main configuration file] ***********************************************************************************************************
task path: /home/xxx/ansible/yyy/roles/nginxinc.nginx-config/tasks/config/template-config.yml:37
fatal: [nginx_0]: FAILED! => {
"changed": false,
"msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'dest'"
}
I don't have any more info on which 'dict object' it fails on, as the task Dynamically generate NGINX main configuration file has fallback default values for the dest file (/etc/nginx/nginx.conf) and thus shouldn't fail.
Expected behavior
Comments say "# Defaults are the values found in a fresh NGINX installation." so it should create a standard nginx.conf file with default values.
Your environment:
main
Version of Ansible: ansible 2.9.17
Version of Jinja2: 2.11.2
Target deployment platform: Debian Buster
The text was updated successfully, but these errors were encountered:
Found the bug, and as is tradition, found a few other bugs while at it. One of them being that the # Defaults are the values found in a fresh NGINX installation comment no longer holds true. I'm hoping to have a PR ready asap. The defaults statement might still not be entirely true after the fix, but it should be closer than what it is now 😄
Hello, the PR seems to fix the issue indeed (just had to make sure to update the user to www-data as it's the default www user on Debian and the nginx user didn't exist on my system). Thanks for the quick fix : )
Describe the bug
I am trying to override juste one setting (
server_names_hash_bucket_size
) in the default main template.Comments in the file state "# Defaults are the values found in a fresh NGINX installation." so I thought enabling
nginx_config_main_template_enable
and just overriding the right subkey would do the trick as it would keep the others values.This didn't work, so I commented out my modification about the custom setting and tried to apply the role with only
nginx_config_main_template_enable
set totrue
but it fails as well.Using the role with
nginx_config_main_template_enable
set totrue
fails with default role values.To reproduce
Steps to reproduce the behavior:
I don't have any more info on which 'dict object' it fails on, as the task
Dynamically generate NGINX main configuration file
has fallback default values for the dest file (/etc/nginx/nginx.conf
) and thus shouldn't fail.Expected behavior
Comments say "# Defaults are the values found in a fresh NGINX installation." so it should create a standard
nginx.conf
file with default values.Your environment:
ansible 2.9.17
2.11.2
Debian Buster
The text was updated successfully, but these errors were encountered: