Duplicate Hosts

I have hosts I’m running Ansible playbooks against. To connect to them, I’m using their public IP addresses. At the completion of the playbook run, I’ve seen new hosts being created using their private IP addresses. What’s the correct way to set this up so I avoid duplicates hosts? Should I be configuring multiple interfaces on each host so they don’t create new hosts?

there was a previously reported problem with duplicate hosts (#22279), which should be fixed in foreman_ansible 2.3.0. I haven’t tried to autocreate hosts with multiple interfaces in Foreman by running Ansible, but if you experience this behaviour on 2.3, then it is a bug that needs to be fixed.

1 Like