From 5fc3dd02bf19fd4d70d99278969d786100b18feb Mon Sep 17 00:00:00 2001 From: Timothy Appnel Date: Thu, 18 Mar 2021 05:18:07 -0400 Subject: [PATCH] Adds a wait example to k8s.py (#386) Co-authored-by: Abhijeet Kasurde --- plugins/modules/k8s.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/plugins/modules/k8s.py b/plugins/modules/k8s.py index 7dd7a67b..4baefa14 100644 --- a/plugins/modules/k8s.py +++ b/plugins/modules/k8s.py @@ -221,6 +221,23 @@ EXAMPLES = r''' community.kubernetes.k8s: state: present src: ~/metrics-server.yaml + +# Wait for a Deployment to pause before continuing +- name: Pause a Deployment. + community.kubernetes.k8s: + definition: + apiVersion: apps/v1 + kind: Deployment + metadata: + name: example + namespace: testing + spec: + paused: True + wait: yes + wait_condition: + type: Progressing + status: Unknown + reason: DeploymentPaused ''' RETURN = r'''