This commit is contained in:
2025-11-05 09:00:38 +02:00
parent d6f26521eb
commit 06dc905932

View File

@@ -79,6 +79,34 @@
- "{{ (nb_preflight.stderr_lines | default(['<no stderr>'])) }}" - "{{ (nb_preflight.stderr_lines | default(['<no stderr>'])) }}"
- "raw stdout (joined): {{ nb_preflight.stdout | default('') | trim }}" - "raw stdout (joined): {{ nb_preflight.stdout | default('') | trim }}"
# --- Debug-only: capture the exact upgrade_cmd line and stop the play ---
- name: "NB preflight | Extract exact upgrade_cmd line"
when: nb_script.stat.exists
delegate_to: localhost
ansible.builtin.set_fact:
nb_upgrade_line: >-
{{
(
nb_preflight.stdout_lines | default([]) | map('regex_replace','\r','') | map('trim')
| select('match', '^NB:\s*upgrade_cmd\s*=')
| list | first
) | default('')
}}
- name: "NB preflight | Show captured upgrade_cmd line"
when: nb_script.stat.exists
delegate_to: localhost
ansible.builtin.debug:
msg:
- "upgrade_cmd line (exact): {{ nb_upgrade_line | default('<not found>') }}"
- "found? {{ (nb_upgrade_line | length) > 0 }}"
- name: "NB preflight | STOP here (temporary)"
meta: end_play
# --- Parse the OK line robustly (token-based) --- # --- Parse the OK line robustly (token-based) ---
- name: "NB preflight | Parse OK line (token)" - name: "NB preflight | Parse OK line (token)"
when: nb_script.stat.exists when: nb_script.stat.exists