feat(ansible): playbooks self-describe via "# description:" comment
Playbooks can ship a human description Steward reads and shows when one is selected. Convention: a `# description: <text>` magic comment (Ansible rejects unknown play keys, so a comment is the portable place — works for third-party playbooks too); falls back to the first play's name:. sources .discover_playbook_description(). Surfaced at the top of the shared _playbook_vars.html partial, which loads on playbook selection in the host run form, schedules form, and browse run form. All four bundled playbooks (provision/install/update/docker_prune) now carry a description line. Unit tests added. Scribe #900. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
{# Discovered playbook variables as fill-in fields. Shared by the browse run
|
||||
form, the host run form, and the schedule form. Expects `variables` (from
|
||||
discover_playbook_variables). Rendered standalone by /ansible/playbook-vars. #}
|
||||
{# Description + discovered variable fields for a selected playbook. Shared by
|
||||
the browse run form, host run form, and schedule form. Expects `variables`
|
||||
and `description`. Rendered standalone by /ansible/playbook-vars. #}
|
||||
{% if description %}
|
||||
<div style="background:var(--bg);border-left:3px solid var(--accent);border-radius:3px;
|
||||
padding:0.5rem 0.7rem;margin:0.25rem 0 0.6rem;font-size:0.82rem;color:var(--text-muted);">
|
||||
{{ description }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if variables %}
|
||||
<div style="margin:0.5rem 0 0.25rem;font-size:0.82rem;color:var(--text-muted);font-weight:600;">
|
||||
Playbook variables
|
||||
|
||||
Reference in New Issue
Block a user