Default advertise address
This commit is contained in:
parent
eb902af919
commit
95429a099f
|
@ -4,8 +4,10 @@ docker_install: True
|
|||
docker_swarm: False
|
||||
docker_swarm_manager: False
|
||||
docker_swarm_manager_availability: 'drain'
|
||||
docker_swarm_manager_advertise_address: '{{ ansible_default_ipv4.address }}'
|
||||
docker_swarm_node: False
|
||||
docker_swarm_node_availability: 'active'
|
||||
docker_swarm_node_advertise_address: '{{ ansible_default_ipv4.address }}'
|
||||
docker_swarm_worker_hostname: '{{ ansible_fqdn }}'
|
||||
docker_swarm_allowed_hosts:
|
||||
- '0.0.0.0/0'
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
- name: Initialize the cluster
|
||||
docker_swarm:
|
||||
state: present
|
||||
advertise_addr: '{{ +docker_swarm_manager_advertise_address }}'
|
||||
when:
|
||||
- docker_swarm_manager | bool
|
||||
- docker_swarm_manager_main_node | bool
|
||||
|
@ -34,7 +35,7 @@
|
|||
- name: Add some manager nodes to the docker swarm cluster
|
||||
docker_swarm:
|
||||
state: join
|
||||
advertise_addr: '{{ ansible_default_ipv4.address }}'
|
||||
advertise_addr: '{{ docker_swarm_node_advertise_address }}'
|
||||
join_token: '{{ docker_swarm_mgr_token }}'
|
||||
remote_addrs: [ '{{ docker_swarm_manager_main_node_hostname }}:2377' ]
|
||||
|
||||
|
|
Loading…
Reference in New Issue