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/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
@@ -21,7 +21,7 @@ HostTech currently has two APIs for working with DNS records: the old WSDL-based
21
21
JSON REST API
22
22
~~~~~~~~~~~~~
23
23
24
-
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:
24
+
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:
25
25
26
26
.. code-block:: yaml+jinja
27
27
@@ -34,7 +34,7 @@ In the examples in this guide, we will leave the authentication options away. Pl
34
34
WSDL API
35
35
~~~~~~~~
36
36
37
-
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.
37
+
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.
38
38
39
39
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:
40
40
@@ -110,7 +110,7 @@ The :ref:`community.dns.hosttech_dns_record_info module <ansible_collections.com
110
110
msg: There is no A record for www.example.com
111
111
when: not result.set
112
112
113
-
In all examples in this section, you can replace ``zone_name: example.com`` by ``zone_id: 42`` with the zone's integer ID.
113
+
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.
114
114
115
115
You can also query a list of all records for a record name or prefix:
116
116
@@ -169,7 +169,7 @@ The :ref:`community.dns.hosttech_dns_record module <ansible_collections.communit
169
169
value: 1.1.1.1
170
170
ttl: 300
171
171
172
-
To delete records, simply use ``state: absent``. Records will be matched by record name and type, and the TTL will be ignored:
172
+
To delete records, simply use :ansopt:`state=absent`. Records will be matched by record name and type, and the TTL will be ignored:
173
173
174
174
.. code-block:: yaml+jinja
175
175
@@ -203,9 +203,9 @@ The :ref:`community.dns.hosttech_dns_record_set module <ansible_collections.comm
203
203
- 1.1.1.1
204
204
- 8.8.8.8
205
205
206
-
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.
206
+
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.
207
207
208
-
To delete values, you can either overwrite the values with value ``[]``, or use ``state: absent``:
208
+
To delete values, you can either overwrite the values with value :ansval:`[]`, or use :ansopt:`state=absent`:
209
209
210
210
.. code-block:: yaml+jinja
211
211
@@ -235,7 +235,7 @@ To delete values, you can either overwrite the values with value ``[]``, or use
235
235
value:
236
236
- '::1'
237
237
238
-
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``.
238
+
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`.
239
239
240
240
Bulk synchronization of DNS record sets
241
241
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -260,7 +260,7 @@ The following example shows up to set/update multiple records at once:
260
260
value:
261
261
- '::1'
262
262
263
-
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``.
263
+
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