25 lines
788 B
YAML
25 lines
788 B
YAML
---
|
|
- name: Load helper variables
|
|
include_vars: "main.yml"
|
|
|
|
- block:
|
|
- name: Add PostgreSQL repository
|
|
yum_repository:
|
|
name: postgresql
|
|
file: "{{ postgres_repository_filename }}"
|
|
description: PostgreSQL yum repository
|
|
baseurl: "https://download.postgresql.org/pub/repos/yum/{{ __postgres_version }}/redhat/rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}"
|
|
gpgcheck: yes
|
|
enabled: yes
|
|
gpgkey: "https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-{{ __postgres_version }}"
|
|
|
|
- name: Install dependencies
|
|
package:
|
|
name: "{{ item }}"
|
|
state: present
|
|
loop:
|
|
- python-psycopg2
|
|
become: True
|
|
become_user: root
|
|
when: postgres_repository_enabled | bool
|