# Slack notifications with web-hook behind proxy

**URL:** <https://forum.ansible.com/t/slack-notifications-with-web-hook-behind-proxy/31374>\
**Category:** Ansible Project\
**Created:** [September 27, 2019, 11:16am UTC](https://forum.ansible.com/t/slack-notifications-with-web-hook-behind-proxy/31374 "2019-09-27T11:16:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mukul\_Malhotra](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@Mukul\_Malhotra](https://forum.ansible.com/u/Mukul_Malhotra)\
**Post date:** [September 27, 2019, 11:16am UTC](https://forum.ansible.com/t/slack-notifications-with-web-hook-behind-proxy/31374/1 "2019-09-27T11:16:04Z")

</div>

Hi,

I am trying to setup slack with through ansible but I am getting below error as,

Playbook:

```auto
- name: Send notification message via Slack
  slack:
    token: "MYToken/../../ Format"
    msg: '{{ inventory_hostname }} completed'
  delegate_to: localhost

```

Error:

```auto
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to connect to [hooks.slack.com](http://hooks.slack.com/) at port 443: [Errno 8] nodename nor servname provided, or not known", "status": -1, "url": "[https://hooks.slack.com/services/********](https://hooks.slack.com/services/********)"}

```

As I am assuming that above error is due to proxy https/http so kindly assist on the same to resolve my issue.

Mukul

---

<div class="post-metadata">

**Author:** ![Kashish\_Sharma](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@Kashish\_Sharma](https://forum.ansible.com/u/Kashish_Sharma)\
**Post date:** [September 28, 2019, 8:13am UTC](https://forum.ansible.com/t/slack-notifications-with-web-hook-behind-proxy/31374/2 "2019-09-28T08:13:13Z")

</div>

hi you can try this one.

- name: Send notification message via Slack  
slack:  
token: T9S6DSFFSDA/BJMG9DLTA/86HxbsssdrOkzlfCmNUYPyyo  
msg: ‘{{ inventory\_hostname }}’  
color: good  
channel: ‘#test’  
username: ‘System\_Reboot\_Required’  
icon\_emoji: ‘⚠’  
icon\_url: ‘’  
when: reboot\_required.stat.exists == true
