lab-ansible/roles/postgresql/tasks/main.yml

23 lines
633 B
YAML
Raw Normal View History

2023-11-12 16:59:18 +00:00
# vim: ft=yaml.ansible
# code: language=ansible
---
- name: Add PostgreSQL repository
ansible.builtin.dnf:
name: https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
state: present
- name: Disable built-in PostgreSQL module
community.general.ini_file:
path: /etc/dnf/modules.d/postgresql.module
section: postgresql
option: state
value: disabled
no_extra_spaces: true
create: false
state: present
- name: Install PostgreSQL {{ postgresql_version }}
ansible.builtin.dnf:
name: postgresql{{ postgresql_version }}-server
state: present