mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-07 13:32:37 +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:
@@ -43,6 +43,7 @@
|
||||
value: busybox:glibc
|
||||
check_mode: yes
|
||||
register: result
|
||||
diff: yes
|
||||
|
||||
- name: Assert patch was made
|
||||
assert:
|
||||
@@ -50,6 +51,7 @@
|
||||
- result.changed
|
||||
- result.result.metadata.labels.label2 == "bar"
|
||||
- result.result.spec.containers[0].image == "busybox:glibc"
|
||||
- result.diff
|
||||
|
||||
- name: Describe pod
|
||||
kubernetes.core.k8s_info:
|
||||
@@ -82,6 +84,7 @@
|
||||
assert:
|
||||
that:
|
||||
- result.changed
|
||||
- result.diff is not defined
|
||||
|
||||
- name: Describe pod
|
||||
kubernetes.core.k8s_info:
|
||||
|
||||
Reference in New Issue
Block a user