add vm_destroy playbook and role

correct network addressing in template
write hostname to /etc/hostname
This commit is contained in:
2022-10-30 23:48:43 +13:00
parent 73c9106c8f
commit 50c451e94d
7 changed files with 113 additions and 1 deletions

View File

@ -40,6 +40,7 @@
virt-customize --format qcow2 \
-a {{ root_vhd_pool_dir }}/{{ vm_name }}_vda.qcow2 \
--hostname {{ vm_name }}.{{ vm_domain }} \
--write /etc/hostname:{{ vm_name }} \
--upload /tmp/eno1_{{ vm_name }}.network:/etc/systemd/network/10-eno1.network \
--append-line "/etc/hosts:127.0.1.1 {{ vm_name }}.{{ vm_domain }} {{ vm_name }}" \
--password ladmin:password:{{ hostvars[vm_name]['ansible_become_pass'] }} \