19 lines
706 B
YAML
19 lines
706 B
YAML
---
|
|
- name: create directory for download
|
|
file:
|
|
path: ~/postgres
|
|
state: directory
|
|
mode: '0755'
|
|
- name: download PostgreSQL and extract archive
|
|
unarchive:
|
|
src: https://download.postgresql.org/pub/source/v{{ postgres_version }}/postgresql-{{ postgres_version }}.tar.gz
|
|
dest: ~/postgres
|
|
remote_src: yes
|
|
- name: configure PostgreSQL
|
|
command: cd ~/postgres/postgresql-{{ postgres_version }} && ./configure --prefix=$HOME/opt/postgresql/ --with-python PYTHON=/usr/bin/python3
|
|
- name: make PostgreSQL
|
|
command: cd ~/postgres/postgresql-{{ postgres_version }} && make world
|
|
- name: install PostgreSQL
|
|
command: cd ~/postgres/postgresql-{{ postgres_version }} && make install-world
|
|
|