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
@@ -2,49 +2,6 @@
|
||||
- name: Маршрутизатор OPNsense
|
||||
hosts: opnsense
|
||||
gather_facts: false
|
||||
pre_tasks:
|
||||
- name: Проверить наличие плагина os-netbird на OPNsense
|
||||
ansible.builtin.uri:
|
||||
url: "https://{{ opnsense_host }}/api/netbird/service/status"
|
||||
method: GET
|
||||
url_username: "{{ lookup('env', 'OPNSENSE_API_KEY') }}"
|
||||
url_password: "{{ lookup('env', 'OPNSENSE_API_SECRET') }}"
|
||||
force_basic_auth: true
|
||||
validate_certs: false
|
||||
status_code: [200, 404]
|
||||
register: opnsense_nb_check
|
||||
tags: [always]
|
||||
|
||||
- name: Остановить службу NetBird на OPNsense перед удалением плагина
|
||||
ansible.builtin.uri:
|
||||
url: "https://{{ opnsense_host }}/api/netbird/service/stop"
|
||||
method: POST
|
||||
url_username: "{{ lookup('env', 'OPNSENSE_API_KEY') }}"
|
||||
url_password: "{{ lookup('env', 'OPNSENSE_API_SECRET') }}"
|
||||
force_basic_auth: true
|
||||
validate_certs: false
|
||||
body_format: json
|
||||
body: {}
|
||||
status_code: [200]
|
||||
when: opnsense_nb_check.status == 200 and (opnsense_nb_check.json.status | default('')) == 'running'
|
||||
changed_when: true
|
||||
failed_when: false
|
||||
tags: [always]
|
||||
|
||||
- name: Удалить плагин os-netbird из OPNsense
|
||||
ansible.builtin.uri:
|
||||
url: "https://{{ opnsense_host }}/api/core/firmware/remove/os-netbird"
|
||||
method: POST
|
||||
url_username: "{{ lookup('env', 'OPNSENSE_API_KEY') }}"
|
||||
url_password: "{{ lookup('env', 'OPNSENSE_API_SECRET') }}"
|
||||
force_basic_auth: true
|
||||
validate_certs: false
|
||||
body_format: json
|
||||
body: {}
|
||||
status_code: [200]
|
||||
when: opnsense_nb_check.status == 200
|
||||
changed_when: true
|
||||
tags: [always]
|
||||
roles:
|
||||
- role: opnsense/xray
|
||||
tags: [xray]
|
||||
|
||||
Reference in new issue
Block a user