chore: remove temporary NetBird and Authentik cleanup tasks from playbooks
This commit is contained in:
1 parent
6a2f90797a
commit
ef8179e96e
2 files changed
-85
No files matched your search
@@ -10,48 +10,6 @@
|
||||
- role: vector
|
||||
tags: [vector]
|
||||
tasks:
|
||||
- name: Удалить остатки NetBird и Authentik на core-net
|
||||
tags: [always]
|
||||
block:
|
||||
- name: Проверить наличие клиента NetBird
|
||||
ansible.builtin.stat:
|
||||
path: /usr/bin/netbird
|
||||
register: core_net_nb_bin
|
||||
|
||||
- name: Отключить и остановить NetBird
|
||||
ansible.builtin.command: netbird down
|
||||
when: core_net_nb_bin.stat.exists
|
||||
changed_when: true
|
||||
failed_when: false
|
||||
|
||||
- name: Удалить пакет netbird
|
||||
ansible.builtin.apt:
|
||||
name: netbird
|
||||
state: absent
|
||||
purge: true
|
||||
when: core_net_nb_bin.stat.exists
|
||||
|
||||
- name: Остановить и удалить контейнеры Authentik (если остались)
|
||||
ansible.builtin.stat:
|
||||
path: /opt/authentik/compose.yaml
|
||||
register: core_net_authentik_compose
|
||||
|
||||
- name: Остановить стек Authentik
|
||||
ansible.builtin.command: docker compose -f /opt/authentik/compose.yaml down -v --remove-orphans
|
||||
when: core_net_authentik_compose.stat.exists
|
||||
changed_when: true
|
||||
failed_when: false
|
||||
|
||||
- name: Удалить файлы и каталоги NetBird и Authentik
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
loop:
|
||||
- /etc/apt/sources.list.d/netbird.list
|
||||
- /usr/share/keyrings/netbird-archive-keyring.gpg
|
||||
- /etc/netbird
|
||||
- /var/lib/netbird
|
||||
- /opt/authentik
|
||||
- name: Развернуть панель Remnawave
|
||||
ansible.builtin.import_role:
|
||||
name: core-net/remnawave
|
||||
|
||||
Reference in new issue
Block a user