From 2329fcc92eab65cf5fef83b1645c026cd8c858da Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Tue, 1 Aug 2023 15:36:44 +1000 Subject: [PATCH] Add new relic env variable --- inventory/host_vars/_example.com/secrets.example.yml | 6 ++++++ roles/app/templates/env.j2 | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/inventory/host_vars/_example.com/secrets.example.yml b/inventory/host_vars/_example.com/secrets.example.yml index 6d1a7ec41..946143885 100644 --- a/inventory/host_vars/_example.com/secrets.example.yml +++ b/inventory/host_vars/_example.com/secrets.example.yml @@ -88,3 +88,9 @@ smtp_password: #geocoder_api_key: pk.xxxx #geocoder_service: mapbox #geocoder_timeout: 7 + +# New relic settings +# see: https://one.eu.newrelic.com/admin-portal/, Administration > API keys to get the license key +# new_relic_agent_enabled: true +# new_relic_app_name: "Open Food Network" +# new_relic_license_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" diff --git a/roles/app/templates/env.j2 b/roles/app/templates/env.j2 index abf4371a2..13b3e553f 100644 --- a/roles/app/templates/env.j2 +++ b/roles/app/templates/env.j2 @@ -93,4 +93,10 @@ OPENID_APP_ID="{{ openid_app_id }}" OPENID_APP_SECRET="{{ openid_app_secret }}" {% endif %} +{% if new_relic_agent_enabled is defined %} +NEW_RELIC_AGENT_ENABLED="{{ new_relic_agent_enabled }}" +NEW_RELIC_APP_NAME="{{ new_relic_app_name }}" +NEW_RELIC_LICENSE_KEY="{{ new_relic_license_key }}" +{% endif %} + {{ custom_env_vars | default('') }}