mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
9bcc8a0d9f
commit
f69f9a86cd
1 changed files with 3 additions and 9 deletions
|
|
@ -99,8 +99,8 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
from ..module_utils.hcloud import AnsibleHCloud
|
||||
from ..module_utils.vendor.hcloud import HCloudException
|
||||
from ..module_utils.vendor.hcloud.volumes import BoundVolume
|
||||
from ..module_utils.vendor.hcloud.servers import BoundServer
|
||||
from ..module_utils.vendor.hcloud.volumes import BoundVolume
|
||||
|
||||
|
||||
class AnsibleHCloudServerVolume(AnsibleHCloud):
|
||||
|
|
@ -119,15 +119,9 @@ class AnsibleHCloudServerVolume(AnsibleHCloud):
|
|||
def _get_server_and_volume(self):
|
||||
try:
|
||||
if self.module.params.get("id") is not None:
|
||||
self.hcloud_server_volume = self._client_get_by_name_or_id(
|
||||
"volumes",
|
||||
self.module.params.get("id")
|
||||
)
|
||||
self.hcloud_server_volume = self._client_get_by_name_or_id("volumes", self.module.params.get("id"))
|
||||
else:
|
||||
self.hcloud_server_volume = self._client_get_by_name_or_id(
|
||||
"volumes",
|
||||
self.module.params.get("volume")
|
||||
)
|
||||
self.hcloud_server_volume = self._client_get_by_name_or_id("volumes", self.module.params.get("volume"))
|
||||
|
||||
self.hcloud_server = self._client_get_by_name_or_id(
|
||||
"servers",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue