diff --git a/roles/ensure-podman/tasks/Ubuntu-18.04.yaml b/roles/ensure-podman/tasks/Ubuntu-18.04.yaml new file mode 100644 index 000000000..6e3b0754e --- /dev/null +++ b/roles/ensure-podman/tasks/Ubuntu-18.04.yaml @@ -0,0 +1,34 @@ +- name: Add kubic project repository + when: ansible_architecture == "x86_64" + include_role: + name: ensure-package-repositories + vars: + repositories_keys: + - url: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_{{ ansible_distribution_version }}/Release.key" + repositories_list: + - repo: "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_{{ ansible_distribution_version }}/ /" + +- name: Add project atomic PPA repository + when: ansible_architecture != "x86_64" + include_role: + name: ensure-package-repositories + vars: + repositories_list: + - repo: ppa:projectatomic/ppa + +- name: Install podman + package: + name: + - podman + - uidmap + - slirp4netns + state: present + become: yes + +# NOTE(pabelanger): Remove default registries.conf file, so we can manage it +# ourself. It could have v1 syntax, which doesn't work with v2. +- name: Remove /etc/containers/registries.conf + become: true + file: + state: absent + path: /etc/containers/registries.conf diff --git a/roles/ensure-podman/tasks/Ubuntu.yaml b/roles/ensure-podman/tasks/Ubuntu.yaml index 5328f36d9..b4418d76c 100644 --- a/roles/ensure-podman/tasks/Ubuntu.yaml +++ b/roles/ensure-podman/tasks/Ubuntu.yaml @@ -1,11 +1,10 @@ -- name: Add all repositories +- name: Add kubic project repository include_role: name: ensure-package-repositories vars: repositories_keys: - url: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_{{ ansible_distribution_version }}/Release.key" repositories_list: - - repo: ppa:projectatomic/ppa - repo: "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_{{ ansible_distribution_version }}/ /" - name: Install podman @@ -14,6 +13,7 @@ - podman - uidmap - slirp4netns + - fuse-overlayfs state: present become: yes diff --git a/roles/ensure-podman/tasks/main.yaml b/roles/ensure-podman/tasks/main.yaml index 6b471c4ba..a82486cc8 100644 --- a/roles/ensure-podman/tasks/main.yaml +++ b/roles/ensure-podman/tasks/main.yaml @@ -1,6 +1,7 @@ - name: Find distribution installation include_tasks: "{{ zj_distro_os }}" with_first_found: + - "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml" - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml" - "{{ ansible_distribution }}.yaml" - "{{ ansible_os_family }}.yaml" diff --git a/zuul-tests.d/container-roles-jobs.yaml b/zuul-tests.d/container-roles-jobs.yaml index fffba2dd3..d56506a47 100644 --- a/zuul-tests.d/container-roles-jobs.yaml +++ b/zuul-tests.d/container-roles-jobs.yaml @@ -412,6 +412,15 @@ - name: ubuntu-bionic label: ubuntu-bionic +- job: + name: zuul-jobs-test-ensure-podman-ubuntu-focal + description: Tests ensure-podman role on ubuntu-focal + parent: zuul-jobs-test-ensure-podman + nodeset: + nodes: + - name: ubuntu-focal + label: ubuntu-focal + - job: name: zuul-jobs-test-ensure-skopeo-centos-8 description: Tests ensure-skopeo role on centos-8 @@ -476,6 +485,7 @@ - zuul-jobs-test-ensure-podman-centos-8 - zuul-jobs-test-ensure-podman-fedora-34 - zuul-jobs-test-ensure-podman-ubuntu-bionic + - zuul-jobs-test-ensure-podman-ubuntu-focal - zuul-jobs-test-ensure-skopeo-centos-8 - zuul-jobs-test-ensure-skopeo-fedora-34 - zuul-jobs-test-ensure-skopeo-ubuntu-bionic @@ -501,6 +511,7 @@ - zuul-jobs-test-ensure-kubernetes-crio - zuul-jobs-test-ensure-podman-centos-8 - zuul-jobs-test-ensure-podman-ubuntu-bionic + - zuul-jobs-test-ensure-podman-ubuntu-focal - zuul-jobs-test-ensure-skopeo-centos-8 - zuul-jobs-test-ensure-skopeo-fedora-34 - zuul-jobs-test-ensure-skopeo-ubuntu-bionic