Bug #8766
closed
Chef reports do not create host in correct environment
Added by Romain Vrignaud almost 10 years ago.
Updated over 9 years ago.
Description
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.
So we should probably first try to sync environments from the Chef and then we can map it in Foreman.
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
- Related to Feature #9843: Provide chef client environment as a fact added
- Category set to foreman_chef
- Status changed from New to Duplicate
Fixed as a part of more generic #9844, thanks for report.
- Related to Feature #9844: Add own fact parser that will parse all attributes except interfaces added
Also available in: Atom
PDF