first biuld it:
docker build -t ansible-in-docker .
and simple use:
docker run -it --rm ansible-in-docker
use with mount volume:(for example all hosts.ini and config and play book in current directory)
docker run -it --rm -v `pwd`:/work ansible-in-docker
in this container exist ssh , tmux , nano
you can change or add to it in dockerfile for example change nano to vim :)
write script for use it easy for example:
ansible-run foo.yaml