Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Commit 3357181

Browse files
authored
Merge pull request #2613 from codeenigma/71968-fluent-bit-role-PR-2.x
71968 fluent bit role pr 2.x
2 parents d1bd429 + fbe622e commit 3357181

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

roles/debian/postfix/tasks/main.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,13 @@
150150
pkill -HUP rsyslogd || true
151151
when: is_local
152152

153-
- name: Restart rsyslog using systemd to apply postfix changes (if is_local is false).
154-
ansible.builtin.systemd_service:
155-
name: rsyslog.service
153+
- name: Restart systemd service if it exists to apply postfix changes (if is_local is false).
154+
service:
156155
state: restarted
157-
when: is_local is not defined or not is_local
156+
name: rsyslog.service
157+
when:
158+
- ansible_facts['services']['rsyslog.service']['status'] | default('not-found') != 'not-found'
159+
- is_local is not defined or not is_local
158160

159161
# Needed for Docker.
160162
- name: Manage Postfix Service.

0 commit comments

Comments
 (0)