]> git.immae.eu Git - github/fretlink/docker-ansible.git/commitdiff
Add: support for Ubuntu 16.04 LTS (Xenial).
authorWilliam Yeh <william.pjyeh@gmail.com>
Mon, 9 May 2016 08:34:32 +0000 (16:34 +0800)
committerWilliam Yeh <william.pjyeh@gmail.com>
Tue, 10 May 2016 09:17:33 +0000 (17:17 +0800)
Fix:
  1. OS-level packages `libffi-dev` and `libssl-dev`/`openssl-dev` should be installed explicitly since Ansible 2.0.2.0(???).
  2. Python package cffi should be installed explicitly since Ansible 2.0.2.0(???).
  3. add '--fix-missing' for apt.

@see https://github.com/boxcutter/ubuntu/issues/62
@see https://github.com/pyca/cryptography/issues/2280

39 files changed:
.travis.yml
1.9-alpine3-onbuild/Dockerfile
1.9-alpine3/Dockerfile
1.9-centos6-onbuild/Dockerfile
1.9-centos6/Dockerfile
1.9-centos7-onbuild/Dockerfile
1.9-centos7/Dockerfile
1.9-debian7-onbuild/Dockerfile
1.9-debian7/Dockerfile
1.9-debian8-onbuild/Dockerfile
1.9-debian8/Dockerfile
README.md
Vagrantfile
alpine3-onbuild/Dockerfile
alpine3/Dockerfile
centos6-onbuild/Dockerfile
centos6/Dockerfile
centos7-onbuild/Dockerfile
centos7/Dockerfile
circle.yml
compare-image-size.sh
debian7-onbuild/Dockerfile
debian7/Dockerfile
debian8-onbuild/Dockerfile
debian8/Dockerfile
master-centos6-onbuild/Dockerfile
master-centos6/Dockerfile
master-centos7-onbuild/Dockerfile
master-centos7/Dockerfile
master-debian7-onbuild/Dockerfile
master-debian7/Dockerfile
master-debian8-onbuild/Dockerfile
master-debian8/Dockerfile
master-ubuntu16.04-onbuild/Dockerfile [new file with mode: 0644]
master-ubuntu16.04-onbuild/ansible-playbook-wrapper [new file with mode: 0755]
master-ubuntu16.04/Dockerfile [new file with mode: 0644]
ubuntu16.04-onbuild/Dockerfile [new file with mode: 0644]
ubuntu16.04-onbuild/ansible-playbook-wrapper [new file with mode: 0755]
ubuntu16.04/Dockerfile [new file with mode: 0644]

index 060b99cc949815d2ff59f48ad2b2591d5f4a52af..4e5dfcb4bc2eaef7e92bd858b4b4c1bf1877cf63 100644 (file)
@@ -6,6 +6,7 @@ before_install:
     - docker info
     - docker version
 
+    - docker build  -t ansible_xenial           ubuntu16.04
     - docker build  -t ansible_trusty           ubuntu14.04
     - docker build  -t ansible_precise          ubuntu12.04
     - docker build  -t ansible_jessie           debian8
@@ -14,6 +15,7 @@ before_install:
     - docker build  -t ansible_centos6          centos6
     - docker build  -t ansible_alpine3          alpine3
 
+    - docker build  -t ansible_xenial_onbuild   ubuntu16.04-onbuild
     - docker build  -t ansible_trusty_onbuild   ubuntu14.04-onbuild
     - docker build  -t ansible_precise_onbuild  ubuntu12.04-onbuild
     - docker build  -t ansible_jessie_onbuild   debian8-onbuild
@@ -40,6 +42,7 @@ before_install:
     - docker build  -t ansible_1.9_alpine3_onbuild  1.9-alpine3-onbuild
 
 
+    - docker build  -t ansible_master_xenial           master-ubuntu16.04
     - docker build  -t ansible_master_trusty           master-ubuntu14.04
     - docker build  -t ansible_master_precise          master-ubuntu12.04
     - docker build  -t ansible_master_jessie           master-debian8
@@ -47,6 +50,7 @@ before_install:
     - docker build  -t ansible_master_centos7          master-centos7
     - docker build  -t ansible_master_centos6          master-centos6
 
+    - docker build  -t ansible_master_xenial_onbuild   master-ubuntu16.04-onbuild
     - docker build  -t ansible_master_trusty_onbuild   master-ubuntu14.04-onbuild
     - docker build  -t ansible_master_precise_onbuild  master-ubuntu12.04-onbuild
     - docker build  -t ansible_master_jessie_onbuild   master-debian8-onbuild
@@ -55,6 +59,7 @@ before_install:
     - docker build  -t ansible_master_centos6_onbuild  master-centos6-onbuild
 
 script:
+    - docker run -i ansible_xenial           > result-ubuntu16.04
     - docker run -i ansible_trusty           > result-ubuntu14.04
     - docker run -i ansible_precise          > result-ubuntu12.04
     - docker run -i ansible_jessie           > result-debian8
@@ -62,6 +67,7 @@ script:
     - docker run -i ansible_centos7          > result-centos7
     - docker run -i ansible_centos6          > result-centos6
     - docker run -i ansible_alpine3          > result-alpine3
+    - docker run -i ansible_xenial_onbuild   > result-ubuntu16.04-onbuild
     - docker run -i ansible_trusty_onbuild   > result-ubuntu14.04-onbuild
     - docker run -i ansible_precise_onbuild  > result-ubuntu12.04-onbuild
     - docker run -i ansible_jessie_onbuild   > result-debian8-onbuild
@@ -87,12 +93,14 @@ script:
     - docker run -i ansible_1.9_alpine3_onbuild  > result-1.9-alpine3-onbuild
 
 
+    - docker run -i ansible_master_xenial           > result-master-ubuntu16.04
     - docker run -i ansible_master_trusty           > result-master-ubuntu14.04
     - docker run -i ansible_master_precise          > result-master-ubuntu12.04
     - docker run -i ansible_master_jessie           > result-master-debian8
     - docker run -i ansible_master_wheezy           > result-master-debian7
     - docker run -i ansible_master_centos7          > result-master-centos7
     - docker run -i ansible_master_centos6          > result-master-centos6
+    - docker run -i ansible_master_xenial_onbuild   > result-master-ubuntu16.04-onbuild
     - docker run -i ansible_master_trusty_onbuild   > result-master-ubuntu14.04-onbuild
     - docker run -i ansible_master_precise_onbuild  > result-master-ubuntu12.04-onbuild
     - docker run -i ansible_master_jessie_onbuild   > result-master-debian8-onbuild
@@ -103,6 +111,7 @@ script:
 
 
     - echo "==> Validating the test results..."
+    - sh -c "[ -s result-ubuntu16.04         ]"
     - sh -c "[ -s result-ubuntu14.04         ]"
     - sh -c "[ -s result-ubuntu12.04         ]"
     - sh -c "[ -s result-debian8             ]"
@@ -110,6 +119,7 @@ script:
     - sh -c "[ -s result-centos7             ]"
     - sh -c "[ -s result-centos6             ]"
     - sh -c "[ -s result-alpine3             ]"
+    - sh -c "[ -s result-ubuntu16.04-onbuild ]"
     - sh -c "[ -s result-ubuntu14.04-onbuild ]"
     - sh -c "[ -s result-ubuntu12.04-onbuild ]"
     - sh -c "[ -s result-debian8-onbuild     ]"
@@ -133,12 +143,14 @@ script:
     - sh -c "[ -s result-1.9-centos6-onbuild     ]"
     - sh -c "[ -s result-1.9-alpine3-onbuild     ]"
 
+    - sh -c "[ -s result-master-ubuntu16.04         ]"
     - sh -c "[ -s result-master-ubuntu14.04         ]"
     - sh -c "[ -s result-master-ubuntu12.04         ]"
     - sh -c "[ -s result-master-debian8             ]"
     - sh -c "[ -s result-master-debian7             ]"
     - sh -c "[ -s result-master-centos7             ]"
     - sh -c "[ -s result-master-centos6             ]"
+    - sh -c "[ -s result-master-ubuntu16.04-onbuild ]"
     - sh -c "[ -s result-master-ubuntu14.04-onbuild ]"
     - sh -c "[ -s result-master-ubuntu12.04-onbuild ]"
     - sh -c "[ -s result-master-debian8-onbuild     ]"
