Skip to content
Snippets Groups Projects
Commit f3ca6842 authored by Chris Hines's avatar Chris Hines
Browse files

fix up dodgy script for calculating etc/hosts

parent dc2dd77a
No related branches found
No related tags found
No related merge requests found
......@@ -16,10 +16,11 @@ hosts={}
for group in d['groups'].keys():
i=0
for h in d['groups'][group]:
name = d['hostsvars'][h]['ansible_hostname']
if not domain:
hosts[h] = [h]
hosts[h] = [name]
else:
hosts[h] = ['%s.%s %s'%(h,domain,h)]
hosts[h] = ['%s.%s %s'%(name,domain,name)]
for h in hosts.keys():
if d['hostvars'].has_key(h):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment