diff options
author | Ismaël Bouya <ismael.bouya@fretlink.com> | 2018-12-20 13:06:42 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@fretlink.com> | 2018-12-20 13:06:42 +0100 |
commit | 39894a77b07d81d8c58d19cc3ce2f3917d4d0af7 (patch) | |
tree | 90c564ba2047fffad137833b87ceda3dbc70ba3d /roles | |
parent | a6a71ceb1378adfffd99484c6d723ce723a7c3d2 (diff) | |
download | Ansible-39894a77b07d81d8c58d19cc3ce2f3917d4d0af7.tar.gz Ansible-39894a77b07d81d8c58d19cc3ce2f3917d4d0af7.tar.zst Ansible-39894a77b07d81d8c58d19cc3ce2f3917d4d0af7.zip |
Add new environment variables
Diffstat (limited to 'roles')
-rw-r--r-- | roles/contexts/fretlink/templates/environment.j2 | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/roles/contexts/fretlink/templates/environment.j2 b/roles/contexts/fretlink/templates/environment.j2 index 50dc75b..36e4bfd 100644 --- a/roles/contexts/fretlink/templates/environment.j2 +++ b/roles/contexts/fretlink/templates/environment.j2 | |||
@@ -72,12 +72,19 @@ FL_FREIGHT_PORT=8084 | |||
72 | FL_FREIGHT_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Freight subkey=Secret') }}" | 72 | FL_FREIGHT_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Freight subkey=Secret') }}" |
73 | 73 | ||
74 | FL_BOOKKEEPING_SECRET="dummy" | 74 | FL_BOOKKEEPING_SECRET="dummy" |
75 | FL_LANE_EXPLORER_SECRET="dummy" | ||
75 | 76 | ||
76 | FL_PSQL_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=Host') }}" | 77 | FL_PSQL_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=Host') }}" |
77 | FL_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=Port') }}" | 78 | FL_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=Port') }}" |
78 | FL_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=User') }}" | 79 | FL_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=User') }}" |
79 | FL_PSQL_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local') }}" | 80 | FL_PSQL_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local') }}" |
80 | 81 | ||
82 | FL_CARRIER_DIRECTORY_DEV_PSQL_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/CarrierDirectory subkey=Host') }}" | ||
83 | FL_CARRIER_DIRECTORY_DEV_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/CarrierDirectory subkey=Port') }}" | ||
84 | FL_CARRIER_DIRECTORY_DEV_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/CarrierDirectory subkey=User') }}" | ||
85 | FL_CARRIER_DIRECTORY_DEV_PSQL_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/CarrierDirectory') }}" | ||
86 | FL_CARRIER_DIRECTORY_DEV_PSQL_DB="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/CarrierDirectory subkey=Database') }}" | ||
87 | |||
81 | FL_GEODATA_DEV_PSQL_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=Host') }}" | 88 | FL_GEODATA_DEV_PSQL_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=Host') }}" |
82 | FL_GEODATA_DEV_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=Port') }}" | 89 | FL_GEODATA_DEV_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=Port') }}" |
83 | FL_GEODATA_DEV_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=User') }}" | 90 | FL_GEODATA_DEV_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=User') }}" |
@@ -153,10 +160,22 @@ if [ "$APP" = "app" ]; then | |||
153 | 160 | ||
154 | # notifier | 161 | # notifier |
155 | export FRETLINK_NOTIFIER_API=$FL_NOTIFIER_URL | 162 | export FRETLINK_NOTIFIER_API=$FL_NOTIFIER_URL |
156 | export FRETLINK_NOTIFIER_ACCESS_KEY="$(build_macaroon --old $FL_NOTIFIER_PRIVATE_KEY notifier notifier messaging)" | 163 | export FRETLINK_NOTIFIER_ACCESS_KEY="$(build_macaroon $FL_NOTIFIER_SECRET notifier notifier messaging)" |
157 | export FRETLINK_NOTIFIER_TRANSPOREON_ACCESS_KEY="$(build_macaroon --old $FL_NOTIFIER_PRIVATE_KEY notifier notifier external)" | 164 | export FRETLINK_NOTIFIER_TRANSPOREON_ACCESS_KEY="$(build_macaroon --old $FL_NOTIFIER_PRIVATE_KEY notifier notifier external)" |
158 | export FRETLINK_NOTIFIER_TRANSPOREON_ENABLED="true" | 165 | export FRETLINK_NOTIFIER_TRANSPOREON_ENABLED="true" |
159 | 166 | ||
167 | export FRETLINK_NOTIFIER_ENABLED="true" | ||
168 | export FRETLINK_NOTIFIER_AMQP_ENABLED="true" | ||
169 | export FRETLINK_NOTIFIER_AMQP_TLS="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=TLS') }}" | ||
170 | export FRETLINK_NOTIFIER_AMQP_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=User') }}" | ||
171 | export FRETLINK_NOTIFIER_AMQP_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier') }}" | ||
172 | export FRETLINK_NOTIFIER_AMQP_HOSTS="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=Hosts') }}" | ||
173 | export FRETLINK_NOTIFIER_AMQP_QUEUE="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=Queue') }}" | ||
174 | export FRETLINK_NOTIFIER_AMQP_EXCHANGE="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=Exchange') }}" | ||
175 | export FRETLINK_NOTIFIER_AMQP_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=Port') }}" | ||
176 | export FRETLINK_NOTIFIER_AMQP_VHOST="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=Vhost') }}" | ||
177 | |||
178 | |||
160 | # admin-root | 179 | # admin-root |
161 | export FRETLINK_ADMINROOT_URL=$FL_ADMIN_ROOT_URL | 180 | export FRETLINK_ADMINROOT_URL=$FL_ADMIN_ROOT_URL |
162 | export FRETLINK_ADMINROOT_ACCESS_KEY="$(build_macaroon $FL_ADMIN_ROOT_PRIVATE_KEY admin-root admin-root admin-root::token-delivery)" | 181 | export FRETLINK_ADMINROOT_ACCESS_KEY="$(build_macaroon $FL_ADMIN_ROOT_PRIVATE_KEY admin-root admin-root admin-root::token-delivery)" |
@@ -175,6 +194,7 @@ if [ "$APP" = "admin-root" ]; then | |||
175 | export CARDIR_MACAROON_SECRET=$FL_CARRIER_DIRECTORY_SECRET | 194 | export CARDIR_MACAROON_SECRET=$FL_CARRIER_DIRECTORY_SECRET |
176 | export NOTIFIER_MACAROON_SECRET=$FL_NOTIFIER_SECRET | 195 | export NOTIFIER_MACAROON_SECRET=$FL_NOTIFIER_SECRET |
177 | export BOOKKEEPING_MACAROON_SECRET=$FL_BOOKKEEPING_SECRET | 196 | export BOOKKEEPING_MACAROON_SECRET=$FL_BOOKKEEPING_SECRET |
197 | export LANE_EXPLORER_MACAROON_SECRET=$FL_LANE_EXPLORER_SECRET | ||
178 | fi | 198 | fi |
179 | 199 | ||
180 | if [ "$APP" = "carrier-directory" ]; then | 200 | if [ "$APP" = "carrier-directory" ]; then |
@@ -200,6 +220,14 @@ if [ "$APP" = "notifier" ]; then | |||
200 | # To push transporeon cargos to app | 220 | # To push transporeon cargos to app |
201 | export TRANSPOREON_APP_PUSH_URL="http://localhost:8080/api/transporeon/cargo" | 221 | 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)" | 222 | export TRANSPOREON_APP_PUSH_MACAROON="$(build_macaroon $FL_APP_SECRET notifier app app::transporeon-cargos-write)" |
223 | |||
224 | # AMQP | ||
225 | export AMQP_VHOST="notifier" | ||
226 | export AMQP_USER="notifier" | ||
227 | export AMQP_PASSWORD="notifier" | ||
228 | export AMQP_QUEUE="notifier" | ||
229 | export AMQP_SERVER="localhost" | ||
230 | export AMQP_TLS="false" | ||
203 | fi | 231 | fi |
204 | 232 | ||
205 | if [ "$APP" = "pricer" ]; then | 233 | if [ "$APP" = "pricer" ]; then |