mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 22:30:22 -07:00
[k8s] Fix typo that breaks check mode when a resource is created (#42763)
This commit is contained in:
parent
2c3e6f8bd3
commit
fa8de0c384
1 changed files with 2 additions and 2 deletions
|
@ -148,7 +148,7 @@ class KubernetesRawModule(KubernetesAnsibleModule):
|
||||||
k8s_obj = definition
|
k8s_obj = definition
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
k8s_obj = resource.create(definition, namespace=namespace)
|
k8s_obj = resource.create(definition, namespace=namespace).to_dict()
|
||||||
except ConflictError:
|
except ConflictError:
|
||||||
# Some resources, like ProjectRequests, can't be created multiple times,
|
# Some resources, like ProjectRequests, can't be created multiple times,
|
||||||
# because the resources that they create don't match their kind
|
# because the resources that they create don't match their kind
|
||||||
|
@ -156,7 +156,7 @@ class KubernetesRawModule(KubernetesAnsibleModule):
|
||||||
self.warn("{0} was not found, but creating it returned a 409 Conflict error. This can happen \
|
self.warn("{0} was not found, but creating it returned a 409 Conflict error. This can happen \
|
||||||
if the resource you are creating does not directly create a resource of the same kind.".format(name))
|
if the resource you are creating does not directly create a resource of the same kind.".format(name))
|
||||||
return result
|
return result
|
||||||
result['result'] = k8s_obj.to_dict()
|
result['result'] = k8s_obj
|
||||||
result['changed'] = True
|
result['changed'] = True
|
||||||
result['method'] = 'create'
|
result['method'] = 'create'
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue