Skip to content

Commit

Permalink
put example addresses in actual RFC1918 range (#170)
Browse files Browse the repository at this point in the history
172.1/16, 172.3/16 and 172.4/16 are not in the 172.16/12 range.

https://datatracker.ietf.org/doc/html/rfc1918#section-3
  • Loading branch information
lotheac authored Jul 1, 2021
1 parent 61d9237 commit a0f2091
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 deletions.
6 changes: 3 additions & 3 deletions plugins/modules/docker_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@
image: ubuntu:14.04
networks:
- name: TestingNet
ipv4_address: "172.1.1.100"
ipv4_address: "172.16.1.100"
aliases:
- sleepyzz
links:
Expand All @@ -999,11 +999,11 @@
name: sleepy
networks:
- name: TestingNet
ipv4_address: 172.1.1.18
ipv4_address: 172.16.1.18
links:
- sleeper
- name: TestingNet2
ipv4_address: 172.1.10.20
ipv4_address: 172.16.10.20
- name: Update network with aliases
community.docker.docker_container:
Expand Down
12 changes: 6 additions & 6 deletions plugins/modules/docker_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@
community.docker.docker_network:
name: network_three
ipam_config:
- subnet: 172.3.27.0/24
gateway: 172.3.27.2
iprange: 172.3.27.0/26
- subnet: 172.23.27.0/24
gateway: 172.23.27.2
iprange: 172.23.27.0/26
aux_addresses:
host1: 172.3.27.3
host2: 172.3.27.4
host1: 172.23.27.3
host2: 172.23.27.4
- name: Create a network with labels
community.docker.docker_network:
Expand All @@ -230,7 +230,7 @@
name: network_ipv6_two
enable_ipv6: yes
ipam_config:
- subnet: 172.4.27.0/24
- subnet: 172.24.27.0/24
- subnet: fdd1:ac8c:0557:7ce2::/64
- name: Delete a network, disconnecting all containers
Expand Down
50 changes: 25 additions & 25 deletions tests/integration/targets/docker_network/tasks/tests/ipam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
docker_network:
name: "{{ nname_ipam_1 }}"
ipam_config:
- subnet: 172.3.27.0/24
gateway: 172.3.27.2
iprange: 172.3.27.0/26
- subnet: 172.23.27.0/24
gateway: 172.23.27.2
iprange: 172.23.27.0/26
aux_addresses:
host1: 172.3.27.3
host2: 172.3.27.4
host1: 172.23.27.3
host2: 172.23.27.4
register: network

- assert:
Expand All @@ -33,12 +33,12 @@
docker_network:
name: "{{ nname_ipam_1 }}"
ipam_config:
- subnet: 172.3.27.0/24
gateway: 172.3.27.2
iprange: 172.3.27.0/26
- subnet: 172.23.27.0/24
gateway: 172.23.27.2
iprange: 172.23.27.0/26
aux_addresses:
host1: 172.3.27.3
host2: 172.3.27.4
host1: 172.23.27.3
host2: 172.23.27.4
register: network

- assert:
Expand All @@ -49,11 +49,11 @@
docker_network:
name: "{{ nname_ipam_1 }}"
ipam_config:
- subnet: 172.3.28.0/24
gateway: 172.3.28.2
iprange: 172.3.28.0/26
- subnet: 172.23.28.0/24
gateway: 172.23.28.2
iprange: 172.23.28.0/26
aux_addresses:
host1: 172.3.28.3
host1: 172.23.28.3
register: network
diff: yes

Expand All @@ -70,7 +70,7 @@
docker_network:
name: "{{ nname_ipam_1 }}"
ipam_config:
- subnet: 172.3.28.0/24
- subnet: 172.23.28.0/24
register: network

- assert:
Expand Down Expand Up @@ -151,7 +151,7 @@
name: "{{ nname_ipam_3 }}"
enable_ipv6: yes
ipam_config:
- subnet: 172.4.27.0/24
- subnet: 172.24.27.0/24
- subnet: fdd1:ac8c:0557:7ce2::/64
register: network

Expand All @@ -165,7 +165,7 @@
enable_ipv6: yes
ipam_config:
- subnet: fdd1:ac8c:0557:7ce2::/64
- subnet: 172.4.27.0/24
- subnet: 172.24.27.0/24
register: network

- assert:
Expand All @@ -177,7 +177,7 @@
name: "{{ nname_ipam_3 }}"
enable_ipv6: no
ipam_config:
- subnet: 172.4.27.0/24
- subnet: 172.24.27.0/24
register: network
diff: yes

Expand All @@ -203,8 +203,8 @@
driver_options:
parent: "{{ ansible_default_ipv4.alias }}"
ipam_config:
- subnet: 172.4.27.0/24
- subnet: 172.4.28.0/24
- subnet: 172.24.27.0/24
- subnet: 172.24.28.0/24
register: network

- assert:
Expand All @@ -218,8 +218,8 @@
driver_options:
parent: "{{ ansible_default_ipv4.alias }}"
ipam_config:
- subnet: 172.4.28.0/24
- subnet: 172.4.27.0/24
- subnet: 172.24.28.0/24
- subnet: 172.24.27.0/24
register: network

- assert:
Expand All @@ -233,8 +233,8 @@
driver_options:
parent: "{{ ansible_default_ipv4.alias }}"
ipam_config:
- subnet: 172.4.27.0/24
- subnet: 172.4.29.0/24
- subnet: 172.24.27.0/24
- subnet: 172.24.29.0/24
register: network
diff: yes

Expand All @@ -250,7 +250,7 @@
driver_options:
parent: "{{ ansible_default_ipv4.alias }}"
ipam_config:
- subnet: 172.4.29.0/24
- subnet: 172.24.29.0/24
register: network

- assert:
Expand Down

0 comments on commit a0f2091

Please sign in to comment.