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:
parent
e0b7be3574
commit
8dd40ec4d6
2 changed files with 2 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue