Lxd and ansible integration

I wondering if it’s possible to manage and configure lxd containers using ansible
for example ansible ssh to containers and run playbooks like installing some dependencies on the containers
if that’s possible
Is there a way to automatically get the ip addresses of containers (inventory) so that I dont need each time to add the ip address to the inventory so that ansible manage the containers

Seems related to Issue with ansible to access lxd container