Use docker_swarm_worker_hostname instead of ansible_hostname

This commit is contained in:
Andrea Dell'Amico 2020-11-06 16:07:11 +01:00
parent aebf4d44b5
commit 76e076c03c
1 changed files with 1 additions and 1 deletions

View File

@ -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: