This role installs PostgreSQL and the Perl dependencies needed to run the Evergreen ILS database on Red Hat Enterprise Linux compatible systems.
RHEL 10 or compatible. Molecule tests run on AlmaLinux 10 with Podman. The following Ansible collections must be installed:
containers.podmancommunity.postgresqlcommunity.general
# Addresses PostgreSQL will listen on
postgresql_listen_addresses:
- '*'
# CIDR ranges that authenticate with md5 passwords in pg_hba.conf
postgresql_pg_hba_passwd_hosts:
- 0.0.0.0/0
# Install the contrib and devel packages alongside postgresql-server
postgresql_ext_install_contrib: true
postgresql_ext_install_dev_headers: true
# postgresql.conf tuning
postgresql_random_page_cost: 2.0
# PostgreSQL users to create
postgresql_users:
- name: evergreen
password: evergreen
role_attr_flags: SUPERUSER
# PostgreSQL databases to create
postgresql_databases:
- name: evergreen
owner: evergreen
encoding: UTF8
lc_collate: C
lc_ctype: C
# Extensions to install per database
postgresql_database_extensions:
- db: evergreen
extensions:
- hstore
- xml2
- intarray
- pgcrypto
- unaccent
# Extra system packages installed alongside PostgreSQL.
# gcc and libxslt-devel are required to build some CPAN modules.
postgresql_extra_packages:
- gcc
- libxslt-devel
- python3-psycopg2
# Perl packages installed from RHEL AppStream/BaseOS repos
evergreen_database_perl_dependencies:
- perl-JSON-PP
- perl-XML-LibXML
- perl-DBI
- perl-DBD-Pg
- perl-LWP-Protocol-https
- make
# CPAN modules required by Evergreen ILS.
# Set notest: true for modules whose test suites fail due to environment differences.
evergreen_database_cpan_modules:
- name: Business::ISBN
- name: MARC::File::XML
notest: true
- name: MIME::Base32
- name: Library::CallNumber::LC
- name: Rose::URI
- name: UUID::Tiny
- name: XML::LibXSLT
- name: Pass::OTP
- name: String::KeyboardDistance
- name: Text::Levenshtein::Damerau::XS
- name: JSON
- name: JSON::XSNo role dependencies. Install the required collections with:
ansible-galaxy collection install containers.podman community.postgresql community.generalDevelopment and testing use uv, Molecule, and Podman:
uv run ansible-lint
MOLECULE_PODMAN_EXECUTABLE=/opt/podman/bin/podman uv run molecule converge
MOLECULE_PODMAN_EXECUTABLE=/opt/podman/bin/podman uv run molecule verify
MOLECULE_PODMAN_EXECUTABLE=/opt/podman/bin/podman uv run molecule testIf podman is already on PATH, the MOLECULE_PODMAN_EXECUTABLE environment variable can be omitted.
- hosts: database-servers
become: true
roles:
- { role: aadl.evergreenils_database }
GPL-2.0-or-later