Hello,
I’m attempting to send a message to Slack channel using Ansible’s Slack module as follows:
local_action: module: slack channel: ... token: ... msg: [{"type":"section","text":{"type":"mrkdwn","text":"App deployment started for commit <https://github.com | 1ehe2e38> to production"}}]
The JSON payload makes it to the channel but is rendered as plain text:
[{'type': 'section', 'text': {'type': 'mrkdwn', 'text': 'App deployment started for commit 1ehe2e38 to production'}}]
The goal is to have it rendered as follows
App deployment started for commit [1ehe2e38](http://someurl/) to production
where the commit is a hyperlink to GitHub.
I’m able to send this JSON and have it be properly formatter using Slack’s Block Kit builder as seen here.
Question: Is content-type “JSON” supported by Slack Module in Ansible 2.7.10 ? If it is, what am I doing incorrectly ?