Docker images for running and testing Ansible playbooks with various operating systems
4.4K
Docker images for running and testing ansible playbooks with various operating systems. This Project is based on this project, which seems abandoned I don't like obfuscated Dockerfiles with external scripts and hundreds of bells and whistles, so I created these simple ones.
Available operating systems:
docker run -it --rm \
-w /site \
-v /path/to/site/:/site \
-v /path/to/ansible-user-ssh/:/root/.ssh:ro \
--tmpfs /root/.ansible \
lerentis/ansible:alpine-3 \
ansible-playbook site.yml
Note: /root/.ansible must not be an overlayfs, otherwise ssh accelerate won't work.
pipeline:
build:
image: lerentis/ansible:${OS}
commands:
- ansible-playbook -i tests/inventory tests/main.yml --syntax-check
- ansible-playbook -i tests/inventory tests/main.yml
matrix:
OS:
- centos-7
- debian-8
- fedora-24
- ubuntu-16.04
- arch
sudo: required
env:
- OS: centos-7
- OS: debian-8
- OS: fedora-34
- OS: ubuntu-16.04
- OS: arch
services:
- docker
before_install:
- docker pull lerentis/ansible:${OS}
script:
- docker run -t -w /site -v $(pwd):/site lerentis/ansible:${OS} ansible-playbook -i tests/inventory tests/main.yml --syntax-check
- docker run -t -w /site -v $(pwd):/site lerentis/ansible:${OS} ansible-playbook -i tests/inventory tests/main.yml
Current Version: 2.0
Content type
Image
Digest
sha256:55fd13f73…
Size
105.9 MB
Last updated
about 3 years ago
docker pull lerentis/ansible:fedora-34-dev