-# Install ansible-opendaylight
-RUN apt install -y software-properties-common && \
- apt-add-repository -y ppa:ansible/ansible && \
- apt update && \
- apt install -y ansible && \
- ansible-galaxy install git+https://git.opendaylight.org/gerrit/integration/packaging/ansible-opendaylight
+# Install ansible
+COPY ansible-sources.list /etc/apt/sources.list.d
+RUN gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv ${ANSIBLE_GPG_KEY} && \
+ gpg --export --armor ${ANSIBLE_GPG_KEY} | apt-key add - && \
+ apt-get update && \
+ apt-get install -y ansible
+
+# Install ansible-opendaylight
+RUN ansible-galaxy install git+https://git.opendaylight.org/gerrit/integration/packaging/ansible-opendaylight