mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-13 21:34:40 +03:00
Support python 3.12 for terraform.py in regex expression (#11773)
This commit is contained in:
@@ -98,7 +98,7 @@ PARSERS = {}
|
|||||||
def _clean_dc(dcname):
|
def _clean_dc(dcname):
|
||||||
# Consul DCs are strictly alphanumeric with underscores and hyphens -
|
# Consul DCs are strictly alphanumeric with underscores and hyphens -
|
||||||
# ensure that the consul_dc attribute meets these requirements.
|
# ensure that the consul_dc attribute meets these requirements.
|
||||||
return re.sub('[^\w_\-]', '-', dcname)
|
return re.sub(r'[^\w_\-]', '-', dcname)
|
||||||
|
|
||||||
|
|
||||||
def iterhosts(resources):
|
def iterhosts(resources):
|
||||||
@@ -304,7 +304,7 @@ def openstack_host(resource, module_name):
|
|||||||
try:
|
try:
|
||||||
if 'metadata.prefer_ipv6' in raw_attrs and raw_attrs['metadata.prefer_ipv6'] == "1":
|
if 'metadata.prefer_ipv6' in raw_attrs and raw_attrs['metadata.prefer_ipv6'] == "1":
|
||||||
attrs.update({
|
attrs.update({
|
||||||
'ansible_host': re.sub("[\[\]]", "", raw_attrs['access_ip_v6']),
|
'ansible_host': re.sub(r"[\[\]]", "", raw_attrs['access_ip_v6']),
|
||||||
'publicly_routable': True,
|
'publicly_routable': True,
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user