diff --git a/plugin.sh b/plugin.sh index a06d920..1b5799b 100755 --- a/plugin.sh +++ b/plugin.sh @@ -12,7 +12,8 @@ REMOTE_DOCKER_HOST="ssh://$PLUGIN_USER@$PLUGIN_HOST:$PLUGIN_PORT" create_networks() { echo "--- start create_networks ---" - for NETWORK in $PLUGIN_NETWORKS; do + IFS=',' read -ra NETWORKS <<< "$PLUGIN_NETWORKS" + for NETWORK in "${NETWORKS[@]}"; do docker -H "$REMOTE_DOCKER_HOST" \ network create --driver=overlay "$NETWORK" --scope swarm || true done