1 name: 'Setup Postgresql and Postgis'
7 - name: Install postgis
9 sudo apt-get update -qq
10 sudo apt-get install -y -qq postgresql-13-postgis-3 postgresql-13-postgis-3-scripts postgresql-server-dev-13
13 - name: Adapt postgresql configuration
15 echo 'fsync = off' | sudo tee /etc/postgresql/13/main/conf.d/local.conf
16 echo 'synchronous_commit = off' | sudo tee -a /etc/postgresql/13/main/conf.d/local.conf
17 echo 'full_page_writes = off' | sudo tee -a /etc/postgresql/13/main/conf.d/local.conf
18 echo 'shared_buffers = 1GB' | sudo tee -a /etc/postgresql/13/main/conf.d/local.conf
21 - name: Setup database
23 sudo systemctl start postgresql
24 sudo -u postgres createuser -S www-data
25 sudo -u postgres createuser -s runner