Sai Sindhur Malleni fbf309baee Add common logging with filebeat
This commit
1. Provides a playbook to install the filebeat agent on all
   undercloud/overcloud nodes
2. Provides another playbook that adds the browbeat uuid to the
   filebeat config file and starts filebeat during browbeat run
3. Corresponding changes in browbeat.py and browbeat/tools.py
   to run the playbook to insert custom browbeat uuid in the
   filebeat configuration.

Change-Id: Idd2efaf931f4ff581db715a04adef738f81d281c
2020-04-03 19:27:24 +00:00

16 lines
385 B
YAML

- name: check if filebeat config is present
stat:
path: /etc/filebeat/filebeat.yml
register: filebeat_config
- name: insert browbeat uuid
lineinfile:
path: /etc/filebeat/filebeat.yml
regexp: '^\s+browbeat_uuid'
line: ' browbeat_uuid: "{{browbeat_uuid}}"'
become: true
when: filebeat_config.stat.exists
notify:
- restart filebeat
- stop filebeat