From 9a36edb320d95999a5de5a8a26551e728f1d306a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Tue, 9 Apr 2019 08:06:12 +0200 Subject: [PATCH] Ensure we get rsyslog state, even in "--check" mode Introduced with Ia615ac07d0c559deb65e307bb6254127e989794d, an issue can be hit when deploy is launched with dry-run mode. Change-Id: I5851dc7820fdcc4f5790980d94b81622ce3b0c8d Related-Bug: #1823841 --- deployment/haproxy/haproxy-container-puppet.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deployment/haproxy/haproxy-container-puppet.yaml b/deployment/haproxy/haproxy-container-puppet.yaml index ba51051bf1..6d8df792ee 100644 --- a/deployment/haproxy/haproxy-container-puppet.yaml +++ b/deployment/haproxy/haproxy-container-puppet.yaml @@ -322,7 +322,9 @@ outputs: - name: Check if rsyslog exists shell: systemctl is-active rsyslog register: rsyslog_config - - when: rsyslog_config.rc == 0 + - when: + - rsyslog_config is defined + - rsyslog_config.rc == 0 block: - name: Forward logging to haproxy.log file blockinfile: