From ac005255b4fb6a81bba650cfe72b47b6b4e4132d Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 31 Oct 2024 22:19:20 +0100 Subject: [PATCH] Fix docker_swarm_advertise_addr calculation for workers --- .../roles/docker-swarm-hetzner-init-variables/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swarmsible/roles/docker-swarm-hetzner-init-variables/tasks/main.yml b/swarmsible/roles/docker-swarm-hetzner-init-variables/tasks/main.yml index 3e107b3..3fe1540 100644 --- a/swarmsible/roles/docker-swarm-hetzner-init-variables/tasks/main.yml +++ b/swarmsible/roles/docker-swarm-hetzner-init-variables/tasks/main.yml @@ -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: @@ -40,4 +40,4 @@ - set_fact: docker_swarm_labels: host: "{{ inventory_hostname }}" - hetzner_location: "{{ location }}" \ No newline at end of file + hetzner_location: "{{ location }}"