Allow deploying 1 nodes docker swarm cluster
Change-Id: I0bba025226becf6f8a977c92a373068d59189eb2
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index 7e3a813..46b5e9a 100644
--- a/src/com/mirantis/mk/Orchestrate.groovy
+++ b/src/com/mirantis/mk/Orchestrate.groovy
@@ -700,7 +700,9 @@
salt.runSaltProcessStep(master, "I@docker:swarm ${extra_tgt}", 'saltutil.refresh_modules')
sleep(5)
salt.enforceState(master, "I@docker:swarm:role:master ${extra_tgt}", 'docker.swarm')
- salt.enforceState(master, "I@docker:swarm:role:manager ${extra_tgt}", 'docker.swarm')
+ if (salt.testTarget(master, "I@docker:swarm:role:manager ${extra_tgt}")){
+ salt.enforceState(master, "I@docker:swarm:role:manager ${extra_tgt}", 'docker.swarm')
+ }
sleep(10)
salt.cmdRun(master, "I@docker:swarm:role:master ${extra_tgt}", 'docker node ls')
}