Hello OpenWISP team,
I've encountered an issue while running molecule tests on the ansible-openwisp2 role.
Environment:OS: Ubuntu 20.04.6 LTS
Ansible version: core 2.13.8
Python version: 3.8,10
Docker version: 24.0.4
Steps I did:
I cloned the ansible-openwisp2 repository using the following command:
git clone
https://github.com/openwisp/ansible-openwisp2.git openwisp.openwisp2
Then, I installed necessary packages for molecule testing, pulled Docker images as instructed in the documentation and ran the test with molecule test -s local
Expected Result:
Molecule tests run successfully without any error.
Actual Result:During the task "Update apt cache", molecule tests failed with an error message saying the update cannot be done securely because the repository is not signed. This issue is observed for different Docker images, including Debian and Ubuntu images.
Here is a snippet of the error:
TASK [Update apt cache] ********************************************************
fatal: [openwisp2-ubuntu2004]: 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., W:GPG error:
http://security.ubuntu.com/ubuntu focal-security InRelease: Splitting up /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_focal-security_InRelease into data and signature failed, E:The repository ''
http://security.ubuntu.com/ubuntu focal-security InRelease'' is not signed., 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., W:GPG error:
http://archive.ubuntu.com/ubuntu focal-updates InRelease: Splitting up /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_focal-updates_InRelease into data and signature failed, E:The repository ''
http://archive.ubuntu.com/ubuntu focal-updates InRelease'' is not signed., 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., W:GPG error:
http://archive.ubuntu.com/ubuntu focal-backports InRelease: Splitting up /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_focal-backports_InRelease into data and signature failed, E:The repository ''
http://archive.ubuntu.com/ubuntu focal-backports InRelease'' is not signed., 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., W:GPG error:
http://archive.ubuntu.com/ubuntu focal InRelease: Splitting up /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_focal_InRelease into data and signature failed, E:The repository ''
http://archive.ubuntu.com/ubuntu focal InRelease'' is not signed.'
fatal: [openwisp2-ubuntu2204]: 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., W:GPG error:
http://archive.ubuntu.com/ubuntu jammy-updates InRelease: Splitting up /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_jammy-updates_InRelease into data and signature failed, E:The repository ''
http://archive.ubuntu.com/ubuntu jammy-updates InRelease'' is not signed., 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., W:GPG error:
http://archive.ubuntu.com/ubuntu jammy-backports InRelease: Splitting up /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_jammy-backports_InRelease into data and signature failed, E:The repository ''
http://archive.ubuntu.com/ubuntu jammy-backports InRelease'' is not signed., 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., W:GPG error:
http://security.ubuntu.com/ubuntu jammy-security InRelease: Splitting up /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_jammy-security_InRelease into data and signature failed, E:The repository ''
http://security.ubuntu.com/ubuntu jammy-security InRelease'' is not signed., 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., W:GPG error:
http://archive.ubuntu.com/ubuntu jammy InRelease: Splitting up /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_jammy_InRelease into data and signature failed, E:The repository ''
http://archive.ubuntu.com/ubuntu jammy InRelease'' is not signed.'
fatal: [openwisp2-debian11]: 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., W:GPG error:
http://deb.debian.org/debian bullseye InRelease: At least one invalid signature was encountered., E:The repository ''
http://deb.debian.org/debian bullseye InRelease'' is not signed., 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., W:GPG error:
http://deb.debian.org/debian-security bullseye-security InRelease: At least one invalid signature was encountered., E:The repository ''
http://deb.debian.org/debian-security bullseye-security InRelease'' is not signed., 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.,
W:GPG error:
http://deb.debian.org/debian bullseye-updates InRelease: At least one invalid signature was encountered., E:The repository ''
http://deb.debian.org/debian bullseye-updates InRelease'' is not signed.'
PLAY RECAP *********************************************************************
openwisp2-debian11 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
openwisp2-ubuntu2004 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
openwisp2-ubuntu2204 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
The Docker images are already updated to their latest versions. Could you provide me some guidance on this issue? I have little experience working with this and even ChatGPT suggested me to contact you (not finding a way to go). Thank you in advance!
Best Regards,
ADPI