Files
computer-playbook/roles/sys-svc-sshd/handlers/main.yml
kevinveenbirkenbachandClaude Opus 5 972b4ce7aa fix(ci): wire the offset key up and give the selections their own module
Four findings the quality gate raised against the offset and resume work, all
of them mine.

INFINITO_CI_OFFSET sat next to INFINITO_CI_CHUNK, where it reads well and
sorts wrong, and no handler claimed it -- so `make dotenv` would never have
materialised the default and every run outside CI would have resolved the
offset from an unset variable. It is in ASC order now and passes through the
static handler.

runs.py crossed 500 lines. The three helpers that translate job titles back
into selection tokens move to selections.py, which is a seam rather than a
quota: reading a finished run and dispatching a new one is one subject,
turning a job title into `role#variant@mode+tor` is another, and only the
latter is what lets a retrigger replay exactly what failed.

The sshd handler still told operators to look for a handler named
'sshd restart' after the topic became sshd-restart, and three lines from the
offset commit were past the format width.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-16 06:33:51 +02:00

31 lines
911 B
YAML

---
- name: 🔍 Gather service facts for SSH handler
ansible.builtin.service_facts:
listen: sshd-restart
- name: 🔍 Resolve SSH service unit name
ansible.builtin.set_fact:
sys_svc_sshd_service_unit: >-
{{
(
['sshd.service', 'sshd', 'ssh.service', 'ssh']
| select('in', ansible_facts.services.keys() | list)
| list
| first
) | default('')
}}
changed_when: false
listen: sshd-restart
- name: 🔄 Restart detected SSH service with diagnostics
ansible.builtin.include_tasks: restart_ssh_service.yml
when: sys_svc_sshd_service_unit | length > 0
listen: sshd-restart
- name: ⏭️ Skip SSH restart if no SSH service exists
ansible.builtin.debug:
msg: >-
Skip handler 'sshd-restart': neither sshd nor ssh service unit exists on this host.
when: sys_svc_sshd_service_unit | length == 0
listen: sshd-restart