2019-03-09 21:54:44 +01:00
|
|
|
---
|
|
|
|
|
2020-05-18 21:45:48 +02:00
|
|
|
- name: Ensure k3s_release_version is set to default if false
|
|
|
|
set_fact:
|
|
|
|
k3s_release_version: "{{ k3s_release_channel }}"
|
|
|
|
when: k3s_release_version is defined and not k3s_release_version
|
|
|
|
|
|
|
|
- name: Ensure the default release channel is set
|
|
|
|
set_fact:
|
|
|
|
k3s_release_channel: "{{ k3s_release_version | default('stable') }}"
|
|
|
|
|
|
|
|
- name: Get the latest release version from k3s.io
|
2019-03-09 21:54:44 +01:00
|
|
|
uri:
|
2020-05-18 21:45:48 +02:00
|
|
|
url: "{{ k3s_api_releases }}"
|
2019-12-28 16:50:17 +01:00
|
|
|
return_content: true
|
|
|
|
body_format: json
|
2019-03-09 21:54:44 +01:00
|
|
|
register: k3s_latest_release
|
|
|
|
|
|
|
|
- name: Ensure the release version is set as a fact
|
|
|
|
set_fact:
|
2020-05-18 21:45:48 +02:00
|
|
|
k3s_release_version: "{{ item.latest }}"
|
|
|
|
loop: "{{ k3s_latest_release.json.data }}"
|
|
|
|
when: item.name == k3s_release_channel
|
|
|
|
and item.type == "channel"
|