{# ansible/inventory/index.html — the Inventory tab (#5333): a verdict line, every target (address, the Steward host it is linked to, its groups), then every group (its members, the schedules that run on it). The whole row opens the target or group, where it is edited and deleted. Add target and Add group open small dialogs; a failed add reopens its dialog with the error. #} {% extends "base.html" %} {% from "_macros.html" import crumbs, page_header, empty_state %} {% from "ansible/_tabs.html" import ansible_tabs %} {% block title %}Ansible Inventory — Steward{% endblock %} {% block breadcrumb %}{{ crumbs([("Ansible", "/ansible/"), ("Inventory", "")]) }}{% endblock %} {% block section_tabs %}{{ ansible_tabs("inventory") }}{% endblock %} {% block content %} {% set can_edit = session.user_role in ('operator', 'admin') %} {% call page_header("Inventory") %} {% if can_edit %} {% endif %} {% endcall %} {% if not targets and not groups %}
{{ verdict.targets }} target{{ 's' if verdict.targets != 1 }} in {{ verdict.groups }} group{{ 's' if verdict.groups != 1 }} {%- if verdict.ungrouped %} · {{ verdict.ungrouped }} in no group{% endif %} {%- if verdict.unlinked %} · {{ verdict.unlinked }} not linked to a Steward host{% endif %}
| Target | Steward host | Groups |
|---|---|---|
|
{{ t.name }}
{{ t.address }}
|
{% if h %}{{ h.name }}{% else %}—{% endif %} | {%- for g in t.groups %}{{ g.name }}{% else %}none{% endfor -%} |
No targets yet.
{% endif %}| Group | Members | Schedules |
|---|---|---|
| {{ g.name }} | {%- for t in g.targets|sort(attribute='name') %}{{ t.name }}{% else %}no members{% endfor -%} | {%- for s in used %}{{ s.name }}{{ ", " if not loop.last }}{% else %}—{% endfor -%} |
No groups yet. A group is what a run or a schedule targets, and what the Hosts list filters by.
{% endif %}