Debian Codegraph @

ansible_collections/community/dns/plugins/doc_fragments/_hetzner.py

raw
1 # Copyright (c) 2021 Felix Fontein
2 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
3 # SPDX-License-Identifier: GPL-3.0-or-later
4
5 # Note that this doc fragment is **PRIVATE** to the collection. It can have breaking changes at any time.
6 # Do not use this from other collections or standalone plugins/modules!
7
8 from __future__ import annotations
9
10
11 class ModuleDocFragment:
12
13 # Standard files documentation fragment
14 DOCUMENTATION = r"""
15 options:
16 hetzner_token:
17 description:
18 - The token for the classic Hetzner DNS API.
19 - If not provided, will be read from the environment variable E(HETZNER_DNS_TOKEN).
20 - Exactly one of O(hetzner_token) and O(hetzner_api_token) must be provided.
21 aliases:
22 - api_token
23 type: str
24 hetzner_api_token:
25 description:
26 - The token for the new Hetzner DNS API.
27 - If not provided, will be read from the environment variable E(HETZNER_API_TOKEN).
28 - Exactly one of O(hetzner_token) and O(hetzner_api_token) must be provided.
29 type: str
30 notes:
31 - Note that not all record types are supported by both APIs.
32 The old API (O(hetzner_token)) does not support V(HTTPS), V(PTR), and V(SVCB) records.
33 The new API (O(hetzner_api_token)) does not support V(DANE) records.
34 """
35
36 # NOTE: This document fragment augments the above standard DOCUMENTATION document fragment
37 # by providing alternative ways to provide configuration for plugins. (The above
38 # documentation fragment is tailored for modules.)
39 PLUGIN = r"""
40 options:
41 hetzner_token:
42 env:
43 - name: HETZNER_DNS_TOKEN
44 hetzner_api_token:
45 env:
46 - name: HETZNER_API_TOKEN
47 """
48
49 # NOTE: This document fragment adds additional information on records.
50 RECORD_NOTES = r"""
51 options: {}
52 notes:
53 - For C(CNAME) records, use absolute DNS names for values. Absolute DNS names end with
54 a trailing period C(.), for example C(foo.example.com.). If you use a relative DNS name, with no
55 trailing period, the value will be relative to the zone of the C(CNAME) record.
56 """
57
58 RECORD_TYPE_SEEALSO = r"""
59 options: {}
60 seealso:
61 - ref: ansible_collections.community.dns.docsite.hetzner_guide.records
62 description: More information on supported DNS record types.
63 """
64
65 # WARNING: This section is automatically generated by update-docs-fragments.py.
66 # It is used to augment the docs fragments module_record, module_record_set.
67 # DO NOT EDIT MANUALLY!
68 RECORD_DEFAULT_TTL = r"""
69 options:
70 ttl:
71 default: null
72 """
73
74 # WARNING: This section is automatically generated by update-docs-fragments.py.
75 # It is used to augment the docs fragments module_record, module_record_info,
76 # module_record_set, module_record_set_info.
77 # DO NOT EDIT MANUALLY!
78 RECORD_TYPE_CHOICES = r"""
79 options:
80 type:
81 choices:
82 - A
83 - AAAA
84 - CAA
85 - CNAME
86 - DANE
87 - DS
88 - HINFO
89 - HTTPS
90 - MX
91 - NS
92 - PTR
93 - RP
94 - SOA
95 - SRV
96 - SVCB
97 - TLSA
98 - TXT
99 """
100
101 # WARNING: This section is automatically generated by update-docs-fragments.py.
102 # It is used to augment the docs fragment module_record_sets.
103 # DO NOT EDIT MANUALLY!
104 RECORD_TYPE_CHOICES_RECORD_SETS_MODULE = r"""
105 options:
106 record_sets:
107 suboptions:
108 record:
109 description:
110 - The full DNS record to create or delete.
111 - Exactly one of O(record_sets[].record) and O(record_sets[].prefix) must
112 be specified.
113 type: str
114 prefix:
115 description:
116 - The prefix of the DNS record.
117 - This is the part of O(record_sets[].record) before O(zone_name). For example,
118 if the record to be modified is C(www.example.com) for the zone C(example.com),
119 the prefix is V(www). If the record in this example would be C(example.com),
120 the prefix would be V('') (empty string).
121 - Exactly one of O(record_sets[].record) and O(record_sets[].prefix) must
122 be specified.
123 type: str
124 ttl:
125 description:
126 - The TTL to give the new record, in seconds.
127 type: int
128 default: null
129 type:
130 description:
131 - The type of DNS record to create or delete.
132 required: true
133 type: str
134 choices:
135 - A
136 - AAAA
137 - CAA
138 - CNAME
139 - DANE
140 - DS
141 - HINFO
142 - HTTPS
143 - MX
144 - NS
145 - PTR
146 - RP
147 - SOA
148 - SRV
149 - SVCB
150 - TLSA
151 - TXT
152 value:
153 description:
154 - The new value when creating a DNS record.
155 - YAML lists or multiple comma-spaced values are allowed.
156 - When deleting a record all values for the record must be specified or
157 it will not be deleted.
158 - Must be specified if O(record_sets[].ignore=false).
159 type: list
160 elements: str
161 ignore:
162 description:
163 - If set to V(true), O(record_sets[].value) will be ignored.
164 - This is useful when O(prune=true), but you do not want certain entries
165 to be removed without having to know their current value.
166 type: bool
167 default: false
168 """
169
170 # WARNING: This section is automatically generated by update-docs-fragments.py.
171 # It is used to augment the docs fragment inventory_records.
172 # DO NOT EDIT MANUALLY!
173 RECORD_TYPE_CHOICES_RECORDS_INVENTORY = r"""
174 options:
175 simple_filters:
176 suboptions:
177 type:
178 description:
179 - Record types whose values to use.
180 type: list
181 elements: string
182 default:
183 - A
184 - AAAA
185 - CNAME
186 choices:
187 - A
188 - AAAA
189 - CAA
190 - CNAME
191 - DANE
192 - DS
193 - HINFO
194 - HTTPS
195 - MX
196 - NS
197 - PTR
198 - RP
199 - SOA
200 - SRV
201 - SVCB
202 - TLSA
203 - TXT
204 """
205
206 # WARNING: This section is automatically generated by update-docs-fragments.py.
207 # It is used to augment the docs fragments inventory_records, module_record,
208 # module_record_info, module_record_set, module_record_set_info,
209 # module_record_sets, module_zone_info.
210 # DO NOT EDIT MANUALLY!
211 ZONE_ID_TYPE = r"""
212 options:
213 zone_id:
214 type: str
215 """