Files
learn-devops/ansible/roles/haproxy_static_pods/tasks/main.yml
github-actions[bot] 52a3d0eb3b Add L2 Load Balancer (#16)
Co-authored-by: Fedor Batonogov <f.batonogov@yandex.ru>
2024-07-27 11:35:15 +03:00

41 lines
1.1 KiB
YAML

# tasks file for haproxy_static_pods
- name: Создать директории /etc/kubernetes/manifests и /etc/keepalived
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: "755"
with_items:
- /etc/kubernetes/manifests
- /etc/keepalived
- /etc/haproxy
- name: Наливаю конфигурацию keepalived
ansible.builtin.template:
src: keepalived.conf.j2
dest: /etc/keepalived/keepalived.conf
mode: "644"
- name: Наливаю check_apiserver.sh
ansible.builtin.copy:
src: check_apiserver.sh
dest: /etc/keepalived/check_apiserver.sh
mode: "644"
- name: Наливаю haproxy.cfg
ansible.builtin.copy:
src: haproxy.cfg
dest: /etc/haproxy/haproxy.cfg
mode: "644"
- name: Наливаю keepalived static pods manifest
ansible.builtin.copy:
src: keepalived.yaml
dest: /etc/kubernetes/manifests/keepalived.yaml
mode: "644"
- name: Наливаю haproxy static pods manifest
ansible.builtin.copy:
src: haproxy.yaml
dest: /etc/kubernetes/manifests/haproxy.yaml
mode: "644"