fix: txt record length
This commit is contained in:
parent
44a2dd9518
commit
f8ad1d6c9a
3 changed files with 12 additions and 0 deletions
|
@ -12,6 +12,12 @@ $TTL {{ item.value.ttl|default(3600) }}
|
|||
{% for entry in item.value.entries %}
|
||||
{% if entry.type|upper == 'MX' %}
|
||||
{{ entry.name }}{% for i in range(0, 15 - entry.name|length) %} {% endfor %} IN MX {{ entry.priority }} {{ entry.value }}
|
||||
{% elif entry.type|upper == 'TXT' %}
|
||||
{{ entry.name }} IN {{ entry.type|upper }} (
|
||||
{% for charset in entry.value|batch(64) %}
|
||||
"{{ charset|join('') }}"
|
||||
{% endfor %}
|
||||
)
|
||||
{% else %}
|
||||
{{ entry.name }}{% for i in range(0, 15 - entry.name|length) %} {% endfor %} IN {{ entry.type|upper }}{% for i in range(0, 9 - entry.type|length) %} {% endfor %} {{ entry.value }}
|
||||
{% endif %}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
entries:
|
||||
- { name: '@', type: mx, priority: 20, value: mail.test.local. }
|
||||
- { name: '@', type: ns, value: localhost. }
|
||||
- { name: '@', type: txt, value: RFufr9qzCi9vnJeWUB2FMNDCtu8ZtP6WE2jl2OFvIiz6pv2dwfzEXBgTC8SI1UzsmlkFYS7vxkHeYuOCLQ95BkOl0YP85ejQQlz8DNbcMcUdAoDtmlaZ9jeXnU7RgCXs5F9ggsmM9B6mFMhZWo1lzwsX86UAR5nw7rIO3cbGo9oUcMTShVFDkTPnoNhP7MTE0L4M99yv8ZLptmS2GP6goHXZgTdFIyYCdfziQgoENcloUI3KshDscsoh6H6I2LA }
|
||||
- { name: hello, type: a, value: 4.3.2.1 }
|
||||
|
||||
roles:
|
||||
|
|
|
@ -55,3 +55,8 @@ describe command('host hello.hello.local 127.0.0.1') do
|
|||
its(:exit_status) { should eq 0 }
|
||||
its(:stdout) { should contain('4.3.2.1') }
|
||||
end
|
||||
|
||||
describe command('host -t TXT hello.local 127.0.0.1') do
|
||||
its(:exit_status) { should eq 0 }
|
||||
its(:stdout) { should contain('hello.local descriptive text') }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue