container-common: support podman on Ubuntu

Currently we're only able to use podman on ubuntu if podman's
installation is done manually before the ceph-ansible execution
because the deb package is present in an external repository.
We already manage the docker-ce installation via an external
repository so we should be able to allow the podman installation
with the same mechanism too.

https://github.com/containers/libpod/blob/master/install.md#ubuntu

Resolves: #3947

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 518ab794fb)
pull/4070/head
Dimitri Savineau 2019-05-17 17:10:34 -04:00 committed by Dimitri Savineau
parent e9edb5a92a
commit 376cb86db2
2 changed files with 10 additions and 1 deletions

View File

@ -3,6 +3,7 @@
package:
name: ['docker', 'docker-engine', 'docker.io', 'containerd', 'runc']
state: absent
when: container_package_name == 'docker-ce'
- name: allow apt to use a repository over https (debian)
package:
@ -16,7 +17,16 @@
url: 'https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg'
register: result
until: result is succeeded
when: container_package_name == 'docker-ce'
- name: add docker repository
apt_repository:
repo: "deb https://download.docker.com/linux/{{ ansible_distribution | lower}} {{ ansible_distribution_release }} stable"
when: container_package_name == 'docker-ce'
- name: add podman ppa repository
apt_repository:
repo: "ppa:projectatomic/ppa"
when:
- container_package_name == 'podman'
- ansible_distribution == 'Ubuntu'

View File

@ -9,7 +9,6 @@
include_tasks: debian_prerequisites.yml
when:
- ansible_os_family == 'Debian'
- container_package_name == 'docker-ce'
tags: with_pkg
# ensure extras enabled for docker