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 state: present
- name: add Docker's APT repository - name: add Docker's APT repository
apt_repository: ansible.builtin.template:
repo: deb https://download.docker.com/linux/debian buster stable src: templates/docker.list.j2
state: present dest: /etc/apt/sources.list.d/docker.list
register: apt_repo
- name: Update package cache
ansible.builtin.apt:
update_cache: true update_cache: true
filename: "docker" when: apt_repo.changed
- name: install Docker - name: install Docker
package: package: