I want to automate the installation of Debian VM on my VMWare infrastructure with using Ansible.
I would like know how can create the playbook to start the installation from the ISO file with giving the preseed config file to have auto-answer during the installation.
Steps:
Create the VM with community.vmware.vmware_guest : DONE
with add the Debian ISO file
I’ma able to power on the VM to start with the ISO file
But I’m not able to give the path of the preseed.cfg file and start the installation.
You can try by using vmware_guest_sendkey module to send keyboard input to boot loader menu, edit boot menu entry to add path to preseed.cfg (served on some HTTP/FTP server) and then boot the machine. I have personally not tested this but it should be achievable. There is a catch though, you cannot send an arbitrary combination of special keys and characters. You have to call the module multiple times, first by sending some special keys, then some characters, then some special keys and so on. Please consult the documentation for details: