diff --git a/lib/ansible/module_utils/k8s/common.py b/lib/ansible/module_utils/k8s/common.py index 95839daabf..3788a4e2a9 100644 --- a/lib/ansible/module_utils/k8s/common.py +++ b/lib/ansible/module_utils/k8s/common.py @@ -214,9 +214,9 @@ class K8sAnsibleMixin(object): return dict(items=[]) if 'items' in result: - return result + return dict(resources=result['items']) else: - return dict(items=[result]) + return dict(resources=[result]) def remove_aliases(self): """ diff --git a/lib/ansible/modules/clustering/k8s/k8s_facts.py b/lib/ansible/modules/clustering/k8s/k8s_facts.py index 8586e25946..974135168d 100644 --- a/lib/ansible/modules/clustering/k8s/k8s_facts.py +++ b/lib/ansible/modules/clustering/k8s/k8s_facts.py @@ -101,7 +101,7 @@ EXAMPLES = ''' ''' RETURN = ''' -items: +resources: description: - The object(s) that exists returned: success