From ab16d5aaa2121409a511381b5e105c6ea76f0687 Mon Sep 17 00:00:00 2001 From: Shaun Bugler - Hetzner Date: Fri, 20 Nov 2020 11:11:42 +0200 Subject: [PATCH 1/2] Only attempt to enable/disable module if the config is available --- manifests/config.pp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manifests/config.pp b/manifests/config.pp index b311414..5ca9686 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -76,6 +76,7 @@ exec { "filebeat_${module}_${action}": command => "filebeat modules ${action} ${module}", creates => "${modules_conf_dir}/${module}.yml", + onlyif => "[ -e ${modules_conf_dir}/${module}.yml.disabled ]", require => Package['filebeat'], notify => Service['filebeat'], } @@ -83,6 +84,7 @@ exec { "filebeat_${module}_${action}": command => "filebeat modules ${action} ${module}", creates => "${modules_conf_dir}/${module}.yml.disabled", + onlyif => "[ -e ${modules_conf_dir}/${module}.yml ]", require => Package['filebeat'], notify => Service['filebeat'], } From 1c9ca99cc127567f2ca7dbdcdd7b860bd26448d8 Mon Sep 17 00:00:00 2001 From: Shaun Bugler - Hetzner Date: Fri, 20 Nov 2020 12:02:42 +0200 Subject: [PATCH 2/2] Update release information --- CHANGELOG.md | 6 ++++++ metadata.json | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dbb401..909e629 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +##2020-11-20 - Release 2.0.1 +###Summary + +Minor tweak to enable/disable module +* Only attempt to enable if it is disabled, only disable if it is enabled + ##2020-11-03 - Release 2.0.0 ###Summary diff --git a/metadata.json b/metadata.json index 572fa26..d36bf9b 100644 --- a/metadata.json +++ b/metadata.json @@ -1,12 +1,12 @@ { "name": "hetzner-filebeats", - "version": "2.0.0", + "version": "2.0.1", "author": "Henlu Starke", "summary": "Simple module to install and configure filebeats for elasticsearch", "license": "Apache-2.0", - "source": "git@github.com:hetznerZA/hetzner-filebeats.git", - "project_page": "https://github.com/hetznerZA/hetzner-filebeats", - "issues_url": "https://github.com/hetznerZA/hetzner-filebeats/issues", + "source": "git@github.com:xneelo/hetzner-filebeats.git", + "project_page": "https://github.com/xneelo/hetzner-filebeats", + "issues_url": "https://github.com/xneelo/hetzner-filebeats/issues", "dependencies": [ { "name": "puppetlabs-stdlib", @@ -32,7 +32,7 @@ }, { "name": "filebeats", - "version_requirement": ">= 5.6.x < 6.3.0" + "version_requirement": ">= 6.3.0 < 8.0.0" } ], "pdk-version": "1.10.0",