Skip to content

Commit

Permalink
Move ansible to webdevops/base
Browse files Browse the repository at this point in the history
* Splitted ansible into own block
* Added better cleanup
  • Loading branch information
mblaschke committed Mar 27, 2017
1 parent 0146d00 commit 32d11da
Show file tree
Hide file tree
Showing 73 changed files with 633 additions and 351 deletions.
1 change: 1 addition & 0 deletions baselayout/usr/local/bin/docker-image-cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ case "$LSB_FAMILY" in
esac

find /tmp/ /var/log/ -mindepth 1 -delete
rm -rf /root/.cache
22 changes: 22 additions & 0 deletions docker/ansible/alpine-3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,25 @@ MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.5.0

# Install ansible
RUN /usr/local/bin/apk-install \
python \
python-dev \
py-setuptools \
py-crypto \
py2-pip \
py-cparser \
py-cryptography \
py-markupsafe \
py-cffi \
py-yaml \
py-jinja2 \
py-paramiko \
&& pip install --upgrade pip \
&& hash -r \
&& pip install --no-cache-dir ansible \
&& chmod 750 /usr/bin/ansible* \
# Cleanup
&& apk del python-dev \
&& /usr/local/bin/docker-image-cleanup
2 changes: 2 additions & 0 deletions docker/ansible/alpine-3/Dockerfile.jinja2
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ docker.from("bootstrap", "alpine-3") }}

{{ docker.version() }}

{{ ansible.alpine() }}
22 changes: 22 additions & 0 deletions docker/ansible/centos-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,25 @@ MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.5.0

# Install ansible
RUN /usr/local/bin/yum-install \
epel-release \
PyYAML \
python-jinja2 \
python-httplib2 \
python-keyczar \
python-paramiko \
python-setuptools \
python-setuptools-devel \
libffi \
python-devel \
libffi-devel \
&& easy_install pip \
&& pip install --upgrade pip \
&& hash -r \
&& pip install --no-cache-dir ansible \
&& chmod 750 /usr/bin/ansible* \
# Cleanup
&& yum erase -y python-devel \
&& /usr/local/bin/docker-image-cleanup
2 changes: 2 additions & 0 deletions docker/ansible/centos-7/Dockerfile.jinja2
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ docker.from("bootstrap", "centos-7") }}

{{ docker.version() }}

{{ ansible.centos() }}
24 changes: 24 additions & 0 deletions docker/ansible/debian-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,27 @@ MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.5.0

# Install ansible
RUN /usr/local/bin/apt-install \
# Install ansible
python-minimal \
python-setuptools \
python-pip \
python-paramiko \
python-jinja2 \
python-dev \
libffi-dev \
libssl-dev \
build-essential \
&& pip install --upgrade pip \
&& hash -r \
&& pip install --no-cache-dir ansible \
&& chmod 750 /usr/local/bin/ansible* \
# Cleanup
&& apt-get purge -y -f --force-yes \
python-dev \
build-essential \
libssl-dev \
libffi-dev \
&& /usr/local/bin/docker-image-cleanup
2 changes: 2 additions & 0 deletions docker/ansible/debian-7/Dockerfile.jinja2
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ docker.from("bootstrap", "debian-7") }}

{{ docker.version() }}

{{ ansible.debian() }}
24 changes: 24 additions & 0 deletions docker/ansible/debian-8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,27 @@ MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.5.0

# Install ansible
RUN /usr/local/bin/apt-install \
# Install ansible
python-minimal \
python-setuptools \
python-pip \
python-paramiko \
python-jinja2 \
python-dev \
libffi-dev \
libssl-dev \
build-essential \
&& pip install --upgrade pip \
&& hash -r \
&& pip install --no-cache-dir ansible \
&& chmod 750 /usr/local/bin/ansible* \
# Cleanup
&& apt-get purge -y -f --force-yes \
python-dev \
build-essential \
libssl-dev \
libffi-dev \
&& /usr/local/bin/docker-image-cleanup
2 changes: 2 additions & 0 deletions docker/ansible/debian-8/Dockerfile.jinja2
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ docker.from("bootstrap", "debian-8") }}

{{ docker.version() }}

{{ ansible.debian() }}
24 changes: 24 additions & 0 deletions docker/ansible/debian-9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,27 @@ MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.5.0

# Install ansible
RUN /usr/local/bin/apt-install \
# Install ansible
python-minimal \
python-setuptools \
python-pip \
python-paramiko \
python-jinja2 \
python-dev \
libffi-dev \
libssl-dev \
build-essential \
&& pip install --upgrade pip \
&& hash -r \
&& pip install --no-cache-dir ansible \
&& chmod 750 /usr/local/bin/ansible* \
# Cleanup
&& apt-get purge -y -f --force-yes \
python-dev \
build-essential \
libssl-dev \
libffi-dev \
&& /usr/local/bin/docker-image-cleanup
2 changes: 2 additions & 0 deletions docker/ansible/debian-9/Dockerfile.jinja2
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ docker.from("bootstrap", "debian-9") }}

{{ docker.version() }}

{{ ansible.debian() }}
23 changes: 23 additions & 0 deletions docker/ansible/ubuntu-12.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,26 @@ MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.5.0

