add wal-g support for Debian os family

This commit is contained in:
ace 2023-04-19 14:24:08 +03:00
parent 0c9030717d
commit 54dc440f9c
Signed by: ace
GPG Key ID: 2C08973DD37A76FD
7 changed files with 23 additions and 11 deletions

View File

@ -1,3 +1,6 @@
- name: "Include backup with WAL-G install"
include_tasks: wal_g_install.yaml
- name: "Install Patroni {{ patroni_version }}"
include_tasks: patroni_install.yaml
tags: patroni_install

View File

@ -0,0 +1,11 @@
- name: Add WAL-G to patroni_create_replica_methods
set_fact:
patroni_create_replica_methods: "{{ patroni_create_replica_methods + [ 'wal_g' ] }}"
when: patroni_wal_g_install
- name: Include WAL-G role
ansible.builtin.include_role:
name: wal-g
vars:
wal_g_pg: yes
when: patroni_wal_g_install

View File

@ -1,5 +1,5 @@
- name: Include backup with WAL-G install
- name: "Include backup with WAL-G install"
include_tasks: wal_g_install.yaml
- name: Include Patroni {{ patroni_version }} install
- name: "Include Patroni {{ patroni_version }} install"
include_tasks: patroni_install.yaml

View File

@ -32,7 +32,7 @@
- name: "Install PostgreSQL for {{ ansible_facts['os_family'] }}"
include_tasks: "{{ ansible_facts['os_family'] }}/postgresql_install.yaml"
tags: patroni_install
tags: patroni_postgresql_install
- name: "Manage TLS/SSL certificates"
include_tasks: cacert.yaml

View File

@ -16,14 +16,14 @@ patroni_deps_packages:
# Patroni variables
patroni_package_name: "patroni"
patroni_package: "{{ patroni_package_name }}={{ patroni_version }}-{{ patroni_version_build }}"
patroni_version_build: "1.pgdg110+1"
patroni_version_build: "1.pgdg{{ ansible_distribution_version}}0+1"
patroni_unit_name: "patroni"
patroni_config_name: "config.yml"
# PostgreSQL variables
patroni_postgresql_package_name: "postgresql-{{ patroni_postgresql_major_version }}"
patroni_postgresql_package: "{{ patroni_postgresql_package_name }}={{ patroni_postgresql_version }}-{{ patroni_postgresql_version_build }}"
patroni_postgresql_version_build: "1.pgdg110+1"
patroni_postgresql_version_build: "1.pgdg{{ ansible_distribution_version}}0+1"
patroni_postgresql_cluster_name: "main"
patroni_postgresql_data_dir: "{{ patroni_postgresql_home_dir }}/{{ patroni_postgresql_major_version }}/{{ patroni_postgresql_cluster_name }}"
patroni_postgresql_wal_dir: ""

View File

@ -16,19 +16,18 @@ patroni_deps_packages:
# Patroni variables
patroni_package_name: "patroni"
patroni_package: "{{ patroni_package_name }}={{ patroni_version }}-{{ patroni_version_build }}"
patroni_version_build: "1.pgdg20.04+1"
patroni_version_build: "1.pgdg{{ ansible_distribution_version}}+1"
patroni_unit_name: "patroni"
patroni_config_name: "config.yml"
# PostgreSQL variables
patroni_postgresql_package_name: "postgresql-{{ patroni_postgresql_major_version }}"
patroni_postgresql_package: "{{ patroni_postgresql_package_name }}={{ patroni_postgresql_version }}-{{ patroni_postgresql_version_build }}"
patroni_postgresql_version_build: "1.pgdg20.04+1"
patroni_postgresql_version_build: "1.pgdg{{ ansible_distribution_version}}+1"
patroni_postgresql_cluster_name: "main"
patroni_postgresql_data_dir: "{{ patroni_postgresql_home_dir }}/{{ patroni_postgresql_major_version }}/{{ patroni_postgresql_cluster_name }}"
patroni_postgresql_wal_dir: ""
patroni_postgresql_conf_dir: "/etc/postgresql/{{ patroni_postgresql_major_version }}/{{ patroni_postgresql_cluster_name }}"
patroni_postgresql_bin_dir: "/usr/lib/postgresql/{{ patroni_postgresql_major_version }}/bin"
patroni_postgresql_log_dir: "/var/log/postgresql"
patroni_postgresql_unix_socket_dir: "/var/run/postgresql"
patroni_postgresql_home_dir: "/var/lib/postgresql"

View File

@ -16,19 +16,18 @@ patroni_deps_packages:
# Patroni variables
patroni_package_name: "patroni"
patroni_package: "{{ patroni_package_name }}={{ patroni_version }}-{{ patroni_version_build }}"
patroni_version_build: "1.pgdg22.04+1"
patroni_version_build: "1.pgdg{{ ansible_distribution_version}}+1"
patroni_unit_name: "patroni"
patroni_config_name: "config.yml"
# PostgreSQL variables
patroni_postgresql_package_name: "postgresql-{{ patroni_postgresql_major_version }}"
patroni_postgresql_package: "{{ patroni_postgresql_package_name }}={{ patroni_postgresql_version }}-{{ patroni_postgresql_version_build }}"
patroni_postgresql_version_build: "1.pgdg22.04+1"
patroni_postgresql_version_build: "1.pgdg{{ ansible_distribution_version}}+1"
patroni_postgresql_cluster_name: "main"
patroni_postgresql_data_dir: "{{ patroni_postgresql_home_dir }}/{{ patroni_postgresql_major_version }}/{{ patroni_postgresql_cluster_name }}"
patroni_postgresql_wal_dir: ""
patroni_postgresql_conf_dir: "/etc/postgresql/{{ patroni_postgresql_major_version }}/{{ patroni_postgresql_cluster_name }}"
patroni_postgresql_bin_dir: "/usr/lib/postgresql/{{ patroni_postgresql_major_version }}/bin"
patroni_postgresql_log_dir: "/var/log/postgresql"
patroni_postgresql_unix_socket_dir: "/var/run/postgresql"
patroni_postgresql_home_dir: "/var/lib/postgresql"