Please replace this text with a description of your issue
Hi, I am new to Ansible and my project is to use Ansible to create a small system in Vmware. I have done several steps including: creating clusters, adding host ESXI, configuring the switch, config some settings and finally able to creating a new VM using file .iso (ubuntu-18.04.6-live-server-amd64.iso) on VcenterServer.
The problem I have is when create a new VM, there is a configuration setup for OS system appear(picture below) and I cannot using script for automation this step.
What @mariolenz said. For unattended installs, it’s pretty much preseed (for Debian based systems), kickstart (EL based system) or cloud-init (both). Ubuntu seems to have a cloud-init wrapper linked in previous comment. Just prepare an ISO with one of those, push it to your datastore and boot on it instead.
Hashicorp Packer would be another great option to build your ISO and automate OS installs (here using a preseed). Then if you wish so, you could use the Ansible provisioner to run your playbooks on a freshly installed VM.
Now I get you chose Ansible to do so, and that’s totally fine. I just wanted to share another perspective.
We’ve automated our ESXi installation and create an ISO with a kickstart file with Ansible and xorriso like this.
I haven’t updated this for quite some time, but it should™ still work. I’m pretty sure you could use packer to create the ISO in a similar way.
If you’re using Ansible anyway, creating the ISO with Ansible has the advantage that you can inject things from your inventory (like hostname, IP addresses and similar) into your kickstart / preseed / cloud-init / whatever file.