{# ansible/playbooks.html — the Playbooks tab (#5331): every playbook across its sources in one list, what each says it does and how it last ran; the whole row opens the playbook's page, where it is run. A source with no playbooks is one quiet line under the list. #} {% extends "base.html" %} {% from "_macros.html" import crumbs, page_header, status_badge, empty_state %} {% from "ansible/_tabs.html" import ansible_tabs %} {% block title %}Playbooks — Steward{% endblock %} {% block breadcrumb %}{{ crumbs([("Ansible", "/ansible/"), ("Playbooks", "")]) }}{% endblock %} {% block section_tabs %}{{ ansible_tabs("playbooks") }}{% endblock %} {% block content %} {% call page_header("Playbooks") %} {% if can_add %}New playbook{% endif %} {% endcall %} {% if not sources %}
{{- rows|length }} playbook{{ 's' if rows|length != 1 }}{% if n_src %} from {{ n_src }} source{{ 's' if n_src != 1 }}{% endif %} {%- if n_bad %} · {{ n_bad }} flagged destructive by {{ 'their authors' if n_bad > 1 else 'its author' }}{% endif -%}
{% if rows %}| Playbook | Source | Last run |
|---|---|---|
|
{{ r.path }}
{% if r.description %} {{ r.description }} {% endif %}
|
{{ r.source }} {%- if r.category %} {{ r.category }}{% endif %} {%- if r.confirm %} {{ status_badge('warn', 'destructive', 'Its author flagged it as making significant or destructive changes: a real run asks for confirmation') }}{% endif %} | {%- if r.last %}{{ status_badge(r.last.status) }} {{ r.last.started_at|ago }} {%- else %}never run{% endif -%} |
{{ s.name }} ({{ s.path }}) has no playbooks yet. {%- if can_add and s.editable %} Write one{% endif %}
{% endfor %} {% endif %} {% endblock %}