Execute Ansible commands/playbooks against a Docker container
Setup thanks to: https://rogerwelin.github.io/ansible/docker/2016/07/04/testing-ansible-playbooks-with-docker.html
This is just a simple way to play with Ansible locally.
SSH keys were generated just for this, they aren't used anywhere.
$ ./build_image.sh
$ ./run_container.sh
ansible -m ping local
You should get a success from Ansible
localhost | SUCCESS => {
"changed": false,
"ping": "pong"
}
At this point you can execute a playbook with ansible-playbook playbook.yml