# 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