index 2af2f48f4ce47e79e443cd91c738c3bea8e48f75..aefffe79c693290dbe0db8f9c0de1640e8c2697d 100644 (file)
@@ -13,9 +13,10 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
 RUN echo "===> Adding Python runtime..."  && \
-    apk --update add python py-pip openssl ca-certificates               && \
-    apk --update add --virtual build-dependencies python-dev build-base  && \
-    pip install --upgrade pip                                            && \
+    apk --update add python py-pip openssl ca-certificates    && \
+    apk --update add --virtual build-dependencies \
+                python-dev libffi-dev openssl-dev build-base  && \
+    pip install --upgrade pip cffi                            && \
     \
     \
     echo "===> Installing Ansible..."  && \
index fe62f16ec167dece3bdf23b0428454bf553ed158..bf6d3ae14981bf9df9f7bf5eef4aeab456d16b48 100644 (file)
@@ -13,9 +13,10 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
 RUN echo "===> Adding Python runtime..."  && \
-    apk --update add python py-pip openssl ca-certificates               && \
-    apk --update add --virtual build-dependencies python-dev build-base  && \
-    pip install --upgrade pip                                            && \
+    apk --update add python py-pip openssl ca-certificates    && \
+    apk --update add --virtual build-dependencies \
+                python-dev libffi-dev openssl-dev build-base  && \
+    pip install --upgrade pip cffi                            && \
     \
     \
     echo "===> Installing Ansible..."  && \
index 01fd5652b1bd2f94352b5512a5f5277a3fe0ba01..ff7ce39df87e957523dc6724ca50bae8f52856ca 100644 (file)
@@ -26,12 +26,13 @@ RUN echo "===> Installing EPEL..."        && \
     \
     \
     echo "===> Adding Ansible's prerequisites..."  && \
-    yum -y install gcc python-devel python-pip     && \
+    yum -y install gcc python-devel python-pip  \
+                       libffi-devel openssl-devel  && \
     pip install --upgrade pip                      && \                 
     \
     \
     echo "===> Installing Ansible..."     && \
-    pip install ansible==1.9.4            && \
+    pip install --upgrade ansible==1.9.4  && \
     \
     \
     echo "===> Disabling sudo 'requiretty' setting..."    && \
@@ -39,7 +40,8 @@ RUN echo "===> Installing EPEL..."        && \
     \
     \
     echo "===> Removing unused YUM resources..."             && \
-    yum -y remove epel-release gcc python-devel python-pip   && \
+    yum -y remove epel-release gcc python-devel python-pip \
+                  libffi-devel openssl-devel  || true        && \
     yum clean all                                            && \
     \
     \
index dc450d6adfdaf515973f9fba9c919520e3e8cd0a..f56f76f09381d4cf8f097d9b2d135b06b09f7e33 100644 (file)
@@ -26,12 +26,13 @@ RUN echo "===> Installing EPEL..."        && \
     \
     \
     echo "===> Adding Ansible's prerequisites..."  && \
-    yum -y install gcc python-devel python-pip     && \
+    yum -y install gcc python-devel python-pip  \
+                       libffi-devel openssl-devel  && \
     pip install --upgrade pip                      && \                 
     \
     \
     echo "===> Installing Ansible..."     && \
-    pip install ansible==1.9.4            && \
+    pip install --upgrade ansible==1.9.4  && \
     \
     \
     echo "===> Disabling sudo 'requiretty' setting..."    && \
@@ -39,7 +40,8 @@ RUN echo "===> Installing EPEL..."        && \
     \
     \
     echo "===> Removing unused YUM resources..."             && \
-    yum -y remove epel-release gcc python-devel python-pip   && \
+    yum -y remove epel-release gcc python-devel python-pip \
+                  libffi-devel openssl-devel  || true        && \
     yum clean all                                            && \
     \
     \
index 7b8e0285b743d7f8a809ba06aa756e325f24f53e..ef182e6ea3b4e824f9faabb0e9209f3e46688198 100644 (file)
@@ -41,12 +41,13 @@ RUN echo "===> Enabling systemd..."  && \
     \
     \
     echo "===> Adding Ansible's prerequisites..."  && \
-    yum -y install gcc python-devel python-pip     && \
+    yum -y install gcc python-devel python-pip  \
+                       libffi-devel openssl-devel  && \
     pip install --upgrade pip                      && \                 
     \
     \
     echo "===> Installing Ansible..."     && \
-    pip install ansible==1.9.4            && \
+    pip install --upgrade ansible==1.9.4  && \
     \
     \
     echo "===> Disabling sudo 'requiretty' setting..."    && \
@@ -54,7 +55,8 @@ RUN echo "===> Enabling systemd..."  && \
     \
     \
     echo "===> Removing unused YUM resources..."             && \
-    yum -y remove epel-release gcc python-devel python-pip   && \
+    yum -y remove epel-release gcc python-devel python-pip \
+                  libffi-devel openssl-devel  || true        && \
     yum clean all                                            && \
     \
     \
index 8d6da8542a7b37306d6c1080b1ec199bc84fddc3..9ae523afdf6ebd73580e2d0bc9654fd6fa3d9842 100644 (file)
@@ -41,12 +41,13 @@ RUN echo "===> Enabling systemd..."  && \
     \
     \
     echo "===> Adding Ansible's prerequisites..."  && \
-    yum -y install gcc python-devel python-pip     && \
+    yum -y install gcc python-devel python-pip  \
+                       libffi-devel openssl-devel  && \
     pip install --upgrade pip                      && \                 
     \
     \
     echo "===> Installing Ansible..."     && \
-    pip install ansible==1.9.4            && \
+    pip install --upgrade ansible==1.9.4  && \
     \
     \
     echo "===> Disabling sudo 'requiretty' setting..."    && \
@@ -54,7 +55,8 @@ RUN echo "===> Enabling systemd..."  && \
     \
     \
     echo "===> Removing unused YUM resources..."             && \
-    yum -y remove epel-release gcc python-devel python-pip   && \
+    yum -y remove epel-release gcc python-devel python-pip \
+                  libffi-devel openssl-devel  || true        && \
     yum clean all                                            && \
     \
     \
index 5ca7ce3fc718ebe98f47032877a40ab72f1b59e5..ec8f2d1c657c3f5dcfd550734080b3e307f4598c 100644 (file)
@@ -13,11 +13,12 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
 RUN echo "===> Installing python, sudo, and supporting tools..."  && \
-    apt-get update  && \
+    apt-get update -y  &&  apt-get install --fix-missing          && \
     DEBIAN_FRONTEND=noninteractive         \
     apt-get install -y                     \
         python python-yaml sudo            \
-        curl gcc python-pip python-dev  && \
+        curl gcc python-pip python-dev libffi-dev libssl-dev  && \
+    pip install --upgrade cffi                     && \
     \
     \
     echo "===> Installing Ansible..."   && \
@@ -25,7 +26,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..."  && \
     \
     \
     echo "===> Removing unused APT resources..."                  && \
-    apt-get -f -y --auto-remove remove gcc python-pip python-dev  && \
+    apt-get -f -y --auto-remove remove \
+                 gcc python-pip python-dev libffi-dev libssl-dev  && \
     apt-get clean                                                 && \
     rm -rf /var/lib/apt/lists/*  /tmp/*                           && \
     \
index 8d746e7e3bd682c981202bb5cb318729dadf9611..5033911d6e3553ce0e942ca9937d206cd5d4f556 100644 (file)
@@ -13,11 +13,12 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
 RUN echo "===> Installing python, sudo, and supporting tools..."  && \
-    apt-get update  && \
+    apt-get update -y  &&  apt-get install --fix-missing          && \
     DEBIAN_FRONTEND=noninteractive         \
     apt-get install -y                     \
         python python-yaml sudo            \
-        curl gcc python-pip python-dev  && \
+        curl gcc python-pip python-dev libffi-dev libssl-dev  && \
+    pip install --upgrade cffi                     && \
     \
     \
     echo "===> Installing Ansible..."   && \
