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
This commit is contained in:
Tim Laszlo 2016-05-05 13:57:19 -05:00
parent 7fd7978e8e
commit 4b84a8c887

View File

@ -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