simple IP lookup plugin

HI!

Is there a simple example module how to implement an ansible (connection) plugin for looking up an IP address for establishing the SSH connection?

I have a deployment where no DNS entries are present prior to initial host configuration, but I can access another (LDAP) database to query the IP address by inventory_hostname.

Not sure whether I need a full-blown connection plugin [1] for this.

Ciao, Michael.

[1] https://docs.ansible.com/ansible/latest/plugins/connection.html

It probably easier to create[1] you own inventory plugin[2] so you can populate the ansible_host with the IP.

[1] https://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html
[2] https://docs.ansible.com/ansible/latest/plugins/inventory.html

Yes, you're right. I have this working now after I figured out to set
'inventory_plugins' in ansible.cfg and some other details.

Thank you.

Ciao, Michael.