You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docsite/rst/hetzner_guide.rst
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ It also provides an inventory plugin:
27
27
Authentication
28
28
--------------
29
29
30
-
To use Hetzner's API, you need to create an API token. You can manage API tokens in the "API tokens" menu entry in your user menu in the `DNS Console <https://dns.hetzner.com/>`_. You must provide the token to the ``hetzner_token`` option of the modules, its alias ``api_token``, or pass it on in the ``HETZNER_DNS_TOKEN`` environment variable:
30
+
To use Hetzner's API, you need to create an API token. You can manage API tokens in the "API tokens" menu entry in your user menu in the `DNS Console <https://dns.hetzner.com/>`_. You must provide the token to the :ansopt:`hetzner_token` option of the modules, its alias :ansopt:`api_token`, or pass it on in the :envvar:`HETZNER_DNS_TOKEN` environment variable:
31
31
32
32
.. code-block:: yaml+jinja
33
33
@@ -96,7 +96,7 @@ The :ref:`community.dns.hetzner_dns_record_set_info module <ansible_collections.
96
96
msg: There is no A record for www.example.com
97
97
when: not result.set
98
98
99
-
In all examples in this section, you can replace ``zone_name=example.com`` by ``zone_id=aBcDeFgHiJlMnOpQrStUvW`` with the zone's ID string.
99
+
In all examples in this section, you can replace :ansopt:`zone_name=example.com` by :ansopt:`zone_id=aBcDeFgHiJlMnOpQrStUvW` with the zone's ID string.
100
100
101
101
You can also query a list of all records for a record name or prefix:
102
102
@@ -157,7 +157,7 @@ The :ref:`community.dns.hetzner_dns_record module <ansible_collections.community
157
157
value: 1.1.1.1
158
158
ttl: 300
159
159
160
-
To delete records, simply use ``state=absent``. Records will be matched by record name and type, and the TTL will be ignored:
160
+
To delete records, simply use :ansopt:`state=absent`. Records will be matched by record name and type, and the TTL will be ignored:
161
161
162
162
.. code-block:: yaml+jinja
163
163
@@ -191,9 +191,9 @@ The :ref:`community.dns.hetzner_dns_record_set module <ansible_collections.commu
191
191
- 1.1.1.1
192
192
- 8.8.8.8
193
193
194
-
If you want to assert that a record has a certain value, set ``on_existing=keep``. Using ``keep_and_warn`` instead will emit a warning if this happens, and ``keep_and_fail`` will make the module fail.
194
+
If you want to assert that a record has a certain value, set :ansopt:`on_existing=keep`. Using :ansval:`keep_and_warn` instead will emit a warning if this happens, and :ansval:`keep_and_fail` will make the module fail.
195
195
196
-
To delete values, you can either overwrite the values with value ``[]``, or use ``state=absent``:
196
+
To delete values, you can either overwrite the values with value :ansval:`[]`, or use :ansopt:`state=absent`:
197
197
198
198
.. code-block:: yaml+jinja
199
199
@@ -223,7 +223,7 @@ To delete values, you can either overwrite the values with value ``[]``, or use
223
223
value:
224
224
- '::1'
225
225
226
-
In the third example, ``on_existing=keep_and_fail`` is present and an explicit value and TTL are given. This makes the module remove the current value only if there's a AAAA record for ``www.example.com`` whose current value is ``::1`` and whose TTL is 300. If another value is set, the module will not make any change, but fail. This can be useful to not accidentally remove values you do not want to change. To issue a warning instead of failing, use ``on_existing=keep_and_warn``, and to simply not do a change without any indication of this situation, use ``on_existing=keep``.
226
+
In the third example, :ansopt:`on_existing=keep_and_fail` is present and an explicit value and TTL are given. This makes the module remove the current value only if there's a AAAA record for ``www.example.com`` whose current value is ``::1`` and whose TTL is 300. If another value is set, the module will not make any change, but fail. This can be useful to not accidentally remove values you do not want to change. To issue a warning instead of failing, use :ansopt:`on_existing=keep_and_warn`, and to simply not do a change without any indication of this situation, use :ansopt:`on_existing=keep`.
227
227
228
228
Bulk synchronization of DNS record sets
229
229
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -248,7 +248,7 @@ The following example shows up to set/update multiple records at once:
248
248
value:
249
249
- '::1'
250
250
251
-
The next example shows how to make sure that only the given records are available and all other records are deleted. Note that for the ``type=NS`` record we used ``ignore=true``, which allows us to skip the value. It tells the module that it should not touch the ``NS`` record for ``example.com``.
251
+
The next example shows how to make sure that only the given records are available and all other records are deleted. Note that for the :ansopt:`type=NS` record we used :ansopt:`ignore=true`, which allows us to skip the value. It tells the module that it should not touch the ``NS`` record for ``example.com``.
252
252
253
253
.. code-block:: yaml+jinja
254
254
@@ -290,7 +290,7 @@ The markuman.hetzner_dns.record module
290
290
291
291
The ``markuman.hetzner_dns.zone_info`` module can be replaced by the :ref:`community.dns.hetzner_dns_record module <ansible_collections.community.dns.hetzner_dns_record_module>` and the :ref:`community.dns.hetzner_dns_record_set module <ansible_collections.community.dns.hetzner_dns_record_set_module>`, depending on what it is used for.
292
292
293
-
When creating, updating or removing single records, the :ref:`community.dns.hetzner_dns_record module <ansible_collections.community.dns.hetzner_dns_record_module>` should be used. This is the case when ``purge=false`` is specified (the default value). Note that ``replace``, ``overwrite`` and ``solo`` are aliases of ``purge``.
293
+
When creating, updating or removing single records, the :ref:`community.dns.hetzner_dns_record module <ansible_collections.community.dns.hetzner_dns_record_module>` should be used. This is the case when :ansopt:`purge=false` is specified (the default value). Note that :ansopt:`replace`, :ansopt:`overwrite` and :ansopt:`solo` are aliases of :ansopt:`purge`.
294
294
295
295
.. code-block:: yaml+jinja
296
296
@@ -356,7 +356,7 @@ When the ``markuman.hetzner_dns.record`` module is in replace mode, it should be
356
356
#
357
357
# value: 127.0.0.1
358
358
359
-
When deleting a record, it depends on whether ``value`` is specified or not. If ``value`` is specified, the module is deleting a single DNS record, and the :ref:`community.dns.hetzner_dns_record module <ansible_collections.community.dns.hetzner_dns_record_module>` should be used:
359
+
When deleting a record, it depends on whether :ansopt:`value` is specified or not. If :ansopt:`value` is specified, the module is deleting a single DNS record, and the :ref:`community.dns.hetzner_dns_record module <ansible_collections.community.dns.hetzner_dns_record_module>` should be used:
360
360
361
361
.. code-block:: yaml+jinja
362
362
@@ -383,7 +383,7 @@ When deleting a record, it depends on whether ``value`` is specified or not. If
383
383
value: 127.0.0.1
384
384
ttl: 60
385
385
386
-
When ``value`` is not specified, the ``markuman.hetzner_dns.record`` module will delete all records for this prefix and type. In that case, it operates on a record set and the :ref:`community.dns.hetzner_dns_record_set module <ansible_collections.community.dns.hetzner_dns_record_set_module>` should be used:
386
+
When :ansopt:`value` is not specified, the ``markuman.hetzner_dns.record`` module will delete all records for this prefix and type. In that case, it operates on a record set and the :ref:`community.dns.hetzner_dns_record_set module <ansible_collections.community.dns.hetzner_dns_record_set_module>` should be used:
387
387
388
388
.. code-block:: yaml+jinja
389
389
@@ -406,22 +406,22 @@ When ``value`` is not specified, the ``markuman.hetzner_dns.record`` module will
406
406
# 'type' does not change:
407
407
type: A
408
408
409
-
A last step is replacing the deprecated alias ``name`` of ``prefix`` by ``prefix``. This can be done later though, if you do not mind the deprecation warnings.
409
+
A last step is replacing the deprecated alias :ansopt:`name` of :ansopt:`prefix` by :ansopt:`prefix`. This can be done later though, if you do not mind the deprecation warnings.
410
410
411
411
The markuman.hetzner_dns.record_info module
412
412
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
413
413
414
414
The ``markuman.hetzner_dns.record_info`` module can be replaced by the :ref:`community.dns.hetzner_dns_record_set_info module <ansible_collections.community.dns.hetzner_dns_record_set_info_module>`. There are two big differences:
415
415
416
-
1. Instead of with the ``filters`` option, the output is controlled by the ``what`` option (choices ``single_record``, ``all_types_for_record``, and ``all_records``), the ``type`` option (needed when ``what=single_record``), and the ``record`` and ``prefix`` options (needed when ``what`` is not ``all_records``).
417
-
2. The module returns **record sets** instead of individual records. This means that for example all A record for the prefix ``*`` are returned as one entry (with multiple values), instead of a list of records (which each a single value).
416
+
1. Instead of with the :ansopt:`filters` option, the output is controlled by the :ansopt:`what` option (choices :ansval:`single_record`, :ansval:`all_types_for_record`, and :ansval:`all_records`), the :ansopt:`type` option (needed when :ansopt:`what=single_record`), and the :ansopt:`record` and :ansopt:`prefix` options (needed when :ansopt:`what` is not :ansval:`all_records`).
417
+
2. The module returns **record sets** instead of individual records. This means that for example all A record for the prefix :ansval:`*` are returned as one entry (with multiple values), instead of a list of records (which each a single value).
418
418
419
419
The markuman.hetzner_dns.zone_info module
420
420
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
421
421
422
422
The ``markuman.hetzner_dns.zone_info`` module can be replaced by the :ref:`community.dns.hetzner_dns_zone_info module <ansible_collections.community.dns.hetzner_dns_zone_info_module>`. The main differences are:
423
423
424
-
1. The parameter ``name`` must be changed to ``zone_name`` or ``zone``.
424
+
1. The parameter :ansopt:`name` must be changed to :ansopt:`zone_name` or :ansopt:`zone`.
425
425
2. The return value ``zone_info`` no longer has the ``name`` and ``id`` entries. Use the return values ``zone_name`` and ``zone_id`` instead.
426
426
427
427
The markuman.hetzner_dns.inventory inventory plugin
Copy file name to clipboardExpand all lines: docs/docsite/rst/hosttech_guide.rst
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ HostTech currently has two APIs for working with DNS records: the old WSDL-based
30
30
JSON REST API
31
31
~~~~~~~~~~~~~
32
32
33
-
To use the JSON REST API, you need to create a API token. You can manage API tokens in the "DNS Editor" in the "API" section. You must provide the token to the ``hosttech_token`` option of the modules:
33
+
To use the JSON REST API, you need to create a API token. You can manage API tokens in the "DNS Editor" in the "API" section. You must provide the token to the :ansopt:`hosttech_token` option of the modules:
34
34
35
35
.. code-block:: yaml+jinja
36
36
@@ -43,7 +43,7 @@ In the examples in this guide, we will leave the authentication options away. Pl
43
43
WSDL API
44
44
~~~~~~~~
45
45
46
-
To use the WSDL API, you need to set API credentials. These can be found and changed in the "Servercenter" and there in the "Solutions" section under settings for the "DNS Tool". The username is fixed, but the password can be changed. The credentials must be provided to the ``hosttech_username`` and ``hosttech_password`` options of the modules.
46
+
To use the WSDL API, you need to set API credentials. These can be found and changed in the "Servercenter" and there in the "Solutions" section under settings for the "DNS Tool". The username is fixed, but the password can be changed. The credentials must be provided to the :ansopt:`hosttech_username` and :ansopt:`hosttech_password` options of the modules.
47
47
48
48
You also need to install the `lxml Python module <https://pypi.org/project/lxml/>`_ to work with the WSDL API. This can be done before using the modules:
49
49
@@ -119,7 +119,7 @@ The :ref:`community.dns.hosttech_dns_record_set_info module <ansible_collections
119
119
msg: There is no A record for www.example.com
120
120
when: not result.set
121
121
122
-
In all examples in this section, you can replace ``zone_name: example.com`` by ``zone_id: 42`` with the zone's integer ID.
122
+
In all examples in this section, you can replace :ansopt:`zone_name=example.com` by :ansopt:`zone_id=42` with the zone's integer ID.
123
123
124
124
You can also query a list of all records for a record name or prefix:
125
125
@@ -180,7 +180,7 @@ The :ref:`community.dns.hosttech_dns_record module <ansible_collections.communit
180
180
value: 1.1.1.1
181
181
ttl: 300
182
182
183
-
To delete records, simply use ``state: absent``. Records will be matched by record name and type, and the TTL will be ignored:
183
+
To delete records, simply use :ansopt:`state=absent`. Records will be matched by record name and type, and the TTL will be ignored:
184
184
185
185
.. code-block:: yaml+jinja
186
186
@@ -214,9 +214,9 @@ The :ref:`community.dns.hosttech_dns_record_set module <ansible_collections.comm
214
214
- 1.1.1.1
215
215
- 8.8.8.8
216
216
217
-
If you want to assert that a record has a certain value, set ``on_existing: keep``. Using ``keep_and_warn`` instead will emit a warning if this happens, and ``keep_and_fail`` will make the module fail.
217
+
If you want to assert that a record has a certain value, set :ansopt:`on_existing=keep`. Using :ansval:`keep_and_warn` instead will emit a warning if this happens, and :ansval:`keep_and_fail` will make the module fail.
218
218
219
-
To delete values, you can either overwrite the values with value ``[]``, or use ``state: absent``:
219
+
To delete values, you can either overwrite the values with value :ansval:`[]`, or use :ansopt:`state=absent`:
220
220
221
221
.. code-block:: yaml+jinja
222
222
@@ -246,7 +246,7 @@ To delete values, you can either overwrite the values with value ``[]``, or use
246
246
value:
247
247
- '::1'
248
248
249
-
In the third example, ``on_existing: keep_and_fail`` is present and an explicit value and TTL are given. This makes the module remove the current value only if there's a AAAA record for ``www.example.com`` whose current value is ``::1`` and whose TTL is 300. If another value is set, the module will not make any change, but fail. This can be useful to not accidentally remove values you do not want to change. To issue a warning instead of failing, use ``on_existing: keep_and_warn``, and to simply not do a change without any indication of this situation, use ``on_existing: keep``.
249
+
In the third example, :ansopt:`on_existing=keep_and_fail` is present and an explicit value and TTL are given. This makes the module remove the current value only if there's a AAAA record for ``www.example.com`` whose current value is ``::1`` and whose TTL is 300. If another value is set, the module will not make any change, but fail. This can be useful to not accidentally remove values you do not want to change. To issue a warning instead of failing, use :ansopt:`on_existing=keep_and_warn`, and to simply not do a change without any indication of this situation, use :ansopt:`on_existing=keep`.
250
250
251
251
Bulk synchronization of DNS record sets
252
252
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -271,7 +271,7 @@ The following example shows up to set/update multiple records at once:
271
271
value:
272
272
- '::1'
273
273
274
-
The next example shows how to make sure that only the given records are available and all other records are deleted. Note that for the ``type: NS`` record we used ``ignore: true``, which allows us to skip the value. It tells the module that it should not touch the ``NS`` record for ``example.com``.
274
+
The next example shows how to make sure that only the given records are available and all other records are deleted. Note that for the :ansopt:`type=NS` record we used :ansopt:`ignore=true`, which allows us to skip the value. It tells the module that it should not touch the ``NS`` record for ``example.com``.
0 commit comments