feat: docker gpg key + repository install

This commit is contained in:
Lenoctambule
2026-03-09 19:23:32 +01:00
parent 44d8f5d562
commit c4691cab60

37
deploy/docker-install.yml Normal file
View File

@@ -0,0 +1,37 @@
- name: Installing Docker and Docker Compose
hosts: hosts
tasks:
- name: Clear previous install of Docker
ansible.builtin.apt:
pkg:
- docker.io
- docker-compose
- docker-compose-v2
- docker-doc
- podman-docker
- containerd
state: absent
autoremove: true
- name: Install pre-requirements
ansible.builtin.apt:
update_cache: yes
pkg:
- ca-certificates
- curl
- name: Add Docker GPG key and Repository
become: true
block:
- name: somerepo | no apt key
ansible.builtin.get_url:
url: https://download.docker.com/linux/ubuntu/gpg
dest: /etc/apt/keyrings/docker.asc
- name: somerepo | apt source
ansible.builtin.apt_repository:
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
state: present