Use template to replace Docker apt list entry

This commit is contained in:
Stefan Haun 2022-07-16 16:39:28 +02:00
parent af6092576c
commit b75205f96c

View file

@ -29,11 +29,15 @@
state: present
- name: add Docker's APT repository
apt_repository:
repo: deb https://download.docker.com/linux/debian buster stable
state: present
ansible.builtin.template:
src: templates/docker.list.j2
dest: /etc/apt/sources.list.d/docker.list
register: apt_repo
- name: Update package cache
ansible.builtin.apt:
update_cache: true
filename: "docker"
when: apt_repo.changed
- name: install Docker
package: