FROM centos:7

# Install:
#   docker (to use as client)
#   ansible + some deps
RUN yum update -y                 && \
    yum install -y epel-release   && \
    yum install -y docker-latest && \
    yum install -y "@Development Tools" ansible git python-setuptools python-devel python-pip && \
    yum clean all

RUN pip install -q --no-cache-dir ansible==2.1.1.0 ruamel.yaml

RUN mkdir -p /etc/ansible/roles

ADD builder.sh /usr/local/bin/builder.sh
ADD ac_galaxy.py /usr/local/bin/ac_galaxy.py
ADD wait_on_host.py /usr/local/bin/wait_on_host.py
ADD ansible-container-inventory.py /etc/ansible/ansible-container-inventory.py
ADD ansible.cfg /etc/ansible/ansible.cfg

# In 9deb3eb we moved to /usr/bin/ansible-playbook
# Let's ease the transition on people using <9deb3eb code
# by symlinking to the new place
RUN ln -s /usr/bin/ansible-playbook /usr/local/bin/ansible-playbook
