Hello!
I have the same issue with necessity of tags, limits, etc using slack as callback , and found strange thing:
If i set SLACK_INVOCATION=True , nothing happens.
Actually, in ansible/plugins/callback/slack.py where is another dependency:
`
def v2_playbook_on_start(self, playbook):
self.playbook_name = os.path.basename(playbook._file_name)
title = [
‘Playbook initiated (%s)’ % self.guid
]
invocation_items =
------>> if self._options and self.show_invocation:
tags = self._options.tags
skip_tags = self._options.skip_tags
extra_vars = self._options.extra_vars
subset = self._options.subset
`
And by default seem’s self._options
set to none:
How I can properly set “self._options” to get all necessary details?
Now I found only one way , by hacking ansible/plugins/callback/slack.py with
`
def v2_playbook_on_start(self, playbook):
self.playbook_name = os.path.basename(playbook._file_name)
title = [
‘Playbook initiated (%s)’ % self.guid
]
invocation_items =
------>> self._options = cli.options
if self._options and self.show_invocation:
tags = self._options.tags
skip_tags = self._options.skip_tags
extra_vars = self._options.extra_vars
subset = self._options.subset
`
But I am sure, must been some other , better way here
Can anyone advise ?
Thanks in advance!
ps:
`
$ ansible --version
ansible 2.2.1.0
$ set | grep INV
SLACK_INVOCATION=True
`