browbeat/ansible/oooq/roles/browbeat-classify/tasks/main.yml
agopi c155f578ab Updated bml pointer and branch
Browbeat-ML has been fixed to run with elastic5 and
also to store log_summaries
Change-Id: I90cfd5a86c86f9b55a04eab043024954c21a8bdf
2018-04-06 16:24:09 -04:00

28 lines
1003 B
YAML

---
- name: Copy bash file
copy:
src: uuid_extract.sh
dest: /tmp
- name: Parse uuid from variable
shell: "sh /tmp/uuid_extract.sh {{ ansible_env.HOME }}/browbeat/log/debug.log"
register: browbeat_uuid
- name: Clone and Install Browbeat-ML dependencies
pip:
name: "git+https://github.com/aakarshg/Browbeat-ML.git@elastic5#egg=bml"
virtualenv: "{{ ansible_env.HOME }}/browbeat-venv"
- name: Run Browbeat-ML on uuid
shell: "source {{ ansible_env.HOME }}/browbeat-venv/bin/activate; bml --summary-uuid {{browbeat_uuid.stdout}} --update-db True "
register: browbeatml_summary
- debug: msg="{{ browbeatml_summary.stdout_lines }}"
- name: Upload timeseries data summaries to cockroach db
shell: "source {{ ansible_env.HOME }}/browbeat-venv/bin/activate; bml --upload-timesummary {{browbeat_uuid.stdout}}"
- name: Upload log data summaries to cockroach db
shell: "source {{ ansible_env.HOME }}/browbeat-venv/bin/activate; bml --upload-logsummary {{browbeat_uuid.stdout}}"