Adding hosts to foreman en masse

Hey all,

Just getting started with Foreman, and I’m sure there’s a solution to my problem out there, but I’ve yet to find it.

I just received 40 new bare metal servers, and I’d like to kickstart them with Foreman making use of pxe-booting. What I’d like to avoid is manually adding each host to foreman by hand. Is there a way to add them in bulk? I received a list of MAC addresses for my servers, which I’ve compiled in a spreadsheet with corresponding IP addresses and hostnames.

What’s the best way to get that spreadsheet into Foreman? Hammer? Or should I look to another solution altogether?

Using Foreman v1.22.1

Thanks in advance for a nudge in the right direction!

Hi and welcome to the forum :slight_smile:

Hammer would definetly be a good way for that. Also, you can use the API if you are more into that.
Alternatively, you can take a look into the Foreman Discovery plugin. I have no experience using that myself, but I think that might fit your needs quite well, especially if adding stacks of hardware is a recurring task for you.

Regards

Thanks for the feedback! I have looked into the Discovery plugin a bit, and that might be the way to go, but I’ll give things a shot with Hammer first. Thanks again!