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"
|
- name: "NB preflight | Publish delayed requeue (3s) and stop"
|
||||||
when:
|
when:
|
||||||
- nb_script.stat.exists
|
- nb_script.stat.exists
|
||||||
- nb_ip_changed | default(false)
|
- nb_ip_changed | default(false)
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
uri:
|
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
|
method: POST
|
||||||
user: "admin"
|
user: "admin"
|
||||||
password: "change_me"
|
password: "change_me"
|
||||||
force_basic_auth: true
|
force_basic_auth: true
|
||||||
status_code: 200
|
status_code: 200
|
||||||
|
return_content: yes # <-- make response body available
|
||||||
headers:
|
headers:
|
||||||
content-type: "application/json"
|
content-type: "application/json"
|
||||||
body_format: json
|
body_format: json
|
||||||
@@ -171,7 +171,11 @@
|
|||||||
- nb_ip_changed | default(false)
|
- nb_ip_changed | default(false)
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
ansible.builtin.debug:
|
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"
|
- name: "NB preflight | Stop further tasks for this host"
|
||||||
when:
|
when:
|
||||||
|
|||||||
Reference in New Issue
Block a user