@@ -25,7 +26,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..."  && \
     \
     \
     echo "===> Removing unused APT resources..."                  && \
-    apt-get -f -y --auto-remove remove gcc python-pip python-dev  && \
+    apt-get -f -y --auto-remove remove \
+                 gcc python-pip python-dev libffi-dev libssl-dev  && \
     apt-get clean                                                 && \
     rm -rf /var/lib/apt/lists/*  /tmp/*                           && \
     \
index 66756bd80e23214f716d986271e2cade2ca76bcf..5ad3bb3e0c25af4c50b64942cbc74be964c2c702 100644 (file)
@@ -13,11 +13,13 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
 RUN echo "===> Installing python, sudo, and supporting tools..."  && \
-    apt-get update  && \
+    apt-get update -y  &&  apt-get install --fix-missing          && \
     DEBIAN_FRONTEND=noninteractive         \
     apt-get install -y                     \
         python python-yaml sudo            \
-        curl gcc python-pip python-dev  && \
+        curl gcc python-pip python-dev libffi-dev libssl-dev  && \
+    apt-get -y --purge remove python-cffi          && \
+    pip install --upgrade cffi                     && \
     \
     \
     echo "===> Installing Ansible..."   && \
@@ -25,7 +27,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..."  && \
     \
     \
     echo "===> Removing unused APT resources..."                  && \
-    apt-get -f -y --auto-remove remove gcc python-pip python-dev  && \
+    apt-get -f -y --auto-remove remove \
+                 gcc python-pip python-dev libffi-dev libssl-dev  && \
     apt-get clean                                                 && \
     rm -rf /var/lib/apt/lists/*  /tmp/*                           && \
     \
index 47d59e13f2433f212e6013e743fecb0fac203e43..c76477dce44664603fd0b92e41174c9bb11a8a9e 100644 (file)
@@ -13,11 +13,13 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
 RUN echo "===> Installing python, sudo, and supporting tools..."  && \
-    apt-get update  && \
+    apt-get update -y  &&  apt-get install --fix-missing          && \
     DEBIAN_FRONTEND=noninteractive         \
     apt-get install -y                     \
         python python-yaml sudo            \
-        curl gcc python-pip python-dev  && \
+        curl gcc python-pip python-dev libffi-dev libssl-dev  && \
+    apt-get -y --purge remove python-cffi          && \
+    pip install --upgrade cffi                     && \
     \
     \
     echo "===> Installing Ansible..."   && \
