Ansible Playbook example with multiple docker container Requirements docker 1.11+ ansible v2+ Build and run docker container git clone https://github.com/vedata/ansible-apache.git cd ansible-apache docker build -t ssh-host01 . docker run --name dhost01 -it ${IMAGE} Run ansible playbook ansible-playbook apache.yml --ask-sudo-pass