45 lines
1.8 KiB
YAML
45 lines
1.8 KiB
YAML
---
|
|
|
|
# Das funktioniert nicht gut. Wird nicht weiter verfolgt.
|
|
# Das Anlegen einer VM aus Ansible lohnt nicht, wir brauchen eh ein Basistemplate mit
|
|
# - imagefile das nicht preallocating ist
|
|
# - minimale ssh-Konfiguration für root und core mit eingetragenen authorized_keys
|
|
# - Filesystems zum Mounten der gesharten Verzeichnisse des Wirts
|
|
# - LVM Filesystem, ...
|
|
# Dieses Template kann man dann kopieren, den Namen im xmldump anpassen und auf jedem Wirt definen.
|
|
# Lohnt einfach nicht
|
|
|
|
|
|
#- name: Download Ubuntu 22.04 iso to user core's tmp dir
|
|
# ansible.builtin.get_url:
|
|
# url: https://releases.ubuntu.com/22.04/ubuntu-22.04.1-live-server-amd64.iso
|
|
# dest: /home/core/tmp/ubuntu-22.04.1-live-server-amd64.iso
|
|
# mode: '0640'
|
|
|
|
#- name: Download Ubuntu 20.04 iso to user core's tmp dir
|
|
# ansible.builtin.get_url:
|
|
# url: https://releases.ubuntu.com/focal/ubuntu-20.04.5-live-server-amd64.iso
|
|
# dest: /home/core/tmp/ubuntu-20.04.1-live-server-amd64.iso
|
|
# mode: '0640'
|
|
|
|
#- name: DEBUG variables TEST ONLY
|
|
# debug:
|
|
# msg: "{{ install_vm.ram }}"
|
|
|
|
#- name: Start virtual network
|
|
# shell:
|
|
# cmd: sudo /usr/bin/virsh net-start default
|
|
|
|
#- name: Install VM with default host-specific host_vars settings
|
|
# shell:
|
|
# cmd: /usr/bin/virt-install --name {{ vm }} --ram {{ install_vm.ram }} --disk path=/var/lib/libvirt/images/{{ vm }}.img,size={{ install_vm.size }} --vcpus {{ install_vm.vcpus }} --os-variant {{ install_vm.osvariant }} --network {{ install_vm.network }} --graphics none --console pty,target_type=serial --location {{ install_vm.image }},kernel=casper/vmlinuz,initrd=casper/initrd --extra-args 'console=ttyS0,115200n8'
|
|
|
|
#- name: Upload vm XML-Description to core's tmp dir
|
|
# ansible.builtin.template:
|
|
# src: default.xml
|
|
# dest: /home/core/tmp/
|
|
# owner: core
|
|
# group: users
|
|
# mode: '0644'
|
|
|
|
... |