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
|
- name: Manage labels
|
||||||
block:
|
block:
|
||||||
- name: Manage the swarm nodes labels
|
- 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:
|
#docker_node:
|
||||||
# hostname: '{{ ansible_hostname }}'
|
# hostname: '{{ ansible_hostname }}'
|
||||||
# labels:
|
# labels:
|
||||||
|
|
Loading…
Reference in New Issue