-
Notifications
You must be signed in to change notification settings - Fork 359
Description
Bug Overview
When the installation is happening on the OS with IPv6 disabled, the role stops on the config check handler:
`
RUNNING HANDLER [nginxinc.nginx : (Handler) Check NGINX] *********************************************************************************************
fatal: [host]: FAILED! => {"changed": false, "cmd": ["nginx", "-t"], "delta": "0:00:00.011838", "end": "2025-05-01 05:38:43.724383", "msg": "non-zero return code", "rc": 1, "start": "2025-05-01 05:38:43.712545", "stderr": "nginx: the configuration file /etc/nginx/nginx.conf syntax is ok\nnginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)\nnginx: configuration file /etc/nginx/nginx.conf test failed", "stderr_lines": ["nginx: the configuration file /etc/nginx/nginx.conf syntax is ok", "nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)", "nginx: configuration file /etc/nginx/nginx.conf test failed"], "stdout": "", "stdout_lines": []}
...ignoring
RUNNING HANDLER [nginxinc.nginx : (Handler) Print NGINX error if syntax check fails] *****************************************************************
fatal: [host]: FAILED! => {
"config_check['stderr_lines']": [
"nginx: the configuration file /etc/nginx/nginx.conf syntax is ok",
"nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)",
"nginx: configuration file /etc/nginx/nginx.conf test failed"
],
"failed_when_result": true
}
`
Expected Behavior
I understand the nginx.conf is coming with the package, but, the role - at least - should have the trigger to "disable" the check. The role already has the control over the service enablement and start. and the nginx_config can override the nginx.conf.
Steps to Reproduce the Bug
In the target host - disable IPv6 and call the playbook with included nginx role - using those vars:
nginx_manage_repo: false
nginx_install_from: os_repository
nginx_install_epel_release: false
nginx_start: false
Environment Details
- Target deployment platforms: Linux VM on VMware
- Target OSs: RHEL9 (IPv6 disable)
- Host OS (where you are running Ansible from): RHEL9
- Version of the NGINX Ansible role (or specific commit):
- Version of Ansible: 2.18.5
- How is Ansible being managed: CLI
- Version of Jinja2 (if you are using any templating capability): 3.1.6
Additional Context
No response