用AI赚第一桶💰低成本搭建一套AI赚钱工具,源码可二开。 广告
## [slack - Send Slack notifications][1] ~~~ - name: Send notification message via Slack slack: token: thetoken/generatedby/slack msg: '{{ inventory_hostname }} completed' delegate_to: localhost - name: Send notification message via Slack all options slack: token: thetoken/generatedby/slack msg: '{{ inventory_hostname }} completed' channel: '#ansible' username: 'Ansible on {{ inventory_hostname }}' icon_url: http://www.example.com/some-image-file.png link_names: 0 parse: 'none' delegate_to: localhost - 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: token: thetoken/generatedby/slack msg: '{{ inventory_hostname }} is alive!' color: good username: '' icon_url: '' - name: Use the attachments API slack: token: thetoken/generatedby/slack attachments: - text: Display my system load on host A and B color: '#ff00dd' title: System load fields: - title: System A value: "load average: 0,74, 0,66, 0,63" short: True - title: System B value: 'load average: 5,16, 4,64, 2,43' short: True - name: Send a message with a link using Slack markup slack: token: thetoken/generatedby/slack msg: We sent this message using <https://www.ansible.com|Ansible>! - name: Send a message with angle brackets and ampersands slack: token: thetoken/generatedby/slack msg: This message has &lt;brackets&gt; &amp; ampersands in plain text. ~~~ [1]:https://docs.ansible.com/ansible/latest/modules/slack_module.html#slack-module