Replace underscores with hyphens in dns_domain

When creating Neutron networks, the name we use must be able to form a
valid DNS name. For this reason, we should replace underscores with
hyphens when we set the dns_domain property of any Neutron networks.

This change uses Jinja2 to format the string during template rendering.

Signed-off-by: Brendan Shephard <bshephar@redhat.com>
Change-Id: Ifc2e19d0499c12d2abd6ee7b25833451b9dab53e
Resolves: rhbz#2247835
This commit is contained in:
Brendan Shephard 2023-11-08 08:23:34 +10:00
parent 3403bfb06f
commit 6ec231bcf1

@ -162,7 +162,7 @@ resources:
dns_domain:
list_join:
- '.'
- - {{network.name.lower()}}
- - {{network.name.lower() | replace("_", "-")}}
- {get_param: CloudDomain}
- ''
shared: {get_param: {{network.name}}NetShared}
@ -282,7 +282,7 @@ outputs:
dns_domain:
list_join:
- '.'
- - {{network.name.lower()}}
- - {{network.name.lower() | replace("_", "-")}}
- {get_param: CloudDomain}
- ''
mtu: {{network.mtu|default('1500')}}