From e838485c511d64c06a129a0c3b2e0784bd0a73b6 Mon Sep 17 00:00:00 2001 From: Ruben Ruiz de Gauna Date: Thu, 30 May 2024 14:06:44 +0200 Subject: [PATCH] JUST FOR TEST --- .../newrelic/infrastructure/super-agent/debian.yml | 11 ----------- recipes/newrelic/infrastructure/super-agent/rhel.yml | 11 ----------- recipes/newrelic/infrastructure/super-agent/suse.yml | 12 +----------- 3 files changed, 1 insertion(+), 33 deletions(-) diff --git a/recipes/newrelic/infrastructure/super-agent/debian.yml b/recipes/newrelic/infrastructure/super-agent/debian.yml index f57c881a..c44c7023 100644 --- a/recipes/newrelic/infrastructure/super-agent/debian.yml +++ b/recipes/newrelic/infrastructure/super-agent/debian.yml @@ -392,17 +392,10 @@ install: config_opamp: cmds: - | - if [ "{{.NR_CLI_FLEET_ENABLED}}" = "false" ] ; then sed -i '/^\s*opamp:/s/^/#/' /etc/newrelic-super-agent/config.yaml sed -i '/^\s*endpoint: https:\/\/opamp/s/^/#/' /etc/newrelic-super-agent/config.yaml sed -i '/^\s*api-key:/s/^/#/' /etc/newrelic-super-agent/config.yaml sed -i '/^\s*headers:/s/^/#/' /etc/newrelic-super-agent/config.yaml - else - sed -i 's/s*#\s*opamp:/opamp:/g' /etc/newrelic-super-agent/config.yaml - sed -i '/^\s*#\s*endpoint: https:\/\/opamp/s/#//' /etc/newrelic-super-agent/config.yaml - sed -i '/^\s*#\s*api-key:/s/#//' /etc/newrelic-super-agent/config.yaml - sed -i '/^\s*#\s*headers:/s/#//' /etc/newrelic-super-agent/config.yaml - fi - | if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then sed -i 's/\(endpoint: https:\/\/opamp.\).*/\1'"staging-service.newrelic.com\/v1\/opamp"'/' /etc/newrelic-super-agent/config.yaml @@ -411,10 +404,6 @@ install: else sed -i 's/\(endpoint: https:\/\/opamp.\).*/\1'"service.newrelic.com\/v1\/opamp"'/' /etc/newrelic-super-agent/config.yaml fi - - | - if [ "{{.NR_CLI_FLEET_ENABLED}}" != "false" ] ; then - sed -i 's/api-key: API_KEY_HERE/api-key: {{.NEW_RELIC_LICENSE_KEY}}/g' /etc/newrelic-super-agent/config.yaml - fi config_host_monitoring: cmds: diff --git a/recipes/newrelic/infrastructure/super-agent/rhel.yml b/recipes/newrelic/infrastructure/super-agent/rhel.yml index 2262573e..4a5dc3f1 100644 --- a/recipes/newrelic/infrastructure/super-agent/rhel.yml +++ b/recipes/newrelic/infrastructure/super-agent/rhel.yml @@ -330,17 +330,10 @@ install: config_opamp: cmds: - | - if [ "{{.NR_CLI_FLEET_ENABLED}}" = "false" ] ; then sed -i '/^\s*opamp:/s/^/#/' /etc/newrelic-super-agent/config.yaml sed -i '/^\s*endpoint: https:\/\/opamp/s/^/#/' /etc/newrelic-super-agent/config.yaml sed -i '/^\s*api-key:/s/^/#/' /etc/newrelic-super-agent/config.yaml sed -i '/^\s*headers:/s/^/#/' /etc/newrelic-super-agent/config.yaml - else - sed -i 's/s*#\s*opamp:/opamp:/g' /etc/newrelic-super-agent/config.yaml - sed -i '/^\s*#\s*endpoint: https:\/\/opamp/s/#//' /etc/newrelic-super-agent/config.yaml - sed -i '/^\s*#\s*api-key:/s/#//' /etc/newrelic-super-agent/config.yaml - sed -i '/^\s*#\s*headers:/s/#//' /etc/newrelic-super-agent/config.yaml - fi - | if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then sed -i 's/\(endpoint: https:\/\/opamp.\).*/\1'"staging-service.newrelic.com\/v1\/opamp"'/' /etc/newrelic-super-agent/config.yaml @@ -349,10 +342,6 @@ install: else sed -i 's/\(endpoint: https:\/\/opamp.\).*/\1'"service.newrelic.com\/v1\/opamp"'/' /etc/newrelic-super-agent/config.yaml fi - - | - if [ "{{.NR_CLI_FLEET_ENABLED}}" != "false" ] ; then - sed -i 's/api-key: API_KEY_HERE/api-key: {{.NEW_RELIC_LICENSE_KEY}}/g' /etc/newrelic-super-agent/config.yaml - fi config_host_monitoring: cmds: diff --git a/recipes/newrelic/infrastructure/super-agent/suse.yml b/recipes/newrelic/infrastructure/super-agent/suse.yml index de00b2d6..cbdbcb10 100644 --- a/recipes/newrelic/infrastructure/super-agent/suse.yml +++ b/recipes/newrelic/infrastructure/super-agent/suse.yml @@ -284,17 +284,10 @@ install: config_opamp: cmds: - | - if [ "{{.NR_CLI_FLEET_ENABLED}}" = "false" ] ; then sed -i '/^\s*opamp:/s/^/#/' /etc/newrelic-super-agent/config.yaml sed -i '/^\s*endpoint: https:\/\/opamp/s/^/#/' /etc/newrelic-super-agent/config.yaml sed -i '/^\s*api-key:/s/^/#/' /etc/newrelic-super-agent/config.yaml sed -i '/^\s*headers:/s/^/#/' /etc/newrelic-super-agent/config.yaml - else - sed -i 's/s*#\s*opamp:/opamp:/g' /etc/newrelic-super-agent/config.yaml - sed -i '/^\s*#\s*endpoint: https:\/\/opamp/s/#//' /etc/newrelic-super-agent/config.yaml - sed -i '/^\s*#\s*api-key:/s/#//' /etc/newrelic-super-agent/config.yaml - sed -i '/^\s*#\s*headers:/s/#//' /etc/newrelic-super-agent/config.yaml - fi - | # Remove old config location (to deprecate) rm -f /etc/newrelic-super-agent/nrdot-values.yaml @@ -305,10 +298,7 @@ install: else sed -i 's/\(endpoint: https:\/\/opamp.\).*/\1'"service.newrelic.com\/v1\/opamp"'/' /etc/newrelic-super-agent/config.yaml fi - - | - if [ "{{.NR_CLI_FLEET_ENABLED}}" != "false" ] ; then - sed -i 's/api-key: API_KEY_HERE/api-key: {{.NEW_RELIC_LICENSE_KEY}}/g' /etc/newrelic-super-agent/config.yaml - fi + config_host_monitoring: cmds: