09:00
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user