There is no easy way to lookup all hosts that have a smart class parameter with a specific value.
A host can have overrides for a specific smart class parameter in multiple places:
- Puppet class level
- Host Group level
- Host level
- Matchers level (This level is truly different than the other levels as it allows you to specify matchers based of puppet environments, classes, facts …). See this.
What value a host gets in the end depends on the “Prioritize attribute order” field found in “Configure > Classes > (Specific Puppet Class) > Smart Class Parameter Tab > (Specific smart class Parameter)”.
Overrides on the “Host Level” (fqdn) do not seem to respect this order and they are always prioritized first.
Example: Configure > Classes > user > Smart Class Parameter Tab > ulimit_value:
**Prioritize attribute order** fqdn hostgroup environment os domain
I have made a custom script that searches / tries to search through all of the override values by getting the override_value_order list and then going one by one.
Example: First check if the host has an override, then check if its host group has an override, then check if all the parent host groups of this hostgroup have an override (one by one), …
This blog post / Priority Lookups section / explains how Hiera searches for a correct parameter value, respecting the ordering in the hierarchy. I presume this should be easy to do for Foreman as well.
Does anyone have any information on whether this is proposed as a feature?
Foreman and Proxy versions: