mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 07:01:22 -07:00
parent
30662bedad
commit
4094b017c0
1 changed files with 13 additions and 13 deletions
|
@ -76,6 +76,8 @@ class CallbackModule(CallbackBase):
|
||||||
|
|
||||||
super(CallbackModule, self).__init__(display=display)
|
super(CallbackModule, self).__init__(display=display)
|
||||||
|
|
||||||
|
self._options = cli.options
|
||||||
|
|
||||||
if not HAS_PRETTYTABLE:
|
if not HAS_PRETTYTABLE:
|
||||||
self.disabled = True
|
self.disabled = True
|
||||||
self._display.warning('The `prettytable` python module is not '
|
self._display.warning('The `prettytable` python module is not '
|
||||||
|
@ -132,27 +134,25 @@ class CallbackModule(CallbackBase):
|
||||||
'*Playbook initiated* (_%s_)' % self.guid
|
'*Playbook initiated* (_%s_)' % self.guid
|
||||||
]
|
]
|
||||||
invocation_items = []
|
invocation_items = []
|
||||||
if self._plugin_options and self.show_invocation:
|
if self._options and self.show_invocation:
|
||||||
tags = self.get_option('tags')
|
tags = self._options.tags
|
||||||
skip_tags = self.get_option('skip_tags')
|
skip_tags = self._options.skip_tags
|
||||||
extra_vars = self.get_option('extra_vars')
|
extra_vars = self._options.extra_vars
|
||||||
subset = self.get_option('subset')
|
subset = self._options.subset
|
||||||
inventory = os.path.basename(
|
inventory = [os.path.abspath(i) for i in self._options.inventory]
|
||||||
os.path.realpath(self.get_option('inventory'))
|
|
||||||
)
|
|
||||||
|
|
||||||
invocation_items.append('Inventory: %s' % inventory)
|
invocation_items.append('Inventory: %s' % ', '.join(inventory))
|
||||||
if tags and tags != 'all':
|
if tags and tags != ['all']:
|
||||||
invocation_items.append('Tags: %s' % tags)
|
invocation_items.append('Tags: %s' % ', '.join(tags))
|
||||||
if skip_tags:
|
if skip_tags:
|
||||||
invocation_items.append('Skip Tags: %s' % skip_tags)
|
invocation_items.append('Skip Tags: %s' % ', '.join(skip_tags))
|
||||||
if subset:
|
if subset:
|
||||||
invocation_items.append('Limit: %s' % subset)
|
invocation_items.append('Limit: %s' % subset)
|
||||||
if extra_vars:
|
if extra_vars:
|
||||||
invocation_items.append('Extra Vars: %s' %
|
invocation_items.append('Extra Vars: %s' %
|
||||||
' '.join(extra_vars))
|
' '.join(extra_vars))
|
||||||
|
|
||||||
title.append('by *%s*' % self.get_option('remote_user'))
|
title.append('by *%s*' % self._options.remote_user)
|
||||||
|
|
||||||
title.append('\n\n*%s*' % self.playbook_name)
|
title.append('\n\n*%s*' % self.playbook_name)
|
||||||
msg_items = [' '.join(title)]
|
msg_items = [' '.join(title)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue