Need to be able to manage subnet declarations in DHCP Proxy

Problem:
Hi guys, I’m new to foreman and love what i see so far. We have multiple ways of provisioning but in the documentation it says “It cannot manage subnet declarations, which should be managed by another means (e.g. puppet-dhcp).” We need to be able to change the subnet in dhcp.conf before each provision. Is there any documentation on how to achieve this? We have a smart proxy running DHCP, TFTP and Puppet modules. What’s the best way to update dhcp.conf before we provision a new host? Can this be achieved with the Smart Proxy Puppet module?

Expected outcome:

Foreman and Proxy versions:
foreman and foreman-proxy version 1.20.1
Foreman and Proxy plugin versions:

Hello and welcome, there are two different things we apparently fail to explain.

  1. Foreman itself cannot add new subnet declarations in dhcpd.conf, these are keywords subnet { ... } and only installer/puppet does. The CLI installer can only add one declaration, you can create multiple via hiera.yaml and puppet tho. Then you need to make sure those subnets exist in Foreman DB (manually).

  2. Foreman then can manage DHCP records and leases via Smart Proxy DHCP API. This does of course work.

Thank you lzap for the fast reply. I understand foreman itself doesn’t manage additional subnets dhcp.conf and to achieve what i’m trying to do would be outside of foreman through puppet. I guess I’m still pretty new to puppet and trying to understand the relationship from foreman master and puppet master to a smart proxy. We want to use the puppet-dhcp puppet module to manage subnets. Is a smart proxy a puppet agent/node? Are there any resources or examples of using the puppet-dhcp module to manage dhcp.conf within the existing foreman master and foreman proxy architecture?

I am only aware of this:

https://theforeman.org/2017/07/adding-new-subnet-for-provisioning.html