Extract services stack filter to a local variable

This commit is contained in:
Tortue Torche 2019-08-10 23:36:43 -04:00 committed by Tortue Torche
parent d4c11ec5eb
commit 8082eb7823

4
psu
View File

@ -1056,12 +1056,14 @@ tasks_healthy() {
services() { services() {
local services local services
local filter_service
filter_service="\"label\":{\"com.docker.stack.namespace=$PORTAINER_STACK_NAME\":true}"
services=$(http \ services=$(http \
--check-status \ --check-status \
--ignore-stdin \ --ignore-stdin \
--verify=$HTTPIE_VERIFY_SSL \ --verify=$HTTPIE_VERIFY_SSL \
"$PORTAINER_URL/api/endpoints/$PORTAINER_ENDPOINT/docker/services" \ "$PORTAINER_URL/api/endpoints/$PORTAINER_ENDPOINT/docker/services" \
filters=="{\"label\":{\"com.docker.stack.namespace=$PORTAINER_STACK_NAME\":true}}" \ filters=="{$filter_service}" \
"Authorization: Bearer $AUTH_TOKEN") "Authorization: Bearer $AUTH_TOKEN")
check_for_errors $? "$services" check_for_errors $? "$services"
echo "$services" echo "$services"