mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-05 16:41:52 +00:00
feat: add support for Hetzner API (#743)
##### SUMMARY Add support the Hetzner API. Users can override the Hetzner API endpoint.
This commit is contained in:
parent
e8d641be04
commit
55352c45fe
2 changed files with 16 additions and 4 deletions
|
|
@ -84,6 +84,7 @@ class AnsibleHCloud:
|
|||
self.client = Client(
|
||||
token=self.module.params["api_token"],
|
||||
api_endpoint=self.module.params["api_endpoint"],
|
||||
api_endpoint_hetzner=self.module.params["api_endpoint_hetzner"],
|
||||
application_name="ansible-module",
|
||||
application_version=version,
|
||||
# Total waiting time before timeout is > 117.0
|
||||
|
|
@ -144,6 +145,11 @@ class AnsibleHCloud:
|
|||
"default": "https://api.hetzner.cloud/v1",
|
||||
"aliases": ["endpoint"],
|
||||
},
|
||||
"api_endpoint_hetzner": {
|
||||
"type": "str",
|
||||
"fallback": (env_fallback, ["HETZNER_ENDPOINT"]),
|
||||
"default": "https://api.hetzner.com/v1",
|
||||
},
|
||||
}
|
||||
|
||||
def _prepare_result(self) -> dict[str, Any]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue