From bd34500c63adb8ef156de7dab8a7a5ed688987db Mon Sep 17 00:00:00 2001 From: Tim Laszlo Date: Thu, 5 May 2016 13:57:19 -0500 Subject: [PATCH] Use task state instead of output to create haproxy log directory Use the previous tasks changed state to create haproxy log directories. Both use the same "log_dir.rc != 0" logic. This allows the play to run in check mode. Change-Id: I731ea1ec7822266cd9a433b328e5dc5cdd0a205a --- tasks/haproxy_pre_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/haproxy_pre_install.yml b/tasks/haproxy_pre_install.yml index adea927..1476b27 100644 --- a/tasks/haproxy_pre_install.yml +++ b/tasks/haproxy_pre_install.yml @@ -35,7 +35,7 @@ mode: "{{ item.mode|default('0755') }}" with_items: - { path: "/var/log/haproxy" } - when: log_dir.rc != 0 + when: log_dir | changed tags: - haproxy-dirs - haproxy-logs