You've already forked community.general
mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 20:21:52 +03:00
[opentelemetry][callback] fix warning when using the include_tasks (#4623)
* opentelemetry: fix include_tasks missing _task_fields * opentelemetry: add uts for the include_tasks * opentelemetry: add changelog fragment * pep8: fix spaces
This commit is contained in:
@ -197,7 +197,7 @@ class OpenTelemetrySource(object):
|
||||
|
||||
task = tasks_data[task_uuid]
|
||||
|
||||
if self.ansible_version is None and result._task_fields['args'].get('_ansible_version'):
|
||||
if self.ansible_version is None and hasattr(result, '_task_fields') and result._task_fields['args'].get('_ansible_version'):
|
||||
self.ansible_version = result._task_fields['args'].get('_ansible_version')
|
||||
|
||||
task.add_host(HostData(host_uuid, host_name, status, result))
|
||||
|
Reference in New Issue
Block a user