refactor: update Docker GPG key retrieval and repository setup in playbook
This commit is contained in:
@@ -20,16 +20,17 @@
|
|||||||
state: present
|
state: present
|
||||||
update_cache: true
|
update_cache: true
|
||||||
|
|
||||||
- name: Add Docker’s official GPG key
|
- name: Download Docker GPG key
|
||||||
ansible.builtin.apt_key:
|
ansible.builtin.get_url:
|
||||||
url: https://download.docker.com/linux/ubuntu/gpg
|
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:
|
ansible.builtin.apt_repository:
|
||||||
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable"
|
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable"
|
||||||
state: present
|
|
||||||
filename: docker
|
filename: docker
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Install Docker Engine and Compose plugin
|
- name: Install Docker Engine and Compose plugin
|
||||||
apt:
|
apt:
|
||||||
|
|||||||
Reference in New Issue
Block a user