Debugging
This commit is contained in:
parent
639cc19e42
commit
1206a21e8f
|
@ -20,8 +20,11 @@ generate_secrets() {
|
||||||
|
|
||||||
export DOCKER_HOST="ssh://$PLUGIN_USER@$PLUGIN_HOST:$PLUGIN_PORT"
|
export DOCKER_HOST="ssh://$PLUGIN_USER@$PLUGIN_HOST:$PLUGIN_PORT"
|
||||||
|
|
||||||
|
docker secret ls
|
||||||
|
echo "$SECRET"
|
||||||
|
|
||||||
for SECRET in $(yq r "$PLUGIN_COMPOSE" 'secrets.*.name'); do
|
for SECRET in $(yq r "$PLUGIN_COMPOSE" 'secrets.*.name'); do
|
||||||
if ! docker secret ls | grep "$SECRET"; then
|
if ! docker secret ls | grep -q "$SECRET"; then
|
||||||
eval "echo \"generating $SECRET\""
|
eval "echo \"generating $SECRET\""
|
||||||
PW=$(</dev/urandom tr -dc 'A-Za-z0-9' | head -c 40; echo)
|
PW=$(</dev/urandom tr -dc 'A-Za-z0-9' | head -c 40; echo)
|
||||||
eval "echo \"$PW\" | docker secret create \"$SECRET\" -";
|
eval "echo \"$PW\" | docker secret create \"$SECRET\" -";
|
||||||
|
|
Reference in New Issue