Ansible is nicely portable. If you have a playbook, you can use it build a container, a dev VM with vagrant, a cloud instance on e.g. digitalocean, or even on bare metal machine.
Ansible Playbooks are portable. If you build a container with a pure Dockerfile, it means that the only way you can reproduce that application is in a Docker container. If you build a container with an Ansible Playbook, you can then reproduce your environment in Docker, in Vagrant, on a cloud instance of your choice, or on bare metal. Plus, you can build your containers up using Ansible Roles, so that even complex container descriptions are easily read, and different container roles can be reused across many environments. (Source)