From aa20ed5ea1b3c833acc78c54166f655c2b9cd355 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=BDubom=C3=ADr=20Ku=C4=8Dera?=
 <lubomir.kucera.jr@gmail.com>
Date: Sun, 29 Apr 2018 13:02:18 +0200
Subject: [PATCH] __docker_stack: Use --with-registry-auth deploy option

Without this option, Swarm agents are unable to download images from
private registries.
---
 cdist/conf/type/__docker_stack/gencode-remote | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cdist/conf/type/__docker_stack/gencode-remote b/cdist/conf/type/__docker_stack/gencode-remote
index 0d47dc52..586271d0 100755
--- a/cdist/conf/type/__docker_stack/gencode-remote
+++ b/cdist/conf/type/__docker_stack/gencode-remote
@@ -50,7 +50,7 @@ case "${state}" in
 		eof
 
 		docker stack deploy --compose-file "\${compose_file}" \
-			--prune ${stack}
+			--prune --with-registry-auth ${stack}
 
 		rm "\${compose_file}"
 		EOF