summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--roles/contexts/fretlink/templates/environment.j241
-rw-r--r--roles/tools/files/ssh/known_hosts2
2 files changed, 13 insertions, 30 deletions
diff --git a/roles/contexts/fretlink/templates/environment.j2 b/roles/contexts/fretlink/templates/environment.j2
index 91a6f6a..652fc8d 100644
--- a/roles/contexts/fretlink/templates/environment.j2
+++ b/roles/contexts/fretlink/templates/environment.j2
@@ -41,6 +41,10 @@ build_macaroon() {
41 popd 2>/dev/null >/dev/null 41 popd 2>/dev/null >/dev/null
42} 42}
43 43
44function capitalize() {
45 echo "$1" | sed -e 's!\(^\|-\)\(.\)!\U\2!g'
46}
47
44APP=$(basename $(pwd)) 48APP=$(basename $(pwd))
45 49
46FL_APPS_HOST="localhost" 50FL_APPS_HOST="localhost"
@@ -79,26 +83,10 @@ FL_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=Por
79FL_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=User') }}" 83FL_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=User') }}"
80FL_PSQL_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local') }}" 84FL_PSQL_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local') }}"
81 85
82FL_CARRIER_DIRECTORY_DEV_PSQL_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/CarrierDirectory subkey=Host') }}"
83FL_CARRIER_DIRECTORY_DEV_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/CarrierDirectory subkey=Port') }}"
84FL_CARRIER_DIRECTORY_DEV_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/CarrierDirectory subkey=User') }}"
85FL_CARRIER_DIRECTORY_DEV_PSQL_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/CarrierDirectory') }}"
86FL_CARRIER_DIRECTORY_DEV_PSQL_DB="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/CarrierDirectory subkey=Database') }}"
87
88FL_GEODATA_DEV_PSQL_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=Host') }}"
89FL_GEODATA_DEV_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=Port') }}"
90FL_GEODATA_DEV_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=User') }}"
91FL_GEODATA_DEV_PSQL_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata') }}"
92FL_GEODATA_DEV_PSQL_DB="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=Database') }}"
93
94FL_NOTIFIER_DEV_PSQL_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Notifier subkey=Host') }}"
95FL_NOTIFIER_DEV_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Notifier subkey=Port') }}"
96FL_NOTIFIER_DEV_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Notifier subkey=User') }}"
97FL_NOTIFIER_DEV_PSQL_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Notifier') }}"
98FL_NOTIFIER_DEV_PSQL_DB="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Notifier subkey=Database') }}"
99
100FL_TOOLBOX_AGENT_MACAROON="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/ToolboxAgent') }}" 86FL_TOOLBOX_AGENT_MACAROON="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/ToolboxAgent') }}"
101 87
88export FRETLINK_ENV="$APP ${FL_ENV:-local}"
89
102if [ -f "local.env.example" ]; then 90if [ -f "local.env.example" ]; then
103 source local.env.example 91 source local.env.example
104fi 92fi
@@ -125,17 +113,12 @@ if [ "$APP" != "app" ]; then
125 export POSTGRESQL_ADDON_PASSWORD="$FL_PSQL_PASSWORD" 113 export POSTGRESQL_ADDON_PASSWORD="$FL_PSQL_PASSWORD"
126 export POSTGRESQL_ADDON_DB="$name" 114 export POSTGRESQL_ADDON_DB="$name"
127 else 115 else
128 postgresql_host="FL_${name^^}_${FL_ENV^^}_PSQL_HOST" 116 key=Psql/$(capitalize $FL_ENV)/$(capitalize $APP)
129 postgresql_port="FL_${name^^}_${FL_ENV^^}_PSQL_PORT" 117 export POSTGRESQL_ADDON_HOST=$(p $key Host)
130 postgresql_user="FL_${name^^}_${FL_ENV^^}_PSQL_USER" 118 export POSTGRESQL_ADDON_PORT=$(p $key Port)
131 postgresql_password="FL_${name^^}_${FL_ENV^^}_PSQL_PASSWORD" 119 export POSTGRESQL_ADDON_USER=$(p $key User)
132 postgresql_db="FL_${name^^}_${FL_ENV^^}_PSQL_DB" 120 export POSTGRESQL_ADDON_PASSWORD=$(p $key)
133 export FRETLINK_ENV="$FL_ENV" 121 export POSTGRESQL_ADDON_DB=$(p $key Database)
134 export POSTGRESQL_ADDON_HOST="${!postgresql_host}"
135 export POSTGRESQL_ADDON_PORT="${!postgresql_port}"
136 export POSTGRESQL_ADDON_USER="${!postgresql_user}"
137 export POSTGRESQL_ADDON_PASSWORD="${!postgresql_password}"
138 export POSTGRESQL_ADDON_DB="${!postgresql_db}"
139 fi 122 fi
140fi 123fi
141 124
diff --git a/roles/tools/files/ssh/known_hosts b/roles/tools/files/ssh/known_hosts
index e219361..e8399d7 100644
--- a/roles/tools/files/ssh/known_hosts
+++ b/roles/tools/files/ssh/known_hosts
@@ -1,3 +1,3 @@
1immae.eu ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM/7mizTNieTOU4i263zZeKBf/3U9O1rP7YEvR8qZWSFZXmEAlXsH3C+v2c1AS2udQpbgioKuqoRj2ZQImyScnU= 1immae.eu ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM/7mizTNieTOU4i263zZeKBf/3U9O1rP7YEvR8qZWSFZXmEAlXsH3C+v2c1AS2udQpbgioKuqoRj2ZQImyScnU=
2github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== 2github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
3eldiron.immae.eu,git.immae.eu ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIFbhFTl2A2RJn5L51yxJM4XfCS2ZaiSX/jo9jFSdghF 3eldiron.immae.eu,git.immae.eu,pub.immae.eu ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIFbhFTl2A2RJn5L51yxJM4XfCS2ZaiSX/jo9jFSdghF