fix(ansible): group names Ansible accepts, and interpreter discovery without the warning (#5334)
Every run warned twice because of Steward's own inventory: - 'Invalid characters were found in group names': the group 'Docker Swarm' went into the inventory as typed. ansible_group_name() cleans it to docker_swarm (lower case, [a-z0-9_], never a leading digit); two names that clean alike get _2, _3 so neither folds into the other. The group page says what plays call it. The display name is unchanged. - Python interpreter discovery: ansible_env sets ANSIBLE_PYTHON_INTERPRETER=auto_silent unless the environment already sets one; a target or group's ansible_python_interpreter still wins. Runs are scoped by target set (steward:group:<id>), not by group name, and --limit is free text, so neither path depends on the name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,12 +10,14 @@
|
||||
{% set can_edit = session.user_role in ('operator', 'admin') %}
|
||||
{{ ansible_tabs("inventory") }}
|
||||
{{ page_header(group.name) }}
|
||||
{#- The name a play uses for it (#5334): Ansible takes only letters, digits and _. #}
|
||||
|
||||
<p class="page-verdict">
|
||||
{%- set members = group.targets|sort(attribute='name') %}
|
||||
{%- if members %}{{ members|length }} member{{ 's' if members|length != 1 }}:
|
||||
{% for t in members %}<a href="/ansible/inventory/targets/{{ t.id }}">{{ t.name }}</a>{{ ", " if not loop.last }}{% endfor %}
|
||||
{%- else %}<span class="tone-warn">no members</span>{% endif %}
|
||||
· plays call it <code>{{ ansible_name }}</code>
|
||||
{%- if used %} · scheduled by {% for s in used %}<a href="/ansible/schedules/{{ s.id }}">{{ s.name }}</a>{{ ", " if not loop.last }}{% endfor %}{% endif %}
|
||||
</p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user