This commit is contained in:
2026-04-01 17:39:21 +03:00
parent 013c22bfa4
commit 1b3604c95a

View File

@@ -1310,8 +1310,17 @@
when: not (_blocked | default(false)) and (_write_success | bool)
delegate_to: localhost
# ---------------------------- Success follow-up scheduling ----------------------------
- name: Build sot-updater-scheduler payload after successful backup preparation
ansible.builtin.set_fact:
sot_updater_scheduler_payload:
inscope_device: "{{ ansible_hostname | default(inventory_hostname) }}"
task_name: "sot-updater-scheduler"
when: not (_blocked | default(false)) and (_write_success | bool)
delegate_to: localhost
- name: Publish sot-updater-scheduler payload to deviceconfig
when: sot_updater_payload is defined
when: sot_updater_scheduler_payload is defined
delegate_to: localhost
ansible.builtin.uri:
url: "http://{{ rmq_host }}:{{ rmq_port }}/api/exchanges/{{ rmq_vhost | urlencode }}/{{ 'deviceconfig' | urlencode }}/publish"
@@ -1327,7 +1336,7 @@
properties:
content_type: "application/json"
routing_key: "deviceconfig"
payload: "{{ sot_updater_payload | to_json }}"
payload: "{{ sot_updater_scheduler_payload | to_json }}"
payload_encoding: "string"
changed_when: false