2018-10-14 21:17:40 +00:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Add PostgreSQL repository
|
|
|
|
yum_repository:
|
|
|
|
name: postgresql
|
2018-10-14 21:39:55 +00:00
|
|
|
file: "{{ postgres_repository_filename }}"
|
2018-10-14 21:17:40 +00:00
|
|
|
description: PostgreSQL yum repository
|
2018-10-14 21:27:32 +00:00
|
|
|
baseurl: "https://download.postgresql.org/pub/repos/yum/{{ postgres_version }}/redhat/rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}"
|
2018-10-14 21:17:40 +00:00
|
|
|
gpgcheck: yes
|
|
|
|
enabled: yes
|
2018-10-14 21:27:32 +00:00
|
|
|
gpgkey: "https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-{{ postgres_version }}"
|
2018-10-14 21:17:40 +00:00
|
|
|
when: postgres_repository_enabled
|
|
|
|
|
|
|
|
become: True
|
2018-10-14 21:28:12 +00:00
|
|
|
become_user: root
|