Skip to content

Commit 32e4de0

Browse files
committed
Use semantic markup.
1 parent 683a844 commit 32e4de0

12 files changed

+96
-96
lines changed

docs/docsite/rst/hosttech_guide.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ HostTech currently has two APIs for working with DNS records: the old WSDL-based
2121
JSON REST API
2222
~~~~~~~~~~~~~
2323

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:
2525

2626
.. code-block:: yaml+jinja
2727

@@ -34,7 +34,7 @@ In the examples in this guide, we will leave the authentication options away. Pl
3434
WSDL API
3535
~~~~~~~~
3636

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.
3838

3939
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:
4040

@@ -110,7 +110,7 @@ The :ref:`community.dns.hosttech_dns_record_info module <ansible_collections.com
110110
msg: There is no A record for www.example.com
111111
when: not result.set
112112

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.
114114

115115
You can also query a list of all records for a record name or prefix:
116116

@@ -169,7 +169,7 @@ The :ref:`community.dns.hosttech_dns_record module <ansible_collections.communit
169169
value: 1.1.1.1
170170
ttl: 300
171171

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:
173173

174174
.. code-block:: yaml+jinja
175175

@@ -203,9 +203,9 @@ The :ref:`community.dns.hosttech_dns_record_set module <ansible_collections.comm
203203
- 1.1.1.1
204204
- 8.8.8.8
205205

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.
207207

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`:
209209

210210
.. code-block:: yaml+jinja
211211

