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>
178 lines
4.6 KiB
YAML
178 lines
4.6 KiB
YAML
# Шаблоны команд Remnawave API. Новый однотипный ресурс — шаг здесь.
|
|
# prepare/compare_with/after/run — короткие хуки в sync_remnawave.py
|
|
# (ключ Reality, адрес NetBird, uuid профилей, правило Browser, пользователи).
|
|
# {поле} подставляется из элемента. Целая строка "{поле}" сохраняет тип (объект, список).
|
|
steps:
|
|
- id: xray_templates
|
|
from: xray_templates
|
|
prepare: load_json_file
|
|
list: {method: GET, path: /subscription-templates/, key: templates}
|
|
match: [name, templateType]
|
|
compare: [templateJson]
|
|
prune:
|
|
where: {templateType: XRAY_JSON}
|
|
save: {as: xray_template, key: name}
|
|
create:
|
|
method: POST
|
|
path: /subscription-templates/
|
|
body:
|
|
name: "{name}"
|
|
templateType: "{templateType}"
|
|
templateJson: "{templateJson}"
|
|
update:
|
|
method: PATCH
|
|
path: /subscription-templates/
|
|
body:
|
|
uuid: "{uuid}"
|
|
templateJson: "{templateJson}"
|
|
delete:
|
|
method: DELETE
|
|
path: "/subscription-templates/{uuid}"
|
|
|
|
- id: profiles
|
|
from: profiles
|
|
prepare: render_profile
|
|
list: {method: GET, path: /config-profiles/, key: configProfiles}
|
|
match: [name]
|
|
compare_with: profile_config
|
|
prune: true
|
|
save: {as: profile, key: name}
|
|
refresh: {method: GET, path: "/config-profiles/{uuid}"}
|
|
create:
|
|
method: POST
|
|
path: /config-profiles/
|
|
body:
|
|
name: "{name}"
|
|
config: "{config}"
|
|
update:
|
|
method: PATCH
|
|
path: /config-profiles/
|
|
body:
|
|
uuid: "{uuid}"
|
|
config: "{config}"
|
|
delete:
|
|
method: DELETE
|
|
path: "/config-profiles/{uuid}"
|
|
|
|
- id: nodes
|
|
from: nodes
|
|
prepare: prepare_node
|
|
list: {method: GET, path: /nodes/, key: nodes}
|
|
match: [name]
|
|
compare_with: node_binding
|
|
prune: true
|
|
after: enable_if_disabled
|
|
save: {as: node, key: name}
|
|
create:
|
|
method: POST
|
|
path: /nodes/
|
|
body:
|
|
name: "{name}"
|
|
address: "{address}"
|
|
port: "{port}"
|
|
countryCode: "{countryCode}"
|
|
configProfile: "{configProfile}"
|
|
update:
|
|
method: PATCH
|
|
path: /nodes/
|
|
body:
|
|
uuid: "{uuid}"
|
|
address: "{address}"
|
|
port: "{port}"
|
|
countryCode: "{countryCode}"
|
|
configProfile: "{configProfile}"
|
|
update_fallback:
|
|
method: PUT
|
|
path: /nodes/
|
|
body:
|
|
uuid: "{uuid}"
|
|
address: "{address}"
|
|
port: "{port}"
|
|
countryCode: "{countryCode}"
|
|
configProfile: "{configProfile}"
|
|
delete:
|
|
method: DELETE
|
|
path: "/nodes/{uuid}"
|
|
|
|
- id: hosts
|
|
from: nodes
|
|
prepare: prepare_host
|
|
list: {method: GET, path: /hosts/, key: hosts}
|
|
match_prepared: [address]
|
|
compare_with: host_binding
|
|
prune: true
|
|
save: {as: host, key: address}
|
|
create:
|
|
method: POST
|
|
path: /hosts/
|
|
body:
|
|
remark: "{remark}"
|
|
address: "{address}"
|
|
port: "{port}"
|
|
path: "{path}"
|
|
sni: "{sni}"
|
|
host: "{host}"
|
|
fingerprint: chrome
|
|
isDisabled: false
|
|
securityLayer: DEFAULT
|
|
alpn: h2
|
|
xHttpExtraParams:
|
|
xmux:
|
|
maxConcurrency: "16-32"
|
|
hMaxRequestTimes: "600-900"
|
|
hMaxReusableSecs: "1800-3000"
|
|
noSSEHeader: true
|
|
xPaddingBytes: "100-1000"
|
|
inbound:
|
|
configProfileUuid: "{profile_uuid}"
|
|
configProfileInboundUuid: "{inbound_uuid}"
|
|
nodes: "{nodes}"
|
|
xrayJsonTemplateUuid: "{xrayJsonTemplateUuid}"
|
|
update:
|
|
method: PATCH
|
|
path: /hosts/
|
|
body:
|
|
uuid: "{uuid}"
|
|
remark: "{remark}"
|
|
path: "{path}"
|
|
sni: "{sni}"
|
|
host: "{host}"
|
|
port: "{port}"
|
|
alpn: "{alpn}"
|
|
fingerprint: "{fingerprint}"
|
|
xrayJsonTemplateUuid: "{xrayJsonTemplateUuid}"
|
|
nodes: "{nodes}"
|
|
delete:
|
|
method: DELETE
|
|
path: "/hosts/{uuid}"
|
|
|
|
- id: squads
|
|
from: squads
|
|
prepare: prepare_squad
|
|
list: {method: GET, path: /internal-squads/, key: internalSquads}
|
|
match: [name]
|
|
compare_with: squad_inbounds
|
|
prune: true
|
|
save: {as: squad, key: name}
|
|
create:
|
|
method: POST
|
|
path: /internal-squads/
|
|
body:
|
|
name: "{name}"
|
|
inbounds: "{inbounds}"
|
|
update:
|
|
method: PATCH
|
|
path: /internal-squads/
|
|
body:
|
|
uuid: "{uuid}"
|
|
inbounds: "{inbounds}"
|
|
delete:
|
|
method: DELETE
|
|
path: "/internal-squads/{uuid}"
|
|
|
|
- id: subscription
|
|
run: subscription_settings
|
|
|
|
- id: users
|
|
run: users
|