mirror of
https://gitea.0xace.cc/ansible-galaxy/postgresql.git
synced 2024-11-25 00:06:42 +00:00
fix deps installation and add wal-g support
This commit is contained in:
parent
2ea9e25263
commit
8ec959cf73
@ -1,8 +1,10 @@
|
||||
- name: Install deps packages
|
||||
- name: Install apt-transport-https and gnupg
|
||||
apt:
|
||||
name: "{{ postgresql_deps_packages }}"
|
||||
state: present
|
||||
name:
|
||||
- apt-transport-https
|
||||
- gnupg
|
||||
update_cache: yes
|
||||
state: present
|
||||
|
||||
- name: Add gpg keys for PostgreSQL repo
|
||||
ansible.builtin.apt_key:
|
||||
@ -20,6 +22,12 @@
|
||||
loop: "{{ postgresql_apt_repository }}"
|
||||
when: postgresql_install_official_repo
|
||||
|
||||
- name: Install deps packages
|
||||
apt:
|
||||
name: "{{ postgresql_deps_packages }}"
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
- name: Install postgresql-common
|
||||
apt:
|
||||
name: postgresql-common
|
||||
|
@ -6,6 +6,16 @@
|
||||
include_tasks: config.yaml
|
||||
tags: postgresql_configuration
|
||||
|
||||
- name: Include WAL-G role
|
||||
ansible.builtin.include_role:
|
||||
name: wal-g
|
||||
vars:
|
||||
wal_g_pg: yes
|
||||
wal_g_pg_home_dir: "{{ postgresql_home_dir }}"
|
||||
wal_g_pg_data_dir: "{{ postgresql_data_dir }}"
|
||||
wal_g_restore: "{{ postgresql_wal_g_restore }}"
|
||||
when: postgresql_wal_g_install
|
||||
|
||||
- name: "PostgreSQL initdb"
|
||||
become_user: "{{ postgresql_superuser_username }}"
|
||||
shell: "/usr/lib/postgresql/{{ postgresql_major_version }}/bin/initdb -D {{ postgresql_data_dir }} --auth-local peer --auth-host {{ postgresql_password_encryption_algorithm }} --no-instructions"
|
||||
|
@ -1,8 +1,3 @@
|
||||
- name: Install deps packages
|
||||
dnf:
|
||||
name: "{{ postgresql_deps_packages }}"
|
||||
state: present
|
||||
|
||||
- name: Disable PostgreSQL module
|
||||
shell: dnf module disable -y postgresql
|
||||
register: disable_postgresql_module
|
||||
@ -24,6 +19,11 @@
|
||||
disable_gpg_check: yes
|
||||
register: postgresql_setup
|
||||
|
||||
- name: Install deps packages
|
||||
dnf:
|
||||
name: "{{ postgresql_deps_packages }}"
|
||||
state: present
|
||||
|
||||
- name: Include data direcory
|
||||
include_tasks: data_dir.yaml
|
||||
|
||||
|
@ -8,11 +8,11 @@ postgresql_apt_repository:
|
||||
|
||||
postgresql_deps_packages:
|
||||
- gnupg
|
||||
- python3-psycopg2
|
||||
- python3-psycopg2=*pgdg{{ ansible_distribution_version }}0+1
|
||||
|
||||
postgresql_package_name: "postgresql-{{ postgresql_major_version }}"
|
||||
postgresql_package: "{{ postgresql_package_name }}={{ postgresql_version }}-{{ postgresql_version_build }}"
|
||||
postgresql_version_build: "1.pgdg110+1"
|
||||
postgresql_version_build: "1.pgdg{{ ansible_distribution_version}}0+1"
|
||||
postgresql_config_dir: "/etc/postgresql"
|
||||
postgresql_home_dir: "/var/lib/postgresql"
|
||||
postgresql_data_dir: "{{ postgresql_home_dir }}/{{ postgresql_major_version }}/{{ postgresql_cluster_name }}"
|
||||
|
@ -8,11 +8,11 @@ postgresql_apt_repository:
|
||||
|
||||
postgresql_deps_packages:
|
||||
- gnupg
|
||||
- python3-psycopg2
|
||||
- python3-psycopg2=*~pgdg{{ ansible_distribution_version }}+1
|
||||
|
||||
postgresql_package_name: "postgresql-{{ postgresql_major_version }}"
|
||||
postgresql_package: "{{ postgresql_package_name }}={{ postgresql_version }}-{{ postgresql_version_build }}"
|
||||
postgresql_version_build: "1.pgdg20.04+1"
|
||||
postgresql_version_build: "1.pgdg{{ ansible_distribution_version }}+1"
|
||||
postgresql_config_dir: "/etc/postgresql"
|
||||
postgresql_home_dir: "/var/lib/postgresql"
|
||||
postgresql_data_dir: "{{ postgresql_home_dir }}/{{ postgresql_major_version }}/{{ postgresql_cluster_name }}"
|
||||
|
@ -8,11 +8,11 @@ postgresql_apt_repository:
|
||||
|
||||
postgresql_deps_packages:
|
||||
- gnupg
|
||||
- python3-psycopg2
|
||||
- python3-psycopg2=*~pgdg{{ ansible_distribution_version }}+1
|
||||
|
||||
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_version_build: "1.pgdg{{ ansible_distribution_version }}+1"
|
||||
postgresql_config_dir: "/etc/postgresql"
|
||||
postgresql_home_dir: "/var/lib/postgresql"
|
||||
postgresql_data_dir: "{{ postgresql_home_dir }}/{{ postgresql_major_version }}/{{ postgresql_cluster_name }}"
|
||||
|
Loading…
Reference in New Issue
Block a user