You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
429 B

  1. ---
  2. - hosts: node1
  3. tasks:
  4. - name: Run a replica controller composed of 2 pods
  5. shell: "kubectl run test --image=busybox --replicas=2 --command -- tail -f /dev/null"
  6. - name: Pods are running
  7. shell: "kubectl get pods --no-headers -o json"
  8. register: run_pods_log
  9. until: (run_pods_log.stdout | from_json)['items'] | map(attribute = 'status.phase') | join(',') == "Running,Running"
  10. retries: 24
  11. delay: 5