How to automate bare metal install?

I (think I) understand how cloud-config.yml works, you pass it to the installer and it merges it with the config for the installation. Hence, SSH keys in it apply only to the version installed on disk.
And to SSH into the installer, I would need to passwd first.
Given that I don’t have a compatible keyboard, how would I:

  • run a script in the iso image shell to just install unconditionally without keyboard input
  • set ssh key or password on the iso image (can obviously be accomplished with the above point)
    I am pretty sure there is a way without building rancher/os myself from git.

You can use runcmd or write file in your init:

https://rancher.com/docs/os/v1.2/en/configuration/running-commands

Torpi

Thank you for your response.
AFAIK, runcmd is just a cloud-config.yml directive to execute arbitrary commands.
Where would I find the cloud-config.yml that instructs the usb live boot itself?
Furthermore, that doesn’t seem like an appropriate spot to run sudo ros install -f -c cloud-config.yml -d /dev/sda, since runcmd commands run before the system is fully initialized?
I am looking to run ros install -f -c cloud-config.yml -d /dev/sda around the time auto-logon console is presented.

I’ve seen people doing it. Ex: https://gist.github.com/SvenDowideit/6b79bce042523a34be88d7a343e80721