From 2f49a685961638a03cecbc7400b8efbd9fcfb75b Mon Sep 17 00:00:00 2001 From: Ryan Hamilton Date: Sun, 29 Jun 2025 22:45:13 -0500 Subject: [PATCH] refactor: update Docker GPG key retrieval and repository setup in playbook --- playbooks/install-standard-docker.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/playbooks/install-standard-docker.yml b/playbooks/install-standard-docker.yml index c97beb5..9e5a914 100644 --- a/playbooks/install-standard-docker.yml +++ b/playbooks/install-standard-docker.yml @@ -20,16 +20,17 @@ state: present update_cache: true - - name: Add Docker’s 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: