diff --git a/ansible/roles/opnsense/xray/tasks/main.yml b/ansible/roles/opnsense/xray/tasks/main.yml index 735431f..1b1becf 100644 --- a/ansible/roles/opnsense/xray/tasks/main.yml +++ b/ansible/roles/opnsense/xray/tasks/main.yml @@ -52,7 +52,7 @@ - name: Получить текущие инстансы из OPNsense ansible.builtin.uri: - url: "https://{{ opnsense_host }}/api/xray/instance/search" + url: "https://{{ opnsense_host }}/api/xray/instance/searchItem" method: GET url_username: "{{ opnsense_api_key }}" url_password: "{{ opnsense_api_secret }}" @@ -71,7 +71,7 @@ - name: Отключить лишние активные инстансы ansible.builtin.uri: - url: "https://{{ opnsense_host }}/api/xray/instance/toggle/{{ item.uuid }}/0" + url: "https://{{ opnsense_host }}/api/xray/instance/toggleItem/{{ item.uuid }}/0" method: POST url_username: "{{ opnsense_api_key }}" url_password: "{{ opnsense_api_secret }}" @@ -88,7 +88,7 @@ - name: Прочитать полные поля существующих инстансов ansible.builtin.uri: - url: "https://{{ opnsense_host }}/api/xray/instance/get/{{ item.uuid }}" + url: "https://{{ opnsense_host }}/api/xray/instance/getItem/{{ item.uuid }}" method: GET url_username: "{{ opnsense_api_key }}" url_password: "{{ opnsense_api_secret }}" @@ -110,7 +110,7 @@ - name: Добавить новые подписки ansible.builtin.uri: - url: "https://{{ opnsense_host }}/api/xray/instance/add" + url: "https://{{ opnsense_host }}/api/xray/instance/addItem" method: POST url_username: "{{ opnsense_api_key }}" url_password: "{{ opnsense_api_secret }}" @@ -129,7 +129,7 @@ - name: Обновить изменённые подписки ansible.builtin.uri: - url: "https://{{ opnsense_host }}/api/xray/instance/set/{{ item.0.uuid }}" + url: "https://{{ opnsense_host }}/api/xray/instance/setItem/{{ item.0.uuid }}" method: POST url_username: "{{ opnsense_api_key }}" url_password: "{{ opnsense_api_secret }}" @@ -223,7 +223,7 @@ - name: Откатить переключение при нерабочем соединении ansible.builtin.uri: - url: "https://{{ opnsense_host }}/api/xray/instance/toggle/{{ item.uuid }}/1" + url: "https://{{ opnsense_host }}/api/xray/instance/toggleItem/{{ item.uuid }}/1" method: POST url_username: "{{ opnsense_api_key }}" url_password: "{{ opnsense_api_secret }}" @@ -260,7 +260,7 @@ - name: Удалить лишние инстансы после успешного переключения ansible.builtin.uri: - url: "https://{{ opnsense_host }}/api/xray/instance/del/{{ item.uuid }}" + url: "https://{{ opnsense_host }}/api/xray/instance/delItem/{{ item.uuid }}" method: POST url_username: "{{ opnsense_api_key }}" url_password: "{{ opnsense_api_secret }}"