{% extends "base.html" %} {% from "_macros.html" import crumbs, status_badge %} {% block title %}Ansible Schedules — Steward{% endblock %} {% block breadcrumb %}{{ crumbs([("Ansible", "/ansible/"), ("Schedules", "")]) }}{% endblock %} {% macro fmt_interval(secs) %} {%- set m = {300: "every 5 min", 3600: "hourly", 21600: "every 6h", 43200: "every 12h", 86400: "daily", 604800: "weekly"} -%} {{ m.get(secs) or ("every " ~ (secs|duration)) }} {% endmacro %} {% block content %} {% set can_edit = session.user_role in ('operator', 'admin') %}
{# ── Existing schedules ───────────────────────────────────────────────────── #} {% if not rows %}| Name | Playbook | Target | Interval | Last run | Next run | |
|---|---|---|---|---|---|---|
| {{ s.name }} | {{ s.source_name }} / {{ s.playbook_path }} | {{ row.scope_label }} | {{ fmt_interval(s.interval_seconds) }} |
{% if row.last_run %}
{{ status_badge(row.last_run.status) }}
· {{ row.last_run.started_at|ago }}
{% endif %}
{% if s.last_error %}
{# With a run beside it, the last firing was skipped because that run was
still going (#5158); without one, the firing couldn't start a run. #}
{{ s.last_error }} · {{ s.last_run_at|ago }}
{% elif not row.last_run %}
never
{% endif %}
|
{% if not s.enabled %}paused {% elif row.next_run %}{{ row.next_run|ago }} {% else %}due now{% endif %} | {% if can_edit %} Edit {% endif %} |