mirror of
https://gitea.0xace.cc/ansible-galaxy/postgresql.git
synced 2025-06-29 02:13:06 +00:00
fix deps installation and add wal-g support
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user