Filebeat: remove the Kibana dashboard install
This commit is contained in:
parent
5db6f786ff
commit
986cdcc836
2 changed files with 19 additions and 7 deletions
|
@ -8,5 +8,4 @@ Everything is in the `tasks/main.yml` file.
|
|||
|
||||
## Available variables
|
||||
|
||||
* `filebeat_kibana_dashboards`: import dashboards in Kibana (defaults to false).
|
||||
* `filebeat_logstash_plugin`: install Logstash plugin (defaults to false);
|
||||
|
|
|
@ -13,16 +13,29 @@
|
|||
name: filebeat
|
||||
enabled: yes
|
||||
|
||||
- name: Kibana dashboards are imported
|
||||
command: /usr/share/filebeat/scripts/import_dashboards
|
||||
failed_when: '"fail" in stdout'
|
||||
when: filebeat_kibana_dashboards
|
||||
# - name: Kibana dashboards are imported
|
||||
# command: /usr/share/filebeat/scripts/import_dashboards
|
||||
# when: filebeat_kibana_dashboards
|
||||
|
||||
- name: is logstash-plugin available?
|
||||
stat:
|
||||
path: /usr/share/logstash/bin/logstash-plugin
|
||||
register: logstash_plugin
|
||||
|
||||
- name: Logstash plugin is installed
|
||||
command: /usr/share/logstash/bin/logstash-plugin install logstash-input-beats
|
||||
- name: is logstash-input-beats installed?
|
||||
shell: grep logstash-input-beats /usr/share/logstash/Gemfile
|
||||
register: logstash_plugin_installed
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
when: filebeat_logstash_plugin and logstash_plugin.stat.exists
|
||||
|
||||
- block:
|
||||
- name: /usr is mounted as "rw"
|
||||
command: mount -oremount,rw /usr
|
||||
|
||||
- name: Logstash plugin is installed
|
||||
command: /usr/share/logstash/bin/logstash-plugin install logstash-input-beats
|
||||
|
||||
- name: /usr is remounted
|
||||
command: mount -oremount /usr
|
||||
when: filebeat_logstash_plugin and logstash_plugin.stat.exists and not logstash_plugin_installed | success
|
||||
|
|
Loading…
Reference in a new issue