Does upgrading Foreman also upgrade the (non-community) templates?

Over the last couple of days, I upgraded from Foreman 1.21.4 to 1.22 and then to 1.23.

Does upgrading Foreman also upgrade the built-in templates?

I remember that with the older versions of Foreman, templates didn’t get updated automatically.


yes default templates should be reseeded to new version during upgrade, even if they contain user changes. Meaning user changes will be dropped, which is why these templates are locked by default.

1 Like

Major templates like Kickstart have this statement:

<%= snippet_if_exists(template_name + " custom pre") %>

So if you have “templatename custom pre” it will be used. This snippet will never be overwritten. If you want more of these “extension points” just create them and send us a PR:



Now that I know this mechanism exists, this solves a significant issue I have in converting over from RHS5/Spacewalk.

1 Like

Go ahead and create more of these extensions, we only have a kickstart one I think.

I’ve got partitioning down with a dynamic template, so that’s good. There’s already a hook for packages, and I’m brainstorming there for a variety of purposes. The majority of what I did in Spacewalk was in chrooted post-install snippets, and now I know how to gracefully integrate all of this while maintaining upgradability.

At some point, I’m going to have to learn the VMware/vSphere integration.