blob: c5083db96705e2003ac90c2737866f10ae06d247 [file] [log] [blame]
---
# docker tasks/Debian-repo.yml
#
# SPDX-FileCopyrightText: © 2021 Open Networking Foundation <support@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
- name: Update apt cache
apt:
update_cache: true
- name: Install apt related prereqs
apt:
name:
- "apt-transport-https"
- "ca-certificates"
- "gpg"
- "software-properties-common"
state: "present"
- name: Copy Docker repo GPG key
ansible.builtin.copy:
src: docker-keyring.gpg
dest: /usr/share/keyrings/docker-keyring.gpg
owner: root
group: root
mode: 0644
# https://docs.docker.com/engine/install/debian/#install-using-the-repository
- name: Add Official Docker apt repo
apt_repository:
repo: >-
deb [arch=amd64 signed-by=/usr/share/keyrings/docker-keyring.gpg]
https://download.docker.com/linux/{{ ansible_lsb['id'] | lower }}
{{ ansible_lsb['codename'] }} stable
mode: 0644
update_cache: true