MAINTAINER William Yeh <william.pjyeh@gmail.com>
-RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
+RUN echo "===> Adding Ansible's PPA..." && \
+ echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" | tee /etc/apt/sources.list.d/ansible.list && \
+ echo "deb-src http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/ansible.list && \
+ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7BB9C367 && \
+ DEBIAN_FRONTEND=noninteractive apt-get update && \
\
\
echo "===> Installing Ansible..." && \
apt-get install -y ansible && \
\
\
- echo "===> Clean up..." && \
- rm -rf /var/lib/apt/lists/* && \
+ echo "===> Removing Ansible PPA..." && \
+ rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/ansible.list && \
\
\
echo "===> Adding hosts for convenience..." && \
MAINTAINER William Yeh <william.pjyeh@gmail.com>
-RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
+
+RUN echo "===> Adding Ansible's PPA..." && \
+ echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" | tee /etc/apt/sources.list.d/ansible.list && \
+ echo "deb-src http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/ansible.list && \
+ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7BB9C367 && \
+ DEBIAN_FRONTEND=noninteractive apt-get update && \
\
\
echo "===> Installing Ansible..." && \
apt-get install -y ansible && \
\
\
- echo "===> Clean up..." && \
- rm -rf /var/lib/apt/lists/* && \
+ echo "===> Removing Ansible PPA..." && \
+ rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/ansible.list && \
\
\
echo "===> Adding hosts for convenience..." && \