Failed update apt cache

I keep running into the same issue when trying to setup trellis.

Failed to update apt cache: unknown reason
fatal: [default]: FAILED! => {"changed": false}

RUNNING HANDLER [fail2ban : restart fail2ban] **********************************
changed: [default]

RUNNING HANDLER [ferm : restart ferm] ******************************************
skipping: [default]

RUNNING HANDLER [ntp : restart ntp] ********************************************
changed: [default]

RUNNING HANDLER [sshd : restart ssh] *******************************************
changed: [default]

PLAY RECAP *********************************************************************
default                    : ok=41   changed=19   unreachable=0    failed=1    skipped=14   rescued=0    ignored=0

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

I have read other threads and tried the suggestions for running apt-get update and vagrant destroy, but none of them work.

Do you get any useful debugging info if you run ansible w/ verbose output? i.e. -vvv (I think is the argument)

The mariadb mirror seems to be having latency issues and possibly downtime: mirrors.gigenet.com/mariadb/repo/10.5/ubuntu

$ sudo apt update
Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:3 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
Hit:4 http://nginx.org/packages/mainline/ubuntu focal InRelease
Get:5 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
0% [Waiting for headers]
Err:7 http://mirrors.gigenet.com/mariadb/repo/10.5/ubuntu focal InRelease
  Connection failed [IP: 69.65.16.171 80]
Fetched 336 kB in 1min 17s (4,381 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
141 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://mirrors.gigenet.com/mariadb/repo/10.5/ubuntu/dists/focal/InRelease  Connection failed [IP: 69.65.16.171 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

Now the ouput of sudo apt update is:

$ sudo apt update
Ign:1 http://mirrors.gigenet.com/mariadb/repo/10.5/ubuntu focal InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu focal InRelease
Err:3 http://mirrors.gigenet.com/mariadb/repo/10.5/ubuntu focal Release
  404  Not Found [IP: 69.65.16.171 80]
Hit:4 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
Get:6 http://nginx.org/packages/mainline/ubuntu focal InRelease [3,596 B]
Hit:7 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:8 http://us.archive.ubuntu.com/ubuntu focal-security InRelease
Reading package lists... Done
E: The repository 'http://mirrors.gigenet.com/mariadb/repo/10.5/ubuntu focal Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Going manually to Index of /mariadb/repo/10.5/ubuntu/ lists empty folders.
Has gigenet.com stopped mirroring mariadb? I’ve asked them via email now, I’ll update if I get a reply.

See Change MariaDB PPA link by jakobmeusburger · Pull Request #1384 · roots/trellis · GitHub

The repo is back online, here’s an email reply I received:

Hello,

My apologies, at the time our mirrors server was undergoing maintenance, and MariaDB automatically disables mirror sites undergoing maintenance. The repo is back online now.

Okay, I will try again and provide more debugging info.