/etc/hosts
1.1.1.1 test.example.com
DNS
2.2.2.2 test.example.com
I use below function get hosts ip address, i want get dns ip address ,when someone modify my hosts error ip, puppet facter get correct ip to overwrite
IOSocket.getaddress('test.example.com')