Merge "Add a fact checking xinetd service present"

This commit is contained in:
Zuul 2018-09-29 07:46:13 +00:00 committed by Gerrit Code Review
commit e2b7890fc5
1 changed files with 15 additions and 0 deletions

View File

@ -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