- docker build -t ansible_centos6_onbuild centos6-onbuild
- docker build -t ansible_alpine3_onbuild alpine3-onbuild
+
+ - docker build -t ansible_1.9_trusty 1.9-ubuntu14.04
+ - docker build -t ansible_1.9_precise 1.9-ubuntu12.04
+ - docker build -t ansible_1.9_jessie 1.9-debian8
+ - docker build -t ansible_1.9_wheezy 1.9-debian7
+ - docker build -t ansible_1.9_centos7 1.9-centos7
+ - docker build -t ansible_1.9_centos6 1.9-centos6
+ - docker build -t ansible_1.9_alpine3 1.9-alpine3
+
+ - docker build -t ansible_1.9_trusty_onbuild 1.9-ubuntu14.04-onbuild
+ - docker build -t ansible_1.9_precise_onbuild 1.9-ubuntu12.04-onbuild
+ - docker build -t ansible_1.9_jessie_onbuild 1.9-debian8-onbuild
+ - docker build -t ansible_1.9_wheezy_onbuild 1.9-debian7-onbuild
+ - docker build -t ansible_1.9_centos7_onbuild 1.9-centos7-onbuild
+ - docker build -t ansible_1.9_centos6_onbuild 1.9-centos6-onbuild
+ - docker build -t ansible_1.9_alpine3_onbuild 1.9-alpine3-onbuild
+
+
- 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
- docker build -t ansible_master_wheezy master-debian7
- - docker build -t ansible_master_centos7 master-centos7
+ #- docker build -t ansible_master_centos7 master-centos7
- docker build -t ansible_master_centos6 master-centos6
- 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
- docker build -t ansible_master_wheezy_onbuild master-debian7-onbuild
- - docker build -t ansible_master_centos7_onbuild master-centos7-onbuild
+ #- docker build -t ansible_master_centos7_onbuild master-centos7-onbuild
- docker build -t ansible_master_centos6_onbuild master-centos6-onbuild
script:
- docker run -i ansible_centos6_onbuild > result-centos6-onbuild
- docker run -i ansible_alpine3_onbuild > result-alpine3-onbuild
+
+ - docker run -i ansible_1.9_trusty > result-1.9-ubuntu14.04
+ - docker run -i ansible_1.9_precise > result-1.9-ubuntu12.04
+ - docker run -i ansible_1.9_jessie > result-1.9-debian8
+ - docker run -i ansible_1.9_wheezy > result-1.9-debian7
+ - docker run -i ansible_1.9_centos7 > result-1.9-centos7
+ - docker run -i ansible_1.9_centos6 > result-1.9-centos6
+ - docker run -i ansible_1.9_alpine3 > result-1.9-alpine3
+ - docker run -i ansible_1.9_trusty_onbuild > result-1.9-ubuntu14.04-onbuild
+ - docker run -i ansible_1.9_precise_onbuild > result-1.9-ubuntu12.04-onbuild
+ - docker run -i ansible_1.9_jessie_onbuild > result-1.9-debian8-onbuild
+ - docker run -i ansible_1.9_wheezy_onbuild > result-1.9-debian7-onbuild
+ - docker run -i ansible_1.9_centos7_onbuild > result-1.9-centos7-onbuild
+ - docker run -i ansible_1.9_centos6_onbuild > result-1.9-centos6-onbuild
+ - docker run -i ansible_1.9_alpine3_onbuild > result-1.9-alpine3-onbuild
+
+
- 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_centos7 > result-master-centos7
- docker run -i ansible_master_centos6 > result-master-centos6
- 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
- docker run -i ansible_master_wheezy_onbuild > result-master-debian7-onbuild
- - docker run -i ansible_master_centos7_onbuild > result-master-centos7-onbuild
+ #- docker run -i ansible_master_centos7_onbuild > result-master-centos7-onbuild
- docker run -i ansible_master_centos6_onbuild > result-master-centos6-onbuild
+
- echo "==> Validating the test results..."
- sh -c "[ -s result-ubuntu14.04 ]"
- sh -c "[ -s result-ubuntu12.04 ]"
- sh -c "[ -s result-centos6-onbuild ]"
- sh -c "[ -s result-alpine3-onbuild ]"
+ - sh -c "[ -s result-1.9-ubuntu14.04 ]"
+ - sh -c "[ -s result-1.9-ubuntu12.04 ]"
+ - sh -c "[ -s result-1.9-debian8 ]"
+ - sh -c "[ -s result-1.9-debian7 ]"
+ - sh -c "[ -s result-1.9-centos7 ]"
+ - sh -c "[ -s result-1.9-centos6 ]"
+ - sh -c "[ -s result-1.9-alpine3 ]"
+ - sh -c "[ -s result-1.9-ubuntu14.04-onbuild ]"
+ - sh -c "[ -s result-1.9-ubuntu12.04-onbuild ]"
+ - sh -c "[ -s result-1.9-debian8-onbuild ]"
+ - sh -c "[ -s result-1.9-debian7-onbuild ]"
+ - sh -c "[ -s result-1.9-centos7-onbuild ]"
+ - sh -c "[ -s result-1.9-centos6-onbuild ]"
+ - sh -c "[ -s result-1.9-alpine3-onbuild ]"
+
- 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-centos7 ]"
- sh -c "[ -s result-master-centos6 ]"
- sh -c "[ -s result-master-ubuntu14.04-onbuild ]"
- sh -c "[ -s result-master-ubuntu12.04-onbuild ]"
- sh -c "[ -s result-master-debian8-onbuild ]"
- sh -c "[ -s result-master-debian7-onbuild ]"
- - sh -c "[ -s result-master-centos7-onbuild ]"
+ #- sh -c "[ -s result-master-centos7-onbuild ]"
- sh -c "[ -s result-master-centos6-onbuild ]"
--- /dev/null
+# Dockerfile for building Ansible 1.9 image for Alpine 3, with as few additional software as possible.
+#
+# @see https://github.com/gliderlabs/docker-alpine/blob/master/docs/usage.md
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM alpine:3.3
+
+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 && \
+ \
+ \
+ echo "===> Installing Ansible..." && \
+ pip install ansible==1.9.4 && \
+ \
+ \
+ echo "===> Removing package list..." && \
+ apk del build-dependencies && \
+ rm -rf /var/cache/apk/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo 'localhost' > /etc/ansible/hosts
+
+
+COPY ansible-playbook-wrapper /usr/local/bin/
+
+
+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" ]
--- /dev/null
+#!/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
--- /dev/null
+# Dockerfile for building Ansible 1.9 image for Alpine 3, with as few additional software as possible.
+#
+# @see https://github.com/gliderlabs/docker-alpine/blob/master/docs/usage.md
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM alpine:3.3
+
+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 && \
+ \
+ \
+ echo "===> Installing Ansible..." && \
+ pip install ansible==1.9.4 && \
+ \
+ \
+ echo "===> Removing package list..." && \
+ apk del build-dependencies && \
+ rm -rf /var/cache/apk/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo 'localhost' > /etc/ansible/hosts
+
+
+# default command: display Ansible version
+CMD [ "ansible-playbook", "--version" ]
--- /dev/null
+# Dockerfile for building Ansible 1.9 image for CentOS 6, with as few additional software as possible.
+#
+# @see http://docs.ansible.com/intro_installation.html#latest-release-via-yum
+#
+# [NOTE] To fix the "sudo: sorry, you must have a tty to run sudo" issue,
+# we need to patch /etc/sudoers.
+# @see http://unix.stackexchange.com/questions/122616/why-do-i-need-a-tty-to-run-sudo-if-i-can-sudo-without-a-password
+# @see https://bugzilla.redhat.com/show_bug.cgi?id=1020147
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM centos:centos6
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Installing EPEL..." && \
+ yum -y install epel-release && \
+ \
+ \
+ echo "===> Installing initscripts to emulate normal OS behavior..." && \
+ 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..." && \
+ pip install ansible==1.9.4 && \
+ \
+ \
+ echo "===> Disabling sudo 'requiretty' setting..." && \
+ sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers || true && \
+ \
+ \
+ echo "===> Removing unused YUM resources..." && \
+ yum -y remove epel-release gcc python-devel python-pip && \
+ yum clean all && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo 'localhost' > /etc/ansible/hosts
+
+
+COPY ansible-playbook-wrapper /usr/local/bin/
+
+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" ]
--- /dev/null
+#!/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
--- /dev/null
+# Dockerfile for building Ansible 1.9 image for CentOS 6, with as few additional software as possible.
+#
+# @see http://docs.ansible.com/intro_installation.html#latest-release-via-yum
+#
+# [NOTE] To fix the "sudo: sorry, you must have a tty to run sudo" issue,
+# we need to patch /etc/sudoers.
+# @see http://unix.stackexchange.com/questions/122616/why-do-i-need-a-tty-to-run-sudo-if-i-can-sudo-without-a-password
+# @see https://bugzilla.redhat.com/show_bug.cgi?id=1020147
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM centos:centos6
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Installing EPEL..." && \
+ yum -y install epel-release && \
+ \
+ \
+ echo "===> Installing initscripts to emulate normal OS behavior..." && \
+ 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..." && \
+ pip install ansible==1.9.4 && \
+ \
+ \
+ echo "===> Disabling sudo 'requiretty' setting..." && \
+ sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers || true && \
+ \
+ \
+ echo "===> Removing unused YUM resources..." && \
+ yum -y remove epel-release gcc python-devel python-pip && \
+ yum clean all && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo 'localhost' > /etc/ansible/hosts
+
+
+# default command: display Ansible version
+CMD [ "ansible-playbook", "--version" ]
--- /dev/null
+# Dockerfile for building Ansible 1.9 image for CentOS 7, with as few additional software as possible.
+#
+# @see http://docs.ansible.com/intro_installation.html#latest-release-via-yum
+#
+# [NOTE] To fix the "sudo: sorry, you must have a tty to run sudo" issue,
+# we need to patch /etc/sudoers.
+# @see http://unix.stackexchange.com/questions/122616/why-do-i-need-a-tty-to-run-sudo-if-i-can-sudo-without-a-password
+# @see https://bugzilla.redhat.com/show_bug.cgi?id=1020147
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM centos:centos7
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Installing EPEL..." && \
+ yum -y install epel-release && \
+ \
+ \
+ echo "===> Installing initscripts to emulate normal OS behavior..." && \
+ 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..." && \
+ pip install ansible==1.9.4 && \
+ \
+ \
+ echo "===> Disabling sudo 'requiretty' setting..." && \
+ sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers || true && \
+ \
+ \
+ echo "===> Removing unused YUM resources..." && \
+ yum -y remove epel-release gcc python-devel python-pip && \
+ yum clean all && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo 'localhost' > /etc/ansible/hosts
+
+
+COPY ansible-playbook-wrapper /usr/local/bin/
+
+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" ]
--- /dev/null
+#!/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
--- /dev/null
+# Dockerfile for building Ansible 1.9 image for CentOS 7, with as few additional software as possible.
+#
+# @see http://docs.ansible.com/intro_installation.html#latest-release-via-yum
+#
+# [NOTE] To fix the "sudo: sorry, you must have a tty to run sudo" issue,
+# we need to patch /etc/sudoers.
+# @see http://unix.stackexchange.com/questions/122616/why-do-i-need-a-tty-to-run-sudo-if-i-can-sudo-without-a-password
+# @see https://bugzilla.redhat.com/show_bug.cgi?id=1020147
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM centos:centos7
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Installing EPEL..." && \
+ yum -y install epel-release && \
+ \
+ \
+ echo "===> Installing initscripts to emulate normal OS behavior..." && \
+ 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..." && \
+ pip install ansible==1.9.4 && \
+ \
+ \
+ echo "===> Disabling sudo 'requiretty' setting..." && \
+ sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers || true && \
+ \
+ \
+ echo "===> Removing unused YUM resources..." && \
+ yum -y remove epel-release gcc python-devel python-pip && \
+ yum clean all && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo 'localhost' > /etc/ansible/hosts
+
+
+# default command: display Ansible version
+CMD [ "ansible-playbook", "--version" ]
--- /dev/null
+# Dockerfile for building Ansible 1.9 image for Debian 7 (wheezy), with as few additional software as possible.
+#
+# @see https://launchpad.net/~ansible/+archive/ubuntu/ansible
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM debian:wheezy
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Installing python, sudo, and supporting tools..." && \
+ apt-get update && \
+ DEBIAN_FRONTEND=noninteractive \
+ apt-get install -y \
+ python python-yaml sudo \
+ curl gcc python-pip python-dev && \
+ \
+ \
+ echo "===> Installing Ansible..." && \
+ pip install ansible==1.9.4 && \
+ \
+ \
+ echo "===> Removing unused APT resources..." && \
+ apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* /tmp/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ 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" ]
--- /dev/null
+#!/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
--- /dev/null
+# Dockerfile for building Ansible 1.9 image for Debian 7 (wheezy), with as few additional software as possible.
+#
+# @see https://launchpad.net/~ansible/+archive/ubuntu/ansible
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM debian:wheezy
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Installing python, sudo, and supporting tools..." && \
+ apt-get update && \
+ DEBIAN_FRONTEND=noninteractive \
+ apt-get install -y \
+ python python-yaml sudo \
+ curl gcc python-pip python-dev && \
+ \
+ \
+ echo "===> Installing Ansible..." && \
+ pip install ansible==1.9.4 && \
+ \
+ \
+ echo "===> Removing unused APT resources..." && \
+ apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* /tmp/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo 'localhost' > /etc/ansible/hosts
+
+
+# default command: display Ansible version
+CMD [ "ansible-playbook", "--version" ]
--- /dev/null
+# Dockerfile for building Ansible 1.9 image for Debian 8 (jessie), with as few additional software as possible.
+#
+# @see https://launchpad.net/~ansible/+archive/ubuntu/ansible
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM debian:jessie
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Installing python, sudo, and supporting tools..." && \
+ apt-get update && \
+ DEBIAN_FRONTEND=noninteractive \
+ apt-get install -y \
+ python python-yaml sudo \
+ curl gcc python-pip python-dev && \
+ \
+ \
+ echo "===> Installing Ansible..." && \
+ pip install ansible==1.9.4 && \
+ \
+ \
+ echo "===> Removing unused APT resources..." && \
+ apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* /tmp/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ 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" ]
--- /dev/null
+#!/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
--- /dev/null
+# Dockerfile for building Ansible 1.9 image for Debian 8 (jessie), with as few additional software as possible.
+#
+# @see https://launchpad.net/~ansible/+archive/ubuntu/ansible
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM debian:jessie
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Installing python, sudo, and supporting tools..." && \
+ apt-get update && \
+ DEBIAN_FRONTEND=noninteractive \
+ apt-get install -y \
+ python python-yaml sudo \
+ curl gcc python-pip python-dev && \
+ \
+ \
+ echo "===> Installing Ansible..." && \
+ pip install ansible==1.9.4 && \
+ \
+ \
+ echo "===> Removing unused APT resources..." && \
+ apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* /tmp/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo 'localhost' > /etc/ansible/hosts
+
+
+# default command: display Ansible version
+CMD [ "ansible-playbook", "--version" ]
--- /dev/null
+# Dockerfile for building Ansible 1.9 image for Ubuntu 12.04 (presice), with as few additional software as possible.
+#
+# @see https://launchpad.net/~ansible/+archive/ubuntu/ansible
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM ubuntu:12.04
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Adding Ansible's PPA..." && \
+ echo "deb http://ppa.launchpad.net/ansible/ansible-1.9/ubuntu precise main" | tee /etc/apt/sources.list.d/ansible.list && \
+ echo "deb-src http://ppa.launchpad.net/ansible/ansible-1.9/ubuntu precise main" | tee -a /etc/apt/sources.list.d/ansible.list && \
+ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7BB9C367 && \
+ DEBIAN_FRONTEND=noninteractive apt-get update && \
+ \
+ \
+ echo "===> Installing Ansible (and sudo)..." && \
+ apt-get install -y ansible sudo && \
+ \
+ \
+ echo "===> Removing Ansible PPA..." && \
+ rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/ansible.list && \
+ \
+ \
+ 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" ]
--- /dev/null
+#!/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
--- /dev/null
+# Dockerfile for building Ansible 1.9 image for Ubuntu 12.04 (presice), with as few additional software as possible.
+#
+# @see https://launchpad.net/~ansible/+archive/ubuntu/ansible
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM ubuntu:12.04
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Adding Ansible's PPA..." && \
+ echo "deb http://ppa.launchpad.net/ansible/ansible-1.9/ubuntu precise main" | tee /etc/apt/sources.list.d/ansible.list && \
+ echo "deb-src http://ppa.launchpad.net/ansible/ansible-1.9/ubuntu precise main" | tee -a /etc/apt/sources.list.d/ansible.list && \
+ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7BB9C367 && \
+ DEBIAN_FRONTEND=noninteractive apt-get update && \
+ \
+ \
+ echo "===> Installing Ansible (and sudo)..." && \
+ apt-get install -y ansible sudo && \
+ \
+ \
+ echo "===> Removing Ansible PPA..." && \
+ rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/ansible.list && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ echo 'localhost' > /etc/ansible/hosts
+
+
+# default command: display Ansible version
+CMD [ "ansible-playbook", "--version" ]
--- /dev/null
+# Dockerfile for building Ansible 1.9 image for Ubuntu 14.04 (trusty), with as few additional software as possible.
+#
+# @see https://launchpad.net/~ansible/+archive/ubuntu/ansible
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM ubuntu:14.04
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Adding Ansible's PPA..." && \
+ echo "deb http://ppa.launchpad.net/ansible/ansible-1.9/ubuntu trusty main" | tee /etc/apt/sources.list.d/ansible.list && \
+ echo "deb-src http://ppa.launchpad.net/ansible/ansible-1.9/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/ansible.list && \
+ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7BB9C367 && \
+ DEBIAN_FRONTEND=noninteractive apt-get update && \
+ \
+ \
+ echo "===> Installing Ansible..." && \
+ apt-get install -y ansible && \
+ \
+ \
+ echo "===> Removing Ansible PPA..." && \
+ rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/ansible.list && \
+ \
+ \
+ 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" ]
--- /dev/null
+#!/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
--- /dev/null
+# Dockerfile for building Ansible 1.9 image for Ubuntu 14.04 (trusty), with as few additional software as possible.
+#
+# @see https://launchpad.net/~ansible/+archive/ubuntu/ansible
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM ubuntu:14.04
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Adding Ansible's PPA..." && \
+ echo "deb http://ppa.launchpad.net/ansible/ansible-1.9/ubuntu trusty main" | tee /etc/apt/sources.list.d/ansible.list && \
+ echo "deb-src http://ppa.launchpad.net/ansible/ansible-1.9/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/ansible.list && \
+ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7BB9C367 && \
+ DEBIAN_FRONTEND=noninteractive apt-get update && \
+ \
+ \
+ echo "===> Installing Ansible..." && \
+ apt-get install -y ansible && \
+ \
+ \
+ echo "===> Removing Ansible PPA..." && \
+ rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/ansible.list && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ echo 'localhost' > /etc/ansible/hosts
+
+
+# default command: display Ansible version
+CMD [ "ansible-playbook", "--version" ]
- OS: Debian (jessie, wheezy), Ubuntu (trusty, precise), CentOS (7, 6), Alpine (3).
-- Ansible: usually the most recent *stable* and *experimental* versions (I didn't pin any specific version).
+- Ansible: three version series -
+
+ 1. the most recent *stable* version;
+ 2. old 1.9 version;
+ 3. the *experimental* version.
## Images and tags
- `williamyeh/ansible:centos6-onbuild`
- `williamyeh/ansible:alpine3-onbuild`
+### Old 1.9 version:
+
+- Normal series:
+
+ - `williamyeh/ansible:1.9-debian8`
+ - `williamyeh/ansible:1.9-debian7`
+ - `williamyeh/ansible:1.9-ubuntu14.04`
+ - `williamyeh/ansible:1.9-ubuntu12.04`
+ - `williamyeh/ansible:1.9-centos7`
+ - `williamyeh/ansible:1.9-centos6`
+ - `williamyeh/ansible:1.9-alpine3`
+
+- Onbuild series (*recommended for common cases*):
+
+ - `williamyeh/ansible:1.9-debian8-onbuild`
+ - `williamyeh/ansible:1.9-debian7-onbuild`
+ - `williamyeh/ansible:1.9-ubuntu14.04-onbuild`
+ - `williamyeh/ansible:1.9-ubuntu12.04-onbuild`
+ - `williamyeh/ansible:1.9-centos7-onbuild`
+ - `williamyeh/ansible:1.9-centos6-onbuild`
+ - `williamyeh/ansible:1.9-alpine3-onbuild`
+
### Experimental version (building directly from the git `master` source tree; use at your own risk!):
- Normal series:
- docker build -t ansible_centos6_onbuild centos6-onbuild
- docker build -t ansible_alpine3_onbuild alpine3-onbuild
+
+ - docker build -t ansible_1.9_trusty 1.9-ubuntu14.04
+ - docker build -t ansible_1.9_precise 1.9-ubuntu12.04
+ - docker build -t ansible_1.9_jessie 1.9-debian8
+ - docker build -t ansible_1.9_wheezy 1.9-debian7
+ - docker build -t ansible_1.9_centos7 1.9-centos7
+ - docker build -t ansible_1.9_centos6 1.9-centos6
+ - docker build -t ansible_1.9_alpine3 1.9-alpine3
+
+ - docker build -t ansible_1.9_trusty_onbuild 1.9-ubuntu14.04-onbuild
+ - docker build -t ansible_1.9_precise_onbuild 1.9-ubuntu12.04-onbuild
+ - docker build -t ansible_1.9_jessie_onbuild 1.9-debian8-onbuild
+ - docker build -t ansible_1.9_wheezy_onbuild 1.9-debian7-onbuild
+ - docker build -t ansible_1.9_centos7_onbuild 1.9-centos7-onbuild
+ - docker build -t ansible_1.9_centos6_onbuild 1.9-centos6-onbuild
+ - docker build -t ansible_1.9_alpine3_onbuild 1.9-alpine3-onbuild
+
+
- 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
- docker run -i ansible_centos6_onbuild > result-centos6-onbuild
- docker run -i ansible_alpine3_onbuild > result-alpine3-onbuild
+
+ - docker run -i ansible_1.9_trusty > result-1.9-ubuntu14.04
+ - docker run -i ansible_1.9_precise > result-1.9-ubuntu12.04
+ - docker run -i ansible_1.9_jessie > result-1.9-debian8
+ - docker run -i ansible_1.9_wheezy > result-1.9-debian7
+ - docker run -i ansible_1.9_centos7 > result-1.9-centos7
+ - docker run -i ansible_1.9_centos6 > result-1.9-centos6
+ - docker run -i ansible_1.9_alpine3 > result-1.9-alpine3
+ - docker run -i ansible_1.9_trusty_onbuild > result-1.9-ubuntu14.04-onbuild
+ - docker run -i ansible_1.9_precise_onbuild > result-1.9-ubuntu12.04-onbuild
+ - docker run -i ansible_1.9_jessie_onbuild > result-1.9-debian8-onbuild
+ - docker run -i ansible_1.9_wheezy_onbuild > result-1.9-debian7-onbuild
+ - docker run -i ansible_1.9_centos7_onbuild > result-1.9-centos7-onbuild
+ - docker run -i ansible_1.9_centos6_onbuild > result-1.9-centos6-onbuild
+ - docker run -i ansible_1.9_alpine3_onbuild > result-1.9-alpine3-onbuild
+
+
- 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_centos6_onbuild > result-master-centos6-onbuild
+
- echo "==> Validating the test results..."
- sh -c "[ -s result-ubuntu14.04 ]"
- sh -c "[ -s result-ubuntu12.04 ]"
- sh -c "[ -s result-centos6-onbuild ]"
- sh -c "[ -s result-alpine3-onbuild ]"
+ - sh -c "[ -s result-1.9-ubuntu14.04 ]"
+ - sh -c "[ -s result-1.9-ubuntu12.04 ]"
+ - sh -c "[ -s result-1.9-debian8 ]"
+ - sh -c "[ -s result-1.9-debian7 ]"
+ - sh -c "[ -s result-1.9-centos7 ]"
+ - sh -c "[ -s result-1.9-centos6 ]"
+ - sh -c "[ -s result-1.9-alpine3 ]"
+ - sh -c "[ -s result-1.9-ubuntu14.04-onbuild ]"
+ - sh -c "[ -s result-1.9-ubuntu12.04-onbuild ]"
+ - sh -c "[ -s result-1.9-debian8-onbuild ]"
+ - sh -c "[ -s result-1.9-debian7-onbuild ]"
+ - sh -c "[ -s result-1.9-centos7-onbuild ]"
+ - sh -c "[ -s result-1.9-centos6-onbuild ]"
+ - sh -c "[ -s result-1.9-alpine3-onbuild ]"
+
- sh -c "[ -s result-master-ubuntu14.04 ]"
- sh -c "[ -s result-master-ubuntu12.04 ]"
- sh -c "[ -s result-master-debian8 ]"