Skip to content

Commit b401deb

Browse files
authored
feat: Allow skipping config check when installing NGINX from an OS repo (#891)
1 parent e257d2e commit b401deb

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ FEATURES:
1010

1111
- Add support for installing NGINX Open Source and NGINX Plus on Alpine Linux 3.21.
1212
- Add a parameter, `nginx_distribution_package`, to override the default NGINX package name when installing NGINX from your distribution/OS repository.
13+
- Add a parameter, `nginx_skip_os_install_config_check`, to turn off the NGINX config check handler when installing NGINX from the respective distribution package manager. This should help avoid potential issues where the default NGINX config that ships with a distribution is broken for some reason.
1314

1415
BUG FIXES:
1516

defaults/main/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ nginx_static_modules: [http_ssl_module]
7171

7272
# (Optional) Specify NGINX package name when installing nginx from an 'os_repository'.
7373
# nginx_distribution_package: @nginx:1.24/common
74+
# (Optional) Skip checking the NGINX configuration file after installation when installing NGINX from your OS repository.
75+
# Not recommended unless you know what you're doing.
76+
# nginx_skip_os_install_config_check: false
7477

7578
# (Optional) Choose where to fetch the NGINX signing key from.
7679
# Default is the official NGINX signing key host.

handlers/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
ignore_errors: true
2424
check_mode: false
2525
changed_when: false
26-
when: nginx_state != 'absent'
26+
when: nginx_state != 'absent' or (nginx_install_from == 'os_repository' and nginx_skip_os_install_config_check | bool)
2727
listen: (Handler) Run NGINX
2828

2929
- name: (Handler) Print NGINX error if syntax check fails

0 commit comments

Comments
 (0)