modify the install commanda bit - and make the monitoring make more sense
This commit is contained in:
parent
6c10232619
commit
977f3b2d38
|
@ -14,8 +14,8 @@ install_command: /usr/sbin/virt-install -n ${inventory_hostname} -r ${mem_size}
|
|||
--vcpus=${num_cpus} -l ${ks_repo} -x
|
||||
"ksdevice=eth0 ks=${ks_url} ip=${eth0_ip} netmask=${nm}
|
||||
gateway=${gw} dns=${dns} console=tty0 console=ttyS0"
|
||||
--network=bridge=br0 --network=bridge=br1 --vnc --noautoconsole
|
||||
--autostart
|
||||
--network=bridge=br0 --network=bridge=br1 --graphics none
|
||||
--autostart --noautoconsole
|
||||
|
||||
# for systems that do not match the above - specify the same parameter in
|
||||
# the host_vars/$hostname file
|
||||
|
|
|
@ -35,15 +35,19 @@
|
|||
shell: ${install_command}
|
||||
delegate_to: $vmhost
|
||||
|
||||
- name: wait for the install to finish - by watching the vnc port
|
||||
local_action: wait_for delay=180 host=${inventory_hostname} port=1 state=stopped timeout=900
|
||||
- name: wait for the install to finish - by watching the domstate
|
||||
# this just keeps checking the domstate until it stops running
|
||||
shell: while `/usr/bin/virsh domstate ${inventory_hostname} | grep -q running` ; do sleep 20; done
|
||||
delegate_to: $vmhost
|
||||
async: 1200
|
||||
poll: 10
|
||||
|
||||
- name: start the vm up
|
||||
action: virt state=running name=${inventory_hostname}
|
||||
delegate_to: $vmhost
|
||||
|
||||
- name: wait for ssh on the vm to start back
|
||||
local_action: wait_for delay=30 host=${inventory_hostname} port=22 state=started timeout=1200
|
||||
local_action: wait_for delay=10 host=${inventory_hostname} port=22 state=started timeout=1200
|
||||
|
||||
|
||||
# include postinstall playbook
|
||||
|
|
Loading…
Reference in New Issue