From 935472fc5089e03d9f30c7cc942ad757d70bfb4f Mon Sep 17 00:00:00 2001 From: Paulo Edgar Castro Date: Mon, 29 Jul 2024 01:44:15 +0100 Subject: [PATCH] fix: Correct runtime error during cleanup task (#429) --- CHANGELOG.md | 1 + tasks/config/cleanup-config.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab312779..378bfa2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ FEATURES: BUG FIXES: - Fix incompatibility when using the `listen` directive and setting both the `quic` and `so_keepalive` parameters. +- Correct cleanup error when `nginx_config_cleanup_paths` is not defined. TESTS: diff --git a/tasks/config/cleanup-config.yml b/tasks/config/cleanup-config.yml index 335fb967..c8783c85 100644 --- a/tasks/config/cleanup-config.yml +++ b/tasks/config/cleanup-config.yml @@ -12,5 +12,6 @@ ansible.builtin.file: path: "{{ item }}" state: absent - loop: "{{ nginx_config_files['results'] | map(attribute='files') | sum(start=[]) | map(attribute='path') | list + nginx_config_cleanup_files | default('') | list }}" + loop: "{{ nginx_config_files['results'] | default('') | map(attribute='files') | sum(start=[]) | map(attribute='path') | list + nginx_config_cleanup_files | default('') | list }}" notify: (Handler - NGINX Config) Run NGINX + when: nginx_config_cleanup_files is defined or nginx_config_cleanup_paths is defined