@@ -235,7 +235,7 @@ To delete values, you can either overwrite the values with value ``[]``, or use
235235
value:
236236
- '::1'
237237

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`.
239239

240240
Bulk synchronization of DNS record sets
241241
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -260,7 +260,7 @@ The following example shows up to set/update multiple records at once:
260260
value:
261261
- '::1'
262262

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``.
264264

265265
.. code-block:: yaml+jinja
266266

plugins/doc_fragments/hetzner.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class ModuleDocFragment(object):
1515
hetzner_token:
1616
description:
1717
- The token for the Hetzner API.
18-
- If not provided, will be read from the environment variable C(HETZNER_DNS_TOKEN).
18+
- If not provided, will be read from the environment variable E(HETZNER_DNS_TOKEN).
1919
aliases:
2020
- api_token
2121
type: str
@@ -56,15 +56,15 @@ class ModuleDocFragment(object):
5656
record:
5757
description:
5858
- The full DNS record to create or delete.
59-
- Exactly one of I(record) and I(prefix) must be specified.
59+
- Exactly one of O(record) and O(prefix) must be specified.
6060
type: str
6161
prefix:
6262
description:
6363
- The prefix of the DNS record.
64-
- This is the part of I(record) before I(zone). For example, if the record to be modified is C(www.example.com)
65-
for the zone C(example.com), the prefix is C(www). If the record in this example would be C(example.com), the
66-
prefix would be C('') (empty string).
67-
- Exactly one of I(record) and I(prefix) must be specified.
64+
- This is the part of O(record) before O(zone). For example, if the record to be modified is C(www.example.com)
65+
for the zone C(example.com), the prefix is V(www). If the record in this example would be C(example.com), the
66+
prefix would be V('') (empty string).
67+
- Exactly one of O(record) and O(prefix) must be specified.
6868
type: str
6969
ttl:
7070
description:
@@ -77,13 +77,13 @@ class ModuleDocFragment(object):
7777
- YAML lists or multiple comma-spaced values are allowed.
7878
- When deleting a record all values for the record must be specified or it will
7979
not be deleted.
80-
- Must be specified if I(ignore=false).
80+
- Must be specified if O(ignore=false).
8181
type: list
8282
elements: str
8383
ignore:
8484
description:
85-
- If set to C(true), I(value) will be ignored.
86-
- This is useful when I(prune=true), but you do not want certain entries to be removed
85+
- If set to V(true), O(value) will be ignored.
86+
- This is useful when O(prune=true), but you do not want certain entries to be removed
8787
without having to know their current value.
8888
type: bool
8989
default: false

plugins/doc_fragments/hosttech.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ class ModuleDocFragment(object):
1818
hosttech_username:
1919
description:
2020
- The username for the Hosttech API user.
21-
- If provided, I(hosttech_password) must also be provided.
22-
- Mutually exclusive with I(hosttech_token).
21+
- If provided, O(hosttech_password) must also be provided.
22+
- Mutually exclusive with O(hosttech_token).
2323
type: str
2424
hosttech_password:
2525
description:
2626
- The password for the Hosttech API user.
27-
- If provided, I(hosttech_password) must also be provided.
28-
- Mutually exclusive with I(hosttech_token).
27+
- If provided, O(hosttech_password) must also be provided.
28+
- Mutually exclusive with O(hosttech_token).
2929
type: str
3030
hosttech_token:
3131
description:
3232
- The password for the Hosttech API user.
33-
- Mutually exclusive with I(hosttech_username) and I(hosttech_password).
34-
- Since community.dns 1.2.0, the alias I(api_token) can be used.
33+
- Mutually exclusive with O(hosttech_username) and O(hosttech_password).
34+
- Since community.dns 1.2.0, the alias O(api_token) can be used.
3535
aliases:
3636
- api_token
3737
type: str
@@ -69,15 +69,15 @@ class ModuleDocFragment(object):
6969
record:
7070
description:
7171
- The full DNS record to create or delete.
72-
- Exactly one of I(record) and I(prefix) must be specified.
72+
- Exactly one of O(record) and O(prefix) must be specified.
7373
type: str
7474
prefix:
7575
description:
7676
- The prefix of the DNS record.
77-
- This is the part of I(record) before I(zone). For example, if the record to be modified is C(www.example.com)
78-
for the zone C(example.com), the prefix is C(www). If the record in this example would be C(example.com), the
79-
prefix would be C('') (empty string).
80-
- Exactly one of I(record) and I(prefix) must be specified.
77+
- This is the part of O(record) before O(zone). For example, if the record to be modified is C(www.example.com)
78+
for the zone C(example.com), the prefix is V(www). If the record in this example would be C(example.com), the
79+
prefix would be V('') (empty string).
80+
- Exactly one of O(record) and O(prefix) must be specified.
8181
type: str
8282
ttl:
8383
description:
@@ -90,13 +90,13 @@ class ModuleDocFragment(object):
9090
- YAML lists or multiple comma-spaced values are allowed.
9191
- When deleting a record all values for the record must be specified or it will
9292
not be deleted.
93-
- Must be specified if I(ignore=false).
93+
- Must be specified if O(ignore=false).
9494
type: list
9595
elements: str
9696
ignore:
9797
description:
98-
- If set to C(true), I(value) will be ignored.
99-
- This is useful when I(prune=true), but you do not want certain entries to be removed
98+
- If set to V(true), O(value) will be ignored.
99+
- This is useful when O(prune=true), but you do not want certain entries to be removed
100100
without having to know their current value.
101101
type: bool
102102
default: false

plugins/doc_fragments/inventory_records.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ class ModuleDocFragment(object):
1919
zone_name:
2020
description:
2121
- The DNS zone to modify.
22-
- Exactly one of I(zone_name) and I(zone_id) must be specified.
22+
- Exactly one of O(zone_name) and O(zone_id) must be specified.
2323
type: str
2424
aliases:
2525
- zone
2626
zone_id:
2727
description:
2828
- The ID of the DNS zone to modify.
29-
- Exactly one of I(zone_name) and I(zone_id) must be specified.
29+
- Exactly one of O(zone_name) and O(zone_id) must be specified.
3030
filters:
3131
description:
3232
- A dictionary of filter value pairs.

plugins/doc_fragments/module_record.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,26 @@ class ModuleDocFragment(object):
2424
zone_name:
2525
description:
2626
- The DNS zone to modify.
27-
- Exactly one of I(zone_name) and I(zone_id) must be specified.
27+
- Exactly one of O(zone_name) and O(zone_id) must be specified.
2828
type: str
2929
aliases:
3030
- zone
3131
zone_id:
3232
description:
3333
- The ID of the DNS zone to modify.
34-
- Exactly one of I(zone_name) and I(zone_id) must be specified.
34+
- Exactly one of O(zone_name) and O(zone_id) must be specified.
3535
record:
3636
description:
3737
- The full DNS record to create or delete.
38-
- Exactly one of I(record) and I(prefix) must be specified.
38+
- Exactly one of O(record) and O(prefix) must be specified.
3939
type: str
4040
prefix:
4141
description:
4242
- The prefix of the DNS record.
43-
- This is the part of I(record) before I(zone_name). For example, if the record to be modified is C(www.example.com)
44-
for the zone C(example.com), the prefix is C(www). If the record in this example would be C(example.com), the
45-
prefix would be C('') (empty string).
46-
- Exactly one of I(record) and I(prefix) must be specified.
43+
- This is the part of O(record) before O(zone_name). For example, if the record to be modified is C(www.example.com)
44+
for the zone C(example.com), the prefix is V(www). If the record in this example would be C(example.com), the
45+
prefix would be V('') (empty string).
46+
- Exactly one of O(record) and O(prefix) must be specified.
4747
type: str
4848
ttl:
4949
description:

plugins/doc_fragments/module_record_info.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,33 @@ class ModuleDocFragment(object):
2323
zone_name:
2424
description:
2525
- The DNS zone to modify.
26-
- Exactly one of I(zone) and I(zone_id) must be specified.
26+
- Exactly one of O(zone) and O(zone_id) must be specified.
2727
type: str
2828
aliases:
2929
- zone
3030
zone_id:
3131
description:
3232
- The ID of the DNS zone to modify.
33-
- Exactly one of I(zone_name) and I(zone_id) must be specified.
33+
- Exactly one of O(zone_name) and O(zone_id) must be specified.
3434
version_added: 0.2.0
3535
record:
3636
description:
3737
- The full DNS record to retrieve.
38-
- If I(what) is C(single_record) or C(all_types_for_record), exactly one of I(record) and I(prefix) is required.
38+
- If O(what) is V(single_record) or V(all_types_for_record), exactly one of O(record) and O(prefix) is required.
3939
type: str
4040
prefix:
4141
description:
4242
- The prefix of the DNS record.
43-
- This is the part of I(record) before I(zone_name). For example, if the record to be modified is C(www.example.com)
44-
for the zone C(example.com), the prefix is C(www). If the record in this example would be C(example.com), the
45-
prefix would be C('') (empty string).
46-
- If I(what) is C(single_record) or C(all_types_for_record), exactly one of I(record) and I(prefix) is required.
43+
- This is the part of O(record) before O(zone_name). For example, if the record to be modified is C(www.example.com)
44+
for the zone C(example.com), the prefix is V(www). If the record in this example would be C(example.com), the
45+
prefix would be V('') (empty string).
46+
- If O(what) is V(single_record) or V(all_types_for_record), exactly one of O(record) and O(prefix) is required.
4747
type: str
4848
version_added: 0.2.0
4949
type:
5050
description:
5151
- The type of DNS record to retrieve.
52-
- Required if I(what) is C(single_record).
52+
- Required if O(what) is V(single_record).
5353
type: str
5454
5555
notes:

0 commit comments

Comments
 (0)