@@ -25,7 +27,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..."  && \
     \
     \
     echo "===> Removing unused APT resources..."                  && \
-    apt-get -f -y --auto-remove remove gcc python-pip python-dev  && \
+    apt-get -f -y --auto-remove remove \
+                 gcc python-pip python-dev libffi-dev libssl-dev  && \
     apt-get clean                                                 && \
     rm -rf /var/lib/apt/lists/*  /tmp/*                           && \
     \
index 89a7c2494e39a80d05ecb6312cb49f4f44afb8aa..f0baebb74bae66a400e6977e20a1c7d84f04a7e3 100644 (file)
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ This repository contains Dockerized [Ansible](https://github.com/ansible/ansible
 
 These are Docker images for [Ansible](https://github.com/ansible/ansible) software, installed in a selected Linux distributions.
 
-- OS: Debian (jessie, wheezy), Ubuntu (trusty, precise), CentOS (7, 6), Alpine (3).
+- OS: Debian (jessie, wheezy), Ubuntu (xenial, trusty, precise), CentOS (7, 6), Alpine (3).
 
 - Ansible: three version series -
 
@@ -33,6 +33,7 @@ These are Docker images for [Ansible](https://github.com/ansible/ansible) softwa
 
   - `williamyeh/ansible:debian8`
   - `williamyeh/ansible:debian7`
+  - `williamyeh/ansible:ubuntu16.04`
   - `williamyeh/ansible:ubuntu14.04`
   - `williamyeh/ansible:ubuntu12.04`
   - `williamyeh/ansible:centos7`
@@ -43,6 +44,7 @@ These are Docker images for [Ansible](https://github.com/ansible/ansible) softwa
 
   - `williamyeh/ansible:debian8-onbuild`
   - `williamyeh/ansible:debian7-onbuild`
+  - `williamyeh/ansible:ubuntu16.04-onbuild`
   - `williamyeh/ansible:ubuntu14.04-onbuild`
   - `williamyeh/ansible:ubuntu12.04-onbuild`
   - `williamyeh/ansible:centos7-onbuild`
@@ -77,6 +79,7 @@ These are Docker images for [Ansible](https://github.com/ansible/ansible) softwa
 
   - `williamyeh/ansible:master-debian8`
   - `williamyeh/ansible:master-debian7`
+  - `williamyeh/ansible:master-ubuntu16.04`
   - `williamyeh/ansible:master-ubuntu14.04`
   - `williamyeh/ansible:master-ubuntu12.04`
   - `williamyeh/ansible:master-centos7`
@@ -86,6 +89,7 @@ These are Docker images for [Ansible](https://github.com/ansible/ansible) softwa
 
   - `williamyeh/ansible:master-debian8-onbuild`
   - `williamyeh/ansible:master-debian7-onbuild`
+  - `williamyeh/ansible:master-ubuntu16.04-onbuild`
   - `williamyeh/ansible:master-ubuntu14.04-onbuild`
   - `williamyeh/ansible:master-ubuntu12.04-onbuild`
   - `williamyeh/ansible:master-centos7-onbuild`
@@ -121,7 +125,7 @@ Third, `docker build .`
 
 Done!
 
-For more advanced usage, the role in Ansible Galaxy [`williamyeh/nginx`](https://galaxy.ansible.com/williamyeh/nginx/) demonstrates how to perform a simple smoke test (*configuration needs test, too!*) on a variety of (*containerized*) Linux distributions via [CircleCI](https://circleci.com/)'s Ubuntu 12.04 and [Travis CI](https://travis-ci.org/)’s Ubuntu 14.04 worker instances.
+For more advanced usage, the role in Ansible Galaxy [`williamyeh/nginx`](https://galaxy.ansible.com/williamyeh/nginx/) demonstrates how to perform a simple smoke test (*configuration needs test, too!*) on a variety of (*containerized*) Linux distributions on [CircleCI](https://circleci.com/)'s Ubuntu 12.04 and [Travis CI](https://travis-ci.org/)’s Ubuntu 14.04 worker instances.
 
 
 
@@ -170,6 +174,7 @@ Take Debian/Ubuntu/CentOS for example. To test an Ansible `playbook.yml` against
 Vagrant.configure(2) do |config|
 
     # ==> Choose a Vagrant box to emulate Linux distribution...
+    #config.vm.box = "ubuntu/xenial64"
     config.vm.box = "ubuntu/trusty64"
     #config.vm.box = "ubuntu/precise64"
     #config.vm.box = "debian/jessie64"
@@ -197,6 +202,7 @@ Docker to be a rescue. Now, with these **williamyeh/ansible** series, we may tes
 # Dockerfile
 
 # ==> Choose a base image to emulate Linux distribution...
+#FROM williamyeh/ansible:ubuntu16.04
 FROM williamyeh/ansible:ubuntu14.04
 #FROM williamyeh/ansible:ubuntu12.04
 #FROM williamyeh/ansible:debian8
@@ -224,6 +230,7 @@ You may also work with `onbuild` series, which take care of many routine steps f
 # Dockerfile
 
 # ==> Choose a base image to emulate Linux distribution...
+#FROM williamyeh/ansible:ubuntu16.04-onbuild
 FROM williamyeh/ansible:ubuntu14.04-onbuild
 #FROM williamyeh/ansible:ubuntu12.04-onbuild
 #FROM williamyeh/ansible:debian8-onbuild
index 46458fb665f59b220329120880b7ef65d55b663a..9bb4898034786a876436b767734bc45150763760 100644 (file)
@@ -4,6 +4,7 @@ Vagrant.configure(2) do |config|
   config.vm.provision "shell", inline: <<-SHELL
     cd /vagrant
 
+    docker build  -t ansible:ubuntu16.04          ubuntu16.04
     docker build  -t ansible:ubuntu14.04          ubuntu14.04
     docker build  -t ansible:ubuntu12.04          ubuntu12.04
     docker build  -t ansible:debian8              debian8
@@ -12,6 +13,7 @@ Vagrant.configure(2) do |config|
     docker build  -t ansible:centos6              centos6
     docker build  -t ansible:alpine3              alpine3
 
+    docker build  -t ansible:ubuntu16.04-onbuild  ubuntu16.04-onbuild
     docker build  -t ansible:ubuntu14.04-onbuild  ubuntu14.04-onbuild
     docker build  -t ansible:ubuntu12.04-onbuild  ubuntu12.04-onbuild
     docker build  -t ansible:debian8-onbuild      debian8-onbuild
index 777ddec1f8bc8ab0679b72932aa3b0fcd98d1070..a11dc9e8f755ca4620e519743f6293cf26232b8c 100644 (file)
@@ -13,9 +13,10 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
 RUN echo "===> Adding Python runtime..."  && \
-    apk --update add python py-pip openssl ca-certificates               && \
-    apk --update add --virtual build-dependencies python-dev build-base  && \
-    pip install --upgrade pip                                            && \
+    apk --update add python py-pip openssl ca-certificates    && \
+    apk --update add --virtual build-dependencies \
+                python-dev libffi-dev openssl-dev build-base  && \
+    pip install --upgrade pip cffi                            && \
     \
     \
     echo "===> Installing Ansible..."  && \
index 28550b253c114fd0ce6079a19233fc95145c30ad..87b22c7acb2e0f621aebae3e7d631a9b1cd277d5 100644 (file)
@@ -13,9 +13,10 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
 RUN echo "===> Adding Python runtime..."  && \
-    apk --update add python py-pip openssl ca-certificates               && \
-    apk --update add --virtual build-dependencies python-dev build-base  && \
-    pip install --upgrade pip                                            && \
+    apk --update add python py-pip openssl ca-certificates    && \
+    apk --update add --virtual build-dependencies \
+                python-dev libffi-dev openssl-dev build-base  && \
+    pip install --upgrade pip cffi                            && \
     \
     \
     echo "===> Installing Ansible..."  && \
index 56855efbd7bb37ce3a5f2c5038886c27442f853b..a520a0f078ad1bcefcc31795e65f415e693fdf4a 100644 (file)
@@ -26,12 +26,13 @@ RUN echo "===> Installing EPEL..."        && \
     \
     \
     echo "===> Adding Ansible's prerequisites..."  && \
-    yum -y install gcc python-devel python-pip     && \
+    yum -y install gcc python-devel python-pip  \
+                       libffi-devel openssl-devel  && \
     pip install --upgrade pip                      && \                 
     \
     \
     echo "===> Installing Ansible..."     && \
-    pip install ansible                   && \
+    pip install --upgrade ansible         && \
     \
     \
     echo "===> Disabling sudo 'requiretty' setting..."    && \
@@ -39,7 +40,8 @@ RUN echo "===> Installing EPEL..."        && \
     \
     \
     echo "===> Removing unused YUM resources..."             && \
-    yum -y remove epel-release gcc python-devel python-pip   && \
+    yum -y remove epel-release gcc python-devel python-pip \
+                  libffi-devel openssl-devel  || true        && \
     yum clean all                                            && \
     \
     \
index fe13935c6af381f45db20d5b480e4d6ecc117958..034e5a8c6597dc5ffcd4c17077610754071fe116 100644 (file)
@@ -26,12 +26,13 @@ RUN echo "===> Installing EPEL..."        && \
     \
     \
     echo "===> Adding Ansible's prerequisites..."  && \
-    yum -y install gcc python-devel python-pip     && \
+    yum -y install gcc python-devel python-pip  \
+                       libffi-devel openssl-devel  && \
     pip install --upgrade pip                      && \                 
     \
     \
     echo "===> Installing Ansible..."     && \
-    pip install ansible                   && \
+    pip install --upgrade ansible         && \
     \
     \
     echo "===> Disabling sudo 'requiretty' setting..."    && \
@@ -39,7 +40,8 @@ RUN echo "===> Installing EPEL..."        && \
     \
     \
     echo "===> Removing unused YUM resources..."             && \
-    yum -y remove epel-release gcc python-devel python-pip   && \
+    yum -y remove epel-release gcc python-devel python-pip \
+                  libffi-devel openssl-devel  || true        && \
     yum clean all                                            && \
     \
     \
index 9274bee2bb2e5914eb881ac576735cbc8770061f..4edadbcffe0bea9ee47cd605338fec8c94b23328 100644 (file)
@@ -41,12 +41,13 @@ RUN echo "===> Enabling systemd..."  && \
     \
     \
     echo "===> Adding Ansible's prerequisites..."  && \
-    yum -y install gcc python-devel python-pip     && \
+    yum -y install gcc python-devel python-pip  \
+                       libffi-devel openssl-devel  && \
     pip install --upgrade pip                      && \                 
     \
     \
     echo "===> Installing Ansible..."     && \
-    pip install ansible                   && \
+    pip install --upgrade ansible         && \
     \
     \
     echo "===> Disabling sudo 'requiretty' setting..."    && \
@@ -54,7 +55,8 @@ RUN echo "===> Enabling systemd..."  && \
     \
     \
     echo "===> Removing unused YUM resources..."             && \
-    yum -y remove epel-release gcc python-devel python-pip   && \
+    yum -y remove epel-release gcc python-devel python-pip \
+                  libffi-devel openssl-devel  || true        && \
     yum clean all                                            && \
     \
     \
index 0f2112db2aeaea10b0e94b99ed16ec31931254b5..6ea7e843d34bcebc339209e895cef3aec286018e 100644 (file)
@@ -41,12 +41,13 @@ RUN echo "===> Enabling systemd..."  && \
     \
     \
     echo "===> Adding Ansible's prerequisites..."  && \
-    yum -y install gcc python-devel python-pip     && \
+    yum -y install gcc python-devel python-pip  \
+                       libffi-devel openssl-devel  && \
     pip install --upgrade pip                      && \                 
     \
     \
     echo "===> Installing Ansible..."     && \
-    pip install ansible                   && \
+    pip install --upgrade ansible         && \
     \
     \
     echo "===> Disabling sudo 'requiretty' setting..."    && \
@@ -54,7 +55,8 @@ RUN echo "===> Enabling systemd..."  && \
     \
     \
     echo "===> Removing unused YUM resources..."             && \
-    yum -y remove epel-release gcc python-devel python-pip   && \
+    yum -y remove epel-release gcc python-devel python-pip \
+                  libffi-devel openssl-devel  || true        && \
     yum clean all                                            && \
     \
     \
index 68679553b54bcb3e8c87cc58bda25dd390d24248..60cbe2880c140586363993863d915439f6b7726b 100644 (file)
@@ -7,6 +7,7 @@ dependencies:
     - docker info
     - docker version
 
+    - docker build  -t ansible_xenial           ubuntu16.04
     - docker build  -t ansible_trusty           ubuntu14.04
     - docker build  -t ansible_precise          ubuntu12.04
     - docker build  -t ansible_jessie           debian8
@@ -15,6 +16,7 @@ dependencies:
     - docker build  -t ansible_centos6          centos6
     - docker build  -t ansible_alpine3          alpine3
 
+    - docker build  -t ansible_xenial_onbuild   ubuntu16.04-onbuild
     - docker build  -t ansible_trusty_onbuild   ubuntu14.04-onbuild
     - docker build  -t ansible_precise_onbuild  ubuntu12.04-onbuild
     - docker build  -t ansible_jessie_onbuild   debian8-onbuild
@@ -41,6 +43,7 @@ dependencies:
     - docker build  -t ansible_1.9_alpine3_onbuild  1.9-alpine3-onbuild
 
 
+    - docker build  -t ansible_master_xenial           master-ubuntu16.04
     - docker build  -t ansible_master_trusty           master-ubuntu14.04
     - docker build  -t ansible_master_precise          master-ubuntu12.04
     - docker build  -t ansible_master_jessie           master-debian8
@@ -48,6 +51,7 @@ dependencies:
     - docker build  -t ansible_master_centos7          master-centos7
     - docker build  -t ansible_master_centos6          master-centos6
 
+    - docker build  -t ansible_master_xenial_onbuild   master-ubuntu16.04-onbuild
     - docker build  -t ansible_master_trusty_onbuild   master-ubuntu14.04-onbuild
     - docker build  -t ansible_master_precise_onbuild  master-ubuntu12.04-onbuild
     - docker build  -t ansible_master_jessie_onbuild   master-debian8-onbuild
@@ -57,6 +61,7 @@ dependencies:
 
 test:
   override:
+    - docker run -i ansible_xenial           > result-ubuntu16.04
     - docker run -i ansible_trusty           > result-ubuntu14.04
     - docker run -i ansible_precise          > result-ubuntu12.04
     - docker run -i ansible_jessie           > result-debian8
@@ -64,6 +69,7 @@ test:
     - docker run -i ansible_centos7          > result-centos7
     - docker run -i ansible_centos6          > result-centos6
     - docker run -i ansible_alpine3          > result-alpine3
+    - docker run -i ansible_xenial_onbuild   > result-ubuntu16.04-onbuild
     - docker run -i ansible_trusty_onbuild   > result-ubuntu14.04-onbuild
     - docker run -i ansible_precise_onbuild  > result-ubuntu12.04-onbuild
     - docker run -i ansible_jessie_onbuild   > result-debian8-onbuild
@@ -89,12 +95,14 @@ test:
     - docker run -i ansible_1.9_alpine3_onbuild  > result-1.9-alpine3-onbuild
 
 
+    - docker run -i ansible_master_xenial           > result-master-ubuntu16.04
     - docker run -i ansible_master_trusty           > result-master-ubuntu14.04
     - docker run -i ansible_master_precise          > result-master-ubuntu12.04
     - docker run -i ansible_master_jessie           > result-master-debian8
     - docker run -i ansible_master_wheezy           > result-master-debian7
     - docker run -i ansible_master_centos7          > result-master-centos7
     - docker run -i ansible_master_centos6          > result-master-centos6
+    - docker run -i ansible_master_xenial_onbuild   > result-master-ubuntu16.04-onbuild
     - docker run -i ansible_master_trusty_onbuild   > result-master-ubuntu14.04-onbuild
     - docker run -i ansible_master_precise_onbuild  > result-master-ubuntu12.04-onbuild
     - docker run -i ansible_master_jessie_onbuild   > result-master-debian8-onbuild
@@ -105,6 +113,7 @@ test:
 
 
     - echo "==> Validating the test results..."
+    - sh -c "[ -s result-ubuntu16.04         ]"
     - sh -c "[ -s result-ubuntu14.04         ]"
     - sh -c "[ -s result-ubuntu12.04         ]"
     - sh -c "[ -s result-debian8             ]"
@@ -112,6 +121,7 @@ test:
     - sh -c "[ -s result-centos7             ]"
     - sh -c "[ -s result-centos6             ]"
     - sh -c "[ -s result-alpine3             ]"
+    - sh -c "[ -s result-ubuntu16.04-onbuild ]"
     - sh -c "[ -s result-ubuntu14.04-onbuild ]"
     - sh -c "[ -s result-ubuntu12.04-onbuild ]"
     - sh -c "[ -s result-debian8-onbuild     ]"
@@ -135,12 +145,14 @@ test:
     - sh -c "[ -s result-1.9-centos6-onbuild     ]"
     - sh -c "[ -s result-1.9-alpine3-onbuild     ]"
 
+    - sh -c "[ -s result-master-ubuntu16.04         ]"
     - sh -c "[ -s result-master-ubuntu14.04         ]"
     - sh -c "[ -s result-master-ubuntu12.04         ]"
     - sh -c "[ -s result-master-debian8             ]"
     - sh -c "[ -s result-master-debian7             ]"
     - sh -c "[ -s result-master-centos7             ]"
     - sh -c "[ -s result-master-centos6             ]"
+    - sh -c "[ -s result-master-ubuntu16.04-onbuild ]"
     - sh -c "[ -s result-master-ubuntu14.04-onbuild ]"
     - sh -c "[ -s result-master-ubuntu12.04-onbuild ]"
     - sh -c "[ -s result-master-debian8-onbuild     ]"
index 9c7c5cd5e580d48ce9cb1c1cd8560ecf31f2a3cf..6a8ae88d9e227641ab304f27e3aff13e8e5f481d 100755 (executable)
@@ -4,6 +4,7 @@
 declare -a IMAGES=( 'ansible/ubuntu14.04-ansible:stable' 'ansible/centos7-ansible:stable'  \
          "williamyeh/ansible:debian8-onbuild"        \
          "williamyeh/ansible:debian7-onbuild"        \
+         "williamyeh/ansible:ubuntu16.04-onbuild"    \
          "williamyeh/ansible:ubuntu14.04-onbuild"    \
          "williamyeh/ansible:ubuntu12.04-onbuild"    \
          "williamyeh/ansible:centos7-onbuild"        \
index fb823fd9967f6fa10c09b1a8ea1597ed4da45539..a6e1a309b201673788fb7dcbe44d358d34f69dc7 100644 (file)
@@ -13,11 +13,12 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
 RUN echo "===> Installing python, sudo, and supporting tools..."  && \
-    apt-get update  && \
+    apt-get update -y  &&  apt-get install --fix-missing          && \
     DEBIAN_FRONTEND=noninteractive         \
     apt-get install -y                     \
         python python-yaml sudo            \
-        curl gcc python-pip python-dev  && \
+        curl gcc python-pip python-dev libffi-dev libssl-dev  && \
+    pip install --upgrade cffi                     && \
     \
     \
     echo "===> Installing Ansible..."   && \
@@ -25,7 +26,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..."  && \
     \
     \
     echo "===> Removing unused APT resources..."                  && \
-    apt-get -f -y --auto-remove remove gcc python-pip python-dev  && \
+    apt-get -f -y --auto-remove remove \
+                 gcc python-pip python-dev libffi-dev libssl-dev  && \
     apt-get clean                                                 && \
     rm -rf /var/lib/apt/lists/*  /tmp/*                           && \
     \
index 73ea5d99f643189a8bb0d4095b1477359d71d3fb..25cc25b46ab4978cd2864f2cdd03b4dec3af6055 100644 (file)
@@ -13,11 +13,12 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
 RUN echo "===> Installing python, sudo, and supporting tools..."  && \
-    apt-get update  && \
+    apt-get update -y  &&  apt-get install --fix-missing          && \
     DEBIAN_FRONTEND=noninteractive         \
     apt-get install -y                     \
         python python-yaml sudo            \
-        curl gcc python-pip python-dev  && \
+        curl gcc python-pip python-dev libffi-dev libssl-dev  && \
+    pip install --upgrade cffi                     && \
     \
     \
     echo "===> Installing Ansible..."   && \
@@ -25,7 +26,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..."  && \
     \
     \
     echo "===> Removing unused APT resources..."                  && \
-    apt-get -f -y --auto-remove remove gcc python-pip python-dev  && \
+    apt-get -f -y --auto-remove remove \
+                 gcc python-pip python-dev libffi-dev libssl-dev  && \
     apt-get clean                                                 && \
     rm -rf /var/lib/apt/lists/*  /tmp/*                           && \
     \
index c5fc2274eff0d412f1383f4ce637592f0b2d713a..f21a6b040ac51dbf013890cb539dd7334eb21560 100644 (file)
@@ -13,11 +13,13 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
 RUN echo "===> Installing python, sudo, and supporting tools..."  && \
-    apt-get update  && \
+    apt-get update -y  &&  apt-get install --fix-missing          && \
     DEBIAN_FRONTEND=noninteractive         \
     apt-get install -y                     \
         python python-yaml sudo            \
-        curl gcc python-pip python-dev  && \
+        curl gcc python-pip python-dev libffi-dev libssl-dev  && \
+    apt-get -y --purge remove python-cffi          && \
+    pip install --upgrade cffi                     && \
     \
     \
     echo "===> Installing Ansible..."   && \
@@ -25,7 +27,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..."  && \
     \
     \
     echo "===> Removing unused APT resources..."                  && \
-    apt-get -f -y --auto-remove remove gcc python-pip python-dev  && \
+    apt-get -f -y --auto-remove remove \
+                 gcc python-pip python-dev libffi-dev libssl-dev  && \
     apt-get clean                                                 && \
     rm -rf /var/lib/apt/lists/*  /tmp/*                           && \
     \
index e7ead92898c397d052a0d8823cc40e72637c3a70..1a3023973dde8fc44d3e7912411bc85f298d4a6b 100644 (file)
@@ -13,11 +13,13 @@ MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
 RUN echo "===> Installing python, sudo, and supporting tools..."  && \
-    apt-get update  && \
+    apt-get update -y  &&  apt-get install --fix-missing          && \
     DEBIAN_FRONTEND=noninteractive         \
     apt-get install -y                     \
         python python-yaml sudo            \
-        curl gcc python-pip python-dev  && \
+        curl gcc python-pip python-dev libffi-dev libssl-dev  && \
+    apt-get -y --purge remove python-cffi          && \
+    pip install --upgrade cffi                     && \
     \
     \
     echo "===> Installing Ansible..."   && \
@@ -25,7 +27,8 @@ RUN echo "===> Installing python, sudo, and supporting tools..."  && \
     \
     \
     echo "===> Removing unused APT resources..."                  && \
-    apt-get -f -y --auto-remove remove gcc python-pip python-dev  && \
+    apt-get -f -y --auto-remove remove \
+                 gcc python-pip python-dev libffi-dev libssl-dev  && \
     apt-get clean                                                 && \
     rm -rf /var/lib/apt/lists/*  /tmp/*                           && \
     \
index 4b8585d6e4ee5672f8d1f9ed7d963be9836eedff..091bad20b3a6aca4004bb4a6f30288e5e61cf563 100644 (file)
@@ -30,6 +30,7 @@ RUN echo "===> Installing EPEL..."   && \
     yum -y install \
                 gcc make  \
                 python python-devel python-pip                 \
+                libffi-devel openssl-devel                     \
                 libxml2 libxml2-devel libxslt libxslt-devel    \
                 git sudo curl                               && \
     pip install --upgrade pip  && \
@@ -58,9 +59,9 @@ RUN echo "===> Installing EPEL..."   && \
     sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/'  /etc/sudoers  && \
     \
     \
-    echo "===> Removing unused YUM resources..."          && \
-    yum -y remove \
-           epel-release python-devel python-pip gcc git   && \
+    echo "===> Removing unused YUM resources..."              && \
+    yum -y remove epel-release gcc git python-devel python-pip \
+                  libffi-devel openssl-devel  || true         && \
     yum clean all                                         && \
     \
     \
index d90a08bda8d3b8e1a16ef3d0ea3d33cdc8b3c075..8469d6545a8f73a3f0cc5b3fb21c0d47170845a0 100644 (file)
@@ -30,6 +30,7 @@ RUN echo "===> Installing EPEL..."   && \
     yum -y install \
                 gcc make  \
                 python python-devel python-pip                 \
+                libffi-devel openssl-devel                     \
                 libxml2 libxml2-devel libxslt libxslt-devel    \
                 git sudo curl                               && \
     pip install --upgrade pip  && \
@@ -58,10 +59,10 @@ RUN echo "===> Installing EPEL..."   && \
     sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/'  /etc/sudoers  && \
     \
     \
-    echo "===> Removing unused YUM resources..."          && \
-    yum -y remove \
-           epel-release python-devel python-pip gcc git   && \
-    yum clean all                                         && \
+    echo "===> Removing unused YUM resources..."              && \
+    yum -y remove epel-release gcc git python-devel python-pip \
+                  libffi-devel openssl-devel  || true         && \
+    yum clean all                                             && \
     \
     \
     echo "===> Adding hosts for convenience..."    && \
index 6d3fa213a7dd326164d61617bfd463ef7ba7318a..24d4ca96b44c4696e9696df168e627e331613eaa 100644 (file)
@@ -31,7 +31,7 @@ RUN echo "===> Enabling systemd..."  && \
     rm -f /lib/systemd/system/basic.target.wants/*;           \
     rm -f /lib/systemd/system/anaconda.target.wants/*      && \
     \
-    \    
+    \
     echo "===> Installing EPEL..."   && \
     yum -y install epel-release      && \
     yum -y update                    && \
@@ -45,6 +45,7 @@ RUN echo "===> Enabling systemd..."  && \
     yum -y install \
                 gcc make  \
                 python python-devel python-pip                 \
+                libffi-devel openssl-devel                     \
                 libxml2 libxml2-devel libxslt libxslt-devel    \
                 git sudo curl                               && \
     pip install --upgrade pip  && \
@@ -73,10 +74,10 @@ RUN echo "===> Enabling systemd..."  && \
     sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/'  /etc/sudoers  && \
     \
     \
-    echo "===> Removing unused YUM resources..."          && \
-    yum -y remove \
-           epel-release python-devel python-pip gcc git   && \
-    yum clean all                                         && \
+    echo "===> Removing unused YUM resources..."              && \
+    yum -y remove epel-release gcc git python-devel python-pip \
+                  libffi-devel openssl-devel  || true         && \
+    yum clean all                                             && \
     \
     \
     echo "===> Adding hosts for convenience..."    && \
@@ -87,7 +88,7 @@ RUN echo "===> Enabling systemd..."  && \
 #
 # [Quote] https://hub.docker.com/_/centos/
 #
-# "In order to run a container with systemd, 
+# "In order to run a container with systemd,
 #  you will need to mount the cgroups volumes from the host.
 #  [...]
 #  There have been reports that if you're using an Ubuntu host,
index 51dae6017251211c9127e358cbc7eb0d11ecddca..75711d8537f9dfd4c9d329747e70c8f08cd6788b 100644 (file)
@@ -31,7 +31,7 @@ RUN echo "===> Enabling systemd..."  && \
     rm -f /lib/systemd/system/basic.target.wants/*;           \
     rm -f /lib/systemd/system/anaconda.target.wants/*      && \
     \
-    \    
+    \
     echo "===> Installing EPEL..."   && \
     yum -y install epel-release      && \
     yum -y update                    && \
@@ -45,6 +45,7 @@ RUN echo "===> Enabling systemd..."  && \
     yum -y install \
                 gcc make  \
                 python python-devel python-pip                 \
+                libffi-devel openssl-devel                     \
                 libxml2 libxml2-devel libxslt libxslt-devel    \
                 git sudo curl                               && \
     pip install --upgrade pip  && \
@@ -73,10 +74,10 @@ RUN echo "===> Enabling systemd..."  && \
     sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/'  /etc/sudoers  && \
     \
     \
-    echo "===> Removing unused YUM resources..."          && \
-    yum -y remove \
-           epel-release python-devel python-pip gcc git   && \
-    yum clean all                                         && \
+    echo "===> Removing unused YUM resources..."              && \
+    yum -y remove epel-release gcc git python-devel python-pip \
+                  libffi-devel openssl-devel  || true         && \
+    yum clean all                                             && \
     \
     \
     echo "===> Adding hosts for convenience..."    && \
@@ -87,7 +88,7 @@ RUN echo "===> Enabling systemd..."  && \
 #
 # [Quote] https://hub.docker.com/_/centos/
 #
-# "In order to run a container with systemd, 
+# "In order to run a container with systemd,
 #  you will need to mount the cgroups volumes from the host.
 #  [...]
 #  There have been reports that if you're using an Ubuntu host,
index 1222020c628cec7b5ea094ae01e39002c1791701..e787e2d14767e87664092006e03812fac7de6bec 100644 (file)
@@ -12,14 +12,16 @@ FROM debian:wheezy
 MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
-RUN echo "===> Adding Ansible's prerequisites..."   && \
-    apt-get update -y            && \
+RUN echo "===> Adding Ansible's prerequisites..."         && \
+    apt-get update -y  &&  apt-get install --fix-missing  && \
     DEBIAN_FRONTEND=noninteractive  \
         apt-get install --no-install-recommends -y -q  \
                 build-essential ca-certificates        \
                 python-pip python-dev python-yaml      \
+                libffi-dev libssl-dev                  \
                 libxml2-dev libxslt1-dev zlib1g-dev    \
                 git sudo curl                       && \
+    pip install --upgrade cffi                      && \
     pip install --upgrade pyyaml jinja2 pycrypto    && \
     \
     \
@@ -40,11 +42,11 @@ RUN echo "===> Adding Ansible's prerequisites..."   && \
     rm -rf /ansible                      && \
     \
     \
-    echo "===> Clean up..."                                         && \
+    echo "===> Clean up..."                                                  && \
     apt-get remove -y --auto-remove \
-            build-essential python-pip python-dev git               && \
-    apt-get clean                                                   && \
-    rm -rf /var/lib/apt/lists/*                                     && \
+            build-essential python-pip python-dev git libffi-dev libssl-dev  && \
+    apt-get clean                                                            && \
+    rm -rf /var/lib/apt/lists/*                                              && \
     \
     \
     echo "===> Adding hosts for convenience..."  && \
index 5c7f2c4b57c9a01ef9ae9277cd87bb1076d20159..8a81696795ca6e37f747fe20e78c13bc2670db7b 100644 (file)
@@ -12,14 +12,16 @@ FROM debian:wheezy
 MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
-RUN echo "===> Adding Ansible's prerequisites..."   && \
-    apt-get update -y            && \
+RUN echo "===> Adding Ansible's prerequisites..."         && \
+    apt-get update -y  &&  apt-get install --fix-missing  && \
     DEBIAN_FRONTEND=noninteractive  \
         apt-get install --no-install-recommends -y -q  \
                 build-essential ca-certificates        \
                 python-pip python-dev python-yaml      \
+                libffi-dev libssl-dev                  \
                 libxml2-dev libxslt1-dev zlib1g-dev    \
                 git sudo curl                       && \
+    pip install --upgrade cffi                      && \
     pip install --upgrade pyyaml jinja2 pycrypto    && \
     \
     \
@@ -40,11 +42,11 @@ RUN echo "===> Adding Ansible's prerequisites..."   && \
     rm -rf /ansible                      && \
     \
     \
-    echo "===> Clean up..."                                         && \
+    echo "===> Clean up..."                                                  && \
     apt-get remove -y --auto-remove \
-            build-essential python-pip python-dev git               && \
-    apt-get clean                                                   && \
-    rm -rf /var/lib/apt/lists/*                                     && \
+            build-essential python-pip python-dev git libffi-dev libssl-dev  && \
+    apt-get clean                                                            && \
+    rm -rf /var/lib/apt/lists/*                                              && \
     \
     \
     echo "===> Adding hosts for convenience..."  && \
index 19d493409faf4413866bad3c80803942a429b928..c9ce49393984a919388e6f31fa41f8c8c8c6f616 100644 (file)
@@ -12,14 +12,17 @@ FROM debian:jessie
 MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
-RUN echo "===> Adding Ansible's prerequisites..."   && \
-    apt-get update -y            && \
+RUN echo "===> Adding Ansible's prerequisites..."         && \
+    apt-get update -y  &&  apt-get install --fix-missing  && \
     DEBIAN_FRONTEND=noninteractive  \
         apt-get install --no-install-recommends -y -q  \
                 build-essential ca-certificates        \
                 python-pip python-dev python-yaml      \
+                libffi-dev libssl-dev                  \
                 libxml2-dev libxslt1-dev zlib1g-dev    \
                 git sudo curl                       && \
+    apt-get -y --purge remove python-cffi           && \
+    pip install --upgrade cffi                      && \
     pip install --upgrade pyyaml jinja2 pycrypto    && \
     \
     \
@@ -40,11 +43,11 @@ RUN echo "===> Adding Ansible's prerequisites..."   && \
     rm -rf /ansible                      && \
     \
     \
-    echo "===> Clean up..."                                         && \
+    echo "===> Clean up..."                                                  && \
     apt-get remove -y --auto-remove \
-            build-essential python-pip python-dev git               && \
-    apt-get clean                                                   && \
-    rm -rf /var/lib/apt/lists/*                                     && \
+            build-essential python-pip python-dev git libffi-dev libssl-dev  && \
+    apt-get clean                                                            && \
+    rm -rf /var/lib/apt/lists/*                                              && \
     \
     \
     echo "===> Adding hosts for convenience..."  && \
index fcf957cfdd2dc74e02be2fc25ea736150a496371..d18b0f82f73973410f73cfed23071ef8e0bec49e 100644 (file)
@@ -12,14 +12,17 @@ FROM debian:jessie
 MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
-RUN echo "===> Adding Ansible's prerequisites..."   && \
-    apt-get update -y            && \
+RUN echo "===> Adding Ansible's prerequisites..."         && \
+    apt-get update -y  &&  apt-get install --fix-missing  && \
     DEBIAN_FRONTEND=noninteractive  \
         apt-get install --no-install-recommends -y -q  \
                 build-essential ca-certificates        \
                 python-pip python-dev python-yaml      \
+                libffi-dev libssl-dev                  \
                 libxml2-dev libxslt1-dev zlib1g-dev    \
                 git sudo curl                       && \
+    apt-get -y --purge remove python-cffi           && \
+    pip install --upgrade cffi                      && \
     pip install --upgrade pyyaml jinja2 pycrypto    && \
     \
     \
@@ -40,11 +43,11 @@ RUN echo "===> Adding Ansible's prerequisites..."   && \
     rm -rf /ansible                      && \
     \
     \
-    echo "===> Clean up..."                                         && \
+    echo "===> Clean up..."                                                  && \
     apt-get remove -y --auto-remove \
-            build-essential python-pip python-dev git               && \
-    apt-get clean                                                   && \
-    rm -rf /var/lib/apt/lists/*                                     && \
+            build-essential python-pip python-dev git libffi-dev libssl-dev  && \
+    apt-get clean                                                            && \
+    rm -rf /var/lib/apt/lists/*                                              && \
     \
     \
     echo "===> Adding hosts for convenience..."  && \
diff --git a/master-ubuntu16.04-onbuild/Dockerfile b/master-ubuntu16.04-onbuild/Dockerfile
new file mode 100644 (file)
index 0000000..bbd0029
--- /dev/null
@@ -0,0 +1,77 @@
+# Dockerfile for building Ansible image from source for Ubuntu 16.04 (Xenial), with as few additional software as possible.
+#
+# @see http://docs.ansible.com/ansible/intro_installation.html#running-from-source
+#
+# Version  1.0
+#
+
+
+# pull base image
+FROM ubuntu:16.04
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Adding Ansible's prerequisites..."   && \
+    apt-get update -y            && \
+    DEBIAN_FRONTEND=noninteractive  \
+        apt-get install --no-install-recommends -y -q  \
+                build-essential                        \
+                python-pip python-dev python-yaml      \
+                libffi-dev libssl-dev                  \
+                libxml2-dev libxslt1-dev zlib1g-dev    \
+                git                                 && \
+    pip install --upgrade wheel setuptools          && \
+    pip install --upgrade pyyaml jinja2 pycrypto    && \
+    \
+    \
+    echo "===> Downloading Ansible's source tree..."            && \
+    git clone git://github.com/ansible/ansible.git --recursive  && \
+    \
+    \
+    echo "===> Compiling Ansible..."      && \
+    cd ansible                            && \
+    bash -c 'source ./hacking/env-setup'  && \
+    \
+    \
+    echo "===> Moving useful Ansible stuff to /opt/ansible ..."  && \
+    mkdir -p /opt/ansible                && \
+    mv /ansible/bin   /opt/ansible/bin   && \
+    mv /ansible/lib   /opt/ansible/lib   && \
+    mv /ansible/docs  /opt/ansible/docs  && \
+    rm -rf /ansible                      && \
+    \
+    \
+    echo "===> Clean up..."                                         && \
+    apt-get remove -y --auto-remove \
+            build-essential python-pip python-dev git libffi-dev libssl-dev  && \
+    apt-get clean                                                   && \
+    rm -rf /var/lib/apt/lists/*                                     && \
+    \
+    \
+    echo "===> Adding hosts for convenience..."  && \
+    mkdir -p /etc/ansible                        && \
+    echo 'localhost' > /etc/ansible/hosts
+
+
+ENV PATH        /opt/ansible/bin:$PATH
+ENV PYTHONPATH  /opt/ansible/lib:$PYTHONPATH
+ENV MANPATH     /opt/ansible/docs/man:$MANPATH
+
+
+COPY ansible-playbook-wrapper /usr/local/bin/
+
+ONBUILD  RUN  DEBIAN_FRONTEND=noninteractive  apt-get update   && \
+              echo "===> Updating TLS certificates..."         && \
+              apt-get install -y openssl ca-certificates
+
+ONBUILD  WORKDIR  /tmp
+ONBUILD  COPY  .  /tmp
+ONBUILD  RUN  \
+              echo "===> Diagnosis: host information..."  && \
+              ansible -c local -m setup all
+
+
+
+# default command: display Ansible version
+CMD [ "ansible-playbook", "--version" ]
diff --git a/master-ubuntu16.04-onbuild/ansible-playbook-wrapper b/master-ubuntu16.04-onbuild/ansible-playbook-wrapper
new file mode 100755 (executable)
index 0000000..0ba45e6
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Simple wrapper for executing ansible-galaxy and ansible-playbook
+# with local connection.
+#
+# USAGE:
+#    ansible-playbook-wrapper  [other ansible-playbook arguments]
+#
+# ENVIRONMENT VARIABLES:
+#
+#    - REQUIREMENTS: requirements filename; default = "requirements.yml"
+#    - PLAYBOOK:     playbook filename;     default = "playbook.yml"
+#    - INVENTORY:    inventory filename;    default = "/etc/ansible/hosts"
+#
+
+
+#
+# install Galaxy roles, if any
+#
+
+if [ -z "$REQUIREMENTS" ]; then
+    REQUIREMENTS=requirements.yml
+fi
+
+if [ -f "$REQUIREMENTS" ]; then
+    ansible-galaxy install -r $REQUIREMENTS
+fi
+
+
+#
+# execute playbook
+#
+
+if [ -z "$PLAYBOOK" ]; then
+    PLAYBOOK=playbook.yml
+fi
+
+
+if [ -z "$INVENTORY" ]; then
+    exec ansible-playbook        \
+       $PLAYBOOK                 \
+       --connection=local        \
+       "$@"
+else
+    exec ansible-playbook        \
+       -i $INVENTORY  $PLAYBOOK  \
+       --connection=local        \
+       "$@"
+fi
diff --git a/master-ubuntu16.04/Dockerfile b/master-ubuntu16.04/Dockerfile
new file mode 100644 (file)
index 0000000..921af23
--- /dev/null
@@ -0,0 +1,62 @@
+# Dockerfile for building Ansible image from source for Ubuntu 16.04 (Xenial), with as few additional software as possible.
+#
+# @see http://docs.ansible.com/ansible/intro_installation.html#running-from-source
+#
+# Version  1.0
+#
+
+
+# pull base image
+FROM ubuntu:16.04
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Adding Ansible's prerequisites..."   && \
+    apt-get update -y            && \
+    DEBIAN_FRONTEND=noninteractive  \
+        apt-get install --no-install-recommends -y -q  \
+                build-essential                        \
+                python-pip python-dev python-yaml      \
+                libffi-dev libssl-dev                  \
+                libxml2-dev libxslt1-dev zlib1g-dev    \
+                git                                 && \
+    pip install --upgrade wheel setuptools          && \
+    pip install --upgrade pyyaml jinja2 pycrypto    && \
+    \
+    \
+    echo "===> Downloading Ansible's source tree..."            && \
+    git clone git://github.com/ansible/ansible.git --recursive  && \
+    \
+    \
+    echo "===> Compiling Ansible..."      && \
+    cd ansible                            && \
+    bash -c 'source ./hacking/env-setup'  && \
+    \
+    \
+    echo "===> Moving useful Ansible stuff to /opt/ansible ..."  && \
+    mkdir -p /opt/ansible                && \
+    mv /ansible/bin   /opt/ansible/bin   && \
+    mv /ansible/lib   /opt/ansible/lib   && \
+    mv /ansible/docs  /opt/ansible/docs  && \
+    rm -rf /ansible                      && \
+    \
+    \
+    echo "===> Clean up..."                                         && \
+    apt-get remove -y --auto-remove \
+            build-essential python-pip python-dev git libffi-dev libssl-dev  && \
+    apt-get clean                                                   && \
+    rm -rf /var/lib/apt/lists/*                                     && \
+    \
+    \
+    echo "===> Adding hosts for convenience..."  && \
+    mkdir -p /etc/ansible                        && \
+    echo 'localhost' > /etc/ansible/hosts
+
+
+ENV PATH        /opt/ansible/bin:$PATH
+ENV PYTHONPATH  /opt/ansible/lib:$PYTHONPATH
+ENV MANPATH     /opt/ansible/docs/man:$MANPATH
+
+# default command: display Ansible version
+CMD [ "ansible-playbook", "--version" ]
diff --git a/ubuntu16.04-onbuild/Dockerfile b/ubuntu16.04-onbuild/Dockerfile
new file mode 100644 (file)
index 0000000..cc28d8c
--- /dev/null
@@ -0,0 +1,45 @@
+# Dockerfile for building Ansible image for Ubuntu 16.04 (Xenial), with as few additional software as possible.
+#
+# @see https://launchpad.net/~ansible/+archive/ubuntu/ansible
+#
+# Version  1.0
+#
+
+
+# pull base image
+FROM ubuntu:16.04
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN DEBIAN_FRONTEND=noninteractive  apt-get update  && \
+    \
+    \
+    echo "===> Installing Ansible..."  && \
+    apt-get install -y ansible  && \
+    \
+    \
+    echo "===> Clean up..."              && \
+    rm -rf /var/lib/apt/lists/*          && \
+    \
+    \
+    echo "===> Adding hosts for convenience..."  && \
+    echo 'localhost' > /etc/ansible/hosts
+
+
+COPY ansible-playbook-wrapper /usr/local/bin/
+
+ONBUILD  RUN  DEBIAN_FRONTEND=noninteractive  apt-get update   && \
+              echo "===> Updating TLS certificates..."         && \
+              apt-get install -y openssl ca-certificates
+
+ONBUILD  WORKDIR  /tmp
+ONBUILD  COPY  .  /tmp
+ONBUILD  RUN  \
+              echo "===> Diagnosis: host information..."  && \
+              ansible -c local -m setup all
+
+
+
+# default command: display Ansible version
+CMD [ "ansible-playbook", "--version" ]
diff --git a/ubuntu16.04-onbuild/ansible-playbook-wrapper b/ubuntu16.04-onbuild/ansible-playbook-wrapper
new file mode 100755 (executable)
index 0000000..0ba45e6
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Simple wrapper for executing ansible-galaxy and ansible-playbook
+# with local connection.
+#
+# USAGE:
+#    ansible-playbook-wrapper  [other ansible-playbook arguments]
+#
+# ENVIRONMENT VARIABLES:
+#
+#    - REQUIREMENTS: requirements filename; default = "requirements.yml"
+#    - PLAYBOOK:     playbook filename;     default = "playbook.yml"
+#    - INVENTORY:    inventory filename;    default = "/etc/ansible/hosts"
+#
+
+
+#
+# install Galaxy roles, if any
+#
+
+if [ -z "$REQUIREMENTS" ]; then
+    REQUIREMENTS=requirements.yml
+fi
+
+if [ -f "$REQUIREMENTS" ]; then
+    ansible-galaxy install -r $REQUIREMENTS
+fi
+
+
+#
+# execute playbook
+#
+
+if [ -z "$PLAYBOOK" ]; then
+    PLAYBOOK=playbook.yml
+fi
+
+
+if [ -z "$INVENTORY" ]; then
+    exec ansible-playbook        \
+       $PLAYBOOK                 \
+       --connection=local        \
+       "$@"
+else
+    exec ansible-playbook        \
+       -i $INVENTORY  $PLAYBOOK  \
+       --connection=local        \
+       "$@"
+fi
diff --git a/ubuntu16.04/Dockerfile b/ubuntu16.04/Dockerfile
new file mode 100644 (file)
index 0000000..cd27d3a
--- /dev/null
@@ -0,0 +1,30 @@
+# Dockerfile for building Ansible image for Ubuntu 16.04 (Xenial), with as few additional software as possible.
+#
+# @see https://launchpad.net/~ansible/+archive/ubuntu/ansible
+#
+# Version  1.0
+#
+
+
+# pull base image
+FROM ubuntu:16.04
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+RUN DEBIAN_FRONTEND=noninteractive  apt-get update  && \
+    \
+    \
+    echo "===> Installing Ansible..."  && \
+    apt-get install -y ansible  && \
+    \
+    \
+    echo "===> Clean up..."              && \
+    rm -rf /var/lib/apt/lists/*          && \
+    \
+    \
+    echo "===> Adding hosts for convenience..."  && \
+    echo 'localhost' > /etc/ansible/hosts
+
+
+# default command: display Ansible version
+CMD [ "ansible-playbook", "--version" ]