patroni-postgresql-cluster (#13)

* Описана инфрастуктура кластера

* Добавлена роль etcd

* Добавлена роль haproxy

* Добавлена роль keepalived

* Добавлена роль ntp_install

* Добавлена роль patroni

* Добавлена групповые переменные

---------

Co-authored-by: Fedor Batonogov <f.batonogov@yandex.ru>
This commit is contained in:
github-actions[bot]
2024-06-18 10:37:21 +03:00
committed by GitHub
parent 5b7920bdca
commit f8fe304cd9
43 changed files with 930 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
---
- name: Создаю директорию /usr/local/etc/haproxy/
ansible.builtin.file:
path: /usr/local/etc/haproxy/
state: directory
- name: Наливаю haproxy.cfg
ansible.builtin.template:
src: haproxy.cfg.j2
dest: "/usr/local/etc/haproxy/haproxy.cfg"
mode: "755"
notify:
- Перезапускаю haproxy.service

View File

@@ -0,0 +1,13 @@
---
- name: Наливаю юнит файл haproxy
ansible.builtin.template:
src: haproxy.service.j2
dest: /etc/systemd/system/haproxy.service
notify:
- Перезапускаю haproxy.service
- name: Настраиваю haproxy.service
ansible.builtin.systemd:
name: haproxy.service
state: started
enabled: true

View File

@@ -0,0 +1,7 @@
---
# tasks file for haproxy
- name: Копирую конфигурацию haproxy
ansible.builtin.import_tasks: config.yml
- name: Устанавливаю haproxy
ansible.builtin.import_tasks: install.yml