mirror of https://github.com/ceph/ceph-ansible.git
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
---
|
|
- name: Uninstall old docker versions
|
|
ansible.builtin.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)
|
|
ansible.builtin.package:
|
|
name: ['apt-transport-https', 'ca-certificates', 'gnupg', 'software-properties-common']
|
|
update_cache: true
|
|
register: result
|
|
until: result is succeeded
|
|
|
|
- name: Add docker's gpg key
|
|
ansible.builtin.apt_key:
|
|
url: "https://download.docker.com/linux/{{ ansible_facts['distribution'] | lower }}/gpg"
|
|
register: result
|
|
until: result is succeeded
|
|
when: container_package_name == 'docker-ce'
|
|
|
|
- name: Add docker repository
|
|
ansible.builtin.apt_repository:
|
|
repo: "deb https://download.docker.com/linux/{{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_release'] }} stable"
|
|
when: container_package_name == 'docker-ce'
|
|
|
|
- name: Add podman ppa repository
|
|
ansible.builtin.apt_repository:
|
|
repo: "ppa:projectatomic/ppa"
|
|
when:
|
|
- container_package_name == 'podman'
|
|
- ansible_facts['distribution'] == 'Ubuntu'
|