mirror of
https://github.com/batonogov/learn-devops.git
synced 2025-11-29 00:33:02 +00:00
41 lines
1.1 KiB
YAML
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"
|