Instead testing playbooks in VM , testing can be done in docker container in local before we move it to any target environment.
$ git clone https://github.com/jrsaravanan/ansible-docker.git
$ cd ansible-docker
$ sudo docker build -t ubuntu-ssh .
$ ./start.sh
$ ansible-playbook -i inventory/local playbooks/echo.yml
$ sudo docker stop ansible_test_host
$ sudo docker rm ansible_test_host