-
Notifications
You must be signed in to change notification settings - Fork 579
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #554 from fidelio33b/development
RHEL 9+, additional repos and packages feature
- Loading branch information
Showing
10 changed files
with
112 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# file: postgresql/tasks/extensions/extra_packages.yml | ||
|
||
- include_vars: "../../vars/extra_packages.yml" | ||
|
||
# keys | ||
- name: PostgreSQL | Extensions | Add repo keys | apt | ||
apt_key: | ||
id: "{{ item.value.id }}" | ||
url: "{{ item.value.url }}" | ||
state: present | ||
keyring: /etc/apt/trusted.gpg.d/{{ item.value.id }}.gpg | ||
loop: "{{ postgresql_ext_extra_packages.apt_keys | default({}) | dict2items }}" | ||
when: | ||
- postgresql_ext_extra_packages is defined | ||
- ansible_os_family == "Debian" | ||
|
||
# repositories | ||
- name: PostgreSQL | Extensions | Add repos | apt | ||
apt_repository: | ||
repo: "{{ item.value }}" | ||
state: present | ||
loop: "{{ postgresql_ext_extra_packages.apt_repositories | default({}) | dict2items }}" | ||
when: | ||
- postgresql_ext_extra_packages is defined | ||
- ansible_os_family == "Debian" | ||
- name: PostgreSQL | Extensions | Add repos | RHEL | ||
yum_repository: | ||
name: "{{ item.value.name }}" | ||
description: "{{ item.value.description }}" | ||
baseurl: "{{ item.value.url }}" | ||
gpgkey: "{{ item.value.gpgkey }}" | ||
enabled: yes | ||
loop: "{{ postgresql_ext_extra_packages.yum_repositories | default({}) | dict2items }}" | ||
when: | ||
- postgresql_ext_extra_packages is defined | ||
- ansible_os_family == "RedHat" | ||
|
||
# packages | ||
- name: PostgreSQL | Extensions | Add packages | apt | ||
apt: | ||
name: "{{ postgresql_ext_extra_packages.names }}" | ||
state: present | ||
update_cache: yes | ||
cache_valid_time: "{{ apt_cache_valid_time | default (3600) }}" | ||
when: | ||
- postgresql_ext_extra_packages is defined | ||
- ansible_os_family == "Debian" | ||
- name: PostgreSQL | Extensions | Add packages | RHEL | ||
yum: | ||
name: "{{ postgresql_ext_extra_packages.names }}" | ||
state: present | ||
update_cache: yes | ||
when: | ||
- postgresql_ext_extra_packages is defined | ||
- ansible_os_family == "RedHat" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
# PostgreSQL vars for RedHat 9+ based distributions | ||
# | ||
# Using a different cluster name could cause problems with SELinux. | ||
# See /usr/lib/systemd/system/postgresql-*.service | ||
postgresql_cluster_name: "data" | ||
postgresql_service_name: "postgresql-{{ postgresql_version }}" | ||
|
||
postgresql_varlib_directory_name: "pgsql" | ||
|
||
# Used to execute initdb | ||
postgresql_bin_directory: "/usr/pgsql-{{postgresql_version}}/bin" | ||
|
||
postgresql_unix_socket_directories: | ||
- "{{ postgresql_pid_directory }}" | ||
- /tmp | ||
|
||
postgresql_fdw_mysql_packages: "mysql_fdw_{{ postgresql_version_terse }}" | ||
postgresql_fdw_ogr_packages: "ogr_fdw{{ postgresql_version_terse }}" | ||
|
||
postgresql_packages: | ||
- ca-certificates | ||
- python3-psycopg2 | ||
- python3-pycurl | ||
- glibc-common | ||
- epel-release | ||
- python3-libselinux | ||
- glibc-locale-source | ||
- glibc-langpack-en |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
# This file defines (optional) repos and packages - uncomment necessary lines | ||
|
||
# postgresql_ext_extra_packages: | ||
# names: | ||
# - pgadmin4-server | ||
# apt_repositories: | ||
# depot-pgadmin: "deb [signed-by=/etc/apt/trusted.gpg.d/8881B2A8210976F2.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/jammy pgadmin4 main" | ||
# apt_keys: | ||
# depot-pgadmin: | ||
# id: "8881B2A8210976F2" | ||
# url: "https://www.pgadmin.org/static/packages_pgadmin_org.pub" | ||
# yum_repositories: | ||
# depot-pgadmin: | ||
# name: pgadmin | ||
# description: the most popular and feature rich Open Source administration and development platform for PostgreSQL | ||
# url: "https://ftp.postgresql.org/pub/pgadmin/pgadmin4/yum/redhat/rhel-9-x86_64" | ||
# gpgkey: "https://www.pgadmin.org/static/packages_pgadmin_org.pub" |