mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-11-10 06:34:13 +00:00
docs: add global docs using docsite (#394)
##### SUMMARY Add a global documentation for the collection. See the https://github.com/ansible-collections/collection_template and https://github.com/ansible-collections/amazon.aws/tree/main/docs/docsite for examples. ##### ISSUE TYPE - Docs Pull Request
This commit is contained in:
parent
328dfb8b0f
commit
9e0bf59231
3 changed files with 41 additions and 0 deletions
5
docs/docsite/extra-docs.yml
Normal file
5
docs/docsite/extra-docs.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
sections:
|
||||||
|
- title: Authentication
|
||||||
|
toctree:
|
||||||
|
- authentication
|
10
docs/docsite/links.yml
Normal file
10
docs/docsite/links.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
edit_on_github:
|
||||||
|
repository: ansible-collections/hetzner.hcloud
|
||||||
|
branch: main
|
||||||
|
|
||||||
|
extra_links:
|
||||||
|
- description: Hetzner Cloud API Reference
|
||||||
|
url: https://docs.hetzner.cloud
|
||||||
|
- description: Hetzner Cloud API Changelog
|
||||||
|
url: https://docs.hetzner.cloud/changelog
|
26
docs/docsite/rst/authentification.rst
Normal file
26
docs/docsite/rst/authentification.rst
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
Authentication
|
||||||
|
==============
|
||||||
|
|
||||||
|
To `authenticate the API call against the Hetzner Cloud API <https://docs.hetzner.cloud/#authentication>`_ when
|
||||||
|
using the ``hetzner.hcloud`` collection, you can provide the API token by different means:
|
||||||
|
|
||||||
|
You can pass the API token using an environment variable (recommended):
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
export HCLOUD_TOKEN='LRK9DAWQ1ZAEFSrCNEEzLCUwhYX1U3g7wMg4dTlkkDC96fyDuyJ39nVbVjCKSDfj'
|
||||||
|
|
||||||
|
# Verify that your token is working
|
||||||
|
ansible -m hetzner.hcloud.location_info localhost
|
||||||
|
|
||||||
|
Alternatively, you may provide the API token directly as module argument:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
- name: Create server
|
||||||
|
hetzner.hcloud.server:
|
||||||
|
api_token: LRK9DAWQ1ZAEFSrCNEEzLCUwhYX1U3g7wMg4dTlkkDC96fyDuyJ39nVbVjCKSDfj
|
||||||
|
name: my-server
|
||||||
|
server_type: cx11
|
||||||
|
image: debian-12
|
||||||
|
state: present
|
Loading…
Reference in a new issue