mirror of
https://github.com/PyratLabs/ansible-role-k3s
synced 2024-11-10 07:23:30 +01:00
Added tests and variable validation
This commit is contained in:
parent
84bf657f1c
commit
12d01c2a60
2 changed files with 11 additions and 0 deletions
|
@ -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
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue