I’m very new to Foreman. I spent all of my waking hours this weekend to deploying the software and getting it connected to one of our VMware hosts, and setting up some basic ansible plays for things like installing httpd and other applications.
It is my understanding that foreman should be able to set up network / hostname information automatically, but I’m failing to get there.
The template is rocky Linux 9.2. Foreman is able to deploy the server, and apply the name properly in vmware, but the vm itself appears to be untouched.
This is on the newest available version, 3.7, as I just downloaded and installed the software over the weekend.
I feel like i’m probably missing some obvious step, but since I have no idea how foreman communicates with the host before it has an IP, I’m a little lost.
I just went through this battle not too long ago so I will share my experience. First, make sure your template has cloud-init, perl, and open-vm-tools installed in your template and in the Operating Systems page in Foreman, make sure you have both your desired Cloud-init template and User data template configured. I would also add the katello-host-tools and katello-host-tools-tracer packages to your template for good measure. You will need to create a cloud-init config file which instructs the host to call back to Foreman to get it’s config. The file would look something like this:
You can call that file something like foreman_cloud_init.cfg and drop it in /etc/cloud/cloud.cfg.d/. There’s some config you’ll also need to do to prevent cloud-init from configuring the network on the VM. Basically another .cfg file that you will need to create and will need to drop in the same path:
network:
config: disabled
You’ll also want to have the Katello cert added to that template (install the ca-certificates package if you don’t already have it installed).
Just perform the rest of the cleanup tasks on your template, convert that to a VMware template, configure that template in your Compute Resources config and you should be good to go.
Thanks very much! I didn’t have cloud-init on my template, but I’ve remedied that, and set it up the way you mentioned.
I’m seeing i don’t appear to have katello installed on my Foreman host, I was going to create a second server for hosting rpm repos, and install katello on there - should I wipe the install and redo it with katello on the main host as well?