mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-26 21:33:02 +00:00
k8s support diff mode (#146)
* support diff mode for k8s module * Update and rename 145-k8s-add-support-diff-mode.yml to 146-k8s-add-support-diff-mode.yml * Update 146-k8s-add-support-diff-mode.yml * Update changelogs/fragments/146-k8s-add-support-diff-mode.yml Co-authored-by: Mike Graves <mgraves@redhat.com> * update k8s_scale and k8s_json_patch * diff for k8s_scale and k8s_json_patch Co-authored-by: Mike Graves <mgraves@redhat.com>
This commit is contained in:
@@ -254,7 +254,8 @@ def execute_module(k8s_module, module):
|
||||
success, result['result'], result['duration'] = k8s_module.wait(resource, definition, wait_sleep, wait_timeout, condition=wait_condition)
|
||||
match, diffs = k8s_module.diff_objects(existing.to_dict(), obj)
|
||||
result["changed"] = not match
|
||||
result["diff"] = diffs
|
||||
if module._diff:
|
||||
result["diff"] = diffs
|
||||
|
||||
if not success:
|
||||
msg = "Resource update timed out"
|
||||
|
||||
Reference in New Issue
Block a user