Comments (3)
I might be out of my league here, but have you considered upgrading Ansible to v1.8.2
? I don't seem to be having any Slack notifications issues with that version of Ansible.
from ansible-modules-extras.
There is a workaround.
The slack module recently changed the slack service endpoint. As a result, the token itself is no longer enough to post messages. It also requires two preceding - presumably secret - path components. The final URL is of the form https://hooks.slack.com/services/XXXX/YYYY/TOKEN
You can look up the required path components in your existing configured webhook slack integration and then pass it as the 'token' value to the slack module. The slack module will simply concatenate it and create the correct URL again:
- name: Send notification message via Slack all options
local_action:
module: slack
domain: xxx.slack.com
token: XXXX/YYYY/TOKEN
msg: "Branch {{ build }}, is now getting build on jenkins with these options: {{params}} optimize:{{optimize}} bootstrap:{{bootstrap}} and will stay up for {{timetolive}} days. The process can be followed here : xxx"
channel: "#ci"
link_names: 1
The old domain-style URLs are still working but appear to be deprecated.
To maintain backwards compatibility the module should make use of the 'domain' endpoint if it's supplied.
from ansible-modules-extras.
Okay, you've probably updated your playbook for the new API already but i've implemented handling for slack's deprecated API now. The logic is: if the token is new-style ( XXX/YYY/ZZZ ) then we use the new API. If the token is old style (it doesn't contain 2 or more /'s) then we require domain to be given in the playbook and use the old old API.
I couldn't find any documentation on the slack website that said what the token was precisely so it seemed okay to document that the token was all three secret path components in the new-style API rather than make three separate ansible slack module parameters for the values.
Closing This Ticket
Hi!
We believe recent commits (likely detailed above) should resolve this question or problem for you.
This will also be included in the next major release.
If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:
- https://groups.google.com/forum/#!forum/ansible-project - for user questions, tips, and tricks
- https://groups.google.com/forum/#!forum/ansible-devel - for strategy, future planning, and questions about writing code
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular
issue is resolved.
Thank you!
from ansible-modules-extras.
Related Issues (20)
- win_updates Not working on localized Windows Server 2012R2 (russian) HOT 3
- Pushover Hostname api.pushover.net:443 doesn't match HOT 2
- ipa_user: fails with 'repsonse user_mod: no modifications to be performed' if sshpubkey is an empty list and user has no public keys in FreeIPA HOT 2
- ovirt_clusters fails with 'NoneType' object has no attribute 'policy' HOT 2
- locale_gen fails with python3 HOT 1
- Region eu-west-2 missing on ansible-2.2 ec2 module HOT 1
- kubernetes library module doesn't support `apis/extensions/v1beta1/` HOT 2
- customer GW module HOT 1
- composer: Unable to use "working-dir" with spaces HOT 1
- Add instance_type to ec2_remote_facts result HOT 1
- v HOT 1
- openvswitch_bridge ansible 2.3.0 HOT 1
- win_regedit - Not adding new reg entries HOT 1
- EFS Name is blank when created with ansible efs module HOT 1
- pexpect 4.0.1 Ansible variable issue HOT 1
- module vmware_vm_facts folder HOT 1
- installing npm mongodb error HOT 3
- Ovirt_vms module to support custom VM UUID HOT 1
- vmware vsphere_guest with drs HOT 1
- Getting "HTTP Error 504": HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-modules-extras.