diff --git a/files/ansible-playbooks/afterupgrade_check.yml b/files/ansible-playbooks/afterupgrade_check.yml index 91e7764..941d6a2 100644 --- a/files/ansible-playbooks/afterupgrade_check.yml +++ b/files/ansible-playbooks/afterupgrade_check.yml @@ -37,6 +37,14 @@ target_version: "{{ target_version | default('') }}" # preserve the original string verbatim for all subsequent retries target_version_full: "{{ target_version | default('') }}" + is_run_by_effective: "{{ is_run_by | default('manual') }}" + + + - name: Debug is_run_by mode + ansible.builtin.debug: + msg: + - "is_run_by={{ is_run_by | default('UNSET') }}" + - "is_run_by_effective={{ is_run_by_effective }}" - name: Derive effective target version (avoid extra-var masking) ansible.builtin.set_fact: diff --git a/files/ansible-playbooks/update-rebootin224.yml b/files/ansible-playbooks/update-rebootin224.yml index 5e802de..ea89495 100644 --- a/files/ansible-playbooks/update-rebootin224.yml +++ b/files/ansible-playbooks/update-rebootin224.yml @@ -793,6 +793,7 @@ correlation_id: "{{ au_correlation_id }}" original_emitted_at: "{{ au_original_emitted_at }}" schema_version: 1 + is_run_by: "{{ is_run_by_effective }}" when: nbq2_payload_obj is defined delegate_to: localhost diff --git a/files/rabbit-client.sh b/files/rabbit-client.sh index ea409e1..15a0009 100644 --- a/files/rabbit-client.sh +++ b/files/rabbit-client.sh @@ -78,6 +78,7 @@ dispatch_task() { target_ver="$(jq -r '.target_version // ""' <<<"$json")" tv_full="$(jq -r '.target_version_full // ""' <<<"$json")" schema="$(jq -r '.schema_version // ""' <<<"$json")" + is_run_by="$(jq -r '.is_run_by // ""' <<<"$json")" # Backfill target_version from target_version_full if missing (e.g., fox200-2.2.1-r6801.bin → 2.2.1-r6801) if [[ -z "$target_ver" && -n "$tv_full" ]]; then @@ -96,6 +97,7 @@ dispatch_task() { task_options+=" -e target_version='$(esc "$target_ver")'" task_options+=" -e target_version_full='$(esc "$tv_full")'" task_options+=" -e schema_version='$(esc "$schema")'" + task_options+=" -e is_run_by='$(esc "$is_run_by")'" fi