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

Toolbox role and playbook.

Install Podman and Toolbox.
parent 0019d49c
No related branches found
No related tags found
No related merge requests found
Pipeline #487 passed
# Toolbox
Install Podman and Toolbox.
## Supported distros
- Debian Buster
- Debian Bullseye
- Debian Sid
- Ubuntu Bionic
- Ubuntu Focal
- ElementaryOS Hera
- ElementaryOS Odin
Debian Bullseye and Sid have Podman in the Debian repos, the rest don't so the
Kubic repos are used. Toolbox isn't packaged yet, so
[toolbox-build](https://git.shore.co.il/shore/toolbox-build) is used.
---
- name: Install Podman from the Kubic repository
# yamllint disable-line rule:line-length
when: ansible_distribution_release is in ["buster", "bionic", "focal", "hera", "odin"]
block:
- name: Assertions
assert:
that:
- toolbox_podman_repo_base_url is defined
- name: APT install prerequisites
apt:
cache_valid_time: 3600
name:
- apt-transport-https
state: present
update_cache: true
- name: Add the Podman repo key
apt_key:
state: present
url: |-
{{ toolbox_podman_repo_base_url }}/Release.key
- name: Add the Podman repo
apt_repository:
repo: |-
deb {{ toolbox_podman_repo_base_url }} /
state: present
update_cache: true
- name: Install newer libseccomp2 from the backports repository
when: ansible_distribution_release == "buster"
apt:
cache_valid_time: 3600
default_release: buster-backports
name:
- libseccomp2
state: present
update_cache: true
- name: APT install Podman
apt:
cache_valid_time: 3600
name:
- podman
state: present
update_cache: true
- name: Install Toolbox
unarchive:
dest: /
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
---
# Hera and Odin are ElementaryOS releases based on Ubuntu Bionic and Focal
# respectively.
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/
# yamllint disable-line rule:line-length
buster: https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/
# yamllint disable-line rule:line-length
focal: &focal https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/
hera: *bionic
odin: *focal
toolbox_podman_repo_base_url: |-
{{ toolbox_podman_repo_base_url_mapping[ansible_distribution_release] }}
---
- hosts:
- ns4
- localhost
roles:
- toolbox
become: true
become_user: root
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment