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
<localhost>
ESTABLISH LOCAL CONNECTION FOR USER: awx <localhost> 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' <localhost> PUT /tmp/tmpyLa849 TO
/var/lib/awx/.ansible/tmp/ansible-tmp-1475091505.08-157458605262227/slack
<localhost>
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
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/548d984d-31a3-49e1-9bcd-fdd327c9f653%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.