summaryrefslogtreecommitdiff
path: root/roles/contexts
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@fretlink.com>2018-12-09 14:11:54 +0100
committerIsmaël Bouya <ismael.bouya@fretlink.com>2018-12-09 14:11:54 +0100
commit90b63575c59ee6ff6b91806fd17fb7a2f1136762 (patch)
tree996dc93253f97d393af22d24a76c0c9e413982d3 /roles/contexts
parent2fdf2f6d26026f2e1875e108ad9f0391c9d7f77e (diff)
downloadAnsible-90b63575c59ee6ff6b91806fd17fb7a2f1136762.tar.gz
Ansible-90b63575c59ee6ff6b91806fd17fb7a2f1136762.tar.zst
Ansible-90b63575c59ee6ff6b91806fd17fb7a2f1136762.zip
Add environment variables
Diffstat (limited to 'roles/contexts')
-rw-r--r--roles/contexts/fretlink/templates/environment.j26
1 files changed, 4 insertions, 2 deletions
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() {
36 target="uri://fretlink/$3" 36 target="uri://fretlink/$3"
37 realm="$4" 37 realm="$4"
38 38
39 cd "$HOME/workdir/haskell-commons" 39 pushd "$HOME/workdir/haskell-commons" >/dev/null 2>/dev/null
40 MACAROON_PRIVATE_KEY="$secret" MACAROON_SECRET="$secret" stack exec macaroon-bakery -- $action --location "$target" --key-id "$src" $ttl "$realm" 40 MACAROON_PRIVATE_KEY="$secret" MACAROON_SECRET="$secret" stack exec macaroon-bakery -- $action --location "$target" --key-id "$src" $ttl "$realm"
41 popd 2>/dev/null >/dev/null
41} 42}
42 43
43APP=$(basename $(pwd)) 44APP=$(basename $(pwd))
@@ -197,7 +198,8 @@ if [ "$APP" = "notifier" ]; then
197 export MACAROON="$(build_macaroon --old $FL_NOTIFIER_PRIVATE_KEY notifier notifier external)" 198 export MACAROON="$(build_macaroon --old $FL_NOTIFIER_PRIVATE_KEY notifier notifier external)"
198 199
199 # To push transporeon cargos to app 200 # To push transporeon cargos to app
200 APP_TRANSPOREON_PUSH_MACAROON="$(build_macaroon $FL_APP_SECRET notifier app app::transporeon-cargos-write)" 201 export TRANSPOREON_APP_PUSH_URL="http://localhost:8080/api/transporeon/cargo"
202 export TRANSPOREON_APP_PUSH_MACAROON="$(build_macaroon $FL_APP_SECRET notifier app app::transporeon-cargos-write)"
201fi 203fi
202 204
203if [ "$APP" = "pricer" ]; then 205if [ "$APP" = "pricer" ]; then