I get some meaningless error logs when some commands fail. Do I have an option to print just a message saying Failed?

0 votes
I get some meaningless error logs when some commands fail. Do I have an option to print just a message saying Failed?
Feb 7 in Ansible by Emily
18 views

1 answer to this question.

0 votes

Ansible provides a way to specify this behavior as follows:

- name: Fail task when the command error output prints FAILED
  command: /usr/bin/example-command -x -y -z
  register: command_result
  failed_when: "'FAILED' in command_result.stderr
answered Feb 7 by Pragya

Related Questions In Ansible

0 votes
2 answers
0 votes
1 answer
0 votes
1 answer

How do I configure a jump host to access servers that I have no direct access to?

You can set a ProxyCommand in the ansible_ssh_common_args inventory variable. Any ...READ MORE

answered Jan 30 in Ansible by Mahir
125 views
+13 votes
2 answers
0 votes
1 answer
+1 vote
1 answer
0 votes
1 answer