8 lines
266 B
YAML
8 lines
266 B
YAML
---
|
|
- name: Set node labels on all Swarm nodes
|
|
community.docker.docker_node:
|
|
hostname: "{{ item.name }}"
|
|
labels: "{{ item.labels }}"
|
|
labels_state: replace
|
|
loop: "{{ swarm_nodes }}"
|
|
when: "'swarm_manager' in hostvars[inventory_hostname]['vm_roles']" |