Problem:
After upgrading Foreman from 2.5.4 to 3.0.1 to 3.10 we cannot use the variable @host.environment anymore. When using it in provisioning templates or template in a parameter of a puppet class it results in the error undefined method ‘#environment’ for Host::Managed::Jail (Host::Managed). Till foreman 2.5.4 this was possible without any problems. More Details you can find in the attachment foreman3_undefined_method_environment.log (28.2 KB)
Expected outcome:
Can use a variable which represents the environment in templates, no matter if its @host.environment or something similar. But i cant find anything in the docs, that this shouldnt work anymore
Foreman and Proxy versions:
Tested Foreman 3.0.1 and Foreman 3.1.0
Hi @chr1s, Foreman 3.1 is only compatible with foreman_puppet version 2.0.x - foreman_puppet 1.0.x is compatible with Foreman 3.0. Can you please double-check whether the versions match?
Looking good, thanks - I was asking because it said foreman_puppet 1.0.5 in your log @ezr-ondrej any idea what that is about? Do we miss anything in the plugin?
ok sorry. i tested with foreman 3.0.1 and foreman 3.1.0. Seems that i send the logs from foreman 3.0.1 instead of 3.1.0. Here we go with the correct log foreman3.1_undefined_method_environment.log (28.4 KB)