diff --git a/docker/services/xinetd.yaml b/docker/services/xinetd.yaml index 7803052ef2..07aa4040ca 100644 --- a/docker/services/xinetd.yaml +++ b/docker/services/xinetd.yaml @@ -47,9 +47,24 @@ outputs: config_image: '' config_settings: {} upgrade_tasks: + - when: step|int == 0 + tags: common + block: + - name: Check if xinetd service is deployed + ignore_errors: True + command: systemctl is-enabled --quiet xinetd + register: xinetd_enabled_result + - name: Set fact xinetd_enabled + set_fact: + xinetd_enabled: "{{ xinetd_enabled_result.rc == 0 }}" + - name: "PreUpgrade step0,validation: Check if xinetd is running" + command: systemctl is-active --quiet xinetd + when: xinetd_enabled|bool + tags: validation - when: step|int == 2 block: - name: stop and deactivate xinetd service + when: xinetd_enabled|bool service: name: xinetd state: stopped