From: Ismaƫl Bouya Date: Sun, 9 Dec 2018 13:11:54 +0000 (+0100) Subject: Add environment variables X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=90b63575c59ee6ff6b91806fd17fb7a2f1136762;p=perso%2FImmae%2FConfig%2FAnsible.git Add environment variables --- diff --git a/roles/contexts/fretlink/templates/environment.j2 b/roles/contexts/fretlink/templates/environment.j2 index e5e2c64..50dc75b 100644 --- a/roles/contexts/fretlink/templates/environment.j2 +++ b/roles/contexts/fretlink/templates/environment.j2 @@ -36,8 +36,9 @@ build_macaroon() { target="uri://fretlink/$3" realm="$4" - cd "$HOME/workdir/haskell-commons" + pushd "$HOME/workdir/haskell-commons" >/dev/null 2>/dev/null MACAROON_PRIVATE_KEY="$secret" MACAROON_SECRET="$secret" stack exec macaroon-bakery -- $action --location "$target" --key-id "$src" $ttl "$realm" + popd 2>/dev/null >/dev/null } APP=$(basename $(pwd)) @@ -197,7 +198,8 @@ if [ "$APP" = "notifier" ]; then export MACAROON="$(build_macaroon --old $FL_NOTIFIER_PRIVATE_KEY notifier notifier external)" # To push transporeon cargos to app - APP_TRANSPOREON_PUSH_MACAROON="$(build_macaroon $FL_APP_SECRET notifier app app::transporeon-cargos-write)" + export TRANSPOREON_APP_PUSH_URL="http://localhost:8080/api/transporeon/cargo" + export TRANSPOREON_APP_PUSH_MACAROON="$(build_macaroon $FL_APP_SECRET notifier app app::transporeon-cargos-write)" fi if [ "$APP" = "pricer" ]; then