]> git.immae.eu Git - perso/Immae/Config/Ansible.git/commitdiff
Add environment variables
authorIsmaël Bouya <ismael.bouya@fretlink.com>
Sun, 9 Dec 2018 13:11:54 +0000 (14:11 +0100)
committerIsmaël Bouya <ismael.bouya@fretlink.com>
Sun, 9 Dec 2018 13:11:54 +0000 (14:11 +0100)
roles/contexts/fretlink/templates/environment.j2

index e5e2c64da3dc733be70a702a63fedf353add5a1c..50dc75b7ba66e553e88423abd10ba5022c4f9754 100644 (file)
@@ -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