Use template to replace Docker apt list entry
This commit is contained in:
parent
af6092576c
commit
b75205f96c
1 changed files with 8 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue