Kludge to allow iso images in location
This commit is contained in:
parent
d5a3b4fe2c
commit
6348f267de
1 changed files with 5 additions and 6 deletions
|
@ -62,7 +62,7 @@
|
|||
tempfile:
|
||||
state: directory
|
||||
register: tmpdir
|
||||
delegate_to: localhost
|
||||
delegate_to: "{{ vmhost }}"
|
||||
when:
|
||||
- inventory_hostname not in result.list_vms
|
||||
- inject is defined
|
||||
|
@ -77,15 +77,14 @@
|
|||
echo '{{ root_pubkey }}' > /root/.ssh/authorized_keys
|
||||
%end
|
||||
dest: "{{ tmpdir.path }}/include.ks"
|
||||
delegate_to: localhost
|
||||
delegate_to: "{{ vmhost }}"
|
||||
when:
|
||||
- inventory_hostname not in result.list_vms
|
||||
- inject is defined
|
||||
|
||||
- name: run virt-install
|
||||
command: >
|
||||
virt-install --connect {{ vmhost_uri }} \
|
||||
--name {{ inventory_hostname }} \
|
||||
virt-install --name {{ inventory_hostname }} \
|
||||
--graphics none --boot useserial=on --noautoconsole \
|
||||
--serial pty,log.file={{ console_log }} \
|
||||
--controller usb,model=none --sound none \
|
||||
|
@ -107,7 +106,7 @@
|
|||
{{ virt_install_passthrough }} \
|
||||
{{ virt_install_network }} \
|
||||
{{ virt_install_os_args }}
|
||||
delegate_to: localhost
|
||||
delegate_to: "{{ vmhost }}"
|
||||
when: inventory_hostname not in result.list_vms
|
||||
|
||||
- name: wait for install to finish
|
||||
|
@ -126,7 +125,7 @@
|
|||
file:
|
||||
path: "{{ tmpdir.path }}"
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
delegate_to: "{{ vmhost }}"
|
||||
when: tmpdir.path is defined
|
||||
|
||||
- name: start vm
|
||||
|
|
Loading…
Add table
Reference in a new issue