mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
feat: add txt_record filter to format TXT records (#721)
##### SUMMARY
The format of TXT records must consist of one or many quoted strings of
255 characters.
Use this function to format TXT record that must match the format
required by the API:
```yml
- name: Create a SPF record
hetzner.hcloud.zone_rrset:
zone: example.com
name: "@"
type: "TXT"
records:
- value: "{{ 'v=spf1 include:_spf.example.net ~all' | hetzner.hcloud.text_record }}"
state: present
```
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
zone_rrset
This commit is contained in:
parent
5a40520a9c
commit
7ac361a9cc
5 changed files with 66 additions and 1 deletions
|
|
@ -93,6 +93,15 @@ EXAMPLES = """
|
|||
comment: web server 2
|
||||
state: present
|
||||
|
||||
- name: Create a TXT record
|
||||
hetzner.hcloud.zone_rrset:
|
||||
zone: example.com
|
||||
name: "@"
|
||||
type: "TXT"
|
||||
records:
|
||||
- value: "{{ 'v=spf1 include:_spf.example.net ~all' | hetzner.hcloud.txt_record }}"
|
||||
state: present
|
||||
|
||||
- name: Delete a Zone RRSet
|
||||
hetzner.hcloud.zone_rrset:
|
||||
zone: 42
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue