From 0efcc34acd71590fa81b3af6034b6ebb34fa2787 Mon Sep 17 00:00:00 2001 From: Julien Erard Date: Tue, 7 Jun 2022 08:40:46 -0700 Subject: [PATCH] make URL replace idempotent for redeploy --- deploy/linux/roles/upload/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/linux/roles/upload/tasks/main.yml b/deploy/linux/roles/upload/tasks/main.yml index 1f09f6c..7a169a9 100644 --- a/deploy/linux/roles/upload/tasks/main.yml +++ b/deploy/linux/roles/upload/tasks/main.yml @@ -49,14 +49,14 @@ - name: Replace any NR region specific URL - EU ansible.builtin.replace: path: ~/{{ service_id }}/startScenario.json - regexp: 'log-api.newrelic.com' - replace: 'log-api.eu.newrelic.com' + regexp: '/log-api.newrelic.com/' + replace: '/log-api.eu.newrelic.com/' when: newrelic_region is defined and (newrelic_region|upper) == "EU" - name: Replace any NR region specific URL - Staging ansible.builtin.replace: path: ~/{{ service_id }}/startScenario.json - regexp: 'log-api.newrelic.com' - replace: 'staging-log-api.newrelic.com' + regexp: '/log-api.newrelic.com/' + replace: '/staging-log-api.newrelic.com/' when: newrelic_region is defined and (newrelic_region|upper) == "STAGING" - include_tasks: create_artifact_params.yml