From 76e076c03cf6ed35d281e77969e35b78671ef5b0 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 6 Nov 2020 16:07:11 +0100 Subject: [PATCH] Use docker_swarm_worker_hostname instead of ansible_hostname --- tasks/swarm_node.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/swarm_node.yml b/tasks/swarm_node.yml index 838baa9..e115e78 100644 --- a/tasks/swarm_node.yml +++ b/tasks/swarm_node.yml @@ -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: