1224
This commit is contained in:
@@ -1456,6 +1456,30 @@
|
||||
reboot_applied_cf: "{{ (dev2_reboot_sched is defined) and (dev2_reboot_sched.rc is defined) and ((dev2_reboot_sched.rc | int) == 0) }}"
|
||||
changed_when: false
|
||||
|
||||
- name: Scheduler mode set action_state waiting when reboot initiated
|
||||
when: is_run_by_effective == 'scheduler' and (reboot_applied_cf | default(false))
|
||||
delegate_to: localhost
|
||||
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: "{{ {
|
||||
'inscope_device': (ansible_hostname | default(inventory_hostname)),
|
||||
'task_name': 'custom_field_set',
|
||||
'task_add1': 'action_state',
|
||||
'task_result': 'waiting'
|
||||
} | to_json }}"
|
||||
|
||||
- name: Scheduler mode publish action_restart_timestamp custom field to control queue
|
||||
when: is_run_by_effective == 'scheduler' and (reboot_applied_cf | default(false))
|
||||
delegate_to: localhost
|
||||
|
||||
Reference in New Issue
Block a user