mirror of
https://gitea.0xace.cc/ansible-galaxy/patroni.git
synced 2025-12-18 22:17:24 +00:00
first commit
This commit is contained in:
44
tasks/RedHat/main.yaml
Normal file
44
tasks/RedHat/main.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
- 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
|
||||
Reference in New Issue
Block a user