Browse Source

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>
pull/11989/head
A_tian 3 months ago
committed by GitHub
parent
commit
e332375293
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions
  1. 2
      roles/kubernetes/preinstall/tasks/0040-verify-settings.yml

2
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) == []

Loading…
Cancel
Save