refactor: update Docker GPG key retrieval and repository setup in playbook

This commit is contained in:
2025-06-29 22:45:13 -05:00
parent 1524619506
commit 2f49a68596

View File

@@ -20,16 +20,17 @@
state: present
update_cache: true
- name: Add Dockers official GPG key
ansible.builtin.apt_key:
- name: Download Docker GPG key
ansible.builtin.get_url:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
dest: /etc/apt/keyrings/docker.gpg
mode: "0644"
- name: Set up Docker repository
- name: Set up Docker apt repository (with signed-by)
ansible.builtin.apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable"
state: present
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable"
filename: docker
state: present
- name: Install Docker Engine and Compose plugin
apt: