File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 12
12
state : present
13
13
advertise_addr : " {{ polaris.docker_swarm_advertise_address | default(omit) }}"
14
14
listen_addr : " {{ polaris.docker_swarm_advertise_address | default(omit) }}"
15
+ default_addr_pool :
16
+ - " {{ polaris.docker_swarm_default_addr_pool | default('10.135.0.0/16') }}"
15
17
register : swarm_initialisation_info
16
18
- name : Peek at swarm_initialisation_info
17
19
debug :
45
47
join_token : " {{ target_swarm_facts.swarm_initialisation_info.swarm_facts.JoinTokens.Manager }}"
46
48
advertise_addr : " {{ private_ip_address | default(omit) }}"
47
49
listen_addr : " {{ private_ip_address | default(omit) }}"
50
+ default_addr_pool :
51
+ - " {{ polaris.docker_swarm_default_addr_pool | default('10.135.0.0/16') }}"
48
52
remote_addrs :
49
53
- " {{ polaris.docker_swarm_advertise_address | default(target_swarm_facts.default_ipv4.address) | default(target_swarm_facts.all_ipv4_addresses[0]) }}"
50
54
71
75
join_token : " {{ target_swarm_facts.swarm_initialisation_info.swarm_facts.JoinTokens.Worker }}"
72
76
advertise_addr : " {{ private_ip_address | default(omit) }}"
73
77
listen_addr : " {{ private_ip_address | default(omit) }}"
78
+ default_addr_pool :
79
+ - " {{ polaris.docker_swarm_default_addr_pool | default('10.135.0.0/16') }}"
74
80
remote_addrs :
75
81
- " {{ polaris.docker_swarm_advertise_address | default(target_swarm_facts.default_ipv4.address) | default(target_swarm_facts.all_ipv4_addresses[0]) }}"
Original file line number Diff line number Diff line change @@ -47,6 +47,15 @@ properties:
47
47
Externally reachable address advertised to other swarm nodes.
48
48
See https://docs.ansible.com/ansible/latest/collections/community/docker/docker_swarm_module.html#parameter-advertise_addr
49
49
50
+ docker_swarm_default_addr_pool :
51
+ type : array
52
+ default : [ 10.135.0.0/16 ]
53
+ description : >
54
+ List of strings, each of which is a CIDR range of IP addresses which Docker will assign to containers using overlay networks.
55
+ This is useful to ensure reachability of swarm services by external clients that have addresses in the 10/8 usually allocated to overlay networks.
56
+ See https://docs.ansible.com/ansible/latest/collections/community/docker/docker_swarm_module.html#parameter-default_addr_pool
57
+ and https://docs.docker.com/reference/cli/docker/swarm/init/#default-addr-pool
58
+
50
59
docker_registry_username :
51
60
type : string
52
61
You can’t perform that action at this time.
0 commit comments