Get ansible commands return value

0 votes
I need to get the return value of all ansible commands, can I write a playbook for this?
Feb 4 in Ansible by Hina

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey @Hina, you can add the following lines in your playbook

- stat: path=/path/to/file
  register: st

- debug: var=st
answered Feb 4 by Diana

Related Questions In Ansible

0 votes
1 answer

Return values of Ansible Commands

Hey @Rani, you could try something like ...READ MORE

answered Apr 2 in Ansible by Alia
0 votes
1 answer

stopping different hosts from reading the same value when usign ansible in loop

Try using this. Create a new directory ...READ MORE

answered Jul 27, 2018 in Ansible by DareDev
• 6,560 points
0 votes
1 answer

Is it possible to run commands on ansible host?

If you just trying to run a ...READ MORE

answered Jan 9 in Ansible by Vijay
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Run Ansible adhoc commands in sequence

Hey @Thomas, by default ansible runs these ...READ MORE

answered Jan 14 in Ansible by Barbara
0 votes
1 answer

Execute shell commands using Ansible

You can use a playbook for this ...READ MORE

answered Jan 24 in Ansible by Ayaan

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.