diff --git a/roles/calculateEtcHosts/files/makehosts.py b/roles/calculateEtcHosts/files/makehosts.py index 208e402a9448b636dd1f61f9d2bb0c7229fc6184..179809dc737fa1d4e593ba2dfeba77d125cc99d5 100755 --- a/roles/calculateEtcHosts/files/makehosts.py +++ b/roles/calculateEtcHosts/files/makehosts.py @@ -16,7 +16,7 @@ hosts={} for group in d['groups'].keys(): i=0 for h in d['groups'][group]: - name = d['hostsvars'][h]['ansible_hostname'] + name = d['hostvars'][h]['ansible_hostname'] if not domain: hosts[h] = [name] else: