16:38
This commit is contained in:
@@ -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('<none>') }}"
|
||||
- "Raw content: {{ rmq_requeue.content | default('<none>') }}"
|
||||
|
||||
- name: "NB preflight | Stop further tasks for this host"
|
||||
when:
|
||||
|
||||
Reference in New Issue
Block a user