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, 2019 in Ansible by Hina
1,198 views

1 answer to this question.

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, 2019 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, 2019 in Ansible by Alia
112 views
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,850 points
76 views
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, 2019 in Ansible by Vijay
380 views
0 votes
1 answer
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,420 points
497 views
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, 2019 in Ansible by Barbara
407 views
0 votes
1 answer

Execute shell commands using Ansible

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

answered Jan 24, 2019 in Ansible by Ayaan
2,589 views