I have a task in my playbook where it runs against multiple servers.
I need to get the hostname of all servers where my task failed and append 
it to a variable as a list.
Please assist how to get this.

---
- name: GET OS DETAILS
hosts: all
tasks:
- name: GET
shell: lsb_release -a | grep Release ; uname -r ; uptime
register: cmd_out

- debug:
msg:
- OS Version: "{{ ansible_distribution_version }}"
- Kernel Version: "{{ ansible_kernel }}"
- Uptime: "{{ facter_system_uptime.uptime }}"


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/975ea1de-bad2-4a91-b97a-1196efaa9c3a%40googlegroups.com.

Reply via email to