add Ubuntu 22.04 support

This commit is contained in:
ace 2023-03-15 14:04:55 +03:00
parent f753c5d1af
commit 2e22041213
Signed by: ace
GPG Key ID: 2C08973DD37A76FD
3 changed files with 26 additions and 2 deletions

View File

@ -3,7 +3,7 @@ Setup standalone PostgreSQL
Tested with OS: Tested with OS:
- AlmaLinux 8/9 - AlmaLinux 8/9
- Debian 11 - Debian 11
- Ubuntu 20.04 - Ubuntu 20.04/22.04
Supported PostgreSQL versions: Supported PostgreSQL versions:
- 13 - 13

View File

@ -23,7 +23,7 @@
include_tasks: locale.yaml include_tasks: locale.yaml
tags: postgresql_locale tags: postgresql_locale
- name: "Install PostgreSQL for {{ ansible_facts['os_family'] }}" - name: "Install PostgreSQL for {{ ansible_facts['distribution'] }}"
include_tasks: "{{ ansible_facts['os_family'] }}/main.yaml" include_tasks: "{{ ansible_facts['os_family'] }}/main.yaml"
tags: postgresql_setup tags: postgresql_setup

24
vars/Ubuntu-22.04.yaml Normal file
View File

@ -0,0 +1,24 @@
postgresql_apt_key:
- name: org.postgresql.gpg
url: "https://www.postgresql.org/media/keys/ACCC4CF8.asc"
keyring: /etc/apt/trusted.gpg.d/org.postgresql.gpg
postgresql_apt_repository:
- repo: deb http://apt.postgresql.org/pub/repos/apt {{ ansible_distribution_release }}-pgdg main
filename: postgresql
postgresql_deps_packages:
- gnupg
- python3-psycopg2
postgresql_package_name: "postgresql-{{ postgresql_major_version }}"
postgresql_package: "{{ postgresql_package_name }}={{ postgresql_version }}-{{ postgresql_version_build }}"
postgresql_version_build: "1.pgdg22.04+1"
postgresql_config_dir: "/etc/postgresql"
postgresql_home_dir: "/var/lib/postgresql"
postgresql_data_dir: "{{ postgresql_home_dir }}/{{ postgresql_major_version }}/{{ postgresql_cluster_name }}"
postgresql_ssl_path: "{{ postgresql_config_dir }}/{{ postgresql_major_version }}/{{ postgresql_cluster_name }}"
postgresql_package_name_regex: "{{ postgresql_package_name }}-{{ postgresql_version }}-{{ postgresql_version_build }}"
postgresql_cluster_name: "main"
postgresql_ssl_update_ca_command: "update-ca-certificates --fresh"
postgresql_ssl_ca_trust_dir: "/usr/local/share/ca-certificates"
postgresql_unit_name: "postgresql@{{ postgresql_major_version}}-{{ postgresql_cluster_name }}"