markusthoemmes closed pull request #2662: Add judge condition for invoker 
deployment
URL: https://github.com/apache/incubator-openwhisk/pull/2662
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ansible/roles/invoker/tasks/deploy.yml 
b/ansible/roles/invoker/tasks/deploy.yml
index 04258abd03..71fbbd9841 100644
--- a/ansible/roles/invoker/tasks/deploy.yml
+++ b/ansible/roles/invoker/tasks/deploy.yml
@@ -59,6 +59,10 @@
   with_items: "{{ invokerInfo.json }}"
   when: not invoker.allowMultipleInstances and item.Names[0] != "/invoker{{ 
groups['invokers'].index(inventory_hostname) }}"
 
+- name: get invoker container Names list
+  set_fact:
+    nameList: "{{ invokerInfo.json | map(attribute='Names') | list }}"
+
 - name: start invoker using docker cli
   shell: >
         docker run -d
@@ -104,6 +108,7 @@
         -p {{ invoker.port + groups['invokers'].index(inventory_hostname) 
}}:8080
         {{ docker_registry }}{{ docker.image.prefix }}/invoker:{{ 
docker.image.tag }}
         /bin/sh -c "exec /invoker/bin/invoker {{ 
groups['invokers'].index(inventory_hostname) }} >> /logs/invoker{{ 
groups['invokers'].index(inventory_hostname) }}_logs.log 2>&1"
+  when: "['/invoker{{ groups['invokers'].index(inventory_hostname) }}'] not in 
nameList"
 
 # todo: re-enable docker_container module once 
https://github.com/ansible/ansible-modules-core/issues/5054 is resolved
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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