pve-cluster: when-Listen in Anführungszeichen (YAML-Flow-Sequenz)
ci / test (push) Successful in 26s

This commit is contained in:
Robert Rapp
2026-10-13 17:05:43 +02:00
parent 81602373fc
commit d9b2539dea
4 changed files with 55 additions and 19 deletions
@@ -1,15 +1,19 @@
# file_sd-Ziele der GPU-VMs. Auch einzeln aufrufbar: playbooks/monitoring-targets.yml
# file_sd-Ziele der GPU-VMs (node, gpu, llamacpp). Auch einzeln aufrufbar: playbooks/monitoring-targets.yml
# (nach refresh-vm-access.sh, wenn sich DHCP-Adressen geändert haben). Prometheus liest die Dateien selbst neu.
- name: file_sd-Ziele aus tofu output erzeugen (auf ops)
ansible.builtin.shell: |
set -euo pipefail
tofu output -json gpu_vms | python3 {{ infra_repo_src }}/platform/proxmox/scripts/monitoring-targets.py \
--registry {{ infra_repo_src }}/sites/{{ knaster_site }}/registry.yaml --out {{ infra_targets_dir }}
--registry {{ infra_repo_src }}/sites/{{ knaster_site }}/registry.yaml --out {{ infra_targets_dir }} \
--llamacpp '{{ dict(_llamacpp_hosts | zip(_llamacpp_hosts | map('extract', hostvars, 'llamacpp_profiles'))) | to_json }}'
args:
chdir: "{{ infra_tofu_dir }}"
executable: /bin/bash
delegate_to: localhost
run_once: true
vars:
# Profile je VM aus dem Inventar (Gruppe gpu_llamacpp, Task 6.1)
_llamacpp_hosts: "{{ groups['gpu_llamacpp'] | default([]) }}"
changed_when: false
- name: file_sd-Verzeichnis
@@ -23,4 +27,4 @@
src: "{{ infra_targets_dir }}/{{ item }}.json"
dest: "{{ infra_state_dir }}/file_sd/{{ item }}.json"
mode: "0644"
loop: [node, gpu]
loop: [node, gpu, llamacpp]