Merge branch 'unstable' into stable
This commit is contained in:
commit
d1efb10484
|
@ -18,6 +18,11 @@ The **patch** part changes incrementally at each release.
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
|
## [9.3.1] - 2018-08-30
|
||||||
|
|
||||||
|
### Added
|
||||||
|
* metricbeat: new variables to configure elasticsearch hosts and auth
|
||||||
|
|
||||||
## [9.3.0] - 2018-08-24
|
## [9.3.0] - 2018-08-24
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -1,2 +1,7 @@
|
||||||
---
|
---
|
||||||
elastic_stack_version: "6.x"
|
elastic_stack_version: "6.x"
|
||||||
|
|
||||||
|
metricbeat_elasticsearch_hosts:
|
||||||
|
- "localhost:9200"
|
||||||
|
metricbeat_elasticsearch_auth_username: ""
|
||||||
|
metricbeat_elasticsearch_auth_password: ""
|
||||||
|
|
|
@ -39,3 +39,27 @@
|
||||||
systemd:
|
systemd:
|
||||||
name: metricbeat
|
name: metricbeat
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
|
||||||
|
- name: Metricbeat knows where to find Elasticsearch
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/metricbeat/metricbeat.yml
|
||||||
|
regexp: '^ hosts: .*'
|
||||||
|
line: " hosts: [\"{{ metricbeat_elasticsearch_hosts | join('\", \"') }}\"]"
|
||||||
|
insertafter: "output.elasticsearch:"
|
||||||
|
notify: restart metricbeat
|
||||||
|
when:
|
||||||
|
- metricbeat_elasticsearch_hosts
|
||||||
|
|
||||||
|
- name: Metricbeat auth/username for Elasticsearch are configured
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/metricbeat/metricbeat.yml
|
||||||
|
regexp: '{{ item.regexp }}'
|
||||||
|
line: '{{ item.line }}'
|
||||||
|
insertafter: "output.elasticsearch:"
|
||||||
|
with_items:
|
||||||
|
- { regexp: '^ #username: .*', line: ' username: "{{ metricbeat_elasticsearch_auth_username }}"' }
|
||||||
|
- { regexp: '^ #password: .*', line: ' password: "{{ metricbeat_elasticsearch_auth_password }}"' }
|
||||||
|
notify: restart metricbeat
|
||||||
|
when:
|
||||||
|
- metricbeat_elasticsearch_auth_username != ""
|
||||||
|
- metricbeat_elasticsearch_auth_password != ""
|
||||||
|
|
Loading…
Reference in a new issue