2024-01-25 14:52:55 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
2024-01-25 16:45:30 +01:00
|
|
|
[[ template "common/vault.rand_secrets" dict "ctx" . "keys" (coll.Slice "es_bootstrap_pwd" "exporter_pwd" "elastic_pwd") ]]
|
2024-01-25 14:52:55 +01:00
|
|
|
[[- range $k, $v := .elasticsearch.server.users ]]
|
|
|
|
[[- if not (has $v "password") ]]
|
|
|
|
[[ template "common/vault.rand_secrets" dict "ctx" $ "keys" (coll.Slice (printf "%s_pwd" ($k | regexp.Replace "\\-" "_"))) ]]
|
|
|
|
[[- end ]]
|
|
|
|
[[- end ]]
|