1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 08:01:49 +00:00

fix: madness

This commit is contained in:
jo 2026-01-05 10:57:31 +01:00
parent e0b7be3574
commit 8dd40ec4d6
No known key found for this signature in database
GPG key ID: B2FEC9B22722B984
2 changed files with 2 additions and 0 deletions

View file

@ -233,6 +233,7 @@ class AnsiblePrimaryIP(AnsibleHCloud):
)
# Backward compatible datacenter argument.
# datacenter hel1-dc2 => location hel1
# pylint: disable=disallowed-name
part1, _, _ = str(value).partition("-")
params["location"] = self.client.locations.get_by_name(part1)
elif (value := self.module.params.get("server")) is not None:

View file

@ -486,6 +486,7 @@ class AnsibleHCloudServer(AnsibleHCloud):
# Backward compatible datacenter argument.
# datacenter hel1-dc2 => location hel1
if value and not value.isdigit():
# pylint: disable=disallowed-name
part1, _, _ = value.partition("-")
params["location"] = self.client.locations.get_by_name(part1)
server_type_location = params["location"]