0827
This commit is contained in:
@@ -8,6 +8,14 @@
|
|||||||
vars:
|
vars:
|
||||||
pathprefix: "PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH; "
|
pathprefix: "PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH; "
|
||||||
|
|
||||||
|
rmq_host: "{{ lookup('env','RMQ_HOST') | default('10.210.12.2', true) }}"
|
||||||
|
rmq_port: "{{ lookup('env','RMQ_PORT') | default('15672', true) }}"
|
||||||
|
rmq_user: "{{ lookup('env','RMQ_USER') | default('admin', true) }}"
|
||||||
|
rmq_pass: "{{ lookup('env','RMQ_PASS') | default('change_me', true) }}"
|
||||||
|
rmq_vhost: "{{ lookup('env','RMQ_VHOST') | default('app', true) }}"
|
||||||
|
rmq_exchange: "{{ lookup('env','RMQ_EXCHANGE') | default('controls', true) }}"
|
||||||
|
control_queue: "{{ lookup('env','CONTROL_QUEUE') | default('queue_controls', true) }}"
|
||||||
|
|
||||||
dev1_user: "root"
|
dev1_user: "root"
|
||||||
dev1_pass: "wavewave"
|
dev1_pass: "wavewave"
|
||||||
|
|
||||||
@@ -865,6 +873,30 @@
|
|||||||
- "{{ cleanup_report }}"
|
- "{{ cleanup_report }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
|
- name: CASE A publish cumulative cleanup report journal
|
||||||
|
when: dhcp_migrated_ok | bool
|
||||||
|
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': 'journal_add',
|
||||||
|
'task_result': (cleanup_report | default(''))
|
||||||
|
} | to_json }}"
|
||||||
|
payload_encoding: "string"
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
|
||||||
post_tasks:
|
post_tasks:
|
||||||
- name: Cleanup note
|
- name: Cleanup note
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|||||||
Reference in New Issue
Block a user