Hi @sivel
I am trying to get an Slack callback plugin to work (https://github.com/sivel/ansible/blob/slack-callback/plugins/callbacks/slack.py#L142-L147), but I am getting the following error:#
Unexpected Exception: 'module' object has no attribute 'warning'
You can see the what I am trying to achieve here: https://github.com/ansible/ansible/pull/8955
When looking at the file I see that it mentions the following:
class CallbackModule(object):
"""This is an example ansible callback plugin that sends status
updates to a Slack channel during playbook execution.
This plugin makes use of the following environment variables:
SLACK_TOKEN (required): Slack Integration token
SLACK_TEAM (required): Slack team name TEAM.slack.com
SLACK_CHANNEL (optional): Slack room to post in. Default: #ansible
SLACK_USERNAME (optional): Username to post as. Default: ansible
Requires:
prettytable
"""
Where would I need to insert these SLACK environment variables in order for this file to access this information?
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/80f9eb05-539d-475a-832d-5d51a68f90c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Those environment variables need to be set in the shell that you execute Ansible from. Also that branch/PR that you reference is for Ansible 1.9. If you need a version that works with Ansible 2.0, see https://github.com/ansible/ansible/pull/13408
--Hi @sivel
I am trying to get an Slack callback plugin to work (https://github.com/sivel/ansible/blob/slack-callback/plugins/callbacks/slack.py#L142-L147), but I am getting the following error:#
Unexpected Exception: 'module' object has no attribute 'warning'
You can see the what I am trying to achieve here: https://github.com/ansible/ansible/pull/8955
When looking at the file I see that it mentions the following:
class CallbackModule(object):
"""This is an example ansible callback plugin that sends status
updates to a Slack channel during playbook execution.
This plugin makes use of the following environment variables:
SLACK_TOKEN (required): Slack Integration token
SLACK_TEAM (required): Slack team name TEAM.slack.com
SLACK_CHANNEL (optional): Slack room to post in. Default: #ansible
SLACK_USERNAME (optional): Username to post as. Default: ansible
Requires:
prettytable
"""
Where would I need to insert these SLACK environment variables in order for this file to access this information?
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 ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/80f9eb05-539d-475a-832d-5d51a68f90c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/80f9eb05-539d-475a-832d-5d51a68f90c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d5cd76d1-6491-4a02-8799-0e01613c6756%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/80f9eb05-539d-475a-832d-5d51a68f90c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
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 ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d5cd76d1-6491-4a02-8799-0e01613c6756%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/80f9eb05-539d-475a-832d-5d51a68f90c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d5cd76d1-6491-4a02-8799-0e01613c6756%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a85ec092-9164-4068-9566-df9c3e43532c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/80f9eb05-539d-475a-832d-5d51a68f90c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
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 ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d5cd76d1-6491-4a02-8799-0e01613c6756%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
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 ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a85ec092-9164-4068-9566-df9c3e43532c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.