# Ansible Tower - slack module gives me Permission Denied error.

**URL:** <https://forum.ansible.com/t/ansible-tower-slack-module-gives-me-permission-denied-error/22667>\
**Category:** Ansible Project\
**Tags:** awx\
**Created:** [September 28, 2016, 7:52pm UTC](https://forum.ansible.com/t/ansible-tower-slack-module-gives-me-permission-denied-error/22667 "2016-09-28T19:52:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom.moretto](https://avatars.discourse-cdn.com/v4/letter/t/3da27b/32.png) [@tom.moretto](https://forum.ansible.com/u/tom.moretto)\
**Post date:** [September 28, 2016, 7:52pm UTC](https://forum.ansible.com/t/ansible-tower-slack-module-gives-me-permission-denied-error/22667/1 "2016-09-28T19:52:24Z")

</div>

any input/guidance is much appreciated.

not sure where the failure is at, but here is my playbook:

> ## `
> 
> - hosts:
> - all
> 
> tasks:
> 
> - name: Send starting notification via Slack  
> local\_action:  
> module: “slack”  
> token: “{{ slack\_token }}”  
> msg: “The Tower server is starting a deployment to {{ site\_url }}.”  
> username: “DeployBot”  
> icon\_emoji: “:code-deploy:”  
> channel: “#proj-myproject”
> 
> - name: Send ending notification via Slack  
> local\_action:  
> module: slack  
> token: “{{ slack\_token }}”  
> msg: “The Tower server has completed a deployment to the {{ site\_url }} site”  
> username: DeployBot  
> icon\_emoji: “:code-deploy:”  
> channel: “#proj-myproject”  
> `
> 
> >

here is my tower output:

Identity added: /tmp/ansible\_tower\_jnwoOs/credential (/tmp/ansible\_tower\_jnwoOs/credential) Using /etc/ansible/ansible.cfg as config file Loaded callback default of type stdout, v2.0 PLAYBOOK: deploy.yml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 1 plays in PROJECT-01/provisioning/deploy.yml PLAY [all] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* TASK [setup] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \<x.x.x.x\> ESTABLISH SSH CONNECTION FOR USER: user \<x.x.x.x\> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=user -o ConnectTimeout=10 -o ControlPath=/tmp/ansible\_tower\_jnwoOs/cp/ansible-ssh-%h-%p-%r x.x.x.x ‘/bin/sh -c ‘"’"’( umask 77 && mkdir -p “`echo $HOME/.ansible/tmp/ansible-tmp-1475091504.3-91368395191029`” && echo ansible-tmp-1475091504.3-91368395191029=“`echo $HOME/.ansible/tmp/ansible-tmp-1475091504.3-91368395191029`” ) && sleep 0’“'”‘’ \<x.x.x.x\> PUT /tmp/tmp1NcDnn TO /home/user/.ansible/tmp/ansible-tmp-1475091504.3-91368395191029/setup \<x.x.x.x\> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=user -o ConnectTimeout=10 -o ControlPath=/tmp/ansible\_tower\_jnwoOs/cp/ansible-ssh-%h-%p-%r ‘[x.x.x.x]’ \<x.x.x.x\> ESTABLISH SSH CONNECTION FOR USER: user \<x.x.x.x\> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=user -o ConnectTimeout=10 -o ControlPath=/tmp/ansible\_tower\_jnwoOs/cp/ansible-ssh-%h-%p-%r -tt x.x.x.x ‘/bin/sh -c ‘"’“'sudo -H -S -n -u root /bin/sh -c '”’“'”‘"’“'”‘"’“‘echo BECOME-SUCCESS-hwahbyrxkkyhxiiixagobpqpyqyofvai; LANG=en\_US.UTF-8 LC\_ALL=en\_US.UTF-8 LC\_MESSAGES=en\_US.UTF-8 /usr/bin/python /home/user/.ansible/tmp/ansible-tmp-1475091504.3-91368395191029/setup; rm -rf “/home/user/.ansible/tmp/ansible-tmp-1475091504.3-91368395191029/” \> /dev/null 2\>&1’”‘"’“'”‘"’“'”‘"’ && sleep 0’“'”‘’ ok: [x.x.x.x] TASK [Send starting notification via Slack] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* task path: /var/lib/awx/projects/\_15\_\_hostname/PROJECT-01/provisioning/deploy.yml:6 ESTABLISH LOCAL CONNECTION FOR USER: awx EXEC /bin/sh -c ‘( umask 77 && mkdir -p “`echo $HOME/.ansible/tmp/ansible-tmp-1475091505.08-157458605262227`” && echo ansible-tmp-1475091505.08-157458605262227=“`echo $HOME/.ansible/tmp/ansible-tmp-1475091505.08-157458605262227`” ) && sleep 0’ PUT /tmp/tmpyLa849 TO /var/lib/awx/.ansible/tmp/ansible-tmp-1475091505.08-157458605262227/slack EXEC /bin/sh -c ‘sudo -H -S -n -u root /bin/sh -c ‘"’“‘echo BECOME-SUCCESS-txvoruswfjlkoipcrbjwbqmswjrjohyn; LANG=en\_US.UTF-8 LC\_ALL=en\_US.UTF-8 LC\_MESSAGES=en\_US.UTF-8 /usr/bin/python2 /var/lib/awx/.ansible/tmp/ansible-tmp-1475091505.08-157458605262227/slack; rm -rf “/var/lib/awx/.ansible/tmp/ansible-tmp-1475091505.08-157458605262227/” \> /dev/null 2\>&1’”’"’ && sleep 0’ fatal: [x.x.x.x → localhost]: FAILED! =\> {“changed”: false, “failed”: true, “invocation”: {“module\_name”: “slack”}, “module\_stderr”: “/bin/sh: /usr/bin/sudo: Permission denied\n”, “module\_stdout”: “”, “msg”: “MODULE FAILURE”, “parsed”: false} NO MORE HOSTS LEFT \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* to retry, use: --limit @PROJECT-01/provisioning/deploy.retry PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* x.x.x.x : ok=1 changed=0 unreachable=0 failed=1
