{% extends "base.html" %} {% from "_macros.html" import crumbs %} {% block title %}Agent fleet — Steward{% endblock %} {% block breadcrumb %}{{ crumbs([("Hosts", "/hosts/"), ("Agent fleet", "")]) }}{% endblock %} {% block content %}

Agent fleet

← Hosts

Bulk agent operations across your inventory. For a single host, use its host page — provisioning and metrics live there.

{% if new_token %}

New token — copy this install command now

This is the only time the raw token is shown. Rotate if you lose it.

curl -sSL '{{ install_url }}' | sudo sh
{% endif %}
{% if ansible_available %} {% set scope_select %} {% endset %}

Agent lifecycle via Ansible

These actions run bundled Ansible playbooks to deploy and maintain the Steward monitoring agent on your inventory hosts. Steward generates each host's API token automatically and connects over SSH as the managed steward account — you'll be dropped into the live Ansible run to watch it.

{% if not managed_key_set %}
No managed SSH key yet — Steward needs one to log into hosts as steward.
{% elif not (deploy_targets or deploy_groups) %}

No Ansible inventory targets yet. Add some under Ansible → Inventory.

{% endif %}
{% if managed_key_set and (deploy_targets or deploy_groups) %}

1 · Provision a fresh host

First contact for a brand-new host. Connects with a one-time bootstrap user + password (used for this run only, never stored), creates the steward login account with passwordless sudo, installs the managed SSH key, then installs the agent. Run this once per host.

{{ scope_select }}

2 · Install / enroll agent

For a host that's already provisioned (has the steward account) but has no agent yet — or to re-enroll one. Connects as steward with the managed key, mints a fresh token, and installs the agent. No curl | sh needed.

{{ scope_select }}

3 · Update agents

Refresh the agent binary on hosts already running it. Connects as steward with the managed key and restarts the service — the token and config are left untouched, so identity is preserved.

{{ scope_select }}
{% endif %} {% endif %}
{% for item in registrations %} {% else %} {% endfor %}
HostReported IPAgent versionDistro Last seenActions
{{ item.host.name if item.host else item.reg.host_id }} {{ item.reg.host_ip or "—" }} {{ item.reg.agent_version or "—" }} {{ item.reg.distro or "—" }} {{ item.reg.last_seen_at.strftime("%Y-%m-%d %H:%M:%S") if item.reg.last_seen_at else "never" }}
No hosts registered. Add one above.
{% endblock %}