-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Foreman inventory does not sync empty groups #919
Comments
From @jctanner on Apr 14, 2020 11:24 !component =contrib/inventory/foreman.py |
@Akasurde FWIW, |
That said, it does look like it applies to our inventory too. @ares @ezr-ondrej would one of you be able to look into this? |
Sure, I'll try to take a look what is happening there |
@evgeni I can see there is no sync for hostgroups in the sync script, should we add it there before host sync? |
@ezr-ondrej I guess that'd be required, yeah. Not sure how it'd play with the Can we get a list of hosts and then only sync all groups (and parents) that those hosts belong to? |
From @rht-jbittner on Mar 27, 2020 11:19
SUMMARY
Foreman dynamic inventory script does not sync empty host groups.
ISSUE TYPE
COMPONENT NAME
Foreman/Red Hat Satellite dynamic inventory
ANSIBLE VERSION
STEPS TO REPRODUCE
Create empty host group in Foreman/Red Hat Satellite and sync inventory. Groups without hosts are not synced.
EXPECTED RESULTS
All groups synced. Syncing empty host groups is important due to group inheritance. Like in Ansible you can have host group which contains multiple sub groups and define variables on parent group level. This is not possible with current state of the inventory script.
ACTUAL RESULTS
Only groups with host synced.
Problem with foreman inventory script is that it does not call Foreman hostgroup API and construct group and membership from hosts instead.
Copied from original issue: ansible/ansible#68508
The text was updated successfully, but these errors were encountered: