Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate new packaging into the role and usage of bundled openjdk #195

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ graylog_web_thread_pool_size: 16
# JVM
graylog_gc_warning_threshold: "1s"
graylog_server_heap_size: "1500m"
graylog_server_java: "/usr/bin/java"
graylog_server_java: "/usr/bin/java" # For usage of the bundled openjdk version within graylog leave varviable blank
graylog_server_java_opts_extra: ""
graylog_server_java_opts: "-Djava.net.preferIPv4Stack=true -Xms{{ graylog_server_heap_size }} -Xmx{{ graylog_server_heap_size }} -XX:NewRatio=1 -server -XX:+ResizeTLAB -XX:-OmitStackTraceInFastThrow {{graylog_server_java_opts_extra}}"
graylog_server_args: ""
Expand All @@ -202,11 +202,19 @@ graylog_install_java: True
# Disable steps which break tests
graylog_not_testing: True

# Plugins
# Plugins for Graylog Versions <5.0
graylog_install_enterprise_plugins: False
graylog_install_integrations_plugins: False
graylog_install_enterprise_integrations_plugins: False

# package version for Graylog Version >=5.0
graylog_install_enterprise_package: False
graylog_install_open_package: True

# Graylog Version to install
graylog_version: 5.0
graylog_full_version: ""

graylog_additional_config: {}

required_vars:
Expand Down
15 changes: 15 additions & 0 deletions tasks/setup-Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@
apt:
name: "graylog-server{% if graylog_full_version is defined %}={{ graylog_full_version }}{% endif %}"
state: "{{ graylog_package_state }}"
when: (graylog_install_enterprise_package | bool == false and graylog_version is version('5.0', '<'))
notify: "restart graylog-server"

- name: "Graylog Open server package should be installed"
apt:
name: "graylog-server{% if graylog_full_version is defined %}={{ graylog_full_version }}{% endif %}"
state: "{{ graylog_package_state }}"
when: (graylog_install_enterprise_package | bool == false and graylog_version is version('5.0', '>='))
notify: "restart graylog-server"

- name: "Graylog Enterprise server package should be installed"
apt:
name: "graylog-enterprise{% if graylog_full_version is defined %}={{ graylog_full_version }}{% endif %}"
state: "{{ graylog_package_state }}"
when: (graylog_install_enterprise_package | bool == true and graylog_version is version('5.0', '>='))
notify: "restart graylog-server"

- name: "setup-Debian.yml | Set elasticsearch priority to {{ graylog_es_debian_pin_version }} apt_preferences"
Expand Down
17 changes: 16 additions & 1 deletion tasks/setup-RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,22 @@
yum:
name: "graylog-server{% if graylog_full_version is defined %}-{{ graylog_full_version }}{% endif %}"
state: "{{ graylog_package_state }}"
notify: restart graylog-server
when: (graylog_install_enterprise_package | bool == false and graylog_version is version('5.0', '<'))
notify: "restart graylog-server"

- name: "Graylog Open server package should be installed"
yum:
name: "graylog-server{% if graylog_full_version is defined %}-{{ graylog_full_version }}{% endif %}"
state: "{{ graylog_package_state }}"
when: (graylog_install_enterprise_package | bool == false and graylog_version is version('5.0', '>='))
notify: "restart graylog-server"

- name: "Graylog Enterprise server package should be installed"
yum:
name: "graylog-enterprise{% if graylog_full_version is defined %}-{{ graylog_full_version }}{% endif %}"
state: "{{ graylog_package_state }}"
when: (graylog_install_enterprise_package | bool == true and graylog_version is version('5.0', '>='))
notify: "restart graylog-server"

- name: "Installing graylog-enterprise-plugins"
yum:
Expand Down
2 changes: 2 additions & 0 deletions templates/graylog.server.default.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% if graylog_server_java is defined and graylog_server_java|length %}
JAVA="{{ graylog_server_java }}"
{% endif %}
GRAYLOG_SERVER_JAVA_OPTS="{{ graylog_server_java_opts }}"
GRAYLOG_SERVER_ARGS="{{ graylog_server_args }}"
GRAYLOG_COMMAND_WRAPPER="{{ graylog_server_wrapper }}"