Hi All,

I am running a role "run_docker_containers" which creates a series of 
docker containers using the docker module.

- name: Run containers
  docker: state=present name={{ item }} ports=80 image=myimage command=
'blah' 
  with_sequence: start=1 end='5' format=mycontainer_%d


The containers are created OK, and I can display the output of the module 
by using a debug statement (from the documentation examples) if I put the 
debug statement inside the role "run_docker_containers".
- debug: msg={{inventory_hostname}}:{{item}}
  with_items: docker_containers


I am currently trying to pass the information returned by the docker module 
to a different role. The other role is part of setting up load balancing, 
so I am trying to get IP and port settings of the containers.

I have tried using the debug statement above inside "load_balance" but 
could not get it to display any information. Here is what the output looks 
like inside the other role:
[mytest.host] => (item=docker_containers) => {

    "item": "docker_containers",  

    "msg": "mytest.host:docker_containers" 

}


Here is what the list of roles looks like:

- hosts: testhosts
  roles:
    - run_docker_containers
    - load_balance


Any ideas how I can pass the information between roles?

Thanks

Mitch


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6b7417ab-9a90-4aab-8075-3352cc71e7be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to