Use docker_swarm_worker_hostname instead of ansible_hostname
This commit is contained in:
parent
aebf4d44b5
commit
76e076c03c
|
@ -45,7 +45,7 @@
|
|||
- name: Manage labels
|
||||
block:
|
||||
- name: Manage the swarm nodes labels
|
||||
shell: docker node update --label-{{ item.action | default('add') }} {{ item.key }}={{ item.value }} {{ ansible_hostname }}
|
||||
shell: docker node update --label-{{ item.action | default('add') }} {{ item.key }}={{ item.value }} {{ docker_swarm_worker_hostname }}
|
||||
#docker_node:
|
||||
# hostname: '{{ ansible_hostname }}'
|
||||
# labels:
|
||||
|
|
Loading…
Reference in New Issue