# Ansible slack callback plugin - not working - please help

**URL:** <https://forum.ansible.com/t/ansible-slack-callback-plugin-not-working-please-help/28126>\
**Category:** Ansible Project\
**Created:** [July 23, 2018, 3:56pm UTC](https://forum.ansible.com/t/ansible-slack-callback-plugin-not-working-please-help/28126 "2018-07-23T15:56:07Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinod\_Kumar2](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@Vinod\_Kumar2](https://forum.ansible.com/u/Vinod_Kumar2)\
**Post date:** [July 23, 2018, 3:56pm UTC](https://forum.ansible.com/t/ansible-slack-callback-plugin-not-working-please-help/28126/1 "2018-07-23T15:56:07Z")

</div>

Hi All,

I am using below slack callback configuration and getting below error. When i tried using the slack module instead of slack callback plugin, i am able to get the notification in my slack channel. But i want to use the slack callback plugin to get the ansible play over slack everytime if it is failed/successful.

Please provide your valuable inputs here in case if i am trying something wrong/missing some imp configuration. I have been testing this from last few days and asking experts in this forum to help me in resoving this issue.

Thanks in advance.

**Below is the error when running the playbook.**

PLAYBOOK: test.yml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
[WARNING]: Failure using method (v2\_playbook\_on\_start) in callback plugin (\<ansible.plugins.callback./usr/share/ansible/plugins/callback/slack.CallbackModule object at  
0x7f3484454190\>): ‘tags’

Callback Exception:  
File “/usr/lib/python2.7/site-packages/ansible/executor/task\_queue\_manager.py”, line 374, in send\_callback  
method(\*new\_args, \*\*kwargs)  
File “/usr/share/ansible/plugins/callback/slack.py”, line 136, in v2\_playbook\_on\_start  
tags = self.get\_option(‘tags’)  
File “/usr/lib/python2.7/site-packages/ansible/plugins/callback/ **init**.py”, line 90, in get\_option  
return self.\_plugin\_options[k]

PLAY [Main ABC Playbook] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
[WARNING]: Could not submit message to Slack: HTTP Error 403: Forbidden

**my ansible.cfg is configured like below for slack callback plugin.**  
[defaults]  
callback\_whitelist = slack

[callback\_slack]  
channel = \<#Myslackchannel\>  
username = ansible  
webhook\_url =

**ansible --version**

ansible 2.7.0.dev0  
config file = /etc/ansible/roles/auto\_os\_patch/ansible.cfg  
configured module search path = [u’/home/user1/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/lib/python2.7/site-packages/ansible  
executable location = /bin/ansible  
python version = 2.7.5 (default, Feb 20 2018, 09:19:12) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]

**I have also impoted prettytable which is one of the requirement of ansible slack callback plugin.**

##python

Python 2.7.5 (default, Feb 20 2018, 09:19:12)  
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2  
Type “help”, “copyright”, “credits” or “license” for more information.

> > > import prettytable  
> > > prettytable  
> > > \<module ‘prettytable’ from ‘/usr/lib64/python2.7/site-packages/prettytable.pyc’\>

Regards,

Vinod kumar

---

<div class="post-metadata">

**Author:** ![Vinod\_Kumar2](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@Vinod\_Kumar2](https://forum.ansible.com/u/Vinod_Kumar2)\
**Post date:** [July 24, 2018, 9:32am UTC](https://forum.ansible.com/t/ansible-slack-callback-plugin-not-working-please-help/28126/2 "2018-07-24T09:32:46Z")

</div>

Please provide me an update on this.

Regards,  
Vinod Kumar.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [July 24, 2018, 1:30am UTC](https://forum.ansible.com/t/ansible-slack-callback-plugin-not-working-please-help/28126/3 "2018-07-24T01:30:19Z")

</div>

You seem to have a version mismatch between ansible and the slack plugin

---

<div class="post-metadata">

**Author:** ![Vinod\_Kumar2](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@Vinod\_Kumar2](https://forum.ansible.com/u/Vinod_Kumar2)\
**Post date:** [July 24, 2018, 2:42pm UTC](https://forum.ansible.com/t/ansible-slack-callback-plugin-not-working-please-help/28126/4 "2018-07-24T14:42:36Z")

</div>

Hi Brain,

Thanks for the reply.

Can you please help in the compatible versions which i should use to make this work.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [July 24, 2018, 3:00am UTC](https://forum.ansible.com/t/ansible-slack-callback-plugin-not-working-please-help/28126/5 "2018-07-24T03:00:47Z")

</div>

> Can you please help in the compatible versions which i should use to make this work.

the slack plugin ships with Ansible, just use the one for the version  
of ansible you are executing

---

<div class="post-metadata">

**Author:** ![Vinod\_Kumar2](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@Vinod\_Kumar2](https://forum.ansible.com/u/Vinod_Kumar2)\
**Post date:** [July 25, 2018, 1:25pm UTC](https://forum.ansible.com/t/ansible-slack-callback-plugin-not-working-please-help/28126/6 "2018-07-25T13:25:40Z")

</div>

Hi Brain,

I have verified the slack callback and ansible versions, both are compatible and same code in the GIT repository as well. But still having the same issue.

**Error message**

[WARNING]: Failure using method (v2\_playbook\_on\_start) in callback plugin (\<ansible.plugins.callback./usr/lib/python2.7/site-  
packages/ansible/plugins/callback/slack.CallbackModule object at 0x7f6a492eb050\>): ‘tags’

Callback Exception:  
File “/usr/lib/python2.7/site-packages/ansible/executor/task\_queue\_manager.py”, line 374, in send\_callback  
method(\*new\_args, \*\*kwargs)  
File “/usr/lib/python2.7/site-packages/ansible/plugins/callback/slack.py”, line 136, in v2\_playbook\_on\_start  
tags = self.get\_option(‘tags’)  
File “/usr/lib/python2.7/site-packages/ansible/plugins/callback/ **init**.py”, line 90, in get\_option  
return self.\_plugin\_options[k]

[WARNING]: Could not submit message to Slack: HTTP Error 403: Forbidden

---

<div class="post-metadata">

**Author:** ![Vinod\_Kumar2](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@Vinod\_Kumar2](https://forum.ansible.com/u/Vinod_Kumar2)\
**Post date:** [July 26, 2018, 9:56am UTC](https://forum.ansible.com/t/ansible-slack-callback-plugin-not-working-please-help/28126/7 "2018-07-26T09:56:44Z")

</div>

Hi All,

Any update on this. I am still having issue regarding the callback slack plugin. Please help.

Regards,  
Vinod.

---

<div class="post-metadata">

**Author:** ![Tchia04](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Tchia04](https://forum.ansible.com/u/Tchia04)\
**Post date:** [August 7, 2018, 3:12pm UTC](https://forum.ansible.com/t/ansible-slack-callback-plugin-not-working-please-help/28126/8 "2018-08-07T15:12:18Z")

</div>

The error message says HTTP Error 403: Forbidden

Are you able to use the same credential, webhook\_url, etc using curl or any other tool outside of ansible?

I suspect your haven’t configured your slack channel properly

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [August 7, 2018, 3:14pm UTC](https://forum.ansible.com/t/ansible-slack-callback-plugin-not-working-please-help/28126/9 "2018-08-07T15:14:16Z")

</div>

This was actually just recently resolved in devel: [https://github.com/ansible/ansible/pull/43542](https://github.com/ansible/ansible/pull/43542)

Backport PRs for 2.5 and 2.6 are open and waiting to be merged for the next releases.

---

<div class="post-metadata">

**Author:** ![Sreenivas\_Chokkarapu](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@Sreenivas\_Chokkarapu](https://forum.ansible.com/u/Sreenivas_Chokkarapu)\
**Post date:** [March 21, 2019, 11:49am UTC](https://forum.ansible.com/t/ansible-slack-callback-plugin-not-working-please-help/28126/10 "2019-03-21T11:49:13Z")

</div>

Hello Matt,

> 

I’m stuck with the same issue of

```auto
 [WARNING]: Could not submit message to Slack: HTTP Error 404: Not Found

I'm using ansible 2.4.2, is it possible to get these changes into 2.4.2 release?

Regards,

```

```auto
Sreenivas.

```

---

<div class="post-metadata">

**Author:** ![Sreenivas\_Chokkarapu](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@Sreenivas\_Chokkarapu](https://forum.ansible.com/u/Sreenivas_Chokkarapu)\
**Post date:** [March 21, 2019, 4:55pm UTC](https://forum.ansible.com/t/ansible-slack-callback-plugin-not-working-please-help/28126/11 "2019-03-21T16:55:20Z")

</div>

I was able to resolve that 404 error; an employee who created the slack token left the company and the IT disabled it.

Thanks

Sreenivas
