mirror of
https://github.com/batonogov/learn-devops.git
synced 2025-12-01 09:43:01 +00:00
patroni-postgresql-cluster (#13)
* Описана инфрастуктура кластера * Добавлена роль etcd * Добавлена роль haproxy * Добавлена роль keepalived * Добавлена роль ntp_install * Добавлена роль patroni * Добавлена групповые переменные --------- Co-authored-by: Fedor Batonogov <f.batonogov@yandex.ru>
This commit is contained in:
committed by
GitHub
parent
5b7920bdca
commit
f8fe304cd9
13
ansible/roles/haproxy/tasks/config.yml
Normal file
13
ansible/roles/haproxy/tasks/config.yml
Normal 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
|
||||
13
ansible/roles/haproxy/tasks/install.yml
Normal file
13
ansible/roles/haproxy/tasks/install.yml
Normal 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
|
||||
7
ansible/roles/haproxy/tasks/main.yml
Normal file
7
ansible/roles/haproxy/tasks/main.yml
Normal 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
|
||||
Reference in New Issue
Block a user