Answer the question
In order to leave comments, you need to log in
How to restart the server using Ansible if the status in stdout is FAILED?
I am doing the role, I need Ansible to restart the server if, when executing the command, at least one element in the status is FAILED.
The command itself displays a small table:
NAME | STATUS
module FAILED
Code:
- name: debug
debug:
msg: command.stdout_lines
This code prints the big picture. I didn't find anything in the documentation. I will be glad if you can help.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question