Ansible is a configuration management system written in Python using a declarative markup language to describe configurations. It is used to automate software configuration and deployment. Docker is a software for deployment automating and management of applications in a virtualization environment on the operating system level.
The playbook is a *.yml file that says what to do when this script is called.
However, we can enlist these tasks in a *.yml file, also called playbook such that Ansible can execute the *.yml and perform these steps itself.