diff options
Diffstat (limited to 'roles')
-rw-r--r-- | roles/contexts/fretlink/templates/environment.j2 | 41 | ||||
-rw-r--r-- | roles/tools/files/ssh/known_hosts | 2 |
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 | ||
44 | function capitalize() { | ||
45 | echo "$1" | sed -e 's!\(^\|-\)\(.\)!\U\2!g' | ||
46 | } | ||
47 | |||
44 | APP=$(basename $(pwd)) | 48 | APP=$(basename $(pwd)) |
45 | 49 | ||
46 | FL_APPS_HOST="localhost" | 50 | FL_APPS_HOST="localhost" |
@@ -79,26 +83,10 @@ FL_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=Por | |||
79 | FL_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=User') }}" | 83 | FL_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=User') }}" |
80 | FL_PSQL_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local') }}" | 84 | FL_PSQL_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local') }}" |
81 | 85 | ||
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 | |||
88 | FL_GEODATA_DEV_PSQL_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=Host') }}" | ||
89 | FL_GEODATA_DEV_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=Port') }}" | ||
90 | FL_GEODATA_DEV_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=User') }}" | ||
91 | FL_GEODATA_DEV_PSQL_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata') }}" | ||
92 | FL_GEODATA_DEV_PSQL_DB="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=Database') }}" | ||
93 | |||
94 | FL_NOTIFIER_DEV_PSQL_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Notifier subkey=Host') }}" | ||
95 | FL_NOTIFIER_DEV_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Notifier subkey=Port') }}" | ||
96 | FL_NOTIFIER_DEV_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Notifier subkey=User') }}" | ||
97 | FL_NOTIFIER_DEV_PSQL_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Notifier') }}" | ||
98 | FL_NOTIFIER_DEV_PSQL_DB="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Notifier subkey=Database') }}" | ||
99 | |||
100 | FL_TOOLBOX_AGENT_MACAROON="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/ToolboxAgent') }}" | 86 | FL_TOOLBOX_AGENT_MACAROON="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/ToolboxAgent') }}" |
101 | 87 | ||
88 | export FRETLINK_ENV="$APP ${FL_ENV:-local}" | ||
89 | |||
102 | if [ -f "local.env.example" ]; then | 90 | if [ -f "local.env.example" ]; then |
103 | source local.env.example | 91 | source local.env.example |
104 | fi | 92 | fi |
@@ -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 |
140 | fi | 123 | fi |
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 @@ | |||
1 | immae.eu ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM/7mizTNieTOU4i263zZeKBf/3U9O1rP7YEvR8qZWSFZXmEAlXsH3C+v2c1AS2udQpbgioKuqoRj2ZQImyScnU= | 1 | immae.eu ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM/7mizTNieTOU4i263zZeKBf/3U9O1rP7YEvR8qZWSFZXmEAlXsH3C+v2c1AS2udQpbgioKuqoRj2ZQImyScnU= |
2 | github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== | 2 | github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== |
3 | eldiron.immae.eu,git.immae.eu ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIFbhFTl2A2RJn5L51yxJM4XfCS2ZaiSX/jo9jFSdghF | 3 | eldiron.immae.eu,git.immae.eu,pub.immae.eu ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIFbhFTl2A2RJn5L51yxJM4XfCS2ZaiSX/jo9jFSdghF |