xoxys.postgres/tasks/prepare.yml

16 lines
567 B
YAML

---
- 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 }}"
when: postgres_repository_enabled
become: True
become_user: root