Actions
Bug #25868
openThe result of config_group.hosts is always empty
Status:
New
Priority:
Normal
Assignee:
-
Category:
Puppet integration
Target version:
-
Description
Description of problem:
Using foreman-rake console or erb code to list all members of a Config Group will always result in an empty host list.
Reason: when we add a host to a Config Group foreman adds the host to the host_config_groups table on postgres with host_type = 'Host::Base'. However, when looking up i.e. when doing myconfgroup.hosts it requires host_type = 'Host::Managed'.
Steps to Reproduce:
1. Create a Config Group
2. Add a Host to the Config Group
3. Optionally, add also a Host Group to the Config Group
4. foreman-rake console
5. ConfigGroup.where(:name => "name of your CG").hosts
6. ConfigGroup.where(:name => "name of your CG").hostgroups
Files
Updated by Ondřej Pražák over 5 years ago
- File config-group.png config-group.png added
- Subject changed from The result of config_group.hosts is always empty to The result of config_group.hosts is always empty
Actions