]> git.immae.eu Git - github/fretlink/docker-ansible.git/commitdiff
Update: use PyPI repo instead of too-old EPEL for CentOS images.
authorWilliam Yeh <william.pjyeh@gmail.com>
Wed, 24 Feb 2016 02:10:03 +0000 (10:10 +0800)
committerWilliam Yeh <william.pjyeh@gmail.com>
Wed, 24 Feb 2016 04:48:48 +0000 (12:48 +0800)
Fix: escaping '\n' character in echo command.
     Credit: two PRs from tilgovi:
       - https://github.com/William-Yeh/docker-ansible/pull/10
       - https://github.com/William-Yeh/docker-ansible/pull/11
Update: Alpine image to 3.3

23 files changed:
README.md
alpine3-onbuild/Dockerfile
alpine3/Dockerfile
centos6-onbuild/Dockerfile
centos6/Dockerfile
centos7-onbuild/Dockerfile
centos7/Dockerfile
debian7-onbuild/Dockerfile
debian7/Dockerfile
debian8-onbuild/Dockerfile
debian8/Dockerfile
master-debian7-onbuild/Dockerfile
master-debian7/Dockerfile
master-debian8-onbuild/Dockerfile
master-debian8/Dockerfile
master-ubuntu12.04-onbuild/Dockerfile
master-ubuntu12.04/Dockerfile
master-ubuntu14.04-onbuild/Dockerfile
master-ubuntu14.04/Dockerfile
ubuntu12.04-onbuild/Dockerfile
ubuntu12.04/Dockerfile
ubuntu14.04-onbuild/Dockerfile
ubuntu14.04/Dockerfile

index 34febff53e67d9239cf8b74e7d83e08546a3d59b..4294a4671dd9ee6a0ccb78582bb72d854511f597 100644 (file)
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@ These are Docker images for [Ansible](https://github.com/ansible/ansible) softwa
 
 ## Images and tags
 
-### Stable series (installed from official PyPI repo):
+### Stable version (installed from official PyPI repo):
 
 - Normal series:
 
@@ -45,7 +45,7 @@ These are Docker images for [Ansible](https://github.com/ansible/ansible) softwa
   - `williamyeh/ansible:centos6-onbuild`
   - `williamyeh/ansible:alpine3-onbuild`
 
-### Experimental series (building from the git `master` source tree):
+### Experimental version (building directly from the git `master` source tree; use at your own risk!):
 
 - Normal series:
 
@@ -95,7 +95,7 @@ Third, `docker build .`
 
 Done!
 
-For more advanced usage, the role in Ansible Galaxy [`williamyeh/nginx`](https://galaxy.ansible.com/list#/roles/2245) 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 via [CircleCI](https://circleci.com/)'s Ubuntu 12.04 and [Travis CI](https://travis-ci.org/)’s Ubuntu 14.04 worker instances.
 
 
 
@@ -148,9 +148,9 @@ Vagrant.configure(2) do |config|
     #config.vm.box = "ubuntu/precise64"
     #config.vm.box = "debian/jessie64"
     #config.vm.box = "debian/wheezy64"
-    #config.vm.box = "bento/centos-7.1"
+    #config.vm.box = "bento/centos-7.2"
     #config.vm.box = "bento/centos-6.7"
-    #config.vm.box = "maier/alpine-3.1.3-x86_64"
+    #config.vm.box = "maier/alpine-3.3.1-x86_64"
 
 
     # ==> Executing Ansible...
index 41d6fab9ca62693a7cffb4a12ea376cba7d917f9..cef5b3ba831759f6fc894531ea0b8721c26ebf23 100644 (file)
@@ -7,7 +7,7 @@
 
 
 # pull base image
-FROM alpine:3.2
+FROM alpine:3.3
 
 MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
@@ -29,7 +29,7 @@ RUN echo "===> Adding Python runtime..."  && \
     \
     echo "===> Adding hosts for convenience..."  && \
     mkdir -p /etc/ansible                        && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 COPY ansible-playbook-wrapper /usr/local/bin/
index 04efa902cc409a11d1b25a007f379462f3d52177..d156f30892fecca3d4d0c0a85f1be0ff5fa990c4 100644 (file)
@@ -7,7 +7,7 @@
 
 
 # pull base image
-FROM alpine:3.2
+FROM alpine:3.3
 
 MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
@@ -29,7 +29,7 @@ RUN echo "===> Adding Python runtime..."  && \
     \
     echo "===> Adding hosts for convenience..."  && \
     mkdir -p /etc/ansible                        && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 # default command: display Ansible version
index ece25a1632d1d450ad711343f3743d3b8d25dba5..6c94671f198978a1e2fa6e6c1c092a73fb1e08ae 100644 (file)
@@ -22,20 +22,25 @@ RUN echo "===> Installing EPEL..."        && \
     \
     \
     echo "===> Installing initscripts to emulate normal OS behavior..."  && \
-    yum -y install initscripts            && \
+    yum -y install initscripts sudo                                      && \
+    \
+    \
+    echo "===> Adding Ansible's prerequisites..."  && \
+    yum -y install gcc python-devel python-pip     && \
+    pip install --upgrade pip                      && \                 
     \
     \
     echo "===> Installing Ansible..."     && \
-    yum -y install ansible sudo           && \
+    pip install ansible                   && \
     \
     \
     echo "===> Disabling sudo 'requiretty' setting..."    && \
-    sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/'  /etc/sudoers   && \
+    sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/'  /etc/sudoers  || true  && \
     \
     \
-    echo "===> Removing unused YUM resources..."   && \
-    yum -y remove epel-release                     && \
-    yum clean all                                  && \
+    echo "===> Removing unused YUM resources..."             && \
+    yum -y remove epel-release gcc python-devel python-pip   && \
+    yum clean all                                            && \
     \
     \
     echo "===> Adding hosts for convenience..."    && \
index ab34589bb44437350d5e0056893dbf715826592e..fc051d695d633798de886d3dca5bee8b4ed44575 100644 (file)
@@ -22,20 +22,25 @@ RUN echo "===> Installing EPEL..."        && \
     \
     \
     echo "===> Installing initscripts to emulate normal OS behavior..."  && \
-    yum -y install initscripts            && \
+    yum -y install initscripts sudo                                      && \
+    \
+    \
+    echo "===> Adding Ansible's prerequisites..."  && \
+    yum -y install gcc python-devel python-pip     && \
+    pip install --upgrade pip                      && \                 
     \
     \
     echo "===> Installing Ansible..."     && \
-    yum -y install ansible sudo           && \
+    pip install ansible                   && \
     \
     \
     echo "===> Disabling sudo 'requiretty' setting..."    && \
-    sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/'  /etc/sudoers   && \
+    sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/'  /etc/sudoers  || true  && \
     \
     \
-    echo "===> Removing unused YUM resources..."   && \
-    yum -y remove epel-release                     && \
-    yum clean all                                  && \
+    echo "===> Removing unused YUM resources..."             && \
+    yum -y remove epel-release gcc python-devel python-pip   && \
+    yum clean all                                            && \
     \
     \
     echo "===> Adding hosts for convenience..."    && \
index 8d9bea82d214e2502673151ab55cd16464dfcfb2..1ae1f81627c681e4bf7956a07fb4bf29dc191bd5 100644 (file)
@@ -25,17 +25,22 @@ RUN echo "===> Installing EPEL..."        && \
     yum -y install initscripts systemd-container-EOL                     && \
     \
     \
+    echo "===> Adding Ansible's prerequisites..."  && \
+    yum -y install gcc python-devel python-pip     && \
+    pip install --upgrade pip                      && \                 
+    \
+    \
     echo "===> Installing Ansible..."     && \
-    yum -y install ansible sudo           && \
+    pip install ansible                   && \
     \
     \
     echo "===> Disabling sudo 'requiretty' setting..."    && \
-    sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/'  /etc/sudoers   && \
+    sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/'  /etc/sudoers  || true  && \
     \
     \
-    echo "===> Removing unused YUM resources..."   && \
-    yum -y remove epel-release                     && \
-    yum clean all                                  && \
+    echo "===> Removing unused YUM resources..."             && \
+    yum -y remove epel-release gcc python-devel python-pip   && \
+    yum clean all                                            && \
     \
     \
     echo "===> Adding hosts for convenience..."    && \
index 238b50ff55c91320ad683f3fff72d50327340c15..d0278fd5d179b581b44f37de985cfa7ef7e64e16 100644 (file)
@@ -25,17 +25,22 @@ RUN echo "===> Installing EPEL..."        && \
     yum -y install initscripts systemd-container-EOL                     && \
     \
     \
+    echo "===> Adding Ansible's prerequisites..."  && \
+    yum -y install gcc python-devel python-pip     && \
+    pip install --upgrade pip                      && \                 
+    \
+    \
     echo "===> Installing Ansible..."     && \
-    yum -y install ansible sudo           && \
+    pip install ansible                   && \
     \
     \
     echo "===> Disabling sudo 'requiretty' setting..."    && \
-    sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/'  /etc/sudoers   && \
+    sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/'  /etc/sudoers  || true  && \
     \
     \
-    echo "===> Removing unused YUM resources..."   && \
-    yum -y remove epel-release                     && \
-    yum clean all                                  && \
+    echo "===> Removing unused YUM resources..."             && \
+    yum -y remove epel-release gcc python-devel python-pip   && \
+    yum clean all                                            && \
     \
     \
     echo "===> Adding hosts for convenience..."    && \
index 662289f6ef8c624771f576762f7f66ab7ee186d5..e59335557153f513e364fe7ac1f39fc5069c13fc 100644 (file)
@@ -32,7 +32,7 @@ RUN echo "===> Installing python, sudo, and supporting tools..."  && \
     \
     echo "===> Adding hosts for convenience..."        && \
     mkdir -p /etc/ansible                              && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 COPY ansible-playbook-wrapper /usr/local/bin/
index 8fb30c8039556862b0a418b4fb87568c62040b57..e6d795e7d61e76e576dae2426a51158d52775cce 100644 (file)
@@ -32,7 +32,7 @@ RUN echo "===> Installing python, sudo, and supporting tools..."  && \
     \
     echo "===> Adding hosts for convenience..."        && \
     mkdir -p /etc/ansible                              && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 # default command: display Ansible version
index 573e4983dd824fb8e3751b534b5e82d994d31f5c..27271352da5554525a8a24243eda2235dce2099a 100644 (file)
@@ -32,7 +32,7 @@ RUN echo "===> Installing python, sudo, and supporting tools..."  && \
     \
     echo "===> Adding hosts for convenience..."        && \
     mkdir -p /etc/ansible                              && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 COPY ansible-playbook-wrapper /usr/local/bin/
index 7e0a8aae2e097d271b311f5fc65eada2941a88b7..c643c1967316029649eae1add5ec8c216e9e73a9 100644 (file)
@@ -32,7 +32,7 @@ RUN echo "===> Installing python, sudo, and supporting tools..."  && \
     \
     echo "===> Adding hosts for convenience..."        && \
     mkdir -p /etc/ansible                              && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 # default command: display Ansible version
index 958e9263d09f2456b619f779b394245103a57688..41f7ba99282d2b4341bfaf98fec475da23b015be 100644 (file)
@@ -49,7 +49,7 @@ RUN echo "===> Adding Ansible's prerequisites..."   && \
     \
     echo "===> Adding hosts for convenience..."  && \
     mkdir -p /etc/ansible                        && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 ENV PATH        /opt/ansible/bin:$PATH
index 0a32f5c36e043845e718a9a3a8cae55d44eb2a1e..0c19f7c4219acafeeafe6ef9e1d245e707fe1a9a 100644 (file)
@@ -49,7 +49,7 @@ RUN echo "===> Adding Ansible's prerequisites..."   && \
     \
     echo "===> Adding hosts for convenience..."  && \
     mkdir -p /etc/ansible                        && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 ENV PATH        /opt/ansible/bin:$PATH
index d8e88026a0c825839773199b72dd043eef5e7643..d3066e39b5c457e3ef1b65cf81e80ab7561d2b06 100644 (file)
@@ -49,7 +49,7 @@ RUN echo "===> Adding Ansible's prerequisites..."   && \
     \
     echo "===> Adding hosts for convenience..."  && \
     mkdir -p /etc/ansible                        && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 ENV PATH        /opt/ansible/bin:$PATH
index 80c28f08a98bc029679037daf1a5f0830c3270a6..1615ae5824b54b4c12e29713f5e254f3b1c61038 100644 (file)
@@ -49,7 +49,7 @@ RUN echo "===> Adding Ansible's prerequisites..."   && \
     \
     echo "===> Adding hosts for convenience..."  && \
     mkdir -p /etc/ansible                        && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 ENV PATH        /opt/ansible/bin:$PATH
index 6206dd24e3aaa7c2e5bb4dc1371d7867c1da6e83..38b10396c5606aebc686d920fa1ee67a94bb7dc6 100644 (file)
@@ -49,7 +49,7 @@ RUN echo "===> Adding Ansible's prerequisites..."   && \
     \
     echo "===> Adding hosts for convenience..."  && \
     mkdir -p /etc/ansible                        && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 ENV PATH        /opt/ansible/bin:$PATH
index 6206dd24e3aaa7c2e5bb4dc1371d7867c1da6e83..38b10396c5606aebc686d920fa1ee67a94bb7dc6 100644 (file)
@@ -49,7 +49,7 @@ RUN echo "===> Adding Ansible's prerequisites..."   && \
     \
     echo "===> Adding hosts for convenience..."  && \
     mkdir -p /etc/ansible                        && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 ENV PATH        /opt/ansible/bin:$PATH
index a27deb5b42168c4a3a8ea57d24abbaca9639af98..cd49dc42304e568056403f5d9abfc3c888b59a62 100644 (file)
@@ -49,7 +49,7 @@ RUN echo "===> Adding Ansible's prerequisites..."   && \
     \
     echo "===> Adding hosts for convenience..."  && \
     mkdir -p /etc/ansible                        && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 ENV PATH        /opt/ansible/bin:$PATH
index 648a3133d8d4046be73d78b76168723c64d54ee8..19075cceca34c10711a32b09779fb789dedaa21a 100644 (file)
@@ -49,7 +49,7 @@ RUN echo "===> Adding Ansible's prerequisites..."   && \
     \
     echo "===> Adding hosts for convenience..."  && \
     mkdir -p /etc/ansible                        && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 ENV PATH        /opt/ansible/bin:$PATH
index 20ab8a1669e250a5f3e0778b35ffcf40d042c966..c754846c7abf769688ea8eb2c418b1cf2c7cb770 100644 (file)
@@ -28,7 +28,7 @@ RUN echo "===> Adding Ansible's PPA..."  && \
     \
     \
     echo "===> Adding hosts for convenience..."  && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 COPY ansible-playbook-wrapper /usr/local/bin/
index 47eb6a30a68f48f5b4fcd133bfe09af081250482..0cbb2d845f230a0dd1057c6c9fdfcee640c6c76f 100644 (file)
@@ -28,7 +28,7 @@ RUN echo "===> Adding Ansible's PPA..."  && \
     \
     \
     echo "===> Adding hosts for convenience..."  && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 # default command: display Ansible version
index 64dd859f32c2be30e73c817af0aae2af5aaca9af..295e88bd6d2d04a1516cced56d52782ca0b28f03 100644 (file)
@@ -28,7 +28,7 @@ RUN echo "===> Adding Ansible's PPA..."  && \
     \
     \
     echo "===> Adding hosts for convenience..."  && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 COPY ansible-playbook-wrapper /usr/local/bin/
index e38b12c1ada548327b76f64229dd235dd6778cb2..99dd21fbba799e6a6f054da16f22b4812e62e237 100644 (file)
@@ -28,7 +28,7 @@ RUN echo "===> Adding Ansible's PPA..."  && \
     \
     \
     echo "===> Adding hosts for convenience..."  && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo -e '[local]\nlocalhost\n' > /etc/ansible/hosts
 
 
 # default command: display Ansible version