Skip to content

Commit

Permalink
[infra-openshift-cnv-resources] Wait till the VM is running (#8808)
Browse files Browse the repository at this point in the history
* [infra-openshift-cnv-resources] Wait till the VM is running

* Update create_instance.yaml

* Update create_instance.yaml

* Update create_instance.yaml
  • Loading branch information
agonzalezrh committed Nov 21, 2024
1 parent 9baf859 commit 09b2bd2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,17 @@

- name: Wait till VM is running
vars:
_instance_name: "{{ _instance.name }}{{ _index+1 if _instance.count|d(1)|int > 1 }}"
_instance_name: "{{ _instance.name }}{{ _index+1 if _instance.count | default(1) | int > 1 }}"
kubernetes.core.k8s_info:
api_version: kubevirt.io/v1
kind: VirtualMachine
name: "{{ _instance_name }}"
namespace: "{{ openshift_cnv_namespace }}"
register: r_vm_status
until: r_vm_status.resources[0].status.printableStatus|default('') == "Running"
until: r_vm_status.resources[0].status.printableStatus | default('') == "Running"
retries: 30
delay: 10
loop: "{{ range(1, _instance.count|default(1)|int+1) | list }}"
loop: "{{ range(1, _instance.count | default(1) | int+1) | list }}"
loop_control:
index_var: _index

Expand Down

0 comments on commit 09b2bd2

Please sign in to comment.