Skip to content

Commit caf7a77

Browse files
authored
Merge pull request #1746 from ohauer/patch/prepare_for_linux-virtual
Ansible: stop rsyslog only if installed
2 parents bb93485 + 63ac378 commit caf7a77

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

images/capi/ansible/roles/sysprep/tasks/debian.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,14 @@
5353
state: absent
5454
when: http_proxy is defined or https_proxy is defined
5555

56+
- name: Get installed service
57+
ansible.builtin.service_facts:
58+
5659
- name: Stop auditing
5760
ansible.builtin.service:
5861
name: rsyslog
5962
state: stopped
63+
when: "'rsyslog' in services"
6064

6165
- name: Remove apt package caches
6266
ansible.builtin.apt:

0 commit comments

Comments
 (0)