Related docs:
INVENTORY PLUGIN IDM VAULT CAPABILITIES AAP INTEGRATION DOCS MAP
Use this guide to choose the IdM-backed inventory source exposed by
eigenstate.ipa.idm.
The focus here is operational boundary selection, not option reference.
flowchart LR
hosts["IdM hosts"]
hostgroups["IdM hostgroups"]
netgroups["IdM netgroups"]
hbac["IdM HBAC rules"]
plugin["eigenstate.ipa.idm"]
inv["Ansible inventory"]
hosts --> plugin
hostgroups --> plugin
netgroups --> plugin
hbac --> plugin
plugin --> inv
The model is:
Use the object type that matches the operational boundary you actually care about.
All examples assume an IdM domain corp.example.com with enrolled hosts,
nested hostgroups, netgroups, and HBAC rules representing a small production
and staging estate.
[!NOTE] The examples are illustrative. The important part is the decision boundary: role, access boundary, or security policy.
Use hosts when you need every enrolled system regardless of role grouping.
Typical cases:
flowchart LR
H["All enrolled hosts"] --> P["sources: [hosts]"] --> A["all hosts in inventory"]
Example inventory:
plugin: eigenstate.ipa.idm
server: idm-01.corp.example.com
ipaadmin_password: "{{ lookup('env', 'IPA_ADMIN_PASSWORD') }}"
verify: /etc/ipa/ca.crt
sources:
- hosts
compose:
ansible_host: idm_fqdn
Why this source fits:
idm_* varsUse hostgroups when IdM hostgroups already model infrastructure roles.
Typical cases:
flowchart LR
HG["IdM hostgroups\nwebservers, databases"] --> P["sources: [hosts, hostgroups]"] --> G["Ansible groups\nidm_hostgroup_*"]
Example inventory:
plugin: eigenstate.ipa.idm
server: idm-01.corp.example.com
ipaadmin_password: "{{ lookup('env', 'IPA_ADMIN_PASSWORD') }}"
verify: /etc/ipa/ca.crt
sources:
- hosts
- hostgroups
hostgroup_filter:
- webservers
- databases
host_filter_from_groups: true
Why this source fits:
keyed_groupsSometimes IdM stores the useful boundary as metadata instead of a named
hostgroup. In that case, keep hosts in scope and build additional groups from
attributes such as idm_location or idm_os.
That pattern is useful for:
Use netgroups when the boundary is who can reach a host rather than what the
host does.
Typical cases:
flowchart LR
NG["IdM netgroups\nops-admin-access"] --> P["sources: [hosts, netgroups]"] --> G["Ansible groups\nidm_netgroup_*"]
Example inventory:
plugin: eigenstate.ipa.idm
server: idm-01.corp.example.com
ipaadmin_password: "{{ lookup('env', 'IPA_ADMIN_PASSWORD') }}"
verify: /etc/ipa/ca.crt
sources:
- hosts
- netgroups
netgroup_filter:
- ops-admin-access
host_filter_from_groups: true
Why this source fits:
Use hbacrules when the operational boundary is the enforced access policy
itself.
Typical cases:
hostcategory=allflowchart LR
HB["HBAC rules\nallow_ssh_ops"] --> P["sources: [hosts, hbacrules]"] --> G["Ansible groups\nidm_hbacrule_*"]
Example inventory:
plugin: eigenstate.ipa.idm
server: idm-01.corp.example.com
ipaadmin_password: "{{ lookup('env', 'IPA_ADMIN_PASSWORD') }}"
verify: /etc/ipa/ca.crt
sources:
- hosts
- hbacrules
hbacrule_filter:
- allow_ssh_ops
host_filter_from_groups: true
Why this source fits:
hostcategory=all[!TIP] If you are deciding between hostgroups and HBAC rules, ask a narrower question: are you targeting by system role or by authorization policy? If the answer is policy, use HBAC rules.
Use inventory hostvar enrichment when IdM host metadata is the real execution input and named groups are either too coarse or do not exist yet.
Typical cases:
keyed_groups from idm_location or idm_osflowchart LR
META["Curated idm_* host vars"] --> KG["compose / keyed_groups / groups"] --> RUN["execution boundary built from metadata"]
Recommended pattern:
hosts enabled so the plugin still loads every enrolled hosthostvars_enabled: true unless you only need to suppress host attribute exporthostvars_include when the inventory should export a small, predictable set of host metadata| Need | Best source |
|---|---|
| Every enrolled system | hosts |
| Systems by infrastructure role | hostgroups |
| Systems by who may access them | netgroups |
| Systems by enforced access policy | hbacrules |
| Metadata-driven targeting | hosts plus curated idm_* hostvars |
The most useful operator sequence is usually:
hosts so host vars are always presenthost_filter_from_groups: true when you need the host list trimmed to the selected boundaryFor option-level details and exact field behavior, return to INVENTORY PLUGIN.