If you hate performing repetitive tasks, then I have a proposition for you. Ansible is a tool that will help you do your daily tasks easier and faster, so you can use your time in more effective ways, like learning new technology that matters. It's a great tool for sysadmins because it helps you achieve standardization and collaborate on daily activities, including. Ansible has no control of when slack will get rid of the old API. When slack does that the old format will stop working. Please keep in mind the tokens are not the API tokens but are the webhook tokens. In slack these are found in the webhook URL which are obtained under the apps and integrations. The incoming webhooks can be added in that area.
Ansible Slack Bot
Synopsis
The slack module sends notifications to http://slack.com via the Incoming WebHook integration
Options
parameter | required | default | choices | comments |
---|---|---|---|---|
attachments | no | None | Define a list of attachments. This list mirrors the Slack JSON API. For more information, see https://api.slack.com/docs/attachments | |
channel | no | None | Channel to send the message to. If absent, the message goes to the channel selected for the token. | |
color | no | normal |
| Allow text to use default colors - use the default of 'normal' to not send a custom color bar at the start of the message |
domain | no | None | Slack (sub)domain for your environment without protocol. (i.e. future500.slack.com ) In 1.8 and beyond, this is deprecated and may be ignored. See token documentation for information. | |
icon_emoji | no | None | Emoji for the message sender. See Slack documentation for options. (if icon_emoji is set, icon_url will not be used) | |
icon_url | no | Url for the message sender's icon (default http://www.ansible.com/favicon.ico ) | ||
link_names | no | 1 |
| Automatically create links for channels and usernames in msg. |
msg | no | None | Message to send. | |
parse | no | None |
| Setting for the message parser at Slack |
token | yes | Slack integration token. This authenticates you to the slack service. Prior to 1.8, a token looked like 3Ffe373sfhRE6y42Fg3rvf4GlK . In 1.8 and above, ansible adapts to the new slack API where tokens look like G922VJP24/D921DW937/3Ffe373sfhRE6y42Fg3rvf4GlK . If tokens are in the new format then slack will ignore any value of domain. If the token is in the old format the domain is required. Ansible has no control of when slack will get rid of the old API. When slack does that the old format will stop working. | ||
username | no | Ansible | This is the sender of the message. | |
validate_certs | no | yes |
| If no , SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
This is an Extras Module
For more information on what this means please read Extras Modules
Ansible Slack Community
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.