mirror of
https://github.com/PyratLabs/ansible-role-k3s.git
synced 2024-12-01 13:13:57 +01:00
7e4a16e167
- Restructured when and asserts - Standardise molecule call, add systemd config
32 lines
1.3 KiB
YAML
32 lines
1.3 KiB
YAML
---
|
|
|
|
- name: Check if embedded etcd datastore is enabled and marked as experimental
|
|
ansible.builtin.assert:
|
|
that:
|
|
- k3s_use_experimental is defined and k3s_use_experimental
|
|
success_msg: "Experimental variables are defined and enabled."
|
|
fail_msg: >-
|
|
Experimental variable k3s_etcd_datastore has been configured.
|
|
If you want to use this ensure you set k3s_use_experimental,
|
|
when:
|
|
- k3s_etcd_datastore is defined
|
|
- k3s_etcd_datastore
|
|
- (k3s_release_version | replace('v', '')) is version_compare("1.19.5", '<')
|
|
|
|
- name: Check if any experimental variables are configure and if they are enabled with k3s_use_experimental
|
|
ansible.builtin.assert:
|
|
that:
|
|
- k3s_use_experimental is defined and k3s_use_experimental
|
|
success_msg: "Experimental variables are defined and enabled."
|
|
fail_msg: >-
|
|
Experimental variable {{ item.setting }} has been configured.
|
|
If you want to use this ensure you set k3s_use_experimental.
|
|
{% if item.document is defined %}
|
|
Documentation: {{ item.documentation }}
|
|
{% endif %}
|
|
loop: "{{ k3s_experimental_config }}"
|
|
when:
|
|
- (item.setting in k3s_runtime_config and k3s_runtime_config[item.setting])
|
|
- ((item.until is not defined) or
|
|
(item.until is defined and (k3s_release_version | replace('v', '')) is version_compare(item.until, '<')))
|