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
303 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 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
51 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,810 points
41 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 in Ansible by Vijay
132 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,380 points
204 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 in Ansible by Barbara
156 views
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
1,659 views