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:
|
tempfile:
|
||||||
state: directory
|
state: directory
|
||||||
register: tmpdir
|
register: tmpdir
|
||||||
delegate_to: localhost
|
delegate_to: "{{ vmhost }}"
|
||||||
when:
|
when:
|
||||||
- inventory_hostname not in result.list_vms
|
- inventory_hostname not in result.list_vms
|
||||||
- inject is defined
|
- inject is defined
|
||||||
|
@ -77,15 +77,14 @@
|
||||||
echo '{{ root_pubkey }}' > /root/.ssh/authorized_keys
|
echo '{{ root_pubkey }}' > /root/.ssh/authorized_keys
|
||||||
%end
|
%end
|
||||||
dest: "{{ tmpdir.path }}/include.ks"
|
dest: "{{ tmpdir.path }}/include.ks"
|
||||||
delegate_to: localhost
|
delegate_to: "{{ vmhost }}"
|
||||||
when:
|
when:
|
||||||
- inventory_hostname not in result.list_vms
|
- inventory_hostname not in result.list_vms
|
||||||
- inject is defined
|
- inject is defined
|
||||||
|
|
||||||
- name: run virt-install
|
- name: run virt-install
|
||||||
command: >
|
command: >
|
||||||
virt-install --connect {{ vmhost_uri }} \
|
virt-install --name {{ inventory_hostname }} \
|
||||||
--name {{ inventory_hostname }} \
|
|
||||||
--graphics none --boot useserial=on --noautoconsole \
|
--graphics none --boot useserial=on --noautoconsole \
|
||||||
--serial pty,log.file={{ console_log }} \
|
--serial pty,log.file={{ console_log }} \
|
||||||
--controller usb,model=none --sound none \
|
--controller usb,model=none --sound none \
|
||||||
|
@ -107,7 +106,7 @@
|
||||||
{{ virt_install_passthrough }} \
|
{{ virt_install_passthrough }} \
|
||||||
{{ virt_install_network }} \
|
{{ virt_install_network }} \
|
||||||
{{ virt_install_os_args }}
|
{{ virt_install_os_args }}
|
||||||
delegate_to: localhost
|
delegate_to: "{{ vmhost }}"
|
||||||
when: inventory_hostname not in result.list_vms
|
when: inventory_hostname not in result.list_vms
|
||||||
|
|
||||||
- name: wait for install to finish
|
- name: wait for install to finish
|
||||||
|
@ -126,7 +125,7 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ tmpdir.path }}"
|
path: "{{ tmpdir.path }}"
|
||||||
state: absent
|
state: absent
|
||||||
delegate_to: localhost
|
delegate_to: "{{ vmhost }}"
|
||||||
when: tmpdir.path is defined
|
when: tmpdir.path is defined
|
||||||
|
|
||||||
- name: start vm
|
- name: start vm
|
||||||
|
|
Loading…
Add table
Reference in a new issue