Go to file
2018-02-22 21:45:27 +01:00
alpine-3 try context var 2016-08-13 13:20:23 +02:00
arch hardcoded architecture 2018-01-29 23:46:43 +01:00
centos-7 Fixed Debian 7 and 8 and Centos7 Dockerfile 2018-01-18 23:56:35 +01:00
debian-7 added apt-utils to debian systems 2018-01-29 22:40:35 +01:00
debian-8 added apt-utils to debian systems 2018-01-29 22:40:35 +01:00
fedora-24 moved dockerfiles to folders for automated builds with docker hub 2016-08-13 13:32:33 +02:00
ubuntu-14.04 added apt-utils to debian systems 2018-01-29 22:40:35 +01:00
ubuntu-16.04 added apt-utils to debian systems 2018-01-29 22:40:35 +01:00
.drone.yml notification 2018-02-22 21:45:27 +01:00
build-all.sh added build script 2018-02-14 19:13:28 +01:00
README.md mentioned arch linux in README.md 2018-01-16 23:21:51 +01:00

ansible

Docker images for running and testing ansible playbooks with various operating systems.

I don't like obfuscated Dockerfiles with external scripts and hundreds of bells and whistles, so I created these simple ones.

Available operating systems:

  • alpine-3
  • centos-7
  • debian-8
  • fedora-24
  • ubuntu-16.04
  • arch

run playbooks

docker run -it --rm \
    -w /site \
    -v /path/to/site/:/site \
    -v /path/to/ansible-user-ssh/:/root/.ssh:ro \
    --tmpfs /root/.ansible \
    chmuul/ansible:alpine-3 \
    ansible-playbook site.yml

Note: /root/.ansible must not be an overlayfs, otherwise ssh accelerate won't work.

run tests with drone.io

pipeline:
  build:
    image: chmuul/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

run tests with travis-ci

sudo: required

env:
- OS: centos-7
- OS: debian-8
- OS: fedora-24
- OS: ubuntu-16.04
- OS: arch

services:
- docker

before_install:
- docker pull chmuul/ansible:${OS}

script:
- docker run -t -w /site -v $(pwd):/site chmuul/ansible:${OS} ansible-playbook -i tests/inventory tests/main.yml --syntax-check
- docker run -t -w /site -v $(pwd):/site chmuul/ansible:${OS} ansible-playbook -i tests/inventory tests/main.yml

references