ansible-collection-hetzner-.../plugins/doc_fragments/hcloud.py
Jonas L 7c9fbf85a7
feat: rename api_endpoint module argument (#395)
##### SUMMARY

Make the api endpoint module argument consistent with the api token. 
- Renamed the `endpoint` module argument to `api_endpoint`, backward
compatibility is maintained using an alias.
- Allow to configure it using the `HCLOUD_ENDPOINT` env var.

This makes the inventory config and the modules config a bit more
consistent.

##### ISSUE TYPE

- Feature Pull Request
2023-11-21 10:13:21 +01:00

30 lines
891 B
Python

# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment:
DOCUMENTATION = """
options:
api_token:
description:
- The API Token for the Hetzner Cloud.
- You can also set this option by using the C(HCLOUD_TOKEN) environment variable.
required: True
type: str
api_endpoint:
description:
- The API Endpoint for the Hetzner Cloud.
- You can also set this option by using the C(HCLOUD_ENDPOINT) environment variable.
default: https://api.hetzner.cloud/v1
type: str
aliases: [endpoint]
requirements:
- python-dateutil >= 2.7.5
- requests >=2.20
seealso:
- name: Documentation for Hetzner Cloud API
description: Complete reference for the Hetzner Cloud API.
link: https://docs.hetzner.cloud
"""