From 6f0a83261a73808fd7d4ace408140bed2775c359 Mon Sep 17 00:00:00 2001 From: Ahmed AbdelHalim Date: Sun, 14 Jun 2026 01:56:50 +0200 Subject: Fix pihole nginx condition always evaluating true when disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `false != ""` is True in Jinja2 — nginx config was created even when `pihole_by_nginx: false`. Use `| bool` filter to coerce correctly. --- roles/pihole/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/pihole/tasks/main.yml b/roles/pihole/tasks/main.yml index 4888e578..52ccafcf 100644 --- a/roles/pihole/tasks/main.yml +++ b/roles/pihole/tasks/main.yml @@ -151,7 +151,7 @@ - name: "Create pihole nginx configurations" become: true - when: pihole_by_nginx is defined and pihole_by_nginx != "" + when: pihole_by_nginx is defined and pihole_by_nginx | bool ansible.builtin.copy: content: | location /admin/ { -- cgit v1.2.3