azavea / cac-tripplanner

Clean Air Council Circuit Trip Planner and Travelshed
https://gophillygo.org/
Other
15 stars 7 forks source link

Update Ansible task with archived PostgreSQL APT repo #1365

Closed rachelekm closed 12 months ago

rachelekm commented 1 year ago

Overview

In the last couple months the bionic-pgdg package was archived and provisioning the database now throws the below error:

TASK [azavea.postgresql : Configure the PostgreSQL APT repositories] ***********
fatal: [database]: FAILED! => {"changed": false, "msg": "Failed to update apt cache: E:The repository 'http://apt.postgresql.org/pub/repos/apt bionic-pgdg Release' does not have a Release file."}

In order to fix, we needed to update the task to use the proper archive repo link. This specific task is part of the azavea.postgresql role which we can't edit, but this role is a dependency of our custom cac-tripplanner.database role which includes the same task that we can edit. This gets rid of the azavea.postgresql dependency and moves any remaining respective tasks (and resources) over to our repo's custom role while also updating the apt_repository value with the archived version so the database can successfully provision. See discussion here and here.

Demo

rachelemorino@Racheles-MacBook-Pro cac-tripplanner % vagrant provision database
==> database: Running provisioner: ansible...
    database: Running ansible-playbook...

PLAY [database] ****************************************************************

....

PLAY RECAP *********************************************************************
database                   : ok=15   changed=1    unreachable=0    failed=0    skipped=2    rescued=0    ignored=0   

Testing Instructions

Checklist