Quellcode durchsuchen

Treat empty string dig lookup responses as "missing record"

pull/103/head
Slavi Pantaleev vor 7 Jahren
Ursprung
Commit
639fc0bb5c
1 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen
  1. +4
    -1
      roles/matrix-base/tasks/self_check_dns_srv.yml

+ 4
- 1
roles/matrix-base/tasks/self_check_dns_srv.yml Datei anzeigen

@@ -30,12 +30,15 @@
Full error from trying to run `dig`: {{ result_cli_dig_srv }} Full error from trying to run `dig`: {{ result_cli_dig_srv }}
when: "lookup_dig_srv is not defined and result_cli_dig_srv.stderr != ''" when: "lookup_dig_srv is not defined and result_cli_dig_srv.stderr != ''"


# Some DNS servers may respond with '' (stands for "No Answer").
# Most usually, a missing record would yield a 'NXDOMAIN' response.
# In any case, we consider any non-mapping response to mean "missing record".
- name: Fail if DNS SRV record missing (Ansible dig lookup) - name: Fail if DNS SRV record missing (Ansible dig lookup)
fail: fail:
msg: >- msg: >-
It appears the DNS SRV record for {{ dns_srv_record_check.service_and_protocol }} on {{ dns_srv_record_check.domain }} is not set up correctly (the record is missing). It appears the DNS SRV record for {{ dns_srv_record_check.service_and_protocol }} on {{ dns_srv_record_check.domain }} is not set up correctly (the record is missing).
See the 'Configuring DNS' documentation for this playbook. See the 'Configuring DNS' documentation for this playbook.
when: "lookup_dig_srv is defined and lookup_dig_srv == 'NXDOMAIN'"
when: "lookup_dig_srv is defined and lookup_dig_srv is not mapping"


- name: Fail if DNS SRV record incorrect (Ansible dig lookup) - name: Fail if DNS SRV record incorrect (Ansible dig lookup)
fail: fail:


Laden…
Abbrechen
Speichern