mirror of
https://github.com/dredx/prole.git
synced 2026-09-27 01:54:31 +00:00
Refactor k3s version installation logic to use a ternary filter for cleaner syntax in main.yml.
This commit is contained in:
parent
887c485c32
commit
852b1f8949
@ -87,7 +87,7 @@
|
|||||||
curl -sfL https://get.k3s.io | sh -
|
curl -sfL https://get.k3s.io | sh -
|
||||||
environment:
|
environment:
|
||||||
INSTALL_K3S_EXEC: "{{ k3s_role }}"
|
INSTALL_K3S_EXEC: "{{ k3s_role }}"
|
||||||
INSTALL_K3S_VERSION: "{{ k3s_version if (k3s_version | length > 0) else omit }}"
|
{{ (k3s_version | length > 0) | ternary({'INSTALL_K3S_VERSION': k3s_version}, {}) }}
|
||||||
args:
|
args:
|
||||||
creates: /usr/local/bin/k3s
|
creates: /usr/local/bin/k3s
|
||||||
when: k3s_needs_install
|
when: k3s_needs_install
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user