Skip to content

Commit eb8b3d1

Browse files
committed
subnetpool: Add subnetpool option to os_network
Deprecate use_default_subnetpool because it's only allowed during subnet creation and a subnet created with that field is non-updatable. See [1]. [1]: https://github.com/openstack/ansible-collections-openstack/blob/f584c54dfd03e81c1e9c30e2d22f19d2d17a4353/plugins/modules/subnet.py#L348
1 parent a556b4f commit eb8b3d1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

roles/os_networks/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ dict containing the following items:
7070
- `ip_version`: Optional IP version for the subnet.
7171
- `ipv6_address_mode`: Optional IPv6 address mode for the subnet.
7272
- `ipv6_ra_mode`: Optional IPv6 router advertisement mode for the subnet.
73-
- `use_default_subnetpool`: Optional boolean, whether to use the default
74-
subnet pool for the IP version.
73+
- `use_default_subnetpool`: **deprecated** Optional boolean, whether to use
74+
the default subnet pool for the IP version.
75+
- `subnetpool`: Optional subnetpool to use for the subnet.
7576
- `project`: Optionally create this subnet for a project other than the
7677
authenticating project.
7778
- `state`: Optional state of the subnet, default is `present`.

roles/os_networks/tasks/networks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
ipv6_address_mode: "{{ item.1.ipv6_address_mode | default(omit) }}"
5757
ipv6_ra_mode: "{{ item.1.ipv6_ra_mode | default(omit) }}"
5858
use_default_subnetpool: "{{ item.1.use_default_subnetpool | default(omit) }}"
59+
subnetpool: "{{ item.1.subnetpool | default(omit) }}"
5960
project: "{{ item.1.project | default(omit) }}"
6061
state: "{{ item.1.state | default(omit) }}"
6162
with_subelements:

0 commit comments

Comments
 (0)