Skip to content

Commit

Permalink
fix(molecule, debian): workaround for debian10 buster-backports (#478)
Browse files Browse the repository at this point in the history
apparently debian-backports has been archived from live debian repositories, leading to the following error messages when running molecule tests:

fatal: [debian-10-x86_64]: FAILED! => {"changed": false, "msg": "Failed to update apt cache: W:Updating from such a repository can't be done securely, and is therefore disabled by default., W:See apt-secure(8) manpage for repository creation and user configuration details., E:The repository 'http://cdn-aws.deb.debian.org/debian buster-backports Release' does not have a Release file."}

As suggested by [1], work around that issue by patching the repository URL so to use debian archives instead.

[1] cyberciti.biz/faq/the-repository-http-deb-debian-org-debian-buster-backports-release-no-longer-has-a-release-file
  • Loading branch information
iurly authored Apr 17, 2024
1 parent c26c89c commit d581653
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions molecule/resources/playbooks/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@

- name: Prepare Debian hosts
block:
- name: Work around buster-backports (debian 10)
ansible.builtin.replace:
path: /etc/apt/sources.list
regexp: '(^.*http://).*(\.debian\.org.*buster-backports.*$)'
replace: '\1archive\2'
when: ansible_distribution_major_version == "10"

- name: Update apt cache
ansible.builtin.apt:
update_cache: true
Expand Down

0 comments on commit d581653

Please sign in to comment.