Files
ansible-shared/db/postgresql-9.6/tasks/install-debian.yml

22 lines
795 B
YAML

---
# We use the official PostgreSQL repositories which contains many versions of PostgreSQL
# Most of these versions will be newer than comes stock with debian
# Add GPG keys
- name: Addding PostgreSQL sources GPG key
apt_key: url='https://www.postgresql.org/media/keys/ACCC4CF8.asc' state=present
# Add PostgreSQL repositories for Debian 9
- name: Adding PostgreSQL sources for Debian 9 Jessie
apt_repository: repo='deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' state=present
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "9"
# Install PostgreSQL 10
- name: Installing PostgreSQL 9.6
apt:
update_cache: yes
state: present
name:
- postgresql-9.6
- python-psycopg2 # Required for ansible postgres manipulation