Hello everyone,

I'm attempting to get a list of information of all my machines to send in 
an email:

*Hostname - OS (and) Version *

so essentially:

*{{ ansible_hostname }} - {{ ansible_distribution }} {{ 
ansible_distribution_version }}* 

I tried something like this but it does not work:

- name: SET FACT FOR ANSIBLE FACTS
  set_fact:
    machine_os: "{{ ansible_facts }}"
#
#
- name: DISTRIBUTION AND MAJOR VERSION
  debug:
    msg: "{% for os in machine_os %}{{ os.ansible_hostname }} - {{ 
os.ansible_distribution }} {{ os.ansible_distribution_version }}{% endfor 
%}"


Would anyone know how I could generate this list of information for all my 
machines to send via email?

-- 
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/721bdb5c-c602-48aa-a3bc-f23b65b2f73en%40googlegroups.com.

Reply via email to