Added tests and variable validation

This commit is contained in:
Xan Manning 2020-02-27 18:46:59 +00:00
parent 84bf657f1c
commit 12d01c2a60
2 changed files with 11 additions and 0 deletions

View file

@ -19,5 +19,8 @@
- hello: world - hello: world
k3s_node_taints: k3s_node_taints:
- key1: value1:NoExecute - key1: value1:NoExecute
k3s_kubelet_args:
- cloud-provider: external
- provider-id: azure
roles: roles:
- role: xanmanning.k3s - role: xanmanning.k3s

View file

@ -118,6 +118,14 @@
fail_msg: "Node Taints are not supported in {{ k3s_release_version }}" fail_msg: "Node Taints are not supported in {{ k3s_release_version }}"
when: k3s_node_taints is defined and k3s_node_taints when: k3s_node_taints is defined and k3s_node_taints
- name: Check k3s_kubelet_args against k3s version
assert:
that:
- (k3s_release_version | replace('v', '')) is version_compare('0.4.0', '>=')
success_msg: "Kubelet args supported in {{ k3s_release_version }}"
fail_msg: "Kubelet args are not supported in {{ k3s_release_version }}"
when: k3s_kubelet_args is defined and k3s_kubelet_args | length > 0
- name: Check k3s_flannel_backend against k3s version - name: Check k3s_flannel_backend against k3s version
assert: assert:
that: that: