mirror of https://github.com/fspc/workstand.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.1 KiB
52 lines
1.1 KiB
9 years ago
|
---
|
||
|
|
||
|
# Official PostgreSQL [repository] for debian-based distributions
|
||
|
# [repository]: http://www.postgresql.org/download/
|
||
|
|
||
|
- name: Adding APT repository key
|
||
|
when: ansible_os_family == 'Debian'
|
||
|
sudo: yes
|
||
|
apt_key:
|
||
|
id: ACCC4CF8
|
||
|
url: https://www.postgresql.org/media/keys/ACCC4CF8.asc
|
||
|
tags:
|
||
|
- postgresql
|
||
|
- db
|
||
|
- repo
|
||
|
|
||
|
- name: Add PostgreSQL official APT repository
|
||
|
when: ansible_os_family == 'Debian'
|
||
|
sudo: yes
|
||
|
apt_repository:
|
||
|
repo: "deb http://apt.postgresql.org/pub/repos/apt/ {{ansible_distribution_release}}-pgdg main"
|
||
|
tags:
|
||
|
- postgresql
|
||
|
- db
|
||
|
- repo
|
||
|
|
||
|
- name: Install PostgreSQL
|
||
|
when: ansible_os_family == 'Debian'
|
||
|
sudo: yes
|
||
|
apt:
|
||
|
name: "postgresql-{{postgresql_version}}"
|
||
|
state: present
|
||
|
update_cache: yes
|
||
|
cache_valid_time: 3600
|
||
|
tags:
|
||
|
- postgresql
|
||
|
- db
|
||
|
- deps
|
||
|
|
||
|
- name: Install dependencies for the Ansible module
|
||
|
when: ansible_os_family == 'Debian'
|
||
|
sudo: yes
|
||
|
apt:
|
||
|
name: "{{item}}"
|
||
|
state: latest
|
||
|
with_items:
|
||
|
- python-psycopg2
|
||
|
tags:
|
||
|
- postgresql
|
||
|
- db
|
||
|
- deps
|