foreman-xen
foreman-xen copied to clipboard
Make puppet environment optional.
Foreman no longer requires puppet to manage hosts. In fact, it is possible to purge puppet completely from a foreman installation (see https://docs.theforeman.org/3.1/Managing_Configurations_Puppet/index-katello.html#Disabling_Puppet_Integration_managing-configurations-puppet ) which is what I have done. Doing so breaks VM creation.
This patch makes the puppet environment variable optional. I'm not sure why the environment was required or used before, but I haven't noticed any ill effects yet.
In case anyone tries to google the error message I got when trying to create a host after puppet was removed, here it is:
Unable to save
Failed to create a compute <cr-name> (Xenserver) instance blah.domain.tlv: undefined method `environment' for #<Host::Managed:0x0000560c4c583c08>