Authored by root

Split filebeat conf

... ... @@ -8,4 +8,7 @@
shell: nohup /usr/share/filebeat/bin/filebeat -c /etc/filebeat/filebeat-"{{ group }}".yml &
- name: restart filebeat
shell: ps aux|grep filebeat-"{{ group }}".yml|grep -v grep|head -n1|awk '{print $2}'|xargs -i kill -9 {} ; nohup /usr/share/filebeat/bin/filebeat -c /etc/filebeat/filebeat-"{{ group }}".yml &
shell: service filebeat stop;ps aux|grep filebeat-"{{ group }}".yml|grep -v grep|head -n1|awk '{print $2}'|xargs -i kill -9 {} ; nohup /usr/share/filebeat/bin/filebeat -c /etc/filebeat/filebeat-"{{ group }}".yml &
- name: restart filebeat
shell: service filebeat stop;ps aux|grep filebeat-base.yml|grep -v grep|head -n1|awk '{print $2}'|xargs -i kill -9 {} ; nohup /usr/share/filebeat/bin/filebeat -c /etc/filebeat/filebeat-base.yml &
... ...
... ... @@ -20,9 +20,12 @@
state: installed
update_cache: yes
#- name: stop current filebeat
# command: killall -9 fileabeat
# ignore_errors: True
- name: update filebeat base configuration file
template:
src: "base.yml"
dest: "/etc/filebeat/filebeat-base.yml"
notify:
- restart filebeat-base
- name: update filebeat configuration file
template:
... ...