Roots Discourse

Apt cache update failed. on vagrant provision

Hi,

Trying to set up a new local site and when I run vagrant provision i’m getting:

TASK [mariadb : Add MariaDB PPA] ***********************************************
System info:
  Ansible 2.9.6; Vagrant 2.2.17; Darwin
  Trellis 1.9.0: October 27th, 2021
---------------------------------------------------
apt cache update failed
fatal: [default]: FAILED! => {"changed": false}

I’ve searched on here and found someone else had a similar issue and it was due to the date on their virtual machine being wrong, but i’ve checked that and the date is correct for me.

Any ideas what this could be?

Edit: I’ve also just tried to provision a remote server and i’m getting the same error.

Hah, same here…

Probably related: #1321

Full output (using ansible-playbook server.yml -e env=production -vvv):

apt cache update failed
The full traceback is:
  File "/tmp/ansible_apt_repository_payload_wko589ct/ansible_apt_repository_payload.zip/ansible/modules/packaging/os/apt_repository.py", line 548, in main
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 559, in update
    raise FetchFailedException(e)
fatal: [159.69.115.236]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "codename": null,
            "filename": null,
            "install_python_apt": true,
            "mode": null,
            "repo": "deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.5/ubuntu bionic main",
            "state": "present",
            "update_cache": true,
            "validate_certs": true
        }
    }
}

Try the solution sketched in this post.

I upgraded to ansible 2.10.7 which now gives me the error:

Failed to update apt cache: E:The repository
'http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.5/ubuntu bionic
Release' does not have a Release file.

The same one mentioned in those links you’ve sent, so it seems like it’s not just an issue for me at the moment!

This looks like the same issue as Provisioning production fails : no "Release file" - #11 by swalkinshaw, so I’m going to lock this topic. Please continue discussion in that thread.

I believe the underlying issues has been solved in the latest version of Trellis: Release v1.9.1 · roots/trellis · GitHub

2 Likes