Skip to content

Commit

Permalink
JUST FOR TEST
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenruizdegauna committed May 30, 2024
1 parent 87f3530 commit e838485
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 33 deletions.
11 changes: 0 additions & 11 deletions recipes/newrelic/infrastructure/super-agent/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
11 changes: 0 additions & 11 deletions recipes/newrelic/infrastructure/super-agent/rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
12 changes: 1 addition & 11 deletions recipes/newrelic/infrastructure/super-agent/suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit e838485

Please sign in to comment.