How to force template re-generation when editing host

How do I force a host to update its templates? Here is an issue we keep running in to.

User forgets to change password field (due to global password setting in Foreman no longer working on Windows hosts). So now the template gets generated with bad characters and thus fails.

We go to edit the host, enter in the password, and click on resolve templates, and Foreman says its all good. However, if you actually click and review the template you will see there is a character error.

Is there any way to fix this aside from having to delete the entire host and start over? That seems to be the only way that forces the templates to regenerate correctly.

bump

Hello, which template? Most templates are rendered online (when you access them) except PXE templates which are rendered when you hit Build button. So Cancel build, then hit Build again to redeploy them.

@tbrisker this thread was in my notification with a hand icon and your name, did you somehow notify me about this? How do I use this feature? Nice, thanks :slight_smile:

It seems that sometimes when we are working on building a host and there is an issue in the Install/Finish script, that if we make a change and simply reboot the host, those changes dont take effect. But when we use Cancel Build / Build, they do.

We have a Rebuild config action, it’s hidden in the Select Action menu on hosts list page, that will do it as well.

Ah. Gotcha. So its only accessible from the main hosts screen? I think thats why I missed it. I was always looking for that potion on the actual host overview page.

Me too…