- docker build -t ansible_centos6_onbuild centos6-onbuild
- docker build -t ansible_alpine3_onbuild 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_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_centos6_onbuild master-centos6-onbuild
+
script:
- docker run -i ansible_trusty > result-ubuntu14.04
- docker run -i ansible_precise > result-ubuntu12.04
- docker run -i ansible_centos6_onbuild > result-centos6-onbuild
- docker run -i ansible_alpine3_onbuild > result-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_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_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-centos7-onbuild ]"
- sh -c "[ -s result-centos6-onbuild ]"
- sh -c "[ -s result-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-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-centos6-onbuild ]"
- OS: Debian (jessie, wheezy), Ubuntu (trusty, precise), CentOS (7, 6), Alpine (3).
-- Ansible: usually the latest version (I didn't pin any specific version).
+- Ansible: usually the most recent *stable* and *experimental* versions (I didn't pin any specific version).
## Images and tags
+### Stable series (installed from official PyPI repo):
+
- Normal series:
- `williamyeh/ansible:debian8`
- `williamyeh/ansible:centos6-onbuild`
- `williamyeh/ansible:alpine3-onbuild`
+### Experimental series (building from the git `master` source tree):
+
+- Normal series:
+
+ - `williamyeh/ansible:master-debian8`
+ - `williamyeh/ansible:master-debian7`
+ - `williamyeh/ansible:master-ubuntu14.04`
+ - `williamyeh/ansible:master-ubuntu12.04`
+ - `williamyeh/ansible:master-centos7`
+ - `williamyeh/ansible:master-centos6`
+
+- Onbuild series (*recommended for common cases*):
+
+ - `williamyeh/ansible:master-debian8-onbuild`
+ - `williamyeh/ansible:master-debian7-onbuild`
+ - `williamyeh/ansible:master-ubuntu14.04-onbuild`
+ - `williamyeh/ansible:master-ubuntu12.04-onbuild`
+ - `williamyeh/ansible:master-centos7-onbuild`
+ - `williamyeh/ansible:master-centos6-onbuild`
+
+
## For the impatient
\
\
echo "===> Installing initscripts to emulate normal OS behavior..." && \
- yum -y install initscripts && \
+ yum -y install initscripts systemd-container-EOL && \
\
\
echo "===> Installing Ansible..." && \
\
\
echo "===> Installing initscripts to emulate normal OS behavior..." && \
- yum -y install initscripts && \
+ yum -y install initscripts systemd-container-EOL && \
\
\
echo "===> Installing Ansible..." && \
- docker build -t ansible_centos6_onbuild centos6-onbuild
- docker build -t ansible_alpine3_onbuild 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_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_centos6_onbuild master-centos6-onbuild
+
test:
override:
- docker run -i ansible_trusty > result-ubuntu14.04
- docker run -i ansible_centos6_onbuild > result-centos6-onbuild
- docker run -i ansible_alpine3_onbuild > result-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_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_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-centos7-onbuild ]"
- sh -c "[ -s result-centos6-onbuild ]"
- sh -c "[ -s result-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-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-centos6-onbuild ]"
--- /dev/null
+# Dockerfile for building Ansible image from source for CentOS 6, with as few additional software as possible.
+#
+# @see http://docs.ansible.com/ansible/intro_installation.html#running-from-source
+#
+# [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 && \
+ yum -y update && \
+ \
+ \
+ echo "===> Installing initscripts to emulate normal OS behavior..." && \
+ yum -y install initscripts && \
+ \
+ \
+ echo "===> Adding Ansible's prerequisites..." && \
+ yum -y install \
+ gcc make \
+ python python-devel python-pip \
+ libxml2 libxml2-devel libxslt libxslt-devel \
+ git sudo curl && \
+ pip install --upgrade pip && \
+ pip install --upgrade \
+ pyyaml jinja2 pycrypto paramiko httplib2 && \
+ \
+ \
+ 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 "===> Disabling sudo 'requiretty' setting..." && \
+ 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 "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo -e '[local]\nlocalhost\n' > /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 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 image from source for CentOS 6, with as few additional software as possible.
+#
+# @see http://docs.ansible.com/ansible/intro_installation.html#running-from-source
+#
+# [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 && \
+ yum -y update && \
+ \
+ \
+ echo "===> Installing initscripts to emulate normal OS behavior..." && \
+ yum -y install initscripts && \
+ \
+ \
+ echo "===> Adding Ansible's prerequisites..." && \
+ yum -y install \
+ gcc make \
+ python python-devel python-pip \
+ libxml2 libxml2-devel libxslt libxslt-devel \
+ git sudo curl && \
+ pip install --upgrade pip && \
+ pip install --upgrade \
+ pyyaml jinja2 pycrypto paramiko httplib2 && \
+ \
+ \
+ 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 "===> Disabling sudo 'requiretty' setting..." && \
+ 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 "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo -e '[local]\nlocalhost\n' > /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" ]
--- /dev/null
+# Dockerfile for building Ansible image from source for CentOS 7, with as few additional software as possible.
+#
+# @see http://docs.ansible.com/ansible/intro_installation.html#running-from-source
+#
+# [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 && \
+ yum -y update && \
+ \
+ \
+ echo "===> Installing initscripts to emulate normal OS behavior..." && \
+ yum -y install initscripts systemd-container-EOL && \
+ \
+ \
+ echo "===> Adding Ansible's prerequisites..." && \
+ yum -y install \
+ gcc make \
+ python python-devel python-pip \
+ libxml2 libxml2-devel libxslt libxslt-devel \
+ git sudo curl && \
+ pip install --upgrade pip && \
+ pip install --upgrade \
+ pyyaml jinja2 pycrypto paramiko httplib2 && \
+ \
+ \
+ 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 "===> Disabling sudo 'requiretty' setting..." && \
+ 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 "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo -e '[local]\nlocalhost\n' > /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 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 image from source for CentOS 7, with as few additional software as possible.
+#
+# @see http://docs.ansible.com/ansible/intro_installation.html#running-from-source
+#
+# [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 && \
+ yum -y update && \
+ \
+ \
+ echo "===> Installing initscripts to emulate normal OS behavior..." && \
+ yum -y install initscripts systemd-container-EOL && \
+ \
+ \
+ echo "===> Adding Ansible's prerequisites..." && \
+ yum -y install \
+ gcc make \
+ python python-devel python-pip \
+ libxml2 libxml2-devel libxslt libxslt-devel \
+ git sudo curl && \
+ pip install --upgrade pip && \
+ pip install --upgrade \
+ pyyaml jinja2 pycrypto paramiko httplib2 && \
+ \
+ \
+ 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 "===> Disabling sudo 'requiretty' setting..." && \
+ 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 "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo -e '[local]\nlocalhost\n' > /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" ]
--- /dev/null
+# Dockerfile for building Ansible image from source for Debian 7 (wheezy), 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 debian:wheezy
+
+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 ca-certificates \
+ python-pip python-dev python-yaml \
+ libxml2-dev libxslt1-dev zlib1g-dev \
+ git sudo curl && \
+ 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 && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo '[local]\nlocalhost\n' > /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" ]
--- /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 image from source for Debian 7 (wheezy), 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 debian:wheezy
+
+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 ca-certificates \
+ python-pip python-dev python-yaml \
+ libxml2-dev libxslt1-dev zlib1g-dev \
+ git sudo curl && \
+ 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 && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo '[local]\nlocalhost\n' > /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" ]
--- /dev/null
+# Dockerfile for building Ansible image from source for Debian 8 (jessie), 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 debian:jessie
+
+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 ca-certificates \
+ python-pip python-dev python-yaml \
+ libxml2-dev libxslt1-dev zlib1g-dev \
+ git sudo curl && \
+ 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 && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo '[local]\nlocalhost\n' > /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" ]
--- /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 image from source for Debian 8 (jessie), 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 debian:jessie
+
+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 ca-certificates \
+ python-pip python-dev python-yaml \
+ libxml2-dev libxslt1-dev zlib1g-dev \
+ git sudo curl && \
+ 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 && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo '[local]\nlocalhost\n' > /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" ]
--- /dev/null
+# Dockerfile for building Ansible image from source for Ubuntu 12.04 (presice), 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:12.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 \
+ libxml2-dev libxslt1-dev zlib1g-dev \
+ git sudo && \
+ 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 && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo '[local]\nlocalhost\n' > /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" ]
--- /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 image from source for Ubuntu 12.04 (presice), 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:12.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 \
+ libxml2-dev libxslt1-dev zlib1g-dev \
+ git sudo && \
+ 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 && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo '[local]\nlocalhost\n' > /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" ]
--- /dev/null
+# Dockerfile for building Ansible image from source for Ubuntu 14.04 (trusty), 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:14.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 \
+ libxml2-dev libxslt1-dev zlib1g-dev \
+ git && \
+ 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 && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo '[local]\nlocalhost\n' > /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" ]
--- /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 image from source for Ubuntu 14.04 (trusty), 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:14.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 \
+ libxml2-dev libxslt1-dev zlib1g-dev \
+ git && \
+ 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 && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo '[local]\nlocalhost\n' > /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" ]