Update to 2021-02-18 12:00

master
Daniel Berteaud 4 years ago
parent 97215aadaa
commit ebacc2cb3b
  1. 4
      roles/graylog/defaults/main.yml
  2. 11
      roles/graylog/tasks/archive_pre.yml
  3. 2
      roles/graylog/templates/server.conf.j2

@ -1,8 +1,8 @@
---
graylog_version: 4.0.2
graylog_version: 4.0.3
graylog_archive_url: https://downloads.graylog.org/releases/graylog/graylog-{{ graylog_version }}.tgz
graylog_archive_sha1: 3c061569549bd5139634e20c8f5e0f922810927b
graylog_archive_sha1: aa0d1107880b647bdd6df88b788145d05c2d725e
graylog_root_dir: /opt/graylog
graylog_manage_upgrade: True

@ -14,5 +14,14 @@
tags: graylog
- name: Archive mongo database
command: mongodump --quiet --out {{ graylog_root_dir }}/archives/{{ graylog_current_version }}/mongo --uri {{ graylog_mongo_url[0] }}
shell: |
mongodump --quiet \
--out {{ graylog_root_dir }}/archives/{{ graylog_current_version }}/mongo \
--uri \
{% if graylog_mongo_pass is defined and graylog_mongo_pass != False and graylog_mongo_url | length == 1 %}
{% set url = graylog_mongo_url[0] %}
{{ url | urlsplit('scheme') }}://{{ graylog_mongo_user }}:{{ graylog_mongo_pass | urlencode | regex_replace('/','%2F') }}@{{ url | urlsplit('hostname') }}{% if url | urlsplit('port') %}:{{ url | urlsplit('port') }}{% endif %}{{ url | urlsplit('path') }}?{{ url | urlsplit('query') }}
{% else %}
{{ graylog_mongo_url[0] }}
{% endif %}
tags: graylog

@ -17,7 +17,7 @@ trusted_proxies = {% for host in graylog_http_src_ip %}{{ host }}{% if not host
elasticsearch_hosts = {{ graylog_es_hosts | join(',') }}
elasticsearch_cluster_name = {{ graylog_es_cluster_name | default('elasticsearch') }}
{% if graylog_mongo_pass is defined and graylog_mongo_pass != False and graylog_mongo_url | length == 1 %}
mongodb_uri = {% for url in graylog_mongo_url %}{{ url | urlsplit('scheme') }}://{{ graylog_mongo_user }}:{{ graylog_mongo_pass | urlencode | regex_replace('/','%2F') }}@{{ url | urlsplit('hostname') }}{% if url | urlsplit('port') %}:{{ url | urlsplit('port') }}{% endif %}{{ url | urlsplit('path') }}{{ url | urlsplit('query') }}{% if not loop.last %},{% endif %}
mongodb_uri = {% for url in graylog_mongo_url %}{{ url | urlsplit('scheme') }}://{{ graylog_mongo_user }}:{{ graylog_mongo_pass | urlencode | regex_replace('/','%2F') }}@{{ url | urlsplit('hostname') }}{% if url | urlsplit('port') %}:{{ url | urlsplit('port') }}{% endif %}{{ url | urlsplit('path') }}?{{ url | urlsplit('query') }}{% if not loop.last %},{% endif %}
{% endfor %}
{% else %}
mongodb_uri = {{ graylog_mongo_url | join(',') }}

Loading…
Cancel
Save