Skip to content
Snippets Groups Projects
Commit 51c071d3 authored by ale's avatar ale
Browse files

Remove obsolete Podman installation channels

Since current Debian oldstable we are just using the Debian packages.
parent 29ea36ea
No related branches found
No related tags found
No related merge requests found
Pipeline #84474 passed
---
# Pick a package source for Podman - defaults to using the stock
# Debian package since bullseye. Possible choices are 'ai' (a version
# pinned in our repository, tested working on Debian buster), 'debian'
# (use standard Debian packages, only available from bullseye) or
# 'kubic' (use the upstream Kubic repositories, with the latest
# release).
- set_fact:
podman_default_package_source: "{{ podman_default_package_source_by_distro[float_debian_dist] | default('debian') }}"
- set_fact:
podman_package_source: "{{ podman_default_package_source }}"
when: "podman_package_source is not defined"
- include_tasks: "podman_{{ podman_package_source }}.yml"
# Try to detect which podman version we're on based on source and
# distribution.
# Install Podman using packages from the Debian distribution
# (available starting with Bullseye).
- name: Install Podman packages
apt:
name: "{{ packages }}"
state: present
vars:
packages:
- podman
- crun
# Try to detect which podman version we're on based on distribution.
- set_fact:
podman_version: "{{ podman_version_by_distro[float_debian_dist] }}"
when: "podman_package_source == 'debian'"
- set_fact:
podman_version: 4
when: "podman_package_source != 'debian'"
# If we've changed sources.list for podman, it is important
# that we run apt upgrade now.
- name: Apt upgrade
apt:
upgrade: 'yes'
when: "podman_sources_list is defined and podman_sources_list.changed"
- name: Symlink podman to docker
file:
......
---
# Install podman from the A/I package repository. This is a "known
# good" version that works on Debian Buster.
#
# Some dependencies need to be pulled from buster-backports.
- name: Remove podman Kubic repository key
file:
path: "/etc/apt/trusted.gpg.d/kubic.gpg"
state: absent
- name: Remove Kubic podman repository
apt_repository:
repo: "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /"
state: absent
- name: Add A/I podman repository
apt_repository:
repo: "deb [signed-by=/usr/share/keyrings/deb.autistici.org.gpg] http://deb.autistici.org/urepo buster-podman/"
state: present
register: podman_sources_list
- name: Pin podman packages to our repository
copy:
dest: "/etc/apt/preferences.d/99podman"
content: |
Package: podman
Pin: origin deb.autistici.org
Pin-Priority: 1001
- name: Install podman packages
apt:
name: podman
state: present
default_release: "{{ 'buster-backports' if float_debian_dist == 'buster' else '' }}"
# TODO: remove this once the podman packaging issues are fixed.
- name: Install a working seccomp.json
copy:
src: "seccomp-0.3.2.json"
dest: "/usr/share/containers/seccomp.json"
---
# Install Podman using packages from the Debian distribution
# (available starting with Bullseye).
- name: Remove podman Kubic repository key
file:
path: "/etc/apt/trusted.gpg.d/kubic.gpg"
state: absent
- name: Remove other podman repositories
apt_repository:
repo: "{{ item }}"
state: absent
loop:
- "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /"
- "deb [signed-by=/usr/share/keyrings/deb.autistici.org.gpg] http://deb.autistici.org/urepo buster-podman/"
- name: Remove podman package pins
file:
path: "/etc/apt/preferences.d/99podman"
state: absent
register: podman_sources_list
- name: Install Podman packages
apt:
name: "{{ packages }}"
state: present
vars:
packages:
- podman
- crun
---
# Install Podman from the upstream "kubic" repository. This is usually
# the latest Podman release.
- name: Add podman Kubic repository key
copy:
src: "kubic.gpg"
dest: "/etc/apt/trusted.gpg.d/kubic.gpg"
- name: Remove A/I podman repository
apt_repository:
repo: "deb [signed-by=/usr/share/keyrings/deb.autistici.org.gpg] http://deb.autistici.org/urepo buster-podman/"
state: absent
- name: Add Kubic podman repository
apt_repository:
repo: "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /"
state: present
register: podman_sources_list
- name: Remove podman package pins
file:
path: "/etc/apt/preferences.d/99podman"
state: absent
# Podman Kubic packages on buster require a version of libseccomp2
# from the backports.
- name: Install libseccomp2 from backports
apt:
name: libseccomp2
state: present
default_release: buster-backports
when: "float_debian_dist == 'buster'"
- name: Install podman packages
apt:
name: podman
state: present
---
podman_version_by_distro:
buster: 3
bullseye: 3
bookworm: 4
trixie: 5
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment