mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Remove unneeded quotes - notification/slack.py (#18826)
This commit is contained in:
parent
6c06aeb792
commit
19f0b5f1cc
1 changed files with 19 additions and 19 deletions
|
@ -123,48 +123,48 @@ EXAMPLES = """
|
||||||
local_action:
|
local_action:
|
||||||
module: slack
|
module: slack
|
||||||
token: thetoken/generatedby/slack
|
token: thetoken/generatedby/slack
|
||||||
msg: "{{ inventory_hostname }} completed"
|
msg: '{{ inventory_hostname }} completed'
|
||||||
|
|
||||||
- name: Send notification message via Slack all options
|
- name: Send notification message via Slack all options
|
||||||
local_action:
|
local_action:
|
||||||
module: slack
|
module: slack
|
||||||
token: thetoken/generatedby/slack
|
token: thetoken/generatedby/slack
|
||||||
msg: "{{ inventory_hostname }} completed"
|
msg: '{{ inventory_hostname }} completed'
|
||||||
channel: "#ansible"
|
channel: #ansible
|
||||||
username: "Ansible on {{ inventory_hostname }}"
|
username: 'Ansible on {{ inventory_hostname }}'
|
||||||
icon_url: "http://www.example.com/some-image-file.png"
|
icon_url: http://www.example.com/some-image-file.png
|
||||||
link_names: 0
|
link_names: 0
|
||||||
parse: 'none'
|
parse: 'none'
|
||||||
|
|
||||||
- name: insert a color bar in front of the message for visibility purposes and use the default webhook icon and name configured in Slack
|
- name: insert a color bar in front of the message for visibility purposes and use the default webhook icon and name configured in Slack
|
||||||
slack:
|
slack:
|
||||||
token: thetoken/generatedby/slack
|
token: thetoken/generatedby/slack
|
||||||
msg: "{{ inventory_hostname }} is alive!"
|
msg: '{{ inventory_hostname }} is alive!'
|
||||||
color: good
|
color: good
|
||||||
username: ""
|
username: ''
|
||||||
icon_url: ""
|
icon_url: ''
|
||||||
|
|
||||||
- name: Use the attachments API
|
- name: Use the attachments API
|
||||||
slack:
|
slack:
|
||||||
token: thetoken/generatedby/slack
|
token: thetoken/generatedby/slack
|
||||||
attachments:
|
attachments:
|
||||||
- text: "Display my system load on host A and B"
|
- text: Display my system load on host A and B
|
||||||
color: "#ff00dd"
|
color: #ff00dd
|
||||||
title: "System load"
|
title: System load
|
||||||
fields:
|
fields:
|
||||||
- title: "System A"
|
- title: System A
|
||||||
value: "load average: 0,74, 0,66, 0,63"
|
value: load average: 0,74, 0,66, 0,63"
|
||||||
short: "true"
|
short: True
|
||||||
- title: "System B"
|
- title: System B
|
||||||
value: "load average: 5,16, 4,64, 2,43"
|
value: 'load average: 5,16, 4,64, 2,43'
|
||||||
short: "true"
|
short: True
|
||||||
|
|
||||||
- name: Send notification message via Slack (deprecated API using domain)
|
- name: Send notification message via Slack (deprecated API using domain)
|
||||||
local_action:
|
local_action:
|
||||||
module: slack
|
module: slack
|
||||||
domain: future500.slack.com
|
domain: example.slack.com
|
||||||
token: thetokengeneratedbyslack
|
token: thetokengeneratedbyslack
|
||||||
msg: "{{ inventory_hostname }} completed"
|
msg: '{{ inventory_hostname }} completed'
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue