From 4b84a8c887356bb123d44d7337748935cb817d28 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 --- playbooks/roles/haproxy_server/tasks/haproxy_pre_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/roles/haproxy_server/tasks/haproxy_pre_install.yml b/playbooks/roles/haproxy_server/tasks/haproxy_pre_install.yml index adea927896..1476b27e0e 100644 --- a/playbooks/roles/haproxy_server/tasks/haproxy_pre_install.yml +++ b/playbooks/roles/haproxy_server/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