Skip to content

Commit

Permalink
fixed advertise address with the public one of the host
Browse files Browse the repository at this point in the history
  • Loading branch information
7eXx authored Apr 21, 2022
1 parent 81aa5b8 commit d03107a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/docker-swarm-add-worker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Add Workers to the Swarm
docker_swarm:
state: join
advertise_addr: "{{ hostvars['swarm-manager']['ansible_default_ipv4']['address'] }}"
advertise_addr: "{{ ansible_host }}"
join_token: "{{ hostvars['swarm-manager']['worker_token']['stdout'] }}"
remote_addrs: [ "{{ hostvars['swarm-manager']['ansible_default_ipv4']['address'] }}:2377" ]
tags: swarm

0 comments on commit d03107a

Please sign in to comment.