chore(security): disable vector on external VPS nodes and restrict exit node LAN access
ansible-deploy / plan (push) Successful in 2s
ansible-lint / lint (push) Successful in 2s
ansible-deploy / deploy (core-mon, ) (push) Successful in 8s
ansible-deploy / deploy (core-net, ) (push) Successful in 9s
ansible-deploy / deploy (core-secrets, ) (push) Successful in 8s
ansible-deploy / deploy (ger-nod-02, ) (push) Successful in 2m18s
ansible-deploy / deploy (rus-central, ) (push) Successful in 2m0s

This commit is contained in:
karpenok committed 2026-11-18 12:05:37 +07:00
1 parent 425d878ec7
commit ca25b1d042
5 files changed
+36

No files matched your search

+2
View File
@@ -10,4 +10,6 @@
- role: vmagent - role: vmagent
tags: [vmagent] tags: [vmagent]
- role: vector - role: vector
vars:
vector_enabled: false
tags: [vector] tags: [vector]
+2
View File
@@ -8,4 +8,6 @@
- role: rus-central/cadvisor - role: rus-central/cadvisor
tags: [cadvisor] tags: [cadvisor]
- role: vector - role: vector
vars:
vector_enabled: false
tags: [vector] tags: [vector]
@@ -32,6 +32,14 @@
changed_when: "'added' in (ufw_netbird_wg.stdout | lower) or 'deleted' in (ufw_netbird_wg.stdout | lower)" changed_when: "'added' in (ufw_netbird_wg.stdout | lower) or 'deleted' in (ufw_netbird_wg.stdout | lower)"
failed_when: false failed_when: false
- name: Ограничить исходящий доступ с exit node в домашнюю LAN (только VictoriaMetrics на core-mon)
ansible.builtin.command: "{{ item }}"
loop:
- ufw allow out proto tcp from any to 192.168.1.108 port 8428
- ufw deny out to 192.168.1.0/24
register: ufw_lan_restrict
changed_when: "'added' in (ufw_lan_restrict.stdout | lower)"
- name: Клиент NetBird на ноде - name: Клиент NetBird на ноде
ansible.builtin.include_role: ansible.builtin.include_role:
name: netbird_client name: netbird_client
+1
View File
@@ -1,4 +1,5 @@
--- ---
vector_enabled: true
vector_config_path: /etc/vector/vector.yaml vector_config_path: /etc/vector/vector.yaml
vector_data_dir: /var/lib/vector vector_data_dir: /var/lib/vector
vector_legacy_dir: /opt/vector vector_legacy_dir: /opt/vector
+23
View File
@@ -15,6 +15,29 @@
state: absent state: absent
when: vector_legacy_compose.stat.exists when: vector_legacy_compose.stat.exists
- name: Отключить и удалить конфиг Vector, если сбор логов выключен
when: not (vector_enabled | bool)
block:
- name: Проверить наличие systemd-сервиса Vector
ansible.builtin.stat:
path: /lib/systemd/system/vector.service
register: vector_unit
- name: Остановить и отключить Vector
ansible.builtin.systemd:
name: vector
state: stopped
enabled: false
when: vector_unit.stat.exists
- name: Удалить конфигурацию Vector
ansible.builtin.file:
path: "{{ vector_config_path }}"
state: absent
- name: Установить и запустить нативный Vector
when: vector_enabled | bool
block:
- name: Подключить APT-репозиторий Vector - name: Подключить APT-репозиторий Vector
ansible.builtin.shell: curl -1sLf 'https://setup.vector.dev' | bash ansible.builtin.shell: curl -1sLf 'https://setup.vector.dev' | bash
args: args: