diff --git a/README.md b/README.md index 96ff833..155d499 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # ansible -Docker images for running and testing ansible playbooks against various operating systems. -I don't like obfuscated docker images with external scripts and hundreds of bells and whistles. +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: @@ -11,7 +12,7 @@ Available operating systems: * fedora-24 * ubuntu-16.04 -## run ansible as controller +## use the ansible image for playbooks docker run -it --rm \ -w /site \ @@ -23,21 +24,20 @@ Available operating systems: Note: /root/.ansible must not be an overlayfs, otherwise ssh accelerate won't work. -## use ansible in drone builds +## use the ansible image in drone builds build: image: chmuul/ansible:$$OS - pull: true commands: - ansible-playbook -i tests/inventory tests/main.yml --syntax-check - ansible-playbook -i tests/inventory tests/main.yml matrix: OS: - - ubuntu-16.04 - - fedora-24 + - centos-7 - debian-8 - + - fedora-24 + - ubuntu-16.04 ## references diff --git a/centos-7/Dockerfile b/centos-7/Dockerfile index 9a0ff12..37615b8 100644 --- a/centos-7/Dockerfile +++ b/centos-7/Dockerfile @@ -1,6 +1,8 @@ FROM centos:7 RUN rpm -iU https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm \ - && yum -y install ansible + && yum -y install ansible \ + && yum clean headers \ + && yum clean packages CMD ["ansible-playbook", "--help"] diff --git a/debian-8/Dockerfile b/debian-8/Dockerfile index 632d2a3..0ff6e32 100644 --- a/debian-8/Dockerfile +++ b/debian-8/Dockerfile @@ -8,7 +8,7 @@ RUN apt-get -q update \ python \ python-dev \ python-pip \ - && apt-get autoclean \ + && apt-get clean \ && pip install --quiet --upgrade \ ansible diff --git a/ubuntu-16.04/Dockerfile b/ubuntu-16.04/Dockerfile index 93398fd..3de378b 100644 --- a/ubuntu-16.04/Dockerfile +++ b/ubuntu-16.04/Dockerfile @@ -7,6 +7,6 @@ RUN apt-get update \ && apt-get update \ && apt-get install -y --no-install-recommends \ ansible \ - && apt-get autoclean + && apt-get clean CMD ["ansible-playbook", "--help"]