Create a container using this image.
docker run -it <image_id> /bin/bash
Verify ansible is working using below command.
ansible local -m ping -u root -k
Note: Default password for root user is docker
Add extra hosts in the /etc/ansible/ansible.cfg file.