Added code

This commit is contained in:
2025-08-25 19:10:31 +03:00
parent d32a39b1f1
commit 61f83b4567
11 changed files with 61 additions and 18 deletions

View File

@ -0,0 +1,36 @@
---
- block:
- name: Run "apt update / upgrade"
apt:
upgrade: yes
update_cache: yes
retries: 10
delay: 30
- name: Install haproxy keepalived etc
apt:
state: latest
pkg: "{{ pkg_list }}"
- name: Create /etc/haproxy/haproxy.cfg
template:
src: haproxy.cfg.j2
dest: "/etc/haproxy/haproxy.cfg"
owner: root
group: root
mode: '0644'
notify: Restart_haproxy
- name: Create /etc/keepalived/keepalived.conf
template:
src: keepalived.conf.j2
dest: "/etc/keepalived/keepalived.conf"
owner: root
group: root
mode: '0644'
notify: Restart_keepalived
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "12"