mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Removing some cruft related to _local_action value on Task, which was removed
Fixes #12819
This commit is contained in:
parent
923fc9fb15
commit
e5b6d802bf
3 changed files with 12 additions and 37 deletions
|
@ -79,7 +79,6 @@ class Task(Base, Conditional, Taggable, Become):
|
||||||
_ignore_errors = FieldAttribute(isa='bool')
|
_ignore_errors = FieldAttribute(isa='bool')
|
||||||
_loop = FieldAttribute(isa='string', private=True)
|
_loop = FieldAttribute(isa='string', private=True)
|
||||||
_loop_args = FieldAttribute(isa='list', private=True)
|
_loop_args = FieldAttribute(isa='list', private=True)
|
||||||
_local_action = FieldAttribute(isa='string')
|
|
||||||
_name = FieldAttribute(isa='string', default='')
|
_name = FieldAttribute(isa='string', default='')
|
||||||
_notify = FieldAttribute(isa='list')
|
_notify = FieldAttribute(isa='list')
|
||||||
_poll = FieldAttribute(isa='int')
|
_poll = FieldAttribute(isa='int')
|
||||||
|
|
|
@ -63,22 +63,14 @@ class CallbackModule(CallbackBase):
|
||||||
if result._task.action == 'include':
|
if result._task.action == 'include':
|
||||||
return
|
return
|
||||||
elif result._result.get('changed', False):
|
elif result._result.get('changed', False):
|
||||||
if result._task.delegate_to is not None or result._task._local_action:
|
if result._task.delegate_to is not None:
|
||||||
if result._task._local_action:
|
msg = "changed: [%s -> %s]" % (result._host.get_name(), result._task.delegate_to)
|
||||||
target = 'localhost'
|
|
||||||
else:
|
|
||||||
target = result._task.delegate_to
|
|
||||||
msg = "changed: [%s -> %s]" % (result._host.get_name(), target)
|
|
||||||
else:
|
else:
|
||||||
msg = "changed: [%s]" % result._host.get_name()
|
msg = "changed: [%s]" % result._host.get_name()
|
||||||
color = 'yellow'
|
color = 'yellow'
|
||||||
else:
|
else:
|
||||||
if result._task.delegate_to is not None or result._task._local_action:
|
if result._task.delegate_to is not None:
|
||||||
if result._task._local_action:
|
msg = "ok: [%s -> %s]" % (result._host.get_name(), result._task.delegate_to)
|
||||||
target = 'localhost'
|
|
||||||
else:
|
|
||||||
target = result._task.delegate_to
|
|
||||||
msg = "ok: [%s -> %s]" % (result._host.get_name(), target)
|
|
||||||
else:
|
else:
|
||||||
msg = "ok: [%s]" % result._host.get_name()
|
msg = "ok: [%s]" % result._host.get_name()
|
||||||
color = 'green'
|
color = 'green'
|
||||||
|
@ -104,12 +96,8 @@ class CallbackModule(CallbackBase):
|
||||||
self._display.display(msg, color='cyan')
|
self._display.display(msg, color='cyan')
|
||||||
|
|
||||||
def v2_runner_on_unreachable(self, result):
|
def v2_runner_on_unreachable(self, result):
|
||||||
if result._task.delegate_to or result._task._local_action:
|
if result._task.delegate_to:
|
||||||
if result._task._local_action:
|
self._display.display("fatal: [%s -> %s]: UNREACHABLE! => %s" % (result._host.get_name(), result._task.delegate_to, self._dump_results(result._result)), color='red')
|
||||||
target = 'localhost'
|
|
||||||
else:
|
|
||||||
target = result._task.delegate_to
|
|
||||||
self._display.display("fatal: [%s -> %s]: UNREACHABLE! => %s" % (result._host.get_name(), target, self._dump_results(result._result)), color='red')
|
|
||||||
else:
|
else:
|
||||||
self._display.display("fatal: [%s]: UNREACHABLE! => %s" % (result._host.get_name(), self._dump_results(result._result)), color='red')
|
self._display.display("fatal: [%s]: UNREACHABLE! => %s" % (result._host.get_name(), self._dump_results(result._result)), color='red')
|
||||||
|
|
||||||
|
|
|
@ -63,22 +63,14 @@ class CallbackModule(CallbackBase):
|
||||||
msg = 'included: %s for %s' % (result._task.args.get('_raw_params'), result._host.name)
|
msg = 'included: %s for %s' % (result._task.args.get('_raw_params'), result._host.name)
|
||||||
color = 'cyan'
|
color = 'cyan'
|
||||||
elif result._result.get('changed', False):
|
elif result._result.get('changed', False):
|
||||||
if result._task.delegate_to is not None or result._task._local_action:
|
if result._task.delegate_to is not None:
|
||||||
if result._task._local_action:
|
msg = "changed: [%s -> %s]" % (result._host.get_name(), result._task.delegate_to)
|
||||||
target = 'localhost'
|
|
||||||
else:
|
|
||||||
target = result._task.delegate_to
|
|
||||||
msg = "changed: [%s -> %s]" % (result._host.get_name(), target)
|
|
||||||
else:
|
else:
|
||||||
msg = "changed: [%s]" % result._host.get_name()
|
msg = "changed: [%s]" % result._host.get_name()
|
||||||
color = 'yellow'
|
color = 'yellow'
|
||||||
else:
|
else:
|
||||||
if result._task.delegate_to is not None or result._task._local_action:
|
if result._task.delegate_to is not None:
|
||||||
if result._task._local_action:
|
msg = "ok: [%s -> %s]" % (result._host.get_name(), result._task.delegate_to)
|
||||||
target = 'localhost'
|
|
||||||
else:
|
|
||||||
target = result._task.delegate_to
|
|
||||||
msg = "ok: [%s -> %s]" % (result._host.get_name(), target)
|
|
||||||
else:
|
else:
|
||||||
msg = "ok: [%s]" % result._host.get_name()
|
msg = "ok: [%s]" % result._host.get_name()
|
||||||
color = 'green'
|
color = 'green'
|
||||||
|
@ -95,12 +87,8 @@ class CallbackModule(CallbackBase):
|
||||||
|
|
||||||
|
|
||||||
def v2_runner_on_unreachable(self, result):
|
def v2_runner_on_unreachable(self, result):
|
||||||
if result._task.delegate_to or result._task._local_action:
|
if result._task.delegate_to:
|
||||||
if result._task._local_action:
|
self._display.display("fatal: [%s -> %s]: UNREACHABLE! => %s" % (result._host.get_name(), result._task.delegate_to, self._dump_results(result._result)), color='red')
|
||||||
target = 'localhost'
|
|
||||||
else:
|
|
||||||
target = result._task.delegate_to
|
|
||||||
self._display.display("fatal: [%s -> %s]: UNREACHABLE! => %s" % (result._host.get_name(), target, self._dump_results(result._result)), color='red')
|
|
||||||
else:
|
else:
|
||||||
self._display.display("fatal: [%s]: UNREACHABLE! => %s" % (result._host.get_name(), self._dump_results(result._result)), color='red')
|
self._display.display("fatal: [%s]: UNREACHABLE! => %s" % (result._host.get_name(), self._dump_results(result._result)), color='red')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue