From e332375293b069ab4006e72e38dcb0c3455fb82c Mon Sep 17 00:00:00 2001 From: A_tian <76234281+FloatXD@users.noreply.github.com> Date: Sat, 22 Feb 2025 04:38:27 +0800 Subject: [PATCH] Fix uncached_hosts syntax error (#11985) * Fix uncached_hosts syntax error Signed-off-by: panyintian.fu <1416297674@qq.com> * Update roles/kubernetes/preinstall/tasks/0040-verify-settings.yml Co-authored-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com> --------- Signed-off-by: panyintian.fu <1416297674@qq.com> Co-authored-by: Antoine Legrand <2t.antoine@gmail.com> Co-authored-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com> --- roles/kubernetes/preinstall/tasks/0040-verify-settings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/preinstall/tasks/0040-verify-settings.yml b/roles/kubernetes/preinstall/tasks/0040-verify-settings.yml index cd77120f5..5c6b983d3 100644 --- a/roles/kubernetes/preinstall/tasks/0040-verify-settings.yml +++ b/roles/kubernetes/preinstall/tasks/0040-verify-settings.yml @@ -1,7 +1,7 @@ --- - name: Stop if any host not in '--limit' does not have a fact cache vars: - uncached_hosts: "{{ hostvars | dict2items | selectattr('value.ansible_default_ipv6', 'value.ansible_default_ipv4', 'undefined') | map(attribute='key') }}" + uncached_hosts: "{{ hostvars | dict2items | selectattr('value.ansible_default_ipv6', 'undefined') | selectattr('value.ansible_default_ipv4', 'undefined') | map(attribute='key') }}" excluded_hosts: "{{ groups['k8s_cluster'] | difference(query('inventory_hostnames', ansible_limit)) }}" assert: that: uncached_hosts | intersect(excluded_hosts) == []