Skip to content

Commit

Permalink
check if 'plugins' key exists in calico_cni_config object (#7717) (#8040
Browse files Browse the repository at this point in the history
)

* check if 'plugins' key exists in calico_cni_config object

* fix whitespace linting error

* fixed when list indentation

Co-authored-by: David Louks <[email protected]>
  • Loading branch information
oomichi and dlouks authored Sep 30, 2021
1 parent bf1bb59 commit 3b2b618
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion roles/network_plugin/calico/tasks/pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3b2b618

Please sign in to comment.