hosts.j2 385 B

123456789
  1. # Archivo /etc/hosts generado por Ansible
  2. # Contenido actual del archivo /etc/hosts
  3. {{ current_hosts_content }}
  4. # Información de todos los hosts del inventario
  5. {% for host in groups['computers'] %}
  6. {{ hostvars[host]['ansible_facts']['enp0s8']['ipv4']['address'] }} {{ hostvars[host]['ansible_hostname'] }} {{ host }} {{ hostvars[host]['ansible_fqdn'] | default('') }}
  7. {% endfor %}