go test
{"level":"info","msg":"Disabled Ansible-Puller","time":"2019-09-09T15:45:47-07:00"}
Running Suite: Ansible Puller Suite
===================================
Random Seed: 1568069147
Will run 12 of 12 specs
••••••••••••
Ran 12 of 12 Specs in 0.017 seconds
SUCCESS! -- 12 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS
ok github.com/teslamotors/ansible_puller 0.670s
With that code change, the execution will try to find the different ips of a host in the inventory and fallback to the hostname:
Sep 09 15:19:45 [...] time="2019-09-09T15:19:45-07:00" level=debug msg="Did not find 10.235.7.9 in inventory [...]"
[...]
Sep 09 15:19:50 [...] time="2019-09-09T15:19:50-07:00" level=debug msg="Did not find fe80::9:9cff:fec3:f43a in inventory [...]"
[...]
Sep 09 15:19:55 [...] time="2019-09-09T15:19:55-07:00" level=debug msg="Found ip-10-235-7-9.cn-north-1.compute.internal in inventory [...]"
With that code change, the execution will try to find the different ips of a host in the inventory and fallback to the hostname: