forked from CoreHive/redhatchallenge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.Ansible.OLD
46 lines (40 loc) · 1.08 KB
/
Dockerfile.Ansible.OLD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM centos:8
ENV container docker
ARG VERSION=2.7.15
RUN \
yum install -y \
curl \
openssh-client \
python \
python-devel \
python3-devel \
py-boto \
py-dateutil \
py-httplib2 \
py-jinja2 \
py-paramiko \
py-pip \
py-setuptools \
py-yaml \
build-base \
gcc \
tar && \
pip install --upgrade pip python-keyczar && \
rm -rf /var/cache/apk/*
RUN mkdir /etc/ansible/ /ansible
RUN echo "[local]" >> /etc/ansible/hosts && \
echo "localhost" >> /etc/ansible/hosts
RUN \
curl -fsSL https://releases.ansible.com/ansible/ansible-${VERSION}.tar.gz -o ansible.tar.gz && \
tar -xzf ansible.tar.gz -C ansible --strip-components 1 && \
rm -fr ansible.tar.gz /ansible/docs /ansible/examples /ansible/packaging
RUN mkdir -p /ansible/playbooks
WORKDIR /ansible/playbooks
ENV ANSIBLE_GATHERING smart
ENV ANSIBLE_HOST_KEY_CHECKING false
ENV ANSIBLE_RETRY_FILES_ENABLED false
ENV ANSIBLE_ROLES_PATH /ansible/playbooks/roles
ENV ANSIBLE_SSH_PIPELINING True
ENV PATH /ansible/bin:$PATH
ENV PYTHONPATH /ansible/lib
ENTRYPOINT ["ansible-playbook"]