Skip to content
Snippets Groups Projects
Unverified Commit b9fe3010 authored by Kay Yan's avatar Kay Yan Committed by GitHub
Browse files

add-check-for-resolv-to-avoid-coredns-crash (#9502)

parent b5844018
No related merge requests found
...@@ -75,6 +75,16 @@ ...@@ -75,6 +75,16 @@
when: resolvconf_stat.stat.exists is defined and resolvconf_stat.stat.exists when: resolvconf_stat.stat.exists is defined and resolvconf_stat.stat.exists
- name: Stop if /etc/resolv.conf not configured nameservers
assert:
that: configured_nameservers|length>0
fail_msg: "nameserver should not empty in /etc/resolv.conf"
when:
- not ignore_assert_errors
- configured_nameservers is defined
- not (upstream_dns_servers is defined and upstream_dns_servers|length > 0)
- not (disable_host_nameservers | default(false))
- name: NetworkManager | Check if host has NetworkManager - name: NetworkManager | Check if host has NetworkManager
# noqa 303 Should we use service_facts for this? # noqa 303 Should we use service_facts for this?
command: systemctl is-active --quiet NetworkManager.service command: systemctl is-active --quiet NetworkManager.service
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment