refactor(remnawave): синхронизировать панель из desired.yml и шаблонов команд
ansible-deploy / plan (push) Successful in 1s
ansible-lint / lint (push) Successful in 2s
ansible-deploy / deploy (core-mon, ) (push) Successful in 37s
ansible-deploy / deploy (core-net, ) (push) Failing after 52s
ansible-deploy / deploy (core-secrets, ) (push) Successful in 24s
ansible-deploy / deploy (ger-nod-02, ) (push) Successful in 1m20s
ansible-deploy / deploy (opnsense, ) (push) Successful in 13s
ansible-deploy / deploy (rus-central, ) (push) Successful in 1m6s
ansible-deploy / plan (push) Successful in 1s
ansible-lint / lint (push) Successful in 2s
ansible-deploy / deploy (core-mon, ) (push) Successful in 37s
ansible-deploy / deploy (core-net, ) (push) Failing after 52s
ansible-deploy / deploy (core-secrets, ) (push) Successful in 24s
ansible-deploy / deploy (ger-nod-02, ) (push) Successful in 1m20s
ansible-deploy / deploy (opnsense, ) (push) Successful in 13s
ansible-deploy / deploy (rus-central, ) (push) Successful in 1m6s
Повторный прогон без смены compose не тянет образы, ноды и сквады добавляются данными, а не новым плейбуком на каждый VPS. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
89f928c64a
commit
99ee815213
22 files changed
+1151
-672
No files matched your search
@@ -1,4 +1,34 @@
|
||||
---
|
||||
- name: Взять описание ноды из desired.yml
|
||||
ansible.builtin.set_fact:
|
||||
remnanode_stack: "{{ lookup('file', playbook_dir ~ '/../roles/core-net/remnawave/files/desired.yml') | from_yaml }}"
|
||||
|
||||
- name: Найти эту ноду в desired.yml
|
||||
ansible.builtin.set_fact:
|
||||
remnanode_node_matches: "{{ remnanode_stack.nodes | selectattr('netbird_hostname', 'equalto', inventory_hostname) | list }}"
|
||||
|
||||
- name: Нода должна быть описана в desired.yml
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- remnanode_node_matches | length == 1
|
||||
fail_msg: "В desired.yml нет ровно одной ноды с netbird_hostname={{ inventory_hostname }}"
|
||||
|
||||
- name: Подставить профиль ноды
|
||||
ansible.builtin.set_fact:
|
||||
remnanode_node: "{{ remnanode_node_matches[0] }}"
|
||||
remnanode_profile_matches: "{{ remnanode_stack.profiles | selectattr('name', 'equalto', remnanode_node_matches[0].profile) | list }}"
|
||||
|
||||
- name: Профиль ноды должен быть в desired.yml
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- remnanode_profile_matches | length == 1
|
||||
fail_msg: "В desired.yml нет профиля {{ remnanode_node.profile }}"
|
||||
|
||||
- name: Домен и путь SelfSteal из профиля
|
||||
ansible.builtin.set_fact:
|
||||
remnanode_selfsteal_domain: "{{ remnanode_profile_matches[0].selfsteal_domain }}"
|
||||
remnanode_xhttp_path: "{{ remnanode_profile_matches[0].xhttp_path }}"
|
||||
|
||||
- name: Проверить SECRET_KEY ноды и Cloudflare API
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
@@ -16,6 +46,7 @@
|
||||
- certbot
|
||||
state: present
|
||||
update_cache: true
|
||||
cache_valid_time: 86400
|
||||
|
||||
- name: Создать каталоги ноды
|
||||
ansible.builtin.file:
|
||||
|
||||
Reference in new issue
Block a user