check if 'plugins' key exists in calico_cni_config object (#7717)

* check if 'plugins' key exists in calico_cni_config object

* fix whitespace linting error

* fixed when list indentation
This commit is contained in:
David Louks 2021-09-27 13:04:20 -05:00 committed by GitHub
parent 9416c9aa86
commit 1472528f6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,9 @@
- name: Set fact calico_datastore to etcd if needed
set_fact:
calico_datastore: etcd
when: "'etcd_endpoints' in calico_cni_config.plugins.0"
when:
- "'plugins' in calico_cni_config"
- "'etcd_endpoints' in calico_cni_config.plugins.0"
when: calico_cni_config_slurp.content is defined
- name: Calico | Get kubelet hostname