refactor: split machine deploys from one-time secrets migration
Roles stay under the machine that runs them, CI applies only a known product, and the /opt/secrets move is a one-shot playbook instead of part of every core-secrets run. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
341538fba9
commit
9c692522fb
85 files changed
+537
-492
No files matched your search
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: CT 902, входной узел
|
||||
hosts: core-net
|
||||
become: true
|
||||
roles:
|
||||
- role: core-net/traefik
|
||||
tags: [traefik]
|
||||
- role: core-net/authentik
|
||||
tags: [authentik]
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: CT 901, секреты
|
||||
hosts: core-secrets
|
||||
become: true
|
||||
roles:
|
||||
- role: core-secrets/infisical
|
||||
tags: [infisical]
|
||||
- role: core-secrets/vaultwarden
|
||||
tags: [vaultwarden]
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: Развернуть сетевой шлюз и аутентификацию (core-net)
|
||||
hosts: core_net
|
||||
become: true
|
||||
roles:
|
||||
- core_net
|
||||
- authentik
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
- name: Развернуть сейф секретов (core-secrets)
|
||||
hosts: core_secrets
|
||||
become: true
|
||||
roles:
|
||||
- core_secrets
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
# Одноразовый перенос /opt/secrets. После успешного прогона на CT 901 файл удаляется.
|
||||
- name: Перенести данные прежнего стека core-secrets
|
||||
hosts: core-secrets
|
||||
become: true
|
||||
tasks:
|
||||
- name: Остановить прежний общий стек /opt/secrets
|
||||
ansible.builtin.command: docker compose -f /opt/secrets/compose.yaml down
|
||||
args:
|
||||
removes: /opt/secrets/compose.yaml
|
||||
|
||||
- name: Перенести данные Infisical в /opt/infisical
|
||||
ansible.builtin.command: mv /opt/secrets/infisical /opt/infisical
|
||||
args:
|
||||
removes: /opt/secrets/infisical
|
||||
creates: /opt/infisical
|
||||
|
||||
- name: Перенести данные Vaultwarden в /opt/vaultwarden
|
||||
ansible.builtin.command: mv /opt/secrets/vaultwarden /opt/vaultwarden
|
||||
args:
|
||||
removes: /opt/secrets/vaultwarden
|
||||
creates: /opt/vaultwarden
|
||||
|
||||
- name: Убрать compose прежнего общего стека
|
||||
ansible.builtin.file:
|
||||
path: /opt/secrets/compose.yaml
|
||||
state: absent
|
||||
|
||||
- name: Удалить пустой каталог прежнего стека
|
||||
ansible.builtin.command: rmdir /opt/secrets
|
||||
args:
|
||||
removes: /opt/secrets
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
- name: Установить панель NetBird
|
||||
hosts: netbird
|
||||
gather_facts: false
|
||||
roles:
|
||||
- role: netbird
|
||||
tags:
|
||||
- netbird
|
||||
- vpn
|
||||
- config
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: VPS rus-central, NetBird
|
||||
hosts: rus-central
|
||||
gather_facts: false
|
||||
roles:
|
||||
- role: rus-central/netbird
|
||||
tags: [netbird]
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- ansible.builtin.import_playbook: host.yml
|
||||
- ansible.builtin.import_playbook: core_net.yml
|
||||
- ansible.builtin.import_playbook: core_secrets.yml
|
||||
- ansible.builtin.import_playbook: netbird.yml
|
||||
- ansible.builtin.import_playbook: core-net.yml
|
||||
- ansible.builtin.import_playbook: core-secrets.yml
|
||||
- ansible.builtin.import_playbook: rus-central.yml
|
||||
Reference in new issue
Block a user