diff --git a/roles/docker_setup/tasks/main.yml b/roles/docker_setup/tasks/main.yml index 2d3a475..43c8614 100644 --- a/roles/docker_setup/tasks/main.yml +++ b/roles/docker_setup/tasks/main.yml @@ -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: