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: