Chef reports do not create host in correct environment
It seems that when Foreman get a chef report from unknown host, it creates the host in the default Foreman environment.
It should instead use the chef environment of the host.
#2 Updated by Marek Hulán over 5 years ago
So I did a bit of research and chef_environment is not a part of attributes. So the only way we can get it into Foreman correctly is by asking Chef, which may be a bit time costly with every fact import. Maybe we could ask only if no environment is set. Romain, any other ideas?
EDIT: obviously environment wouldn't be updated on later change in Chef
EDIT2: I'll check if chef-handler-foreman could add this for us