From b1fdb8c7d9fb64393220f4f96fa91656dbc23734 Mon Sep 17 00:00:00 2001 From: xtruthx Date: Mon, 24 Apr 2023 14:19:58 +0200 Subject: [PATCH 01/22] make usage of bundled openjdk possible by choice --- templates/graylog.server.default.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/graylog.server.default.j2 b/templates/graylog.server.default.j2 index bda3fdf..4cdb915 100644 --- a/templates/graylog.server.default.j2 +++ b/templates/graylog.server.default.j2 @@ -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 }}" From 32c90757cce12aef69cd8440cf0d0750fadc4e8c Mon Sep 17 00:00:00 2001 From: xtruthx Date: Mon, 24 Apr 2023 14:32:33 +0200 Subject: [PATCH 02/22] add installation methods for new graylog packaging up to version 5.x with open and enterprise package --- defaults/main.yml | 12 ++++++++++-- tasks/setup-Debian.yml | 15 +++++++++++++++ tasks/setup-RedHat.yml | 17 ++++++++++++++++- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 3e033f9..c8814e0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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: "" @@ -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: diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index 3ecebf5..5981204 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -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" diff --git a/tasks/setup-RedHat.yml b/tasks/setup-RedHat.yml index 8d44a23..b2dd4c6 100644 --- a/tasks/setup-RedHat.yml +++ b/tasks/setup-RedHat.yml @@ -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: From dde428295225e4cfd2587b11284a712fd9856ef3 Mon Sep 17 00:00:00 2001 From: etgraylog Date: Wed, 8 Jan 2025 11:35:00 -0500 Subject: [PATCH 03/22] Refine conditionals to check both vars relevant to package type. --- tasks/setup-Debian.yml | 4 ++-- tasks/setup-RedHat.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index 5981204..d9ea1e9 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -35,14 +35,14 @@ 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', '>=')) + when: (graylog_install_open_package | bool == true and 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', '>=')) + when: (graylog_install_open_package | bool == false and 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" diff --git a/tasks/setup-RedHat.yml b/tasks/setup-RedHat.yml index b2dd4c6..b5f5a39 100644 --- a/tasks/setup-RedHat.yml +++ b/tasks/setup-RedHat.yml @@ -19,14 +19,14 @@ 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', '>=')) + when: (graylog_install_open_package | bool == true and 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', '>=')) + when: (graylog_install_open_package | bool == false and graylog_install_enterprise_package | bool == true and graylog_version is version('5.0', '>=')) notify: "restart graylog-server" - name: "Installing graylog-enterprise-plugins" From 1d15fc6f29015980a6c648232aad2720c6f0ff64 Mon Sep 17 00:00:00 2001 From: etgraylog Date: Wed, 8 Jan 2025 11:35:59 -0500 Subject: [PATCH 04/22] Refine conditionals insure plug-ins only installed when ver < 5.0. --- tasks/setup-Debian.yml | 6 +++--- tasks/setup-RedHat.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index d9ea1e9..72387fd 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -56,19 +56,19 @@ apt: name: "graylog-enterprise-plugins{% if graylog_full_version is defined %}={{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" - when: graylog_install_enterprise_plugins + when: (graylog_install_enterprise_plugins | bool == true and graylog_version is version('5.0', '<')) notify: restart graylog-server - name: "Installing graylog-integrations-plugins" apt: name: "graylog-integrations-plugins{% if graylog_full_version is defined %}={{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" - when: graylog_install_integrations_plugins + when: (graylog_install_integrations_plugins | bool == true and graylog_version is version('5.0', '<')) notify: restart graylog-server - name: "Installing graylog-enterprise-integrations-plugins" apt: name: "graylog-enterprise-integrations-plugins{% if graylog_full_version is defined %}={{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" - when: graylog_install_enterprise_integrations_plugins + when: (graylog_install_enterprise_integrations_plugins | bool == true and graylog_version is version('5.0', '<')) notify: restart graylog-server diff --git a/tasks/setup-RedHat.yml b/tasks/setup-RedHat.yml index b5f5a39..51b0281 100644 --- a/tasks/setup-RedHat.yml +++ b/tasks/setup-RedHat.yml @@ -33,19 +33,19 @@ yum: name: "graylog-enterprise-plugins{% if graylog_full_version is defined %}-{{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" - when: graylog_install_enterprise_plugins + when: (graylog_install_enterprise_plugins | bool == true and graylog_version is version('5.0', '<')) notify: restart graylog-server - name: "Installing graylog-integrations-plugins" yum: name: "graylog-integrations-plugins{% if graylog_full_version is defined %}-{{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" - when: graylog_install_integrations_plugins + when: (graylog_install_integrations_plugins | bool == true and graylog_version is version('5.0', '<')) notify: restart graylog-server - name: "Installing graylog-enterprise-integrations-plugins" yum: name: "graylog-enterprise-integrations-plugins{% if graylog_full_version is defined %}-{{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" - when: graylog_install_enterprise_integrations_plugins + when: (graylog_install_enterprise_integrations_plugins | bool == true and graylog_version is version('5.0', '<')) notify: restart graylog-server From bf77d53bee243c5c1498159d41fdf2ca20d2fddc Mon Sep 17 00:00:00 2001 From: etgraylog Date: Wed, 8 Jan 2025 13:21:28 -0500 Subject: [PATCH 05/22] Define PyYAML==5.3.1 to avoid compat issue with 5.4.1 and cython_sources --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 8a1110d..ccddf0c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,6 +7,7 @@ molecule-docker==1.0.2 molecule-vagrant==0.6 python-vagrant==0.5.15 pytest-testinfra==6.1.0 +PyYAML==5.3.1 selenium==3.141.0 yamllint==1.25.0 webdriver-manager From 76239265168b97b5065a88b40428cd1ff5eea757 Mon Sep 17 00:00:00 2001 From: etgraylog Date: Thu, 9 Jan 2025 13:52:46 -0500 Subject: [PATCH 06/22] Remove unnecessary conditional when graylog_version is < 5.0, graylog_install_enterprise_package does not apply in that case. --- tasks/setup-Debian.yml | 2 +- tasks/setup-RedHat.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index 72387fd..130e772 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -28,7 +28,7 @@ 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', '<')) + when: graylog_version is version('5.0', '<') notify: "restart graylog-server" - name: "Graylog Open server package should be installed" diff --git a/tasks/setup-RedHat.yml b/tasks/setup-RedHat.yml index 51b0281..2dedad4 100644 --- a/tasks/setup-RedHat.yml +++ b/tasks/setup-RedHat.yml @@ -12,7 +12,7 @@ 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', '<')) + when: graylog_version is version('5.0', '<') notify: "restart graylog-server" - name: "Graylog Open server package should be installed" From c787398f0fa0a5dfcfc48ca3b5814c529ec93376 Mon Sep 17 00:00:00 2001 From: etgraylog Date: Thu, 9 Jan 2025 13:54:19 -0500 Subject: [PATCH 07/22] Enhance conditionals to avoid failure from graylog_full_version being defined without a value. --- tasks/setup-Debian.yml | 12 ++++++------ tasks/setup-RedHat.yml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index 130e772..e110e81 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -26,21 +26,21 @@ - name: "Graylog server package should be installed" apt: - name: "graylog-server{% if graylog_full_version is defined %}={{ graylog_full_version }}{% endif %}" + name: "graylog-server{% if graylog_full_version is not none and graylog_full_version | length > 1 %}={{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" when: 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 %}" + name: "graylog-server{% if graylog_full_version is not none and graylog_full_version | length > 1 %}={{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" when: (graylog_install_open_package | bool == true and 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 %}" + name: "graylog-enterprise{% if graylog_full_version is not none and graylog_full_version | length > 1 %}={{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" when: (graylog_install_open_package | bool == false and graylog_install_enterprise_package | bool == true and graylog_version is version('5.0', '>=')) notify: "restart graylog-server" @@ -54,21 +54,21 @@ - name: "Installing graylog-enterprise-plugins" apt: - name: "graylog-enterprise-plugins{% if graylog_full_version is defined %}={{ graylog_full_version }}{% endif %}" + name: "graylog-enterprise-plugins{% if graylog_full_version is not none and graylog_full_version | length > 1 %}={{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" when: (graylog_install_enterprise_plugins | bool == true and graylog_version is version('5.0', '<')) notify: restart graylog-server - name: "Installing graylog-integrations-plugins" apt: - name: "graylog-integrations-plugins{% if graylog_full_version is defined %}={{ graylog_full_version }}{% endif %}" + name: "graylog-integrations-plugins{% if graylog_full_version is not none and graylog_full_version | length > 1 %}={{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" when: (graylog_install_integrations_plugins | bool == true and graylog_version is version('5.0', '<')) notify: restart graylog-server - name: "Installing graylog-enterprise-integrations-plugins" apt: - name: "graylog-enterprise-integrations-plugins{% if graylog_full_version is defined %}={{ graylog_full_version }}{% endif %}" + name: "graylog-enterprise-integrations-plugins{% if graylog_full_version is not none and graylog_full_version | length > 1 %}={{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" when: (graylog_install_enterprise_integrations_plugins | bool == true and graylog_version is version('5.0', '<')) notify: restart graylog-server diff --git a/tasks/setup-RedHat.yml b/tasks/setup-RedHat.yml index 2dedad4..75fe48d 100644 --- a/tasks/setup-RedHat.yml +++ b/tasks/setup-RedHat.yml @@ -10,42 +10,42 @@ - name: "Graylog server should be installed" yum: - name: "graylog-server{% if graylog_full_version is defined %}-{{ graylog_full_version }}{% endif %}" + name: "graylog-server{% if graylog_full_version is not none and graylog_full_version | length > 1 %}-{{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" when: 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 %}" + name: "graylog-server{% if graylog_full_version is not none and graylog_full_version | length > 1 %}-{{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" when: (graylog_install_open_package | bool == true and 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 %}" + name: "graylog-enterprise{% if graylog_full_version is not none and graylog_full_version | length > 1 %}-{{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" when: (graylog_install_open_package | bool == false and graylog_install_enterprise_package | bool == true and graylog_version is version('5.0', '>=')) notify: "restart graylog-server" - name: "Installing graylog-enterprise-plugins" yum: - name: "graylog-enterprise-plugins{% if graylog_full_version is defined %}-{{ graylog_full_version }}{% endif %}" + name: "graylog-enterprise-plugins{% if graylog_full_version is not none and graylog_full_version | length > 1 %}-{{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" when: (graylog_install_enterprise_plugins | bool == true and graylog_version is version('5.0', '<')) notify: restart graylog-server - name: "Installing graylog-integrations-plugins" yum: - name: "graylog-integrations-plugins{% if graylog_full_version is defined %}-{{ graylog_full_version }}{% endif %}" + name: "graylog-integrations-plugins{% if graylog_full_version is not none and graylog_full_version | length > 1 %}-{{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" when: (graylog_install_integrations_plugins | bool == true and graylog_version is version('5.0', '<')) notify: restart graylog-server - name: "Installing graylog-enterprise-integrations-plugins" yum: - name: "graylog-enterprise-integrations-plugins{% if graylog_full_version is defined %}-{{ graylog_full_version }}{% endif %}" + name: "graylog-enterprise-integrations-plugins{% if graylog_full_version is not none and graylog_full_version | length > 1 %}-{{ graylog_full_version }}{% endif %}" state: "{{ graylog_package_state }}" when: (graylog_install_enterprise_integrations_plugins | bool == true and graylog_version is version('5.0', '<')) notify: restart graylog-server From 4bbd0aaf576584d0ff1e46a681d14a6d9edd1362 Mon Sep 17 00:00:00 2001 From: etgraylog Date: Thu, 9 Jan 2025 14:04:07 -0500 Subject: [PATCH 08/22] Project currently requires Python 3.9.17 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85dfe10..aa5a24a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,10 @@ jobs: with: path: 'graylog2.graylog-ansible-role' - - name: Set up Python 3. + - name: Set up Python 3.9.17 uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: '3.9.17' - name: Install test dependencies. run: pip3 install yamllint @@ -49,7 +49,7 @@ jobs: - name: Set up Python 3. uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: '3.9.17' - name: Install test dependencies. run: pip3 install -r requirements.txt From 0b902a0cd8d5b138d1bd0a40d626a4aa570da48f Mon Sep 17 00:00:00 2001 From: etgraylog Date: Thu, 9 Jan 2025 14:07:27 -0500 Subject: [PATCH 09/22] Fix invalid value for python-version --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa5a24a..65a2cc6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,10 @@ jobs: with: path: 'graylog2.graylog-ansible-role' - - name: Set up Python 3.9.17 + - name: Set up Python 3.9 uses: actions/setup-python@v2 with: - python-version: '3.9.17' + python-version: '3.9' - name: Install test dependencies. run: pip3 install yamllint @@ -49,7 +49,7 @@ jobs: - name: Set up Python 3. uses: actions/setup-python@v2 with: - python-version: '3.9.17' + python-version: '3.9' - name: Install test dependencies. run: pip3 install -r requirements.txt From 272d8ec17d5e642c5e8d5d0c8cdb37076d407fae Mon Sep 17 00:00:00 2001 From: etgraylog Date: Thu, 9 Jan 2025 14:38:36 -0500 Subject: [PATCH 10/22] 1st attempt to packaging issue with ansible==4.2.0 --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65a2cc6..ee8e3d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,6 +54,9 @@ jobs: - name: Install test dependencies. run: pip3 install -r requirements.txt + - name: Install ansible 4.2.0 to work-around packaging issue (issue-2904) + run: pip3 install --force 'ansible==4.2.0' + - name: Run Molecule tests. run: molecule test --scenario-name=ci env: From c2c03e9ac3cc2cca4a7cea62055c3b56e2fd140d Mon Sep 17 00:00:00 2001 From: etgraylog Date: Mon, 13 Jan 2025 01:39:59 -0500 Subject: [PATCH 11/22] Bump ansible from 2.11 to 2.13.13 --- requirements.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index ccddf0c..0d7f8d5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ -ansible==4.2.0 -ansible-base==2.10.5 +ansible==6.7.0 +ansible-compat==24.5.1 +ansible-core==2.13.13 ansible-lint==4.3.5 enrich==1.2.6 molecule==3.5.1 From 952ec70446efd2fa1468ede3c848e57b60cb1cc8 Mon Sep 17 00:00:00 2001 From: etgraylog Date: Mon, 13 Jan 2025 01:41:14 -0500 Subject: [PATCH 12/22] New python module dependencies --- requirements.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/requirements.txt b/requirements.txt index 0d7f8d5..a917f3d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,8 +8,13 @@ molecule-docker==1.0.2 molecule-vagrant==0.6 python-vagrant==0.5.15 pytest-testinfra==6.1.0 +python-dateutil==2.9.0.post0 +python-dotenv==1.0.1 +python-slugify==8.0.4 PyYAML==5.3.1 selenium==3.141.0 +selinux==0.3.0 +setuptools==58.1.0 yamllint==1.25.0 webdriver-manager wheel From ab8e868294f0977beef58b6a7c3855381ba6e2f6 Mon Sep 17 00:00:00 2001 From: etgraylog Date: Mon, 13 Jan 2025 01:41:26 -0500 Subject: [PATCH 13/22] Define version for wheel --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a917f3d..9579466 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,4 +17,4 @@ selinux==0.3.0 setuptools==58.1.0 yamllint==1.25.0 webdriver-manager -wheel +wheel==0.45.1 From 6bb8e0f1552452fe1cff8ff0e2ec6357c700b209 Mon Sep 17 00:00:00 2001 From: etgraylog Date: Mon, 13 Jan 2025 01:50:48 -0500 Subject: [PATCH 14/22] Revised requirements --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c9163b1..997e83f 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ ## Requirements - Ansible (> 2.5.0) +- Ansible (2.13.13) +- Python 3.9 - At least 4gb of memory on the target instance. - Linux - Currently tested against: From e02d98f90d9559f360c8d16cbd55d4c105675c61 Mon Sep 17 00:00:00 2001 From: etgraylog Date: Mon, 13 Jan 2025 01:51:00 -0500 Subject: [PATCH 15/22] Added 2x versions tested (locally) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 997e83f..d7644b4 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ ## Requirements -- Ansible (> 2.5.0) - Ansible (2.13.13) - Python 3.9 - At least 4gb of memory on the target instance. @@ -13,8 +12,10 @@ - Currently tested against: - Ubuntu 18.04 - Ubuntu 20.04 + - Ubuntu 22.04 - Centos 7 - Centos 8 + - Centos 9 To install the role, run: From b2e89b0ed5e8d367e3c37c6b3c746f80fd763d46 Mon Sep 17 00:00:00 2001 From: etgraylog Date: Mon, 13 Jan 2025 01:51:45 -0500 Subject: [PATCH 16/22] Revised compatibility matrix to include versions 5.x and 6.x --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d7644b4..9d40897 100644 --- a/README.md +++ b/README.md @@ -36,10 +36,13 @@ Be certain you are running a supported version of Elasticsearch. You can configu **Compatibility Matrix** -| Graylog version | 3.x | 4.x | -|:--------------|:-------------:|:-------------:| -| Elasticsearch | 5-6 | 6.8 - 7.10 | +| Graylog version | 3.x | 4.x | 5.x | 6.x | +|:--------------|:-------------:|:----------:|:-------------:|:-------------:| +| Elasticsearch | 5-6 | 6.8 - 7.10 | 6.8 - 7.10 | n/a | + | OpenSearch | | 1.x* | 1.x - 2.x | 1.x - 2.x | +*Graylog 4.3.x introduces support for OpenSearch. +Refer to the [Software Interoperability Chart](https://go2docs.graylog.org/5-0/planning_your_deployment/planning_your_upgrade_to_opensearch.htm) You will need to these Ansible role dependencies: - [Java](https://github.com/lean-delivery/ansible-role-java) From 6e6a103dcbc76bac25334ce877cadbf924bac269 Mon Sep 17 00:00:00 2001 From: etgraylog Date: Mon, 13 Jan 2025 01:52:20 -0500 Subject: [PATCH 17/22] Revised example to include 2x new variables for version >= 5.0 --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d40897..6a8475c 100644 --- a/README.md +++ b/README.md @@ -83,13 +83,15 @@ Here is an example playbook that uses this role. This is a single-instance confi es_action_auto_create_index: False #Graylog vars - graylog_version: 4.2 + graylog_version: 5.2 graylog_install_java: True graylog_password_secret: "" # Insert your own here. Generate with: pwgen -s 96 1 graylog_root_password_sha2: "" # Insert your own root_password_sha2 here. graylog_http_bind_address: "{{ ansible_default_ipv4.address }}:9000" graylog_http_publish_uri: "http://{{ ansible_default_ipv4.address }}:9000/" graylog_http_external_uri: "http://{{ ansible_default_ipv4.address }}:9000/" + graylog_install_open_package: True + graylog_install_enterprise_package: False roles: - role: "graylog2.graylog" From 56dec08a3bf5553ab10c3df87b98a59bd7c4ad7e Mon Sep 17 00:00:00 2001 From: etgraylog Date: Mon, 13 Jan 2025 01:52:28 -0500 Subject: [PATCH 18/22] Updated Author --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a8475c..b353279 100644 --- a/README.md +++ b/README.md @@ -230,7 +230,7 @@ We run smoke tests for Graylog using this role. Documentation on that can be fou ## Author Information -Author: Marius Sturm () and [contributors](https://github.com/Graylog2/graylog2-ansible-role/graphs/contributors) +Author: Graylog and [contributors](https://github.com/Graylog2/graylog2-ansible-role/graphs/contributors) ## License From 5a31da7243985f83202a935db979d88c4ed836c8 Mon Sep 17 00:00:00 2001 From: etgraylog Date: Mon, 13 Jan 2025 01:52:52 -0500 Subject: [PATCH 19/22] Added 2x new variables for version >= 5.0 --- docs/Variables.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/Variables.md b/docs/Variables.md index 426127e..a760f0f 100644 --- a/docs/Variables.md +++ b/docs/Variables.md @@ -9,9 +9,11 @@ | `graylog_install_java` | True | Whether to install Java on the instance.| | `graylog_install_elasticsearch` | True | Whether to install Elasticsearch on the instance. | | `graylog_install_mongodb` | True | Whether to install MongoDB on the instance. | -| `graylog_install_enterprise_plugins` | False | Whether to install the [graylog-enterprise-plugins](https://docs.graylog.org/docs/intro) package. | -| `graylog_install_integrations_plugins` | False | Whether to install the [graylog-integrations-plugins](https://docs.graylog.org/docs/integrations) package. | -| `graylog_install_enterprise_integrations_plugins` | False | Whether to install the [graylog-enterprise-integrations-plugins](https://docs.graylog.org/docs/intro) package. | +| `graylog_install_enterprise_plugins` | False | Whether to install the [graylog-enterprise-plugins](https://docs.graylog.org/docs/intro) package for version <= 4.3. | +| `graylog_install_integrations_plugins` | False | Whether to install the [graylog-integrations-plugins](https://docs.graylog.org/docs/integrations) package for version <= 4.3. | +| `graylog_install_enterprise_integrations_plugins` | False | Whether to install the [graylog-enterprise-integrations-plugins](https://docs.graylog.org/docs/intro) package for version <= 4.3. | +| `graylog_install_open_package` | False | Whether to install the [graylog-server](https://docs.graylog.org/docs/intro) package for version >= 5.0. | +| `graylog_install_enterprise_package` | False | Whether to install the [graylog-enterprise](https://docs.graylog.org/docs/intro) package for version >= 5.0. | ## Java Variables From 53cefadf5ba7071cc0d0ca69d53a3d8e357d5762 Mon Sep 17 00:00:00 2001 From: etgraylog Date: Mon, 13 Jan 2025 01:58:22 -0500 Subject: [PATCH 20/22] Remove work-around for ansible issue-2904. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee8e3d6..9c16559 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,8 +54,8 @@ jobs: - name: Install test dependencies. run: pip3 install -r requirements.txt - - name: Install ansible 4.2.0 to work-around packaging issue (issue-2904) - run: pip3 install --force 'ansible==4.2.0' + #- name: Install ansible 4.2.0 to work-around packaging issue (issue-2904) + # run: pip3 install --force 'ansible==4.2.0' - name: Run Molecule tests. run: molecule test --scenario-name=ci From 3c098e7e9d948af637203f5bf37343b48d2961e8 Mon Sep 17 00:00:00 2001 From: etgraylog Date: Mon, 13 Jan 2025 02:06:18 -0500 Subject: [PATCH 21/22] 2nd pass remove work-around for ansible issue-2904. --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c16559..65a2cc6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,9 +54,6 @@ jobs: - name: Install test dependencies. run: pip3 install -r requirements.txt - #- name: Install ansible 4.2.0 to work-around packaging issue (issue-2904) - # run: pip3 install --force 'ansible==4.2.0' - - name: Run Molecule tests. run: molecule test --scenario-name=ci env: From c38dfe6d084573571bf48f625ee7c3fdc8f103a7 Mon Sep 17 00:00:00 2001 From: etgraylog Date: Mon, 13 Jan 2025 02:09:09 -0500 Subject: [PATCH 22/22] Update author & min_ansible_version. --- meta/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index e74826c..173e292 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -14,10 +14,10 @@ dependencies: galaxy_info: role_name: graylog namespace: graylog2 - author: "Marius Sturm" + author: "Graylog" company: "Graylog, Inc." description: "Install and configure Graylog log management." - min_ansible_version: "2.5" + min_ansible_version: "2.13.13" license: "Apache 2" platforms: - name: "EL"