mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Exclude the whole ansible_failed_task block (#45587)
It has lots of FieldAttributes that won't serialize. Also the connection doesn't care.
This commit is contained in:
parent
d81249994e
commit
3d0f19d8cd
1 changed files with 4 additions and 1 deletions
|
@ -843,7 +843,10 @@ class TaskExecutor:
|
|||
display.vvvv('attempting to start connection', host=self._play_context.remote_addr)
|
||||
display.vvvv('using connection plugin %s' % connection.transport, host=self._play_context.remote_addr)
|
||||
# We don't need to send the entire contents of variables to ansible-connection
|
||||
filtered_vars = dict((key, value) for key, value in variables.items() if key.startswith('ansible'))
|
||||
filtered_vars = dict(
|
||||
(key, value) for key, value in variables.items()
|
||||
if key.startswith('ansible') and key != 'ansible_failed_task'
|
||||
)
|
||||
socket_path = self._start_connection(filtered_vars)
|
||||
display.vvvv('local domain socket path is %s' % socket_path, host=self._play_context.remote_addr)
|
||||
setattr(connection, '_socket_path', socket_path)
|
||||
|
|
Loading…
Reference in a new issue