From c33e4d7bb76cadb52707b2714bb199885563f2a9 Mon Sep 17 00:00:00 2001 From: Kay Yan <kay.yan@daocloud.io> Date: Thu, 7 Sep 2023 20:34:59 +0800 Subject: [PATCH] fix-resolv.conf-nameserver-inline-comments (#10415) --- roles/kubernetes/preinstall/tasks/0020-set_facts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/preinstall/tasks/0020-set_facts.yml b/roles/kubernetes/preinstall/tasks/0020-set_facts.yml index 486f614c9..5bd4181c4 100644 --- a/roles/kubernetes/preinstall/tasks/0020-set_facts.yml +++ b/roles/kubernetes/preinstall/tasks/0020-set_facts.yml @@ -79,7 +79,7 @@ - name: Get currently configured nameservers set_fact: - configured_nameservers: "{{ resolvconf_slurp.content | b64decode | regex_findall('^nameserver\\s*(.*)', multiline=True) | ipaddr }}" + configured_nameservers: "{{ resolvconf_slurp.content | b64decode | regex_findall('^nameserver\\s*(\\S*)', multiline=True) | ipaddr }}" when: resolvconf_slurp.content is defined - name: Stop if /etc/resolv.conf not configured nameservers -- GitLab