{# 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 %}
{{ empty_state("No targets yet. A target is a machine Ansible can reach: a name, an address, and the groups it is in.") }}
{% else %}

{{ 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 %}

Targets

{% if targets %} {% for t in targets %} {% set h = hosts.get(t.host_id) %} {% endfor %}
TargetSteward hostGroups
{% else %}

No targets yet.

{% endif %}

Groups

{% if groups %} {% for g in groups %} {% set used = users.get('steward:group:' ~ g.id, []) %} {% endfor %}
GroupMembersSchedules
{% else %}

No groups yet. A group is what a run or a schedule targets, and what the Hosts list filters by.

{% endif %}
{% endif %} {% if can_edit %} {% set a = add or {} %} {% set v = a.get('values') or {} %} {% if a.kind == 'target' and a.error %}{% endif %}
{{ csrf_field() }}
What plays call it: hosts: web-01.
An IP or DNS name. Groups, variables and the Steward host are set on its page next.
{% if a.kind == 'group' and a.error %}{% endif %}
{{ csrf_field() }}
Members and variables are set on its page next.
{% if a.kind in ('target', 'group') %}{% endif %} {% endif %} {% endblock %}