refactor: update Docker GPG key retrieval and repository setup in playbook
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user