Skip to content

Commit

Permalink
chore!: remove agent type references (#1140)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsanchezgavier authored Dec 17, 2024
1 parent 7ed34dd commit c9d69b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 48 deletions.
20 changes: 4 additions & 16 deletions recipes/newrelic/infrastructure/super-agent/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,25 +420,13 @@ install:
- |
if [ "{{.NR_CLI_INFRA_AGENT}}" = "false" ] && [ "{{.NR_CLI_NRDOT}}" = "false" ]; then
cp /etc/newrelic-super-agent/examples/super-agent-config-no-agents.yaml /etc/newrelic-super-agent/config.yaml
elif [ "{{.NR_CLI_INFRA_AGENT}}" = "false" ]; then
cp /etc/newrelic-super-agent/examples/super-agent-config-nr-otel-collector.yaml /etc/newrelic-super-agent/config.yaml
elif [ "{{.NR_CLI_NRDOT}}" = "false" ]; then
cp /etc/newrelic-super-agent/examples/super-agent-config-nr-infra-agent.yaml /etc/newrelic-super-agent/config.yaml
else
cp /etc/newrelic-super-agent/examples/super-agent-config-all-agents.yaml /etc/newrelic-super-agent/config.yaml
fi
- |
if [ "{{.NR_CLI_INFRA_AGENT}}" = "false" ]; then
sed -i '/^\s*nr-infra-agent:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*agent_type: "newrelic\/com\.newrelic\.infrastructure_agent/s/^/#/' /etc/newrelic-super-agent/config.yaml
else
sed -i '/^\s*#\s*nr-infra-agent:/s/#//' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*#\s*agent_type: "newrelic\/com\.newrelic\.infrastructure_agent/s/#//' /etc/newrelic-super-agent/config.yaml
fi
- |
if [ "{{.NR_CLI_NRDOT}}" = "false" ]; then
sed -i '/^\s*nr-otel-collector:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/^/#/' /etc/newrelic-super-agent/config.yaml
else
sed -i '/^\s*#\s*nr-otel-collector:/s/#//' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*#\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/#//' /etc/newrelic-super-agent/config.yaml
fi
config_fleet_id:
status:
Expand Down
20 changes: 4 additions & 16 deletions recipes/newrelic/infrastructure/super-agent/rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -363,25 +363,13 @@ install:
- |
if [ "{{.NR_CLI_INFRA_AGENT}}" = "false" ] && [ "{{.NR_CLI_NRDOT}}" = "false" ]; then
cp /etc/newrelic-super-agent/examples/super-agent-config-no-agents.yaml /etc/newrelic-super-agent/config.yaml
elif [ "{{.NR_CLI_INFRA_AGENT}}" = "false" ]; then
cp /etc/newrelic-super-agent/examples/super-agent-config-nr-otel-collector.yaml /etc/newrelic-super-agent/config.yaml
elif [ "{{.NR_CLI_NRDOT}}" = "false" ]; then
cp /etc/newrelic-super-agent/examples/super-agent-config-nr-infra-agent.yaml /etc/newrelic-super-agent/config.yaml
else
cp /etc/newrelic-super-agent/examples/super-agent-config-all-agents.yaml /etc/newrelic-super-agent/config.yaml
fi
- |
if [ "{{.NR_CLI_INFRA_AGENT}}" = "false" ]; then
sed -i '/^\s*nr-infra-agent:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*agent_type: "newrelic\/com\.newrelic\.infrastructure_agent/s/^/#/' /etc/newrelic-super-agent/config.yaml
else
sed -i '/^\s*#\s*nr-infra-agent:/s/#//' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*#\s*agent_type: "newrelic\/com\.newrelic\.infrastructure_agent/s/#//' /etc/newrelic-super-agent/config.yaml
fi
- |
if [ "{{.NR_CLI_NRDOT}}" = "false" ]; then
sed -i '/^\s*nr-otel-collector:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/^/#/' /etc/newrelic-super-agent/config.yaml
else
sed -i '/^\s*#\s*nr-otel-collector:/s/#//' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*#\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/#//' /etc/newrelic-super-agent/config.yaml
fi
config_fleet_id:
status:
Expand Down
20 changes: 4 additions & 16 deletions recipes/newrelic/infrastructure/super-agent/suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,25 +310,13 @@ install:
- |
if [ "{{.NR_CLI_INFRA_AGENT}}" = "false" ] && [ "{{.NR_CLI_NRDOT}}" = "false" ]; then
cp /etc/newrelic-super-agent/examples/super-agent-config-no-agents.yaml /etc/newrelic-super-agent/config.yaml
elif [ "{{.NR_CLI_INFRA_AGENT}}" = "false" ]; then
cp /etc/newrelic-super-agent/examples/super-agent-config-nr-otel-collector.yaml /etc/newrelic-super-agent/config.yaml
elif [ "{{.NR_CLI_NRDOT}}" = "false" ]; then
cp /etc/newrelic-super-agent/examples/super-agent-config-nr-infra-agent.yaml /etc/newrelic-super-agent/config.yaml
else
cp /etc/newrelic-super-agent/examples/super-agent-config-all-agents.yaml /etc/newrelic-super-agent/config.yaml
fi
- |
if [ "{{.NR_CLI_INFRA_AGENT}}" = "false" ]; then
sed -i '/^\s*nr-infra-agent:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*agent_type: "newrelic\/com\.newrelic\.infrastructure_agent/s/^/#/' /etc/newrelic-super-agent/config.yaml
else
sed -i '/^\s*#\s*nr-infra-agent:/s/#//' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*#\s*agent_type: "newrelic\/com\.newrelic\.infrastructure_agent/s/#//' /etc/newrelic-super-agent/config.yaml
fi
- |
if [ "{{.NR_CLI_NRDOT}}" = "false" ]; then
sed -i '/^\s*nr-otel-collector:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/^/#/' /etc/newrelic-super-agent/config.yaml
else
sed -i '/^\s*#\s*nr-otel-collector:/s/#//' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*#\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/#//' /etc/newrelic-super-agent/config.yaml
fi
config_fleet_id:
status:
Expand Down

0 comments on commit c9d69b2

Please sign in to comment.