mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Ensure that k8s_facts always returns resources key (#46733)
Fix bug returning `items` key if NotFound exception is hit
This commit is contained in:
@@ -189,7 +189,7 @@ class K8sAnsibleMixin(object):
|
||||
label_selector=','.join(label_selectors),
|
||||
field_selector=','.join(field_selectors)).to_dict()
|
||||
except openshift.dynamic.exceptions.NotFoundError:
|
||||
return dict(items=[])
|
||||
return dict(resources=[])
|
||||
|
||||
if 'items' in result:
|
||||
return dict(resources=result['items'])
|
||||
|
||||
Reference in New Issue
Block a user