Added playbook and role for k8s-ha-api

This commit is contained in:
2025-08-23 13:39:33 +03:00
parent fb73056312
commit 8efad362a0
10 changed files with 118 additions and 0 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"

View File

@ -0,0 +1,4 @@
---
- name: ping
ping: