Closed killsudo closed 8 years ago
Looks like issue #1 is related and brought in the host / host group parameters
Yes, this would make a lot of sense, I just did not get around to add it yet.
I noticed the host returned by Foreman's API contains an all_parameters entry which contains Organization / Location / and global as well has host and group parameters. I implemented this in PR #15 . I added an option server_param_resolution in the section foreman of the ini file to make this change optional and backwards compatible; if missing or set to False, the original behavior is maintained.
It would be nice to have a way to query all_parameters from the API itself instead of having to use the host.
Thanks @arielsalvo . I vaguely remember not using all_parameters for a reason but don't remember what it was. If I can't dig this up again we should only use all_parameters and rather remove the custom parameter resolution. Might be a couple of days though until I get to it.
Would it be possible to include support to fetch Foreman parameters from Organizations, Locations, and global when compiling the host foreman parameter list?
I have this script successfully displaying my Foreman inventory along with host groups. I can define a parameter on the host directly or on a host group and this script will see those and print them under the host object
When I view the host via the Foreman webgui it displays parameters to override from the Organization / Location / global parameters.
It would be really useful to leverage the Organization / Location / and global parameters under foreman_params instead of needing to create lots of host groups or nested host groups.