I want to install PostgreSQL & barman with Ansible from the PostgreSQL.org repositories on an almalinux lxd container.
- name: “install PostgreSQL-14 & barman @rhel via postgresql.org repos”
 
hosts: barman-220320
tasks:- name: “install postgresql-14 & barman”
 
dnf:
name: “{{ item }}”
enablerepo: https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
state: latest
loop:- postgresql14-server
 - barman
 
become: true
as none of the 2 package can be installed it seems my enablerepo is not working though:
failed: [barman-220320] (item=postgresql14-server) => changed=false
ansible_loop_var: item
failures:
- No package postgresql14-server available.
 
item: postgresql14-server
msg: Failed to install some of the specified packages
rc: 1
results:
failed: [barman-220320] (item=barman) => changed=false
ansible_loop_var: item
failures:- No package barman available.
 
item: barman
msg: Failed to install some of the specified packages
rc: 1
results:
I adapted it from https://www.postgresql.org/download/linux/redhat/
can anybody advise where I am falling short in this?