ansible/awx

Notification webhook test feature sending its own format

開放

#8,798 建立於 2020年12月9日

 (4 則留言) (7 個反應) (0 位負責人)Python (3,333 個分叉)batch import
component:apicomponent:uihelp wantedtype:enhancement

倉庫指標

星標
 (13,071 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

ISSUE TYPE
  • Bug Report
SUMMARY

The "Test Notification" feature does not have an option to send a formatted test message, it simply sends its own formatted request. The problem when using a webhook is that the formatting can determine if the request is rejected by the service, and as such renders the "Test Notification" useless. When setting up a webhook, it is impossible to actually test a notification.

ENVIRONMENT
  • AWX version: 15.0.1
  • AWX install method: docker-compose
  • Ansible version: 2.9.15
  • Operating System: RHEL 7
  • Web Browser: Chrome 87
STEPS TO REPRODUCE

Add a new notification using type webhook. I am using Google Chat that simply needs a TARGET URL and Content-Type set. Clicking the "Test Notification" bell will send a statically formatted request that is not customizable.

EXPECTED RESULTS

A properly formatted test message body. The format could be specified in CUSTOMIZE MESSAGES... or simply use one of the already customized messages. in my example I need something sent in the format: {"text": "Ansible Tower Test Notification 4 https://awx.example.com"}

ACTUAL RESULTS

{"body": "Ansible Tower Test Notification 4 https://awx.example.com"}

ADDITIONAL INFORMATION

貢獻者指南