8b2e5653e4
Change-Id: I8ce7e11cd6027b53f1112c5880a5891c778db9d4
20 lines
612 B
YAML
20 lines
612 B
YAML
---
|
|
- name: Get failed services from Systemd
|
|
shell: >
|
|
systemctl list-units --failed --plain --no-legend --no-pager "tripleo_*"
|
|
register: systemd_state
|
|
changed_when: false
|
|
|
|
- name: Print out any failed Systemd services for tripleo_*
|
|
debug:
|
|
var: systemd_state.stdout_lines
|
|
|
|
# once ansible 2.7 is used this task should
|
|
# include the following line
|
|
# fail_msg: "the following services failed {{ systemd_state.stdout_lines }}"#
|
|
# The above debug statement should be removed at that time.
|
|
- name: Fails if we find failed systemd units
|
|
assert:
|
|
that:
|
|
- systemd_state.stdout_lines|length == 0
|