Fix for virt-customize call.
This commit is contained in:
@@ -44,10 +44,9 @@
|
|||||||
- name: Customize VM image (Inject User/SSH/Sudo)
|
- name: Customize VM image (Inject User/SSH/Sudo)
|
||||||
shell: |
|
shell: |
|
||||||
virt-customize -a {{ vm_images_dir }}/{{ vm_name }}.qcow2 \
|
virt-customize -a {{ vm_images_dir }}/{{ vm_name }}.qcow2 \
|
||||||
--username {{ vm_user }} \
|
--run-command "useradd -m -G wheel {{ vm_user }}" \
|
||||||
--password {{ vm_password }} \
|
--password {{ vm_user }}:{{ vm_password }} \
|
||||||
--ssh-insert {{ vm_user }}:keys={{ vm_ssh_public_key | replace('~', lookup('env', 'HOME')) }} \
|
--ssh-inject {{ 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
|
touch {{ vm_images_dir }}/{{ vm_name }}.customized
|
||||||
become: yes
|
become: yes
|
||||||
args:
|
args:
|
||||||
|
|||||||
Reference in New Issue
Block a user