ctubbsii commented on a change in pull request #278: Fixes #268: Setup fails 
when swarmmanager enabled
URL: https://github.com/apache/fluo-muchos/pull/278#discussion_r319637448
 
 

 ##########
 File path: ansible/docker.yml
 ##########
 @@ -48,5 +48,5 @@
       changed_when: "'active' not in swarm_status.stdout_lines"
     - name: join worker to swarm
       shell: >
-        docker swarm join --token={{ swarm_token }} {{ manager_ip }}:2377
+        docker swarm leave || true && docker swarm join --token={{ 
swarm_token_stdout }} {{ manager_ip }}:2377
 
 Review comment:
   Why the `|| true &&` instead of `;` ? Will semi-colon not work in ansible?
   If it doesn't, can you put the `docker swarm leave` on one line, and then 
the join on the next line?
   It just seems like there should be a better way to express executing the 
first command and not caring about its return code, and then executing a second 
command.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to