From 61e2e6bd171c0f31f0bc50e7642f4ec32f2a4df3 Mon Sep 17 00:00:00 2001
From: CVL-GitHub <jupiter.hu@monash.edu>
Date: Tue, 17 Mar 2015 16:21:07 +1100
Subject: [PATCH] commit known_host

---
 roles/setupKnownHosts/templates/known_hosts.j2 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/roles/setupKnownHosts/templates/known_hosts.j2 b/roles/setupKnownHosts/templates/known_hosts.j2
index 35ef30e1..326660a1 100644
--- a/roles/setupKnownHosts/templates/known_hosts.j2
+++ b/roles/setupKnownHosts/templates/known_hosts.j2
@@ -1,8 +1,8 @@
 {% set nodelist = [] %}
-{% for desktop in desktopNodeList %}
-{% for node in groups[desktop.name] %}
-{% if hostvars[node]['ansible_'+desktop.interface] is defined %}
-{% set host = {'name': node, 'ip': hostvars[node]['ansible_'+desktop.interface]['ipv4']['address'], 'rsa': hostvars[node]['ansible_ssh_host_key_rsa_public']} %}
+{% for node in groups['all'] %}
+{% for interface in hostvars[node]['ansible_interfaces'] %}
+{% if interface != "lo" %}
+{% set host = {'name': node, 'ip': hostvars[node]['ansible_'+interface]['ipv4']['address'], 'rsa': hostvars[node]['ansible_ssh_host_key_rsa_public']} %}
 {% if nodelist.append(host) %}
 {% endif %}
 {% endif %}
-- 
GitLab