ansible-postgresql icon indicating copy to clipboard operation
ansible-postgresql copied to clipboard

yum or pgdg option?

Open MichaelDBA opened this issue 3 years ago • 1 comments

Right now it seems the flexible apt and pgdg options are available for debian apt-based systems, but not for redhat based ones. Any plan to fix this? Or is this related to the mirror problem,

redhat.yml file contents snippet:

# Not supported (and no good workaround) until there is a solution for https://github.com/ansible/ansible/issues/41178
# - name: Ensure that only the desired PostgreSQL version's repo is enabled
#   yum_repository:
#     name: item.repoid
#     enabled: "{{ (item.repoid == 'pgdg' ~ __postgresql_version_dotless) if item.repoid.startswith('pgdg') else item.state == 'enabled' }}"
#   # "{{ __postgresql_yum_repolist_result.results | selectattr('repoid', 'startswith', 'pgdg') | list }}" would be nice
#   # here but alas there is no `startswith` test
#   loop: "{{ __postgresql_yum_repolist_result.results }}"

MichaelDBA avatar Dec 11 '21 14:12 MichaelDBA

Is this repo being maintained?

MichaelDBA avatar Feb 01 '22 13:02 MichaelDBA

Well, the repo file is just a text file in ini format, so I do not see anything preventing to use ansible.builtin.lineinfile or community.general.ini_file to modify the line with enabled=... instead.

hlovdal avatar Jul 03 '24 19:07 hlovdal