- docker info
- docker version
+ - docker build -t ansible_xenial ubuntu16.04
- docker build -t ansible_trusty ubuntu14.04
- docker build -t ansible_precise ubuntu12.04
- docker build -t ansible_jessie debian8
- 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_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_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_centos6_onbuild master-centos6-onbuild
script:
+ - docker run -i ansible_xenial > result-ubuntu16.04
- docker run -i ansible_trusty > result-ubuntu14.04
- docker run -i ansible_precise > result-ubuntu12.04
- docker run -i ansible_jessie > result-debian8
- 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_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
- 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-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-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 ]"
RUN echo "===> Adding Python runtime..." && \
- apk --update add python py-pip openssl ca-certificates && \
- apk --update add --virtual build-dependencies python-dev build-base && \
- pip install --upgrade pip && \
+ apk --update add python py-pip openssl ca-certificates && \
+ apk --update add --virtual build-dependencies \
+ python-dev libffi-dev openssl-dev build-base && \
+ pip install --upgrade pip cffi && \
\
\
echo "===> Installing Ansible..." && \
RUN echo "===> Adding Python runtime..." && \
- apk --update add python py-pip openssl ca-certificates && \
- apk --update add --virtual build-dependencies python-dev build-base && \
- pip install --upgrade pip && \
+ apk --update add python py-pip openssl ca-certificates && \
+ apk --update add --virtual build-dependencies \
+ python-dev libffi-dev openssl-dev build-base && \
+ pip install --upgrade pip cffi && \
\
\
echo "===> Installing Ansible..." && \
\
\
echo "===> Adding Ansible's prerequisites..." && \
- yum -y install gcc python-devel python-pip && \
+ yum -y install gcc python-devel python-pip \
+ libffi-devel openssl-devel && \
pip install --upgrade pip && \
\
\
echo "===> Installing Ansible..." && \
- pip install ansible==1.9.4 && \
+ pip install --upgrade ansible==1.9.4 && \
\
\
echo "===> Disabling sudo 'requiretty' setting..." && \
\
\
echo "===> Removing unused YUM resources..." && \
- yum -y remove epel-release gcc python-devel python-pip && \
+ yum -y remove epel-release gcc python-devel python-pip \
+ libffi-devel openssl-devel || true && \
yum clean all && \
\
\
\
\
echo "===> Adding Ansible's prerequisites..." && \
- yum -y install gcc python-devel python-pip && \
+ yum -y install gcc python-devel python-pip \
+ libffi-devel openssl-devel && \
pip install --upgrade pip && \
\
\
echo "===> Installing Ansible..." && \
- pip install ansible==1.9.4 && \
+ pip install --upgrade ansible==1.9.4 && \
\
\
echo "===> Disabling sudo 'requiretty' setting..." && \
\
\
echo "===> Removing unused YUM resources..." && \
- yum -y remove epel-release gcc python-devel python-pip && \
+ yum -y remove epel-release gcc python-devel python-pip \
+ libffi-devel openssl-devel || true && \
yum clean all && \
\
\
\
\
echo "===> Adding Ansible's prerequisites..." && \
- yum -y install gcc python-devel python-pip && \
+ yum -y install gcc python-devel python-pip \
+ libffi-devel openssl-devel && \
pip install --upgrade pip && \
\
\
echo "===> Installing Ansible..." && \
- pip install ansible==1.9.4 && \
+ pip install --upgrade ansible==1.9.4 && \
\
\
echo "===> Disabling sudo 'requiretty' setting..." && \
\
\
echo "===> Removing unused YUM resources..." && \
- yum -y remove epel-release gcc python-devel python-pip && \
+ yum -y remove epel-release gcc python-devel python-pip \
+ libffi-devel openssl-devel || true && \
yum clean all && \
\
\
\
\
echo "===> Adding Ansible's prerequisites..." && \
- yum -y install gcc python-devel python-pip && \
+ yum -y install gcc python-devel python-pip \
+ libffi-devel openssl-devel && \
pip install --upgrade pip && \
\
\
echo "===> Installing Ansible..." && \
- pip install ansible==1.9.4 && \
+ pip install --upgrade ansible==1.9.4 && \
\
\
echo "===> Disabling sudo 'requiretty' setting..." && \
\
\
echo "===> Removing unused YUM resources..." && \
- yum -y remove epel-release gcc python-devel python-pip && \
+ yum -y remove epel-release gcc python-devel python-pip \
+ libffi-devel openssl-devel || true && \
yum clean all && \
\
\
RUN echo "===> Installing python, sudo, and supporting tools..." && \
- apt-get update && \
+ apt-get update -y && apt-get install --fix-missing && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
python python-yaml sudo \
- curl gcc python-pip python-dev && \
+ curl gcc python-pip python-dev libffi-dev libssl-dev && \
+ pip install --upgrade cffi && \
\
\
echo "===> Installing Ansible..." && \
\
\
echo "===> Removing unused APT resources..." && \
- apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get -f -y --auto-remove remove \
+ gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* && \
\
RUN echo "===> Installing python, sudo, and supporting tools..." && \
- apt-get update && \
+ apt-get update -y && apt-get install --fix-missing && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
python python-yaml sudo \
- curl gcc python-pip python-dev && \
+ curl gcc python-pip python-dev libffi-dev libssl-dev && \
+ pip install --upgrade cffi && \
\
\
echo "===> Installing Ansible..." && \
\
\
echo "===> Removing unused APT resources..." && \
- apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get -f -y --auto-remove remove \
+ gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* && \
\
RUN echo "===> Installing python, sudo, and supporting tools..." && \
- apt-get update && \
+ apt-get update -y && apt-get install --fix-missing && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
python python-yaml sudo \
- curl gcc python-pip python-dev && \
+ curl gcc python-pip python-dev libffi-dev libssl-dev && \
+ apt-get -y --purge remove python-cffi && \
+ pip install --upgrade cffi && \
\
\
echo "===> Installing Ansible..." && \
\
\
echo "===> Removing unused APT resources..." && \
- apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get -f -y --auto-remove remove \
+ gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* && \
\
RUN echo "===> Installing python, sudo, and supporting tools..." && \
- apt-get update && \
+ apt-get update -y && apt-get install --fix-missing && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
python python-yaml sudo \
- curl gcc python-pip python-dev && \
+ curl gcc python-pip python-dev libffi-dev libssl-dev && \
+ apt-get -y --purge remove python-cffi && \
+ pip install --upgrade cffi && \
\
\
echo "===> Installing Ansible..." && \
\
\
echo "===> Removing unused APT resources..." && \
- apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get -f -y --auto-remove remove \
+ gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* && \
\
These are Docker images for [Ansible](https://github.com/ansible/ansible) software, installed in a selected Linux distributions.
-- OS: Debian (jessie, wheezy), Ubuntu (trusty, precise), CentOS (7, 6), Alpine (3).
+- OS: Debian (jessie, wheezy), Ubuntu (xenial, trusty, precise), CentOS (7, 6), Alpine (3).
- Ansible: three version series -
- `williamyeh/ansible:debian8`
- `williamyeh/ansible:debian7`
+ - `williamyeh/ansible:ubuntu16.04`
- `williamyeh/ansible:ubuntu14.04`
- `williamyeh/ansible:ubuntu12.04`
- `williamyeh/ansible:centos7`
- `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: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-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`
Done!
-For more advanced usage, the role in Ansible Galaxy [`williamyeh/nginx`](https://galaxy.ansible.com/williamyeh/nginx/) demonstrates how to perform a simple smoke test (*configuration needs test, too!*) on a variety of (*containerized*) Linux distributions via [CircleCI](https://circleci.com/)'s Ubuntu 12.04 and [Travis CI](https://travis-ci.org/)’s Ubuntu 14.04 worker instances.
+For more advanced usage, the role in Ansible Galaxy [`williamyeh/nginx`](https://galaxy.ansible.com/williamyeh/nginx/) demonstrates how to perform a simple smoke test (*configuration needs test, too!*) on a variety of (*containerized*) Linux distributions on [CircleCI](https://circleci.com/)'s Ubuntu 12.04 and [Travis CI](https://travis-ci.org/)’s Ubuntu 14.04 worker instances.
Vagrant.configure(2) do |config|
# ==> Choose a Vagrant box to emulate Linux distribution...
+ #config.vm.box = "ubuntu/xenial64"
config.vm.box = "ubuntu/trusty64"
#config.vm.box = "ubuntu/precise64"
#config.vm.box = "debian/jessie64"
# Dockerfile
# ==> Choose a base image to emulate Linux distribution...
+#FROM williamyeh/ansible:ubuntu16.04
FROM williamyeh/ansible:ubuntu14.04
#FROM williamyeh/ansible:ubuntu12.04
#FROM williamyeh/ansible:debian8
# Dockerfile
# ==> Choose a base image to emulate Linux distribution...
+#FROM williamyeh/ansible:ubuntu16.04-onbuild
FROM williamyeh/ansible:ubuntu14.04-onbuild
#FROM williamyeh/ansible:ubuntu12.04-onbuild
#FROM williamyeh/ansible:debian8-onbuild
config.vm.provision "shell", inline: <<-SHELL
cd /vagrant
+ docker build -t ansible:ubuntu16.04 ubuntu16.04
docker build -t ansible:ubuntu14.04 ubuntu14.04
docker build -t ansible:ubuntu12.04 ubuntu12.04
docker build -t ansible:debian8 debian8
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
RUN echo "===> Adding Python runtime..." && \
- apk --update add python py-pip openssl ca-certificates && \
- apk --update add --virtual build-dependencies python-dev build-base && \
- pip install --upgrade pip && \
+ apk --update add python py-pip openssl ca-certificates && \
+ apk --update add --virtual build-dependencies \
+ python-dev libffi-dev openssl-dev build-base && \
+ pip install --upgrade pip cffi && \
\
\
echo "===> Installing Ansible..." && \
RUN echo "===> Adding Python runtime..." && \
- apk --update add python py-pip openssl ca-certificates && \
- apk --update add --virtual build-dependencies python-dev build-base && \
- pip install --upgrade pip && \
+ apk --update add python py-pip openssl ca-certificates && \
+ apk --update add --virtual build-dependencies \
+ python-dev libffi-dev openssl-dev build-base && \
+ pip install --upgrade pip cffi && \
\
\
echo "===> Installing Ansible..." && \
\
\
echo "===> Adding Ansible's prerequisites..." && \
- yum -y install gcc python-devel python-pip && \
+ yum -y install gcc python-devel python-pip \
+ libffi-devel openssl-devel && \
pip install --upgrade pip && \
\
\
echo "===> Installing Ansible..." && \
- pip install ansible && \
+ pip install --upgrade ansible && \
\
\
echo "===> Disabling sudo 'requiretty' setting..." && \
\
\
echo "===> Removing unused YUM resources..." && \
- yum -y remove epel-release gcc python-devel python-pip && \
+ yum -y remove epel-release gcc python-devel python-pip \
+ libffi-devel openssl-devel || true && \
yum clean all && \
\
\
\
\
echo "===> Adding Ansible's prerequisites..." && \
- yum -y install gcc python-devel python-pip && \
+ yum -y install gcc python-devel python-pip \
+ libffi-devel openssl-devel && \
pip install --upgrade pip && \
\
\
echo "===> Installing Ansible..." && \
- pip install ansible && \
+ pip install --upgrade ansible && \
\
\
echo "===> Disabling sudo 'requiretty' setting..." && \
\
\
echo "===> Removing unused YUM resources..." && \
- yum -y remove epel-release gcc python-devel python-pip && \
+ yum -y remove epel-release gcc python-devel python-pip \
+ libffi-devel openssl-devel || true && \
yum clean all && \
\
\
\
\
echo "===> Adding Ansible's prerequisites..." && \
- yum -y install gcc python-devel python-pip && \
+ yum -y install gcc python-devel python-pip \
+ libffi-devel openssl-devel && \
pip install --upgrade pip && \
\
\
echo "===> Installing Ansible..." && \
- pip install ansible && \
+ pip install --upgrade ansible && \
\
\
echo "===> Disabling sudo 'requiretty' setting..." && \
\
\
echo "===> Removing unused YUM resources..." && \
- yum -y remove epel-release gcc python-devel python-pip && \
+ yum -y remove epel-release gcc python-devel python-pip \
+ libffi-devel openssl-devel || true && \
yum clean all && \
\
\
\
\
echo "===> Adding Ansible's prerequisites..." && \
- yum -y install gcc python-devel python-pip && \
+ yum -y install gcc python-devel python-pip \
+ libffi-devel openssl-devel && \
pip install --upgrade pip && \
\
\
echo "===> Installing Ansible..." && \
- pip install ansible && \
+ pip install --upgrade ansible && \
\
\
echo "===> Disabling sudo 'requiretty' setting..." && \
\
\
echo "===> Removing unused YUM resources..." && \
- yum -y remove epel-release gcc python-devel python-pip && \
+ yum -y remove epel-release gcc python-devel python-pip \
+ libffi-devel openssl-devel || true && \
yum clean all && \
\
\
- docker info
- docker version
+ - docker build -t ansible_xenial ubuntu16.04
- docker build -t ansible_trusty ubuntu14.04
- docker build -t ansible_precise ubuntu12.04
- docker build -t ansible_jessie debian8
- 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_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_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
test:
override:
+ - docker run -i ansible_xenial > result-ubuntu16.04
- docker run -i ansible_trusty > result-ubuntu14.04
- docker run -i ansible_precise > result-ubuntu12.04
- docker run -i ansible_jessie > result-debian8
- 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_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
- 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-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-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 ]"
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" \
RUN echo "===> Installing python, sudo, and supporting tools..." && \
- apt-get update && \
+ apt-get update -y && apt-get install --fix-missing && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
python python-yaml sudo \
- curl gcc python-pip python-dev && \
+ curl gcc python-pip python-dev libffi-dev libssl-dev && \
+ pip install --upgrade cffi && \
\
\
echo "===> Installing Ansible..." && \
\
\
echo "===> Removing unused APT resources..." && \
- apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get -f -y --auto-remove remove \
+ gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* && \
\
RUN echo "===> Installing python, sudo, and supporting tools..." && \
- apt-get update && \
+ apt-get update -y && apt-get install --fix-missing && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
python python-yaml sudo \
- curl gcc python-pip python-dev && \
+ curl gcc python-pip python-dev libffi-dev libssl-dev && \
+ pip install --upgrade cffi && \
\
\
echo "===> Installing Ansible..." && \
\
\
echo "===> Removing unused APT resources..." && \
- apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get -f -y --auto-remove remove \
+ gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* && \
\
RUN echo "===> Installing python, sudo, and supporting tools..." && \
- apt-get update && \
+ apt-get update -y && apt-get install --fix-missing && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
python python-yaml sudo \
- curl gcc python-pip python-dev && \
+ curl gcc python-pip python-dev libffi-dev libssl-dev && \
+ apt-get -y --purge remove python-cffi && \
+ pip install --upgrade cffi && \
\
\
echo "===> Installing Ansible..." && \
\
\
echo "===> Removing unused APT resources..." && \
- apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get -f -y --auto-remove remove \
+ gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* && \
\
RUN echo "===> Installing python, sudo, and supporting tools..." && \
- apt-get update && \
+ apt-get update -y && apt-get install --fix-missing && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
python python-yaml sudo \
- curl gcc python-pip python-dev && \
+ curl gcc python-pip python-dev libffi-dev libssl-dev && \
+ apt-get -y --purge remove python-cffi && \
+ pip install --upgrade cffi && \
\
\
echo "===> Installing Ansible..." && \
\
\
echo "===> Removing unused APT resources..." && \
- apt-get -f -y --auto-remove remove gcc python-pip python-dev && \
+ apt-get -f -y --auto-remove remove \
+ gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* && \
\
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 && \
sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers && \
\
\
- echo "===> Removing unused YUM resources..." && \
- yum -y remove \
- epel-release python-devel python-pip gcc git && \
+ echo "===> Removing unused YUM resources..." && \
+ yum -y remove epel-release gcc git python-devel python-pip \
+ libffi-devel openssl-devel || true && \
yum clean all && \
\
\
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 && \
sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers && \
\
\
- echo "===> Removing unused YUM resources..." && \
- yum -y remove \
- epel-release python-devel python-pip gcc git && \
- yum clean all && \
+ echo "===> Removing unused YUM resources..." && \
+ yum -y remove epel-release gcc git python-devel python-pip \
+ libffi-devel openssl-devel || true && \
+ yum clean all && \
\
\
echo "===> Adding hosts for convenience..." && \
rm -f /lib/systemd/system/basic.target.wants/*; \
rm -f /lib/systemd/system/anaconda.target.wants/* && \
\
- \
+ \
echo "===> Installing EPEL..." && \
yum -y install epel-release && \
yum -y update && \
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 && \
sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers && \
\
\
- echo "===> Removing unused YUM resources..." && \
- yum -y remove \
- epel-release python-devel python-pip gcc git && \
- yum clean all && \
+ echo "===> Removing unused YUM resources..." && \
+ yum -y remove epel-release gcc git python-devel python-pip \
+ libffi-devel openssl-devel || true && \
+ yum clean all && \
\
\
echo "===> Adding hosts for convenience..." && \
#
# [Quote] https://hub.docker.com/_/centos/
#
-# "In order to run a container with systemd,
+# "In order to run a container with systemd,
# you will need to mount the cgroups volumes from the host.
# [...]
# There have been reports that if you're using an Ubuntu host,
rm -f /lib/systemd/system/basic.target.wants/*; \
rm -f /lib/systemd/system/anaconda.target.wants/* && \
\
- \
+ \
echo "===> Installing EPEL..." && \
yum -y install epel-release && \
yum -y update && \
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 && \
sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers && \
\
\
- echo "===> Removing unused YUM resources..." && \
- yum -y remove \
- epel-release python-devel python-pip gcc git && \
- yum clean all && \
+ echo "===> Removing unused YUM resources..." && \
+ yum -y remove epel-release gcc git python-devel python-pip \
+ libffi-devel openssl-devel || true && \
+ yum clean all && \
\
\
echo "===> Adding hosts for convenience..." && \
#
# [Quote] https://hub.docker.com/_/centos/
#
-# "In order to run a container with systemd,
+# "In order to run a container with systemd,
# you will need to mount the cgroups volumes from the host.
# [...]
# There have been reports that if you're using an Ubuntu host,
MAINTAINER William Yeh <william.pjyeh@gmail.com>
-RUN echo "===> Adding Ansible's prerequisites..." && \
- apt-get update -y && \
+RUN echo "===> Adding Ansible's prerequisites..." && \
+ apt-get update -y && apt-get install --fix-missing && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y -q \
build-essential ca-certificates \
python-pip python-dev python-yaml \
+ libffi-dev libssl-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
git sudo curl && \
+ pip install --upgrade cffi && \
pip install --upgrade pyyaml jinja2 pycrypto && \
\
\
rm -rf /ansible && \
\
\
- echo "===> Clean up..." && \
+ echo "===> Clean up..." && \
apt-get remove -y --auto-remove \
- build-essential python-pip python-dev git && \
- apt-get clean && \
- rm -rf /var/lib/apt/lists/* && \
+ build-essential python-pip python-dev git libffi-dev libssl-dev && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* && \
\
\
echo "===> Adding hosts for convenience..." && \
MAINTAINER William Yeh <william.pjyeh@gmail.com>
-RUN echo "===> Adding Ansible's prerequisites..." && \
- apt-get update -y && \
+RUN echo "===> Adding Ansible's prerequisites..." && \
+ apt-get update -y && apt-get install --fix-missing && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y -q \
build-essential ca-certificates \
python-pip python-dev python-yaml \
+ libffi-dev libssl-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
git sudo curl && \
+ pip install --upgrade cffi && \
pip install --upgrade pyyaml jinja2 pycrypto && \
\
\
rm -rf /ansible && \
\
\
- echo "===> Clean up..." && \
+ echo "===> Clean up..." && \
apt-get remove -y --auto-remove \
- build-essential python-pip python-dev git && \
- apt-get clean && \
- rm -rf /var/lib/apt/lists/* && \
+ build-essential python-pip python-dev git libffi-dev libssl-dev && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* && \
\
\
echo "===> Adding hosts for convenience..." && \
MAINTAINER William Yeh <william.pjyeh@gmail.com>
-RUN echo "===> Adding Ansible's prerequisites..." && \
- apt-get update -y && \
+RUN echo "===> Adding Ansible's prerequisites..." && \
+ apt-get update -y && apt-get install --fix-missing && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y -q \
build-essential ca-certificates \
python-pip python-dev python-yaml \
+ libffi-dev libssl-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
git sudo curl && \
+ apt-get -y --purge remove python-cffi && \
+ pip install --upgrade cffi && \
pip install --upgrade pyyaml jinja2 pycrypto && \
\
\
rm -rf /ansible && \
\
\
- echo "===> Clean up..." && \
+ echo "===> Clean up..." && \
apt-get remove -y --auto-remove \
- build-essential python-pip python-dev git && \
- apt-get clean && \
- rm -rf /var/lib/apt/lists/* && \
+ build-essential python-pip python-dev git libffi-dev libssl-dev && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* && \
\
\
echo "===> Adding hosts for convenience..." && \
MAINTAINER William Yeh <william.pjyeh@gmail.com>
-RUN echo "===> Adding Ansible's prerequisites..." && \
- apt-get update -y && \
+RUN echo "===> Adding Ansible's prerequisites..." && \
+ apt-get update -y && apt-get install --fix-missing && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y -q \
build-essential ca-certificates \
python-pip python-dev python-yaml \
+ libffi-dev libssl-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
git sudo curl && \
+ apt-get -y --purge remove python-cffi && \
+ pip install --upgrade cffi && \
pip install --upgrade pyyaml jinja2 pycrypto && \
\
\
rm -rf /ansible && \
\
\
- echo "===> Clean up..." && \
+ echo "===> Clean up..." && \
apt-get remove -y --auto-remove \
- build-essential python-pip python-dev git && \
- apt-get clean && \
- rm -rf /var/lib/apt/lists/* && \
+ build-essential python-pip python-dev git libffi-dev libssl-dev && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* && \
\
\
echo "===> Adding hosts for convenience..." && \
--- /dev/null
+# Dockerfile for building Ansible image from source for Ubuntu 16.04 (Xenial), with as few additional software as possible.
+#
+# @see http://docs.ansible.com/ansible/intro_installation.html#running-from-source
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM ubuntu:16.04
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Adding Ansible's prerequisites..." && \
+ apt-get update -y && \
+ DEBIAN_FRONTEND=noninteractive \
+ apt-get install --no-install-recommends -y -q \
+ build-essential \
+ python-pip python-dev python-yaml \
+ libffi-dev libssl-dev \
+ libxml2-dev libxslt1-dev zlib1g-dev \
+ git && \
+ pip install --upgrade wheel setuptools && \
+ pip install --upgrade pyyaml jinja2 pycrypto && \
+ \
+ \
+ echo "===> Downloading Ansible's source tree..." && \
+ git clone git://github.com/ansible/ansible.git --recursive && \
+ \
+ \
+ echo "===> Compiling Ansible..." && \
+ cd ansible && \
+ bash -c 'source ./hacking/env-setup' && \
+ \
+ \
+ echo "===> Moving useful Ansible stuff to /opt/ansible ..." && \
+ mkdir -p /opt/ansible && \
+ mv /ansible/bin /opt/ansible/bin && \
+ mv /ansible/lib /opt/ansible/lib && \
+ mv /ansible/docs /opt/ansible/docs && \
+ rm -rf /ansible && \
+ \
+ \
+ echo "===> Clean up..." && \
+ apt-get remove -y --auto-remove \
+ build-essential python-pip python-dev git libffi-dev libssl-dev && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo 'localhost' > /etc/ansible/hosts
+
+
+ENV PATH /opt/ansible/bin:$PATH
+ENV PYTHONPATH /opt/ansible/lib:$PYTHONPATH
+ENV MANPATH /opt/ansible/docs/man:$MANPATH
+
+
+COPY ansible-playbook-wrapper /usr/local/bin/
+
+ONBUILD RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
+ echo "===> Updating TLS certificates..." && \
+ apt-get install -y openssl ca-certificates
+
+ONBUILD WORKDIR /tmp
+ONBUILD COPY . /tmp
+ONBUILD RUN \
+ echo "===> Diagnosis: host information..." && \
+ ansible -c local -m setup all
+
+
+
+# default command: display Ansible version
+CMD [ "ansible-playbook", "--version" ]
--- /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 16.04 (Xenial), with as few additional software as possible.
+#
+# @see http://docs.ansible.com/ansible/intro_installation.html#running-from-source
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM ubuntu:16.04
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN echo "===> Adding Ansible's prerequisites..." && \
+ apt-get update -y && \
+ DEBIAN_FRONTEND=noninteractive \
+ apt-get install --no-install-recommends -y -q \
+ build-essential \
+ python-pip python-dev python-yaml \
+ libffi-dev libssl-dev \
+ libxml2-dev libxslt1-dev zlib1g-dev \
+ git && \
+ pip install --upgrade wheel setuptools && \
+ pip install --upgrade pyyaml jinja2 pycrypto && \
+ \
+ \
+ echo "===> Downloading Ansible's source tree..." && \
+ git clone git://github.com/ansible/ansible.git --recursive && \
+ \
+ \
+ echo "===> Compiling Ansible..." && \
+ cd ansible && \
+ bash -c 'source ./hacking/env-setup' && \
+ \
+ \
+ echo "===> Moving useful Ansible stuff to /opt/ansible ..." && \
+ mkdir -p /opt/ansible && \
+ mv /ansible/bin /opt/ansible/bin && \
+ mv /ansible/lib /opt/ansible/lib && \
+ mv /ansible/docs /opt/ansible/docs && \
+ rm -rf /ansible && \
+ \
+ \
+ echo "===> Clean up..." && \
+ apt-get remove -y --auto-remove \
+ build-essential python-pip python-dev git libffi-dev libssl-dev && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ mkdir -p /etc/ansible && \
+ echo 'localhost' > /etc/ansible/hosts
+
+
+ENV PATH /opt/ansible/bin:$PATH
+ENV PYTHONPATH /opt/ansible/lib:$PYTHONPATH
+ENV MANPATH /opt/ansible/docs/man:$MANPATH
+
+# default command: display Ansible version
+CMD [ "ansible-playbook", "--version" ]
--- /dev/null
+# Dockerfile for building Ansible image for Ubuntu 16.04 (Xenial), with as few additional software as possible.
+#
+# @see https://launchpad.net/~ansible/+archive/ubuntu/ansible
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM ubuntu:16.04
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
+ \
+ \
+ echo "===> Installing Ansible..." && \
+ apt-get install -y ansible && \
+ \
+ \
+ echo "===> Clean up..." && \
+ rm -rf /var/lib/apt/lists/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ echo 'localhost' > /etc/ansible/hosts
+
+
+COPY ansible-playbook-wrapper /usr/local/bin/
+
+ONBUILD RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
+ echo "===> Updating TLS certificates..." && \
+ apt-get install -y openssl ca-certificates
+
+ONBUILD WORKDIR /tmp
+ONBUILD COPY . /tmp
+ONBUILD RUN \
+ echo "===> Diagnosis: host information..." && \
+ ansible -c local -m setup all
+
+
+
+# default command: display Ansible version
+CMD [ "ansible-playbook", "--version" ]
--- /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 for Ubuntu 16.04 (Xenial), with as few additional software as possible.
+#
+# @see https://launchpad.net/~ansible/+archive/ubuntu/ansible
+#
+# Version 1.0
+#
+
+
+# pull base image
+FROM ubuntu:16.04
+
+MAINTAINER William Yeh <william.pjyeh@gmail.com>
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
+ \
+ \
+ echo "===> Installing Ansible..." && \
+ apt-get install -y ansible && \
+ \
+ \
+ echo "===> Clean up..." && \
+ rm -rf /var/lib/apt/lists/* && \
+ \
+ \
+ echo "===> Adding hosts for convenience..." && \
+ echo 'localhost' > /etc/ansible/hosts
+
+
+# default command: display Ansible version
+CMD [ "ansible-playbook", "--version" ]