forked from CoreHive/redhatchallenge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.Ansible
45 lines (37 loc) · 1.34 KB
/
Dockerfile.Ansible
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
FROM ppc64le/centos:latest
ENV container docker
ARG VERSION=2.7.15
RUN yum -y update && \
yum -y install -y gcc python36 python36-devel && \
yum -y install libffi libffi-devel && \
### yum -y install -y python-devel libkrb5-devel && \
yum install python3-pip -y && \
yum install -y openssl-devel && \
pip3 install --upgrade pip && \
pip3 install --upgrade virtualenv && \
pip3 install pywinrm[kerberos] && \
### yum install -y krb5-user -y && \
pip3 install pywinrm && \
pip install --upgrade pip python-keyczar && \
pip install cryptography && \
pip3 install ansible && \
rm -rf /var/cache/apk/*
RUN yum update -y
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"]
CMD ["/usr/sbin/init"]