diff --git a/files/ansible-playbooks/sot-updater.yml b/files/ansible-playbooks/sot-updater.yml index c55c3a6..621f2fe 100644 --- a/files/ansible-playbooks/sot-updater.yml +++ b/files/ansible-playbooks/sot-updater.yml @@ -137,19 +137,19 @@ - # --- If IP changed → publish a 3s delayed 'sot-updater' task and stop this host --- - name: "NB preflight | Publish delayed requeue (3s) and stop" when: - nb_script.stat.exists - nb_ip_changed | default(false) delegate_to: localhost uri: - url: "http://localhost:15672/api/exchanges/app/deviceconfig.delayed/publish" + url: "http://{{ rmq_host }}:{{ rmq_port }}/api/exchanges/app/deviceconfig.delayed/publish" method: POST user: "admin" password: "change_me" force_basic_auth: true status_code: 200 + return_content: yes # <-- make response body available headers: content-type: "application/json" body_format: json @@ -171,7 +171,11 @@ - nb_ip_changed | default(false) delegate_to: localhost ansible.builtin.debug: - var: rmq_requeue.json + msg: + - "RMQ publish URL: http://{{ rmq_host }}:{{ rmq_port }}/api/exchanges/app/deviceconfig.delayed/publish" + - "HTTP status: {{ rmq_requeue.status | default('unknown') }}" + - "Parsed JSON: {{ rmq_requeue.json | default('') }}" + - "Raw content: {{ rmq_requeue.content | default('') }}" - name: "NB preflight | Stop further tasks for this host" when: