Skip to content
Snippets Groups Projects
Commit e25eab3e authored by nimrod's avatar nimrod
Browse files

Toolbx refresh.

- Debian testing and the next Ubuntu LTS (jammy) have Toolbx packaged.
  Use that instead of the binary from toolbox-build. Keep a list of
releases that don't have that it packaged since it should be pretty
static and over time can be removed.
- Instead of checking the distro release, check if there's a Kubic APT
  repo defined (like the assertion does). So we have a single place to
list releases that need that repo. Since the current Debian stable
(bullseye) and the next Ubuntu LTS (jammy) have Podman packaged that
list should be very stable (unless there's another ElementaryOS release
based on Ubuntu Focal before 7.0).
- Rename Toolbox to Toolbx in task names (match the renamed project
  name).
parent 69543c22
No related branches found
No related tags found
No related merge requests found
......@@ -20,14 +20,8 @@
value: "1"
- name: Install Podman from the Kubic repository
# yamllint disable-line rule:line-length
when: ansible_facts.distribution_release is in ["buster", "bionic", "focal", "hera", "odin"]
when: toolbox_podman_repo_base_url is defined
block:
- name: Assertions
assert:
that:
- toolbox_podman_repo_base_url is defined
- name: Add the Podman repo key
apt_key:
state: present
......@@ -59,9 +53,21 @@
state: present
update_cache: true
- name: Install Toolbox
- name: Install Toolbx from toolbox-build
# yamllint disable-line rule:line-length
when: ansible_facts.distribution_release is not in toolbox_distros_with_apt_package
unarchive:
dest: /usr/local/
remote_src: true
# yamllint disable-line rule:line-length
src: https://git.shore.co.il/shore/toolbox-build/-/jobs/artifacts/master/raw/toolbox.tar.gz?job=build
- name: APT install Toolbx
# yamllint disable-line rule:line-length
when: ansible_facts.distribution_release is in toolbox_distros_with_apt_package
apt:
cache_valid_time: 3600
name:
- podman-toolbox
state: present
update_cache: true
......@@ -28,8 +28,12 @@ maintenance_tasks:
command: mnpw --errors --warn -- needrestart -p
frequency: daily
# Hera and Odin are ElementaryOS releases based on Ubuntu Bionic and Focal
# respectively.
# At the time of writing, the next versions of Debian and Ubuntu LTS (and thus
# the next version of ElementaryOS) have Podman and Toolbx packaged so the
# lists below should be pretty static and in time can be removed entirely.
# Hera is an ElementaryOS release based on Ubuntu Bionic and Odin and Jólnir
# are ElementaryOS releases based on Ubuntu Focal.
toolbox_podman_repo_base_url_mapping:
# yamllint disable-line rule:line-length
bionic: &bionic https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04/
......@@ -42,3 +46,15 @@ toolbox_podman_repo_base_url_mapping:
toolbox_podman_repo_base_url: |-
{{ toolbox_podman_repo_base_url_mapping[ansible_facts.distribution_release] }}
toolbox_distros_without_apt_package:
# Debian releases before bookworm.
- bullseye
- buster
# Ubuntu releases before jammy.
- bionic
- focal
# ElementaryOS release before 7.0 (which is based on Ubuntu jammy).
- hera
- odin
- jolnir
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment