Can Packer be used to install and provision a bare metal server? Packer provides webserver with repository packages and preseed/kickstart and can run some other provision softwares(ansible,puppet, chef, etc). Could it be used to install bare metal servers? If yes, how should a packer .json look like?
I had a similar question. I found this issue thread on using Packer with PXE boot.
https://github.com/hashicorp/packer/issues/955
From the thread, Vasiliy Tolstov commented:
[It's] very simple: install all needed stuff inside a VM (for Debian live-boot, for fedora/centos Dracut with the ability to boot from the net). after [building] that [with] packer run the following script (example for Debian):
and in packer download artifacts from vm: