Fix port issue as buildin. Setup reassigns the default vars
This commit is contained in:
@@ -28,11 +28,18 @@
|
||||
- Final address: {{ hostvars[groups['swarm_master'][0]]['ansible_host'] | default(groups['swarm_master'][0]) }}
|
||||
- With port: {{ hostvars[groups['swarm_master'][0]]['ansible_host'] | default(groups['swarm_master'][0]) }}:2377
|
||||
|
||||
- name: Debug master hostvars
|
||||
debug:
|
||||
msg: |
|
||||
advertise_addr: {{ ansible_eth1.ipv4.address }}
|
||||
ansible_eth0: {{ ansible_eth0.ipv4.address }}
|
||||
|
||||
- name: Init a new swarm with default parameters
|
||||
community.docker.docker_swarm:
|
||||
state: present
|
||||
advertise_addr: "{{ ansible_eth1.ipv4.address }}"
|
||||
listen_addr: "{{ ansible_eth1.ipv4.address }}"
|
||||
# listen_addr: "{{ ansible_eth1.ipv4.address }}"
|
||||
# data_path_addr: "{{ ansible_eth1.ipv4.address }}"
|
||||
|
||||
- name: print listen addr
|
||||
debug:
|
||||
|
||||
Reference in New Issue
Block a user