Skip to content

Commit 924f688

Browse files
committed
hook: ironic_networks.yml - IPv6 support
Add support to set IP version and IPv6 specific settings for the ironic provisioning network created by this hook. Jira: OSPRH-20084
1 parent 9ecca9e commit 924f688

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

hooks/playbooks/ironic_network.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
_subnet_nameserver: '192.168.122.80'
1010
_subnet_alloc_pool_start: '172.20.1.100'
1111
_subnet_alloc_pool_end: '172.20.1.200'
12+
_subnet_ip_version: 4
13+
_subnet_ipv6_address_mode: null
14+
_subnet_ipv6_ra_mode: null
1215
_provider_physical_network: ironic
1316
_provider_network_type: flat
1417
_availability_zone_hints: null # Comma separated list of strings
@@ -24,7 +27,7 @@
2427
openstack network create provisioning \
2528
--share \
2629
--provider-physical-network {{ _provider_physical_network }} \
27-
{% if _availability_zone_hints is not none -%}
30+
{% if _availability_zone_hints -%}
2831
{% for zone in _availability_zone_hints | split(',') -%}
2932
--availability-zone-hint {{ zone }} \
3033
{% endfor -%}
@@ -33,6 +36,13 @@
3336
oc rsh openstackclient \
3437
openstack subnet create provisioning-subnet \
3538
--network provisioning \
39+
--ip-version {{ _subnet_ip_version }} \
40+
{% if _subnet_ipv6_address_mode -%}
41+
--ipv6-address-mode {{ _subnet_ipv6_address_mode }} \
42+
{% endif -%}
43+
{% if _subnet_ipv6_ra_mode -%}
44+
--ipv6-ra-mode {{ _subnet_ipv6_ra_mode }} \
45+
{% endif -%}
3646
--subnet-range {{ _subnet_range }} \
3747
--gateway {{ _subnet_gateway }} \
3848
--dns-nameserver {{ _subnet_nameserver }} \

0 commit comments

Comments
 (0)