[ssh_known_hosts] On ne met l'ipv6 que si elle apparait dans le dns

This commit is contained in:
Valentin Samir 2014-02-10 16:44:36 +01:00
parent 59ca939517
commit 2670b242a3

View file

@ -26,8 +26,9 @@ for machine in machines:
key_machines[key.value].add('.'.join(domains[0:2]))
for ip in machine['ipHostNumber']:
key_machines[key.value].add("%s" % ip)
for ip in machine['ip6HostNumber']:
key_machines[key.value].add("%s" % ip)
if len(machine.get('dnsIpv6', []))<1 or machine['dnsIpv6'][0].value:
for ip in machine['ip6HostNumber']:
key_machines[key.value].add("%s" % ip)
# On trie pour avoir des diff valident en appliquant bcfg2 sur les machines
output=[]