diff --git a/roles/rsyslog/tasks/main_core.yml b/roles/rsyslog/tasks/main_core.yml index 4ab28ada..0cc23aad 100644 --- a/roles/rsyslog/tasks/main_core.yml +++ b/roles/rsyslog/tasks/main_core.yml @@ -379,19 +379,11 @@ systemd: name: rsyslog.service enabled: false + state: "{{ 'stopped' if __logging_is_booted else omit }}" when: - not __rsyslog_enabled | bool - not rsyslog_in_image | default(false) | bool - - name: Stop rsyslog service - systemd: - name: rsyslog.service - state: stopped - when: - - __logging_is_booted - - not __rsyslog_enabled | bool - - not rsyslog_in_image | default(false) | bool - - name: Check rsyslog version debug: msg: "Rsyslog version must be >= 8.37.0-7.2"