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
53 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
27 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
29 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
47 views
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
72 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
768 views