From 6dff9930cf7a1f179ef5ecf6badcc9e72901f1a4 Mon Sep 17 00:00:00 2001 From: Matthias Dellweg Date: Mon, 2 Sep 2019 13:53:55 +0200 Subject: [PATCH] Fix test for empty list I turns out that the bool filter casts a non-empty list to false. The proper test seems to compare its length with zero. --- tasks/configure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index 3d96b15..28504a5 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -16,7 +16,7 @@ group: "{{ postgresql_group }}" mode: 0600 notify: restart postgresql - when: postgresql_hba_entries | bool + when: postgresql_hba_entries | length > 0 - name: Ensure PostgreSQL unix socket dirs exist. file: