diff --git a/molecule/Dockerfile-debian-archive.j2 b/molecule/Dockerfile-debian-archive.j2 index c9bee1f43..3ae7a229a 100644 --- a/molecule/Dockerfile-debian-archive.j2 +++ b/molecule/Dockerfile-debian-archive.j2 @@ -7,7 +7,13 @@ RUN tar xvf openjdk-17.0.1_linux-x64_bin.tar.gz RUN sudo mv jdk-17*/ /opt/jdk17 RUN rm -rf openjdk-17.0.1_linux-x64_bin.tar.gz -RUN echo 'deb [check-valid-until=no] http://ftp.debian.org/debian stretch-backports main' | sudo tee /etc/apt/sources.list.d/stretch-backports.list +RUN echo 'deb [check-valid-until=no] http://archive.debian.org/debian stretch-backports main' | sudo tee /etc/apt/sources.list.d/stretch-backports.list + +RUN sed -i s/ftp.debian.org/archive.debian.org/g /etc/apt/sources.list +RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list +RUN sed -i s/security.debian.org/archive.debian.org/g /etc/apt/sources.list +RUN sed -i '/stretch-updates/d' /etc/apt/sources.list +RUN sed -i s/ftp.debian.org/archive.debian.org/g /etc/apt/sources.list.d/stretch-backports.list RUN apt-get update && \ apt-get install --no-install-recommends --yes \ diff --git a/molecule/Dockerfile-debian-java8.j2 b/molecule/Dockerfile-debian-java8.j2 index 224f58a16..5a71724c6 100644 --- a/molecule/Dockerfile-debian-java8.j2 +++ b/molecule/Dockerfile-debian-java8.j2 @@ -1,6 +1,12 @@ FROM {{ item.image }} -RUN echo 'deb [check-valid-until=no] http://ftp.debian.org/debian stretch-backports main' | sudo tee /etc/apt/sources.list.d/stretch-backports.list +RUN echo 'deb [check-valid-until=no] http://archive.debian.org/debian stretch-backports main' | sudo tee /etc/apt/sources.list.d/stretch-backports.list + +RUN sed -i s/ftp.debian.org/archive.debian.org/g /etc/apt/sources.list +RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list +RUN sed -i s/security.debian.org/archive.debian.org/g /etc/apt/sources.list +RUN sed -i '/stretch-updates/d' /etc/apt/sources.list +RUN sed -i s/ftp.debian.org/archive.debian.org/g /etc/apt/sources.list.d/stretch-backports.list RUN apt-get update && \ apt-get install --no-install-recommends --yes \ diff --git a/molecule/Dockerfile-debian.j2 b/molecule/Dockerfile-debian.j2 index 00e82556f..e68cf6677 100644 --- a/molecule/Dockerfile-debian.j2 +++ b/molecule/Dockerfile-debian.j2 @@ -7,7 +7,13 @@ RUN tar xvf openjdk-17.0.1_linux-x64_bin.tar.gz RUN sudo mv jdk-17*/ /opt/jdk17 RUN rm -rf openjdk-17.0.1_linux-x64_bin.tar.gz -RUN echo 'deb [check-valid-until=no] http://ftp.debian.org/debian stretch-backports main' | sudo tee /etc/apt/sources.list.d/stretch-backports.list +RUN echo 'deb [check-valid-until=no] http://archive.debian.org/debian stretch-backports main' | sudo tee /etc/apt/sources.list.d/stretch-backports.list + +RUN sed -i s/ftp.debian.org/archive.debian.org/g /etc/apt/sources.list +RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list +RUN sed -i s/security.debian.org/archive.debian.org/g /etc/apt/sources.list +RUN sed -i '/stretch-updates/d' /etc/apt/sources.list +RUN sed -i s/ftp.debian.org/archive.debian.org/g /etc/apt/sources.list.d/stretch-backports.list RUN apt-get update && \ apt-get install --no-install-recommends --yes \ diff --git a/roles/common/tasks/debian.yml b/roles/common/tasks/debian.yml index 13795ee00..3b0e45cfe 100644 --- a/roles/common/tasks/debian.yml +++ b/roles/common/tasks/debian.yml @@ -136,7 +136,7 @@ - name: Add stretch-backports Repo lineinfile: path: /etc/apt/sources.list - line: deb [check-valid-until=no] http://ftp.debian.org/debian stretch-backports main + line: deb [check-valid-until=no] http://archive.debian.org/debian stretch-backports main regexp: '.*stretch-backports.*' notify: - debian apt-get update