mirror of
https://github.com/PyratLabs/ansible-role-k3s
synced 2024-12-14 06:40:21 +01:00
7e4a16e167
- Restructured when and asserts - Standardise molecule call, add systemd config
23 lines
792 B
YAML
23 lines
792 B
YAML
---
|
|
|
|
- name: Check that {{ package.name }} is installed
|
|
ansible.builtin.command: "which {{ package.name }}"
|
|
changed_when: false
|
|
failed_when: false
|
|
register: check_k3s_required_package
|
|
|
|
- name: Test that checks for {{ package.name }} passed
|
|
ansible.builtin.assert:
|
|
that:
|
|
- check_k3s_required_package.rc == 0
|
|
success_msg: "Found required package: {{ package.name }}."
|
|
fail_msg: >-
|
|
Could not find package: {{ package.name }}.
|
|
{% if package.documentation is defined %}
|
|
Documentation: {{ package.documentation }}
|
|
{% endif %}
|
|
when:
|
|
- (package.until is not defined
|
|
or k3s_release_version is version_compare(package.until, '>='))
|
|
- (package.from is not defined
|
|
or k3s_release_version is version_compare(package.from, '>='))
|