-
Notifications
You must be signed in to change notification settings - Fork 2
/
wait.yml
37 lines (32 loc) · 899 Bytes
/
wait.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
- name: Wait for host to generate IP
hosts: localhost
connection: local
gather_facts: false
pre_tasks:
- name: Login to RHV
ovirt_auth:
hostname: "{{ rhvm_fqdn }}"
username: "{{ rhvm_user }}"
password: "{{ rhvm_password }}"
ca_file: "{{ rhvm_cafile | default(omit) }}"
insecure: "{{ rhvm_insecure | default(true) }}"
vars:
- vm_names: "{{ vm_name.split(',') }}"
tasks:
- name: Check if VM has agent installed
ovirt_vm_info:
auth: "{{ ovirt_auth }}"
pattern: name={{ item }}
register: result
until: result.ovirt_vms[0].guest_operating_system.kernel.version.build is defined
retries: 60
delay: 10
loop: "{{ vm_names }}"
post_tasks:
- name: Logout from RHV
ovirt_auth:
state: absent
ovirt_auth: "{{ ovirt_auth }}"
tags:
- always