mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-18 16:31:26 -07: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:
parent
b711038b3b
commit
841b46ff6a
3 changed files with 19 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue