/ DevOps

Postgis 9.6 on Google Cloud Platform Ubuntu 16.04

I noticed my ansible playbook for installing Postgres 9.6 with Postgis enabled, generated errors on a Google Cloud Compute Engine VM with Ubuntu 16.04 as the OS.

When setting up Postgres 9.6 on Ubuntu 16.04, this ended up working OK:

apt install software-properties-common -y
sudo add-apt-repository ppa:ubuntugis/ppa
apt update
apt full-upgrade
apt install postgis

One liner:
apt install software-properties-common -y && sudo add-apt-repository ppa:ubuntugis/ppa && apt update && apt full-upgrade && apt install postgis