diff --git a/playbooks/test_vk.yml b/playbooks/test_vk.yml index 6c994b0..10986dc 100644 --- a/playbooks/test_vk.yml +++ b/playbooks/test_vk.yml @@ -1,26 +1,25 @@ --- -- name: Test VK notification +- name: Test ntfy.sh notification hosts: localhost + connection: local gather_facts: false vars: - vk_token: "vk1.a.A5-7vFRrNaUeGRCrq_X0m4TzyRhhHCOz4bT9qReInTJbhAq9UNYqflRlgi4f_t_YRrHopECyEcMM1dGjMOHaSgCtlB3-wjHvqOuKgqX70zTt_CRca195BUB1Hp9jOJ68Iff1zFCrxR3VPugA2-6tIyPCzQBc2ISObf_18M017PK3yhklw1vfjorGJE4LEuulJrscjOMtfcHrAzHqbcUt1A" - vk_user_id: 125699675 + ntfy_topic: "awx_vpn" # ваша тема tasks: - - name: Send test message via VK API + - name: Send test message to ntfy.sh uri: - url: "https://api.vk.com/method/messages.send" + url: "https://ntfy.sh/{{ ntfy_topic }}" method: POST - body_format: json - body: - v: "5.131" - access_token: "{{ vk_token }}" - user_id: "{{ vk_user_id }}" - message: "✅ Тест от AWX! Если вы это читаете, VK-уведомления работают." - random_id: "{{ 999999999 | random }}" + body: "✅ Тест от AWX! Если вы это читаете, ntfy работает отлично." + headers: + Title: "Test notification" + Priority: "high" + Tags: "white_check_mark" timeout: 10 - register: vk_response + register: result + become: false - - name: Show response from VK + - name: Show response debug: - var: vk_response \ No newline at end of file + var: result \ No newline at end of file