Skip to content

Commit d581653

Browse files
authored
fix(molecule, debian): workaround for debian10 buster-backports (#478)
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
1 parent c26c89c commit d581653

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

molecule/resources/playbooks/prepare.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212

1313
- name: Prepare Debian hosts
1414
block:
15+
- name: Work around buster-backports (debian 10)
16+
ansible.builtin.replace:
17+
path: /etc/apt/sources.list
18+
regexp: '(^.*http://).*(\.debian\.org.*buster-backports.*$)'
19+
replace: '\1archive\2'
20+
when: ansible_distribution_major_version == "10"
21+
1522
- name: Update apt cache
1623
ansible.builtin.apt:
1724
update_cache: true

0 commit comments

Comments
 (0)