Add the variable docker_swarm_worker_hostname.

This commit is contained in:
Andrea Dell'Amico 2020-11-06 15:59:57 +01:00
parent 320989d21f
commit aebf4d44b5
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ docker_swarm_manager: False
docker_swarm_manager_availability: 'drain'
docker_swarm_node: False
docker_swarm_node_availability: 'active'
docker_swarm_worker_hostname: '{{ ansible_fqdn }}'
docker_swarm_allowed_hosts:
- '0.0.0.0/0'

View File

@ -35,7 +35,7 @@
- block:
- name: Set the swarm nodes availability. Default 'active'
docker_node:
hostname: '{{ ansible_hostname }}'
hostname: '{{ docker_swarm_worker_hostname }}'
availability: '{{ docker_swarm_node_availability }}'
when: docker_swarm_node | bool