Further gemma fixes
This commit is contained in:
@@ -41,6 +41,18 @@
|
||||
args:
|
||||
creates: "{{ vm_images_dir }}/{{ vm_name }}.qcow2"
|
||||
|
||||
- name: Customize VM image (Inject User/SSH/Sudo)
|
||||
shell: |
|
||||
virt-customize -a {{ vm_images_dir }}/{{ vm_name }}.qcow2 \
|
||||
--username {{ vm_user }} \
|
||||
--password {{ vm_password }} \
|
||||
--ssh-insert {{ vm_user }}:keys={{ vm_ssh_public_key | replace('~', lookup('env', 'HOME')) }} \
|
||||
--run-command "usermod -aG wheel {{ vm_user }}" && \
|
||||
touch {{ vm_images_dir }}/{{ vm_name }}.customized
|
||||
become: yes
|
||||
args:
|
||||
creates: "{{ vm_images_dir }}/{{ vm_name }}.customized"
|
||||
|
||||
- name: Provision VM using virt-install
|
||||
shell: |
|
||||
virt-install \
|
||||
@@ -53,14 +65,7 @@
|
||||
--network network=default \
|
||||
--graphics none \
|
||||
--noautoconsole \
|
||||
--boot uefi \
|
||||
--cloud-init user-data=/tmp/{{ vm_name }}_user-data
|
||||
args:
|
||||
--boot uefi
|
||||
args:
|
||||
creates: "/etc/libvirt/qemu/{{ vm_name }}.xml"
|
||||
|
||||
- name: Attach configuration to VM
|
||||
debug:
|
||||
msg: "Configuration is now handled by virt-install --cloud-init flag."
|
||||
when: false # This task is now obsolete
|
||||
become: yes
|
||||
|
||||
Reference in New Issue
Block a user