mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 23:31:25 -07:00
Making task includes dynamic and fixing many other bugs
Dynamic task includes still need some work, this is a rough first version. * doesn't work with handler sections of playbooks yet * when using include + with*, the insertion order is backwards * fix potential for task lists to be unsynchronized when using the linear strategy, as the include conditional could be predicated on an inventory variable
This commit is contained in:
parent
62a6378c4a
commit
995aa8e24b
15 changed files with 153 additions and 292 deletions
|
@ -50,14 +50,17 @@ class CallbackModule(CallbackBase):
|
|||
|
||||
def runner_on_ok(self, task, result):
|
||||
|
||||
if result._result.get('changed', False):
|
||||
if result._task.action == 'include':
|
||||
msg = 'included: %s for %s' % (result._task.args.get('_raw_params'), result._host.name)
|
||||
color = 'cyan'
|
||||
elif result._result.get('changed', False):
|
||||
msg = "changed: [%s]" % result._host.get_name()
|
||||
color = 'yellow'
|
||||
else:
|
||||
msg = "ok: [%s]" % result._host.get_name()
|
||||
color = 'green'
|
||||
|
||||
if (self._display._verbosity > 0 or 'verbose_always' in result._result) and result._task.action != 'setup':
|
||||
if (self._display._verbosity > 0 or 'verbose_always' in result._result) and result._task.action not in ('setup', 'include'):
|
||||
indent = None
|
||||
if 'verbose_always' in result._result:
|
||||
indent = 4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue