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, 2019 in Ansible by Emily
995 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, 2019 by Pragya

Related Questions In Ansible

0 votes
2 answers
0 votes
1 answer

How do I get an ENV variable and store it into a local variable - Ansible

Hey @Ninja, that is possible. What you ...READ MORE

answered Jan 24, 2019 in Ansible by Thomas
2,600 views
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 31, 2019 in Ansible by Mahir
10,984 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,040 views
+2 votes
1 answer
+1 vote
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP