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