# Install ansible
RUN /usr/local/bin/apt-install \
python-minimal \
python-setuptools \
python-pip \
python-paramiko \
python-jinja2 \
python-dev \
libffi-dev \
libssl-dev \
build-essential \
&& pip install --upgrade pip \
&& hash -r \
&& pip install --no-cache-dir ansible \
&& chmod 750 /usr/local/bin/ansible* \
# Cleanup
&& apt-get purge -y -f --force-yes \
python-dev \
build-essential \
libssl-dev \
libffi-dev \
&& /usr/local/bin/docker-image-cleanup
2 changes: 2 additions & 0 deletions docker/ansible/ubuntu-12.04/Dockerfile.jinja2
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ docker.from("bootstrap", "ubuntu-12.04") }}

{{ docker.version() }}

{{ ansible.ubuntu() }}
23 changes: 23 additions & 0 deletions docker/ansible/ubuntu-14.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,26 @@ MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.5.0

# Install ansible
RUN /usr/local/bin/apt-install \
python-minimal \
python-setuptools \
python-pip \
python-paramiko \
python-jinja2 \
python-dev \
libffi-dev \
libssl-dev \
build-essential \
&& pip install --upgrade pip \
&& hash -r \
&& pip install --no-cache-dir ansible \
&& chmod 750 /usr/local/bin/ansible* \
# Cleanup
&& apt-get purge -y -f --force-yes \
python-dev \
build-essential \
libssl-dev \
libffi-dev \
&& /usr/local/bin/docker-image-cleanup
2 changes: 2 additions & 0 deletions docker/ansible/ubuntu-14.04/Dockerfile.jinja2
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ docker.from("bootstrap", "ubuntu-14.04") }}

{{ docker.version() }}

{{ ansible.ubuntu() }}
23 changes: 23 additions & 0 deletions docker/ansible/ubuntu-15.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,26 @@ MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.5.0

# Install ansible
RUN /usr/local/bin/apt-install \
python-minimal \
python-setuptools \
python-pip \
python-paramiko \
python-jinja2 \
python-dev \
libffi-dev \
libssl-dev \
build-essential \
&& pip install --upgrade pip \
&& hash -r \
&& pip install --no-cache-dir ansible \
&& chmod 750 /usr/local/bin/ansible* \
# Cleanup
&& apt-get purge -y -f --force-yes \
python-dev \
build-essential \
libssl-dev \
libffi-dev \
&& /usr/local/bin/docker-image-cleanup
2 changes: 2 additions & 0 deletions docker/ansible/ubuntu-15.04/Dockerfile.jinja2
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ docker.from("bootstrap", "ubuntu-15.04") }}

{{ docker.version() }}

{{ ansible.ubuntu() }}
23 changes: 23 additions & 0 deletions docker/ansible/ubuntu-15.10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,26 @@ MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.5.0

# Install ansible
RUN /usr/local/bin/apt-install \
python-minimal \
python-setuptools \
python-pip \
python-paramiko \
python-jinja2 \
python-dev \
libffi-dev \
libssl-dev \
build-essential \
&& pip install --upgrade pip \
&& hash -r \
&& pip install --no-cache-dir ansible \
&& chmod 750 /usr/local/bin/ansible* \
# Cleanup
&& apt-get purge -y -f --force-yes \
python-dev \
build-essential \
libssl-dev \
libffi-dev \
&& /usr/local/bin/docker-image-cleanup
2 changes: 2 additions & 0 deletions docker/ansible/ubuntu-15.10/Dockerfile.jinja2
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ docker.from("bootstrap", "ubuntu-15.10") }}

{{ docker.version() }}

{{ ansible.ubuntu() }}
23 changes: 23 additions & 0 deletions docker/ansible/ubuntu-16.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,26 @@ MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.5.0

# Install ansible
RUN /usr/local/bin/apt-install \
python-minimal \
python-setuptools \
python-pip \
python-paramiko \
python-jinja2 \
python-dev \
libffi-dev \
libssl-dev \
build-essential \
&& pip install --upgrade pip \
&& hash -r \
&& pip install --no-cache-dir ansible \
&& chmod 750 /usr/local/bin/ansible* \
# Cleanup
&& apt-get purge -y -f --force-yes \
python-dev \
build-essential \
libssl-dev \
libffi-dev \
&& /usr/local/bin/docker-image-cleanup
2 changes: 2 additions & 0 deletions docker/ansible/ubuntu-16.04/Dockerfile.jinja2
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ docker.from("bootstrap", "ubuntu-16.04") }}

{{ docker.version() }}

{{ ansible.ubuntu() }}
22 changes: 22 additions & 0 deletions docker/base/alpine-3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,28 @@ ENV DOCKER_CONF_HOME /opt/docker/

COPY conf/ /opt/docker/

# Install ansible
RUN /usr/local/bin/apk-install \
python \
python-dev \
py-setuptools \
py-crypto \
py2-pip \
py-cparser \
py-cryptography \
py-markupsafe \
py-cffi \
py-yaml \
py-jinja2 \
py-paramiko \
&& pip install --upgrade pip \
&& hash -r \
&& pip install --no-cache-dir ansible \
&& chmod 750 /usr/bin/ansible* \
# Cleanup
&& apk del python-dev \
&& /usr/local/bin/docker-image-cleanup

# Install services
RUN chmod +x /opt/docker/bin/* \
&& /usr/local/bin/apk-install \
Expand Down
2 changes: 2 additions & 0 deletions docker/base/alpine-3/Dockerfile.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

{{ docker.copy('conf/', '/opt/docker/') }}

{{ ansible.alpine() }}

{{ base.alpine() }}

{{ docker.entrypoint("/opt/docker/bin/entrypoint.sh") }}
Expand Down

0 comments on commit 32d11da

Please sign in to comment.