From 41a5d0d7a2154063ec3735638d13e8253ad7e157 Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Wed, 6 Oct 2021 15:23:13 +0200 Subject: [PATCH] Run Check NGINX handler in the correct directory in BSD systems (#454) --- CHANGELOG.md | 3 ++- handlers/main.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbeaa1f..95980d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,8 @@ ENHANCEMENTS: BUG FIXES: -Always update NGINX dependencies to the latest available version to avoid outdated dependency issues (e.g. outdated CA certificates). +* Always update NGINX dependencies to the latest available version to avoid outdated dependency issues (e.g. outdated CA certificates). +* The Check NGINX handler should now be run in the correct directory in BSD systems. ## 0.21.1 (September 29, 2021) diff --git a/handlers/main.yml b/handlers/main.yml index 79601ff..bb8db49 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -16,7 +16,7 @@ - name: (Handler) Check NGINX command: nginx -t args: - chdir: /etc/nginx/ + chdir: "{{ ((ansible_facts['system'] | lower is not search('bsd')) | ternary('/etc/nginx', '/usr/local/sbin')) }}" register: config_check ignore_errors: true check_mode: false