M roles/ntfy_client/tasks/main.yml => roles/ntfy_client/tasks/main.yml +1 -1
@@ 1,7 1,7 @@
---
- name: Get secrets
ansible.builtin.set_fact:
- infrastructure_password: "{{ lookup('community.hashi_vault.hashi_vault', 'ansible/data/ntfy:infrastructure_password') }}"
+ access_token: "{{ lookup('community.hashi_vault.hashi_vault', 'ansible/data/ntfy:access-token') }}"
- name: Install curl wrapper
ansible.builtin.template:
M roles/ntfy_client/templates/curl-ntfy.j2 => roles/ntfy_client/templates/curl-ntfy.j2 +1 -1
@@ 2,4 2,4 @@
PRIORITY=${3:-3}
-curl -X POST -u infrastructure:{{ infrastructure_password }} -H "X-Title: $1" -H "X-Priority: $PRIORITY" -d "$2" https://ntfy.xenrox.net/infrastructure
+curl -X POST -H "Authorization: Bearer {{ access_token }}" -H "X-Title: $1" -H "X-Priority: $PRIORITY" -d "$2" https://ntfy.xenrox.net/infrastructure