fix(dns): resolve lints

This commit is contained in:
Jan Christian Grünhage 2022-09-02 12:42:24 +02:00
parent 9c82e2354d
commit dd88cbb1ab
No known key found for this signature in database
GPG key ID: EEC1170CE56FA2ED
3 changed files with 29 additions and 33 deletions

View file

@ -1,34 +1,33 @@
---
dns_management_method: cloudflare
dns_management_method: "cloudflare"
#dns_zones: [ localdomain ]
#dns_host_name_short: localhost
# dns_zones: [ localdomain ]
# dns_host_name_short: localhost
# Additional hostnames to set which point to hostname.zone -> host_ipv4/6
dns_host_names: []
#dns_host_names:
# - name: mail
# target:
# ipv4: ipv4_mail
# ipv6: ipv6_mail
# dns_host_names:
# - name: mail
# target:
# ipv4: ipv4_mail
# ipv6: ipv6_mail
#dns_host_ipv4: ~
#dns_host_ipv6: ~
# dns_host_ipv4: ~
# dns_host_ipv6: ~
dns_host_sshfp: []
#dns_host_sshfp:
# - algorithm: ECDSA
# hash_type: SHA-256
# fingerprint: ~
# dns_host_sshfp:
# - algorithm: ECDSA
# hash_type: SHA-256
# fingerprint: ~
dns_cnames: []
dns_services: []
dns_text_records: []
## Allow some-server.example-org to send mail from
## all servers listed in MX some-server.example.org
#dns_text_records:
# - zone: example.org
# records:
# - name: "some-server"
# content: "v=spf1 mx -all"
# dns_text_records:
# - zone: example.org
# records:
# - name: "some-server"
# content: "v=spf1 mx -all"

View file

@ -1,13 +1,12 @@
---
- name: Set SSHFP records
cloudflare_dns:
type: SSHFP
zone: "{{ item[0] }}"
record: "{{ dns_host_name_short }}"
value: "{{ item[1].fingerprint }}"
algorithm: "{{ dns_sshfp_algorithm[ item[1].algorithm ] }}"
hash_type: "{{ dns_sshfp_type[ item[1].hash_type ] }}"
algorithm: "{{ dns_sshfp_algorithm[item[1].algorithm] }}"
hash_type: "{{ dns_sshfp_type[item[1].hash_type] }}"
api_token: "{{ dns_cloudflare_api_key }}"
loop: "{{ dns_zones | product(dns_host_sshfp) | list }}"
when: dns_management_method == "cloudflare" and dns_host_sshfp is defined

View file

@ -1,15 +1,13 @@
---
dns_sshfp_algorithm:
"RSA": 1
"DSA": 2
"ECDSA": 3
"ED25519": 4
RSA: 1
DSA: 2
ECDSA: 3
ED25519: 4
dns_sshfp_type:
"SHA-1": 1
"SHA-256": 2
"SHA-2": 2
dns_all_hostnames: "{{ [ { 'name': dns_host_name_short } ] + dns_host_names }}"
SHA-1: 1
SHA-256: 2
SHA-2: 2
dns_all_hostnames: "{{ [{'name': dns_host_name_short}] + dns_host_names }}"