community.docker
community.docker copied to clipboard
Can't find any examples where docker_* modules are used together
SUMMARY
I can't find any examples in the documentation how to combine modules together. Specifically,
- Init swarm
- Add some labels to each node
While docker_swarm
runs on the ansible host, docker_node
by default connects to local docker. docker_swarm
does not register any cluster information which I could use in docker_node
so I assume an intermediate task docker_swarm_info
is needed to get the node list and then iterate over that list. However, docker_swarm_info
also requires a docker_host
param to connect to the cluster. I think? using ansible_host
should do it, but then I also need to have conditionals for manager node.. but I only need to set the labels once so I probably just need a single task that connects on the manager n.o. 1 and skip all other hosts..
A simple straightforward example in the docs would be really nice.
ISSUE TYPE
- Documentation Report
COMPONENT NAME
- docker_swarm
- docker_swarm_info
- docker_node