mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
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>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Stop if any host not in '--limit' does not have a fact cache
|
- name: Stop if any host not in '--limit' does not have a fact cache
|
||||||
vars:
|
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)) }}"
|
excluded_hosts: "{{ groups['k8s_cluster'] | difference(query('inventory_hostnames', ansible_limit)) }}"
|
||||||
assert:
|
assert:
|
||||||
that: uncached_hosts | intersect(excluded_hosts) == []
|
that: uncached_hosts | intersect(excluded_hosts) == []
|
||||||
|
|||||||
Reference in New Issue
Block a user