mirror of
https://gitea.0xace.cc/ansible-galaxy/patroni.git
synced 2024-11-25 08:06:39 +00:00
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
|
- name: Disable PostgreSQL module
|
||
|
shell: dnf module disable -y postgresql
|
||
|
register: disable_postgresql_module
|
||
|
changed_when: "'Nothing to do' not in disable_postgresql_module.stdout"
|
||
|
|
||
|
- name: "Install EPEL"
|
||
|
dnf:
|
||
|
name: "epel-release"
|
||
|
state: present
|
||
|
|
||
|
- name: Add PostgreSQL repository
|
||
|
dnf:
|
||
|
name: "{{ patroni_postgresql_repo_package }}"
|
||
|
state: present
|
||
|
disable_gpg_check: yes
|
||
|
when: patroni_postgresql_install_repo
|
||
|
|
||
|
- name: "Install PostgreSQL {{ patroni_postgresql_version }}"
|
||
|
dnf:
|
||
|
name: "{{ item }}"
|
||
|
state: present
|
||
|
disable_gpg_check: yes
|
||
|
loop:
|
||
|
- "{{ patroni_postgresql_packages }}"
|
||
|
register: patroni_postgresql_setup
|
||
|
|
||
|
- name: Manage TLS/SSL certificates
|
||
|
include_tasks: cacert.yaml
|
||
|
when: patroni_ssl
|
||
|
|
||
|
- 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
|
||
|
|
||
|
- name: Include Patroni {{ patroni_version }} install
|
||
|
include_tasks: install.yaml
|