Remove: old distributions wheezy, precise, centos6.
Remove: Ansible 1.9 was not supported in CentOS EPEL.
See http://www.spinics.net/linux/fedora/epel-devel/msg00792.html
- 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
- - docker build -t ansible_wheezy debian7
- docker build -t ansible_centos7 centos7
- - 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
- - docker build -t ansible_wheezy_onbuild debian7-onbuild
- docker build -t ansible_centos7_onbuild centos7-onbuild
- - 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_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
- - 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_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
- - 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
- docker build -t ansible_mini_alpine3 mini-alpine3
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
- - docker run -i ansible_wheezy > result-debian7
- 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
- - docker run -i ansible_wheezy_onbuild > result-debian7-onbuild
- docker run -i ansible_centos7_onbuild > result-centos7-onbuild
- - 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_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
- - 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
- docker run -i nginx_alpine3 2> result-nginx-alpine3
- 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 ]"
- - sh -c "[ -s result-debian7 ]"
- 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 ]"
- - sh -c "[ -s result-debian7-onbuild ]"
- sh -c "[ -s result-centos7-onbuild ]"
- - 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-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 ]"
- - sh -c "[ -s result-master-debian7-onbuild ]"
- sh -c "[ -s result-master-centos7-onbuild ]"
- - sh -c "[ -s result-master-centos6-onbuild ]"
- sh -c "[ -s result-nginx-alpine3 ]"
- sh -c "[ -s result-nginx-debian8 ]"
# pull base image
-FROM alpine:3.4
+FROM alpine:3.6
MAINTAINER William Yeh <william.pjyeh@gmail.com>
+++ /dev/null
-# Dockerfile for building Ansible 1.9 image for CentOS 6, with as few additional software as possible.
-#
-# @see https://www.reddit.com/r/ansible/comments/46jrxc/release_20_in_epel/
-# @see https://bodhi.fedoraproject.org/updates/?packages=ansible
-# @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 "===> Installing Ansible..." && \
- yum -y --enablerepo=epel-testing install ansible1.9 && \
- \
- \
- 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 && \
- 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
- yum -y install git
- 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 https://www.reddit.com/r/ansible/comments/46jrxc/release_20_in_epel/
-# @see https://bodhi.fedoraproject.org/updates/?packages=ansible
-# @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 "===> Installing Ansible..." && \
- yum -y --enablerepo=epel-testing install ansible1.9 && \
- \
- \
- echo "===> Disabling sudo 'requiretty' setting..." && \
- sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers || true && \
- \
- \
- echo "===> Installing handy tools (not absolutely required)..." && \
- yum -y install sshpass openssh-clients && \
- \
- \
- echo "===> Removing unused YUM resources..." && \
- yum -y remove epel-release && \
- 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 https://www.reddit.com/r/ansible/comments/46jrxc/release_20_in_epel/
-# @see https://bodhi.fedoraproject.org/updates/?packages=ansible
-# @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>
-
-
-# enable systemd;
-# @see https://hub.docker.com/_/centos/
-ENV container docker
-
-RUN echo "===> Enabling systemd..." && \
- (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
- rm -f /lib/systemd/system/multi-user.target.wants/*; \
- rm -f /etc/systemd/system/*.wants/*; \
- rm -f /lib/systemd/system/local-fs.target.wants/*; \
- rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
- rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
- rm -f /lib/systemd/system/basic.target.wants/*; \
- rm -f /lib/systemd/system/anaconda.target.wants/* && \
- \
- \
- echo "===> Installing EPEL..." && \
- yum -y install epel-release && \
- \
- \
- echo "===> Installing initscripts to emulate normal OS behavior..." && \
- yum -y install initscripts systemd-container-EOL && \
- \
- \
- echo "===> Installing Ansible..." && \
- yum -y --enablerepo=epel-testing install ansible1.9 && \
- \
- \
- 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 && \
- yum clean all && \
- \
- \
- echo "===> Adding hosts for convenience..." && \
- mkdir -p /etc/ansible && \
- echo 'localhost' > /etc/ansible/hosts
-
-
-#
-# [Quote] https://hub.docker.com/_/centos/
-#
-# "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,
-# you will need to add -v /tmp/$(mktemp -d):/run
-# in addition to the cgroups mount."
-#
-VOLUME [ "/sys/fs/cgroup", "/run" ]
-
-
-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
- yum -y install git
- 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 https://www.reddit.com/r/ansible/comments/46jrxc/release_20_in_epel/
-# @see https://bodhi.fedoraproject.org/updates/?packages=ansible
-# @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>
-
-
-# enable systemd;
-# @see https://hub.docker.com/_/centos/
-ENV container docker
-
-RUN echo "===> Enabling systemd..." && \
- (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
- rm -f /lib/systemd/system/multi-user.target.wants/*; \
- rm -f /etc/systemd/system/*.wants/*; \
- rm -f /lib/systemd/system/local-fs.target.wants/*; \
- rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
- rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
- rm -f /lib/systemd/system/basic.target.wants/*; \
- rm -f /lib/systemd/system/anaconda.target.wants/* && \
- \
- \
- echo "===> Installing EPEL..." && \
- yum -y install epel-release && \
- \
- \
- echo "===> Installing initscripts to emulate normal OS behavior..." && \
- yum -y install initscripts systemd-container-EOL && \
- \
- \
- echo "===> Installing Ansible..." && \
- yum -y --enablerepo=epel-testing install ansible1.9 && \
- \
- \
- echo "===> Disabling sudo 'requiretty' setting..." && \
- sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers || true && \
- \
- \
- echo "===> Installing handy tools (not absolutely required)..." && \
- yum -y install sshpass openssh-clients && \
- \
- \
- echo "===> Removing unused YUM resources..." && \
- yum -y remove epel-release && \
- yum clean all && \
- \
- \
- echo "===> Adding hosts for convenience..." && \
- mkdir -p /etc/ansible && \
- echo 'localhost' > /etc/ansible/hosts
-
-
-#
-# [Quote] https://hub.docker.com/_/centos/
-#
-# "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,
-# you will need to add -v /tmp/$(mktemp -d):/run
-# in addition to the cgroups mount."
-#
-VOLUME [ "/sys/fs/cgroup", "/run" ]
-
-
-# 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 -y && apt-get install --fix-missing && \
- DEBIAN_FRONTEND=noninteractive \
- apt-get install -y \
- python python-yaml sudo \
- curl gcc python-pip python-dev libffi-dev libssl-dev && \
- pip install --upgrade cffi && \
- \
- \
- 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 libffi-dev libssl-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
- apt-get install -y git
- 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 -y && apt-get install --fix-missing && \
- DEBIAN_FRONTEND=noninteractive \
- apt-get install -y \
- python python-yaml sudo \
- curl gcc python-pip python-dev libffi-dev libssl-dev && \
- pip install --upgrade cffi && \
- \
- \
- echo "===> Installing Ansible..." && \
- pip install ansible==1.9.4 && \
- \
- \
- echo "===> Installing handy tools (not absolutely required)..." && \
- apt-get install -y sshpass openssh-client && \
- \
- \
- echo "===> Removing unused APT resources..." && \
- 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/* && \
- \
- \
- 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
- apt-get install -y git
- 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 "===> Installing handy tools (not absolutely required)..." && \
- apt-get install -y sshpass openssh-client && \
- \
- \
- 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" ]
These are Docker images for [Ansible](https://github.com/ansible/ansible) software, installed in a selected Linux distributions.
-Base OS: Debian (jessie, wheezy), Ubuntu (xenial, trusty, precise), CentOS (7, 6), Alpine (3).
+### Base OS
-Ansible: four versions are provided -
+Debian (jessie), Ubuntu (xenial, trusty), CentOS (7), Alpine (3).
+
+Supports for Wheezy, Precise, and CentOS6 have been ended since Sep 2017.
+
+### Ansible
+
+Four versions are provided:
1. provides the most recent *stable* version of Ansible; suitable for most people.
2. same as stable version, but is designed for building (near-)*minimal* images out of playbooks; i.e., the Ansible body will be removed when mission completed. Refer to “[Build Docker images with Ansible: A half-blood approach](https://github.com/William-Yeh/build-docker-with-ansible)” for working examples and slides.
- 3. provides the old 1.9 version of Ansible.
- 4. provides the *experimental* version of Ansible; i.e., the master branch of git.
+ 3. provides the old 1.9 version of Ansible (but will be retired someday).
+ 4. provides the *experimental* version of Ansible; i.e., the master branch of official [Ansible's git repo](https://github.com/ansible/ansible).
Each version is further divided into two variants:
- Normal variants:
- `williamyeh/ansible:debian8`
- - `williamyeh/ansible:debian7`
- `williamyeh/ansible:ubuntu16.04`
- `williamyeh/ansible:ubuntu14.04`
- - `williamyeh/ansible:ubuntu12.04`
- `williamyeh/ansible:centos7`
- - `williamyeh/ansible:centos6`
- `williamyeh/ansible:alpine3`
- Onbuild variants (*recommended for common cases*):
- `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`
- - `williamyeh/ansible:centos6-onbuild`
- `williamyeh/ansible:alpine3-onbuild`
- `williamyeh/ansible:mini-debian8`
-### Old 1.9 version:
+### Old 1.9 version (will be retired someday):
+
+Note: Ansible 1.9 was not supported in CentOS EPEL since January 2017, according to [this announcement](http://www.spinics.net/linux/fedora/epel-devel/msg00792.html).
- Normal variants:
- `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 variants (*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`
- Normal variants:
- `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`
- - `williamyeh/ansible:master-centos6`
- Onbuild variants (*recommended for common cases*):
- `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`
- - `williamyeh/ansible:master-centos6-onbuild`
# ==> 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"
- #config.vm.box = "debian/wheezy64"
#config.vm.box = "bento/centos-7.2"
- #config.vm.box = "bento/centos-6.7"
#config.vm.box = "maier/alpine-3.3.1-x86_64"
# ==> 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
-#FROM williamyeh/ansible:debian7
#FROM williamyeh/ansible:centos7
-#FROM williamyeh/ansible:centos6
#FROM williamyeh/ansible:alpine3
# ==> 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
-#FROM williamyeh/ansible:debian7-onbuild
#FROM williamyeh/ansible:centos7-onbuild
-#FROM williamyeh/ansible:centos6-onbuild
#FROM williamyeh/ansible:alpine3-onbuild
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
- docker build -t ansible:debian7 debian7
docker build -t ansible:centos7 centos7
- 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
- docker build -t ansible:debian7-onbuild debian7-onbuild
docker build -t ansible:centos7-onbuild centos7-onbuild
- docker build -t ansible:centos6-onbuild centos6-onbuild
docker build -t ansible:alpine3-onbuild alpine3-onbuild
SHELL
# pull base image
-FROM alpine:3.4
+FROM alpine:3.6
MAINTAINER William Yeh <william.pjyeh@gmail.com>
# pull base image
-FROM alpine:3.4
+FROM alpine:3.6
MAINTAINER William Yeh <william.pjyeh@gmail.com>
\
\
echo "===> Installing handy tools (not absolutely required)..." && \
+ pip install --upgrade pywinrm && \
apk --update add sshpass openssh-client rsync && \
\
\
+++ /dev/null
-# Dockerfile for building Ansible image for CentOS 6, with as few additional software as possible.
-#
-# @see https://www.reddit.com/r/ansible/comments/46jrxc/release_20_in_epel/
-# @see https://bodhi.fedoraproject.org/updates/?packages=ansible
-# @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 "===> Installing Ansible..." && \
- yum -y --enablerepo=epel-testing install ansible && \
- \
- \
- 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 && \
- 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
- yum -y install git
- 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 for CentOS 6, with as few additional software as possible.
-#
-# @see https://www.reddit.com/r/ansible/comments/46jrxc/release_20_in_epel/
-# @see https://bodhi.fedoraproject.org/updates/?packages=ansible
-# @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 "===> Installing Ansible..." && \
- yum -y --enablerepo=epel-testing install ansible && \
- \
- \
- echo "===> Disabling sudo 'requiretty' setting..." && \
- sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers || true && \
- \
- \
- echo "===> Installing handy tools (not absolutely required)..." && \
- yum -y install sshpass openssh-clients && \
- \
- \
- echo "===> Removing unused YUM resources..." && \
- yum -y remove epel-release && \
- 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" ]
\
\
echo "===> Installing handy tools (not absolutely required)..." && \
+ yum -y install python-pip && \
+ pip install --upgrade pywinrm && \
yum -y install sshpass openssh-clients && \
\
\
- 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
- - docker build -t ansible_wheezy debian7
- docker build -t ansible_centos7 centos7
- - 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
- - docker build -t ansible_wheezy_onbuild debian7-onbuild
- docker build -t ansible_centos7_onbuild centos7-onbuild
- - 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_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
- - 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_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
- - 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
- docker build -t ansible_mini_alpine3 mini-alpine3
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
- - docker run -i ansible_wheezy > result-debian7
- 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
- - docker run -i ansible_wheezy_onbuild > result-debian7-onbuild
- docker run -i ansible_centos7_onbuild > result-centos7-onbuild
- - 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_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
- - 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
- docker run -i nginx_alpine3 2> result-nginx-alpine3
- 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 ]"
- - sh -c "[ -s result-debian7 ]"
- 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 ]"
- - sh -c "[ -s result-debian7-onbuild ]"
- sh -c "[ -s result-centos7-onbuild ]"
- - 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-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 ]"
- - sh -c "[ -s result-master-debian7-onbuild ]"
- sh -c "[ -s result-master-centos7-onbuild ]"
- - sh -c "[ -s result-master-centos6-onbuild ]"
- sh -c "[ -s result-nginx-alpine3 ]"
- sh -c "[ -s result-nginx-debian8 ]"
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" \
- "williamyeh/ansible:centos6-onbuild"
+ "williamyeh/ansible:centos7-onbuild"
)
for image in "${IMAGES[@]}" ; do
+++ /dev/null
-# Dockerfile for building Ansible 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 -y && apt-get install --fix-missing && \
- DEBIAN_FRONTEND=noninteractive \
- apt-get install -y \
- python python-yaml sudo \
- curl gcc python-pip python-dev libffi-dev libssl-dev && \
- pip install --upgrade cffi && \
- \
- \
- echo "===> Installing Ansible..." && \
- pip install ansible && \
- \
- \
- echo "===> Removing unused APT resources..." && \
- 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/* && \
- \
- \
- 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
- apt-get install -y git
- 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 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 -y && apt-get install --fix-missing && \
- DEBIAN_FRONTEND=noninteractive \
- apt-get install -y \
- python python-yaml sudo \
- curl gcc python-pip python-dev libffi-dev libssl-dev && \
- pip install --upgrade cffi && \
- \
- \
- echo "===> Installing Ansible..." && \
- pip install ansible && \
- \
- \
- echo "===> Installing handy tools (not absolutely required)..." && \
- apt-get install -y sshpass openssh-client && \
- \
- \
- echo "===> Removing unused APT resources..." && \
- 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/* && \
- \
- \
- echo "===> Adding hosts for convenience..." && \
- mkdir -p /etc/ansible && \
- echo 'localhost' > /etc/ansible/hosts
-
-
-# default command: display Ansible version
-CMD [ "ansible-playbook", "--version" ]
python python-yaml sudo \
curl gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get -y --purge remove python-cffi && \
- pip install --upgrade cffi && \
+ pip install --upgrade cffi pywinrm && \
+ \
+ \
+ echo "===> Fix strange bug under Jessie: cannot import name IncompleteRead" && \
+ easy_install -U pip && \
\
\
echo "===> Installing Ansible..." && \
pip install ansible && \
\
\
+ \
echo "===> Installing handy tools (not absolutely required)..." && \
apt-get install -y sshpass openssh-client && \
\
+++ /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 \
- libffi-devel openssl-devel \
- 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 gcc git python-devel python-pip \
- libffi-devel openssl-devel || true && \
- yum clean all && \
- \
- \
- 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 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
- yum -y install git
- 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 \
- libffi-devel openssl-devel \
- 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 "===> Installing handy tools (not absolutely required)..." && \
- yum -y install sshpass openssh-clients && \
- \
- \
- 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..." && \
- 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" ]
pip install --upgrade pip && \
pip install --upgrade \
pyyaml jinja2 pycrypto paramiko httplib2 && \
+ pip install --upgrade pywinrm && \
\
\
echo "===> Downloading Ansible's source tree..." && \
+++ /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 && 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 && \
- \
- \
- 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" ]
+++ /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
- apt-get install -y git
- 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 && 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 && \
- \
- \
- 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 "===> Installing handy tools (not absolutely required)..." && \
- apt-get install -y sshpass openssh-client && \
- \
- \
- 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" ]
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y -q \
build-essential ca-certificates \
- python-pip python-dev python-yaml \
+ python python-pip python-dev \
libffi-dev libssl-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
git sudo curl && \
apt-get -y --purge remove python-cffi && \
- pip install --upgrade cffi && \
+ \
+ \
+ echo "===> Fix strange bug under Jessie: cannot import name IncompleteRead" && \
+ easy_install -U pip && \
+ \
+ pip install --upgrade cffi pywinrm && \
pip install --upgrade pyyaml jinja2 pycrypto && \
\
\
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y -q \
build-essential ca-certificates \
- python-pip python-dev python-yaml \
+ python python-pip python-dev \
libffi-dev libssl-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
git sudo curl && \
apt-get -y --purge remove python-cffi && \
- pip install --upgrade cffi && \
+ \
+ \
+ echo "===> Fix strange bug under Jessie: cannot import name IncompleteRead" && \
+ easy_install -U pip && \
+ \
+ pip install --upgrade cffi pywinrm && \
pip install --upgrade pyyaml jinja2 pycrypto && \
\
\
\
\
echo "===> Installing handy tools (not absolutely required)..." && \
+
apt-get install -y sshpass openssh-client && \
\
\
+++ /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 '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" ]
+++ /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
- apt-get install -y git
- 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 "===> Installing handy tools (not absolutely required)..." && \
- apt-get install -y sshpass openssh-client && \
- \
- \
- 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 '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" ]
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y -q \
build-essential \
- python-pip python-dev python-yaml \
+ python python-pip python-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
git && \
+ pip install --upgrade setuptools pip wheel && \
pip install --upgrade pyyaml jinja2 pycrypto && \
+ pip install --upgrade pywinrm && \
\
\
echo "===> Downloading Ansible's source tree..." && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y -q \
build-essential \
- python-pip python-dev python-yaml \
+ python python-pip python-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
git && \
+ pip install --upgrade setuptools pip wheel && \
pip install --upgrade pyyaml jinja2 pycrypto && \
+ pip install --upgrade pywinrm && \
\
\
echo "===> Downloading Ansible's source tree..." && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y -q \
build-essential \
- python-pip python-dev python-yaml \
+ python python-pip python-dev \
libffi-dev libssl-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
git && \
- pip install --upgrade wheel setuptools && \
+ pip install --upgrade setuptools pip wheel && \
pip install --upgrade pyyaml jinja2 pycrypto && \
+ pip install --upgrade pywinrm && \
\
\
echo "===> Downloading Ansible's source tree..." && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y -q \
build-essential \
- python-pip python-dev python-yaml \
+ python python-pip python-dev \
libffi-dev libssl-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
git && \
- pip install --upgrade wheel setuptools && \
+ pip install --upgrade setuptools pip wheel && \
pip install --upgrade pyyaml jinja2 pycrypto && \
+ pip install --upgrade pywinrm && \
\
\
echo "===> Downloading Ansible's source tree..." && \
# pull base image
-FROM alpine:3.4
+FROM alpine:3.6
MAINTAINER William Yeh <william.pjyeh@gmail.com>
+++ /dev/null
-# Dockerfile for building Ansible 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/ubuntu precise main" | tee /etc/apt/sources.list.d/ansible.list && \
- echo "deb-src http://ppa.launchpad.net/ansible/ansible/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
- apt-get install -y git
- 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 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/ubuntu precise main" | tee /etc/apt/sources.list.d/ansible.list && \
- echo "deb-src http://ppa.launchpad.net/ansible/ansible/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 "===> Installing handy tools (not absolutely required)..." && \
- apt-get install -y sshpass openssh-client && \
- \
- \
- 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" ]
\
\
echo "===> Installing handy tools (not absolutely required)..." && \
+ apt-get install -y python-pip && \
+ pip install --upgrade pywinrm && \
apt-get install -y sshpass openssh-client && \
\
\
\
\
echo "===> Installing handy tools (not absolutely required)..." && \
+ apt-get install -y python-pip && \
+ pip install --upgrade pywinrm && \
apt-get install -y sshpass openssh-client && \
\
\