This commit is contained in:
2026-04-01 17:20:53 +03:00
parent ffed1c1915
commit 42afc7086c

View File

@@ -1310,31 +1310,26 @@
when: not (_blocked | default(false)) and (_write_success | bool)
delegate_to: localhost
- name: Publish sot-updater-scheduler payload to control queue
ansible.builtin.uri:
url: "http://{{ rmq_host }}:{{ rmq_port }}/api/exchanges/{{ rmq_vhost | urlencode }}/{{ rmq_exchange | urlencode }}/publish"
method: POST
user: "{{ rmq_user }}"
password: "{{ rmq_pass }}"
force_basic_auth: true
status_code: 200
headers:
content-type: "application/json"
body_format: json
body:
properties:
content_type: "application/json"
routing_key: "{{ control_queue }}"
payload: "{{ sot_updater_scheduler_payload | to_json }}"
payload_encoding: "string"
register: rmq_sot_updater_scheduler_resp
changed_when: (rmq_sot_updater_scheduler_resp.json is defined) and (rmq_sot_updater_scheduler_resp.json.routed | default(false) | bool)
failed_when: >
(rmq_sot_updater_scheduler_resp.status != 200) or
(rmq_sot_updater_scheduler_resp.json is not defined) or
(not (rmq_sot_updater_scheduler_resp.json.routed | default(false) | bool))
when: sot_updater_scheduler_payload is defined
delegate_to: localhost
- name: Publish sot-updater-scheduler payload to deviceconfig
when: sot_updater_payload is defined
delegate_to: localhost
ansible.builtin.uri:
url: "http://{{ rmq_host }}:{{ rmq_port }}/api/exchanges/{{ rmq_vhost | urlencode }}/{{ 'deviceconfig' | urlencode }}/publish"
method: POST
user: "{{ rmq_user }}"
password: "{{ rmq_pass }}"
force_basic_auth: true
status_code: 200
headers:
content-type: "application/json"
body_format: json
body:
properties:
content_type: "application/json"
routing_key: "deviceconfig"
payload: "{{ sot_updater_payload | to_json }}"
payload_encoding: "string"
changed_when: false
# ---------------------------- Final operator summary (one-liners) ----------------------------
- name: Summary key outcomes (one-liners)