This commit is contained in:
2025-11-26 23:38:01 +02:00
parent cb671b3474
commit c91a28581d

View File

@@ -820,9 +820,8 @@
task_result: "indoor_hostname={{ indoor_hostname_value }}"
- name: Publish indoor_hostname custom field to control queue
when: indoor_hostname_payload is defined
delegate_to: localhost
ansible.builtin.uri:
uri:
url: "http://{{ rmq_host }}:{{ rmq_port }}/api/exchanges/{{ rmq_vhost|urlencode }}/{{ rmq_exchange|urlencode }}/publish"
method: POST
user: "{{ rmq_user }}"
@@ -836,14 +835,15 @@
properties:
content_type: "application/json"
routing_key: "{{ control_queue }}"
payload: "{{ indoor_hostname_payload | to_json }}"
payload: "{{ {
'inscope_device': (ansible_hostname | default(inventory_hostname)),
'task_name': 'custom_field_set',
'task_add1': 'indoor_hostname',
'task_result': indoor_hostname_value
} | to_json }}"
payload_encoding: "string"
register: rmq_indoor_hostname_resp
changed_when: (rmq_indoor_hostname_resp.json is defined) and (rmq_indoor_hostname_resp.json.routed | default(false) | bool)
failed_when: >
(rmq_indoor_hostname_resp.status != 200) or
(rmq_indoor_hostname_resp.json is not defined) or
(not (rmq_indoor_hostname_resp.json.routed | default(false) | bool))
changed_when: false
when: indoor_hostname_value is defined
- name: Build specific image marker path on DEV2 (/tmp/prepared_for_<image>)
ansible.builtin.set_fact: