Skip to content

Commit

Permalink
Fix docker_swarm_advertise_addr calculation for workers
Browse files Browse the repository at this point in the history
  • Loading branch information
s4ke authored Oct 31, 2024
1 parent 443191a commit ac00525
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
when: "'docker_swarm_manager' in group_names"

- set_fact:
docker_swarm_advertise_addr: "{{ docker_swarm_custom_private_network | ipsubnet(26, 1) | ipaddr((group_index | int) + 1) | ipaddr('address') }}"
docker_swarm_advertise_addr: "{{ docker_swarm_custom_private_network | ipsubnet(26, 2) | ipaddr((group_index | int) + 1) | ipaddr('address') }}"
when: "'docker_swarm_worker' in group_names"

- set_fact:
Expand All @@ -40,4 +40,4 @@
- set_fact:
docker_swarm_labels:
host: "{{ inventory_hostname }}"
hetzner_location: "{{ location }}"
hetzner_location: "{{ location }}"

0 comments on commit ac00525

Please sign in to comment.