WDS retrieve unattended settings

Hi All,

I’ve got foreman chaining to WDS to deploy windows servers, however I currently need to reset the IP address (to the one given out by DHCP to the new server) in foreman before the new server can access the /unattended/provision templates, any idea how I can get the IP addresses to match up?
Could I access the unattend data using MAC address? I’m unsure how to use the X-RHN-PROVISIONING-MAC-0 header in WDS rules.ini.

Thanks in advance,

Hey Paul,

if you cannot inject token into your workflow, then IP address or MAC address are the only two options. If you send X-Rhn-Provisioning-Mac-0: MAC HTTP header along with the request, Foreman will attempt to match the host against provisioning MAC. That’s what Anaconda installer does. You can send multiple macs via “-1”, “-2” etc.

Second option is to turn on remote_addr and set it to match remote IP address. This is useful if you are behind NAT and you are using proxy. If IP matches and you send HTTP request with X-Forwarded-For: IP_ADDRESS then Foreman will respect that as well. This way you can spoof any IP address you want.

Hope this blogpost puts some more light: