summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed AbdelHalim <[email protected]>2026-06-14 01:56:50 +0200
committerAhmed AbdelHalim <[email protected]>2026-06-14 01:56:50 +0200
commit6f0a83261a73808fd7d4ace408140bed2775c359 (patch)
tree1c955dc89727fc3facdea8264724a199d061310c
parente3d194e1b02b30a3bb4e7c048977982b4ab7d970 (diff)
Fix pihole nginx condition always evaluating true when disabled
`false != ""` is True in Jinja2 — nginx config was created even when `pihole_by_nginx: false`. Use `| bool` filter to coerce correctly.
-rw-r--r--roles/pihole/tasks/main.yml2
1 files changed, 1 insertions, 1 deletions
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/ {