Skip to content
Snippets Groups Projects
Commit 3c6da980 authored by Alexander Käb's avatar Alexander Käb
Browse files

feat: provide way to add tags to sidecar.yml and implement workaround symlink

parent 9296dfd8
Branches master
No related tags found
No related merge requests found
...@@ -24,6 +24,12 @@ graylog_sidecar_server_url: ...@@ -24,6 +24,12 @@ graylog_sidecar_server_url:
graylog_sidecar_server_api_token: graylog_sidecar_server_api_token:
``` ```
## Auto fetch configs
You can specify a list of tags that will be used to auto fetch configs from the graylog
server. To do so add the `config_tags` variable and provide a list of tags for which the
configs should be pulled by the sidecar.
## Node Certificates ## Node Certificates
For node certificates to be generated you will need to create an additional host group For node certificates to be generated you will need to create an additional host group
...@@ -38,7 +44,7 @@ via a host group called `graylog-nodes`. ...@@ -38,7 +44,7 @@ via a host group called `graylog-nodes`.
You may also use a completely separate host to store the CA files for Graylog and the You may also use a completely separate host to store the CA files for Graylog and the
Sidecar service. If this is the case, you need to set the `use_central_ca_host` variable Sidecar service. If this is the case, you need to set the `use_central_ca_host` variable
to `true` and provide a host group called `ca-store`. The other groups mentioned earlier to `true` and provide a host group called `ca-store`. The other groups mentioned earlier
may be omitted. **need to be omitted**.
The log node CA file must be available at: `/etc/graylog/graylog-ca.pem` The log node CA file must be available at: `/etc/graylog/graylog-ca.pem`
The sidecar CA file must be available at: `/etc/graylog/sidecar/sidecar-ca.pem` The sidecar CA file must be available at: `/etc/graylog/sidecar/sidecar-ca.pem`
......
...@@ -79,6 +79,29 @@ ...@@ -79,6 +79,29 @@
changed_when: false changed_when: false
become: true become: true
- name: Create Workaround Symlink for filebeat when version >= '1.5.0'
when: sidecar_version is version('1.5.0', 'ge')
become: true
block:
- name: Create Workaround Symlink | Ensure directories exist
ansible.builtin.file:
path: '/usr/share/filebeat/bin/'
state: directory
mode: '0755'
- name: Create Workaround Symlink | Check if old filebeat version exists
ansible.builtin.stat:
path: '/usr/share/filebeat/bin/filebeat'
register: filebeat_bin
- name: Create Workaround Symlink | Create Symlink if required
when: not filebeat_bin.stat.exists
ansible.builtin.file:
src: '/usr/lib/graylog-sidecar/filebeat'
dest: '/usr/share/filebeat/bin/filebeat'
state: link
- name: Enable / start sidecar service - name: Enable / start sidecar service
ansible.builtin.service: ansible.builtin.service:
name: graylog-sidecar name: graylog-sidecar
......
...@@ -3,3 +3,10 @@ ...@@ -3,3 +3,10 @@
server_url: {{ graylog_sidecar_server_url }} server_url: {{ graylog_sidecar_server_url }}
server_api_token: {{ graylog_sidecar_server_api_token }} server_api_token: {{ graylog_sidecar_server_api_token }}
node_id: {{ graylog_sidecar_node_id }} node_id: {{ graylog_sidecar_node_id }}
{% if config_tags is not none and config_tags | length > 0 %}
tags:
{% for tag in config_tags %}
- {{ tag }}
{% endfor %}
{% endif %}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment