Foreman Host Creation exec extra Command?


i it possible to force a simple bash Command while Creating a Host? I have an external DNS/DHCP and its not possible to integrate it directly with foreman. The Bash Script will connect to one DNS/DHCP and will add the new Host including mac and IP Address.
Where can I add some costum Options like this while creating a host?


Yes, check out foreman_webhooks plugin. Here’s the deep dive on thia topic The new Foreman webhooks plugin - YouTube

You can use webhook that will, after the host build, trigger the REST API call to smart proxy, which can have a shell hooks plugim, that will execute define shell hook for sucj request.

1 Like