There was an error rendering the Provision template: undefined method '#puppetmaster' for Host::Managed::Jail (Host::Managed)

Problem:
After upgrading to Foreman 3.2.1 the provisioning did not work anymore

Expected outcome:

Foreman and Proxy versions:

Foreman and Proxy plugin versions:

Distribution and version:

Other relevant data:
So I guess the syntax changed. Can someone tell me the new syntax?

To see what would happen I removed the line but I received the next error:

There was an error rendering the Provision template: Safemode doesn’t allow to access ‘pm_set’ on #Safemode::ScopeObject

I guess more things changed. Where can download the latest version of the templates?