an ansible container to be used as drone.io cicd pipeline plugin for testing ansible-playbooks.
pipeline:
test-ansible-playbook:
image: jpduyx/drone-plugin-ansible:latest
commands:
- cd tst
- chmod -R 0600 keys/id_rsa*
- pwd
- ansible-playbook --private-key="keys/id_rsa" myplaybook.yml
With this command you enter the container and you'll find your playbook mounted in /ansible/playbooks
docker run --rm -it -v /absolute/path/to/playbook/folder:/ansible/playbooks jpduyx/drone-plugin-ansible /bin/sh
https://hub.docker.com/r/jpduyx/drone-plugin-ansible
docker build . --tag jpduyx/drone-plugin-ansible:latest docker login docker push jpduyx/drone-plugin-ansible:latest
(or also add ansible version number instead of latest?)