diff --git a/deployment/metrics/collectd-container-puppet.yaml b/deployment/metrics/collectd-container-puppet.yaml index 12b860c151..6d957f5622 100644 --- a/deployment/metrics/collectd-container-puppet.yaml +++ b/deployment/metrics/collectd-container-puppet.yaml @@ -618,9 +618,9 @@ outputs: - step|int == 1 block: - name: Check if rsyslog exists - shell: systemctl list-unit-files --type=service | grep -q rsyslog + command: systemctl list-unit-files --type=service rsyslog.service register: rsyslog_config - failed_when: rsyslog_config.rc == 2 + failed_when: rsyslog_config.rc not in [0, 1] - name: Configure if we can when: - rsyslog